@parallelworks/tandem-web 0.142.0 → 0.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +105 -6
- package/_virtual/_virtual_i18n/es/common.js +105 -6
- package/_virtual/_virtual_i18n/ja/common.js +105 -6
- package/_virtual/_virtual_i18n/ko/common.js +105 -6
- package/_virtual/_virtual_i18n/zh/common.js +105 -6
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +2 -0
- package/components/CodeHostSettings.js +25 -25
- package/components/CustomFields.js +349 -0
- package/components/DocProperties.js +8 -2
- package/components/GitHub.js +22 -22
- package/components/IssueBoard.js +48 -43
- package/components/IssueEvent.js +2 -0
- package/components/IssueFilters.js +210 -122
- package/components/IssueImport.js +1 -1
- package/components/IssueRow.js +96 -79
- package/components/IssueTemplates.js +216 -156
- package/components/IssueTypes.js +318 -0
- package/components/NewIssueDialog.js +254 -216
- package/components/SettingsNav.js +40 -35
- package/components/TeamForm.js +49 -35
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +8 -8
- package/components/Updates.js +8 -8
- package/lib/boardMove.js +69 -47
- package/lib/customFields.js +113 -0
- package/lib/issueDisplay.js +27 -12
- package/lib/issueList.js +166 -62
- package/lib/issueTypes.js +50 -0
- package/lib/teamTree.js +24 -0
- package/lib/views.js +13 -11
- package/package.json +1 -1
- package/pages/issues.js +331 -291
- package/routeTree.gen.js +151 -145
- package/routes/_workspace/agents/index2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +433 -370
- package/routes/_workspace/projects/_projectId3.js +213 -201
- package/routes/_workspace/settings/audit-log3.js +2 -0
- package/routes/_workspace/settings/fields.js +6 -0
- package/routes/_workspace/settings/fields2.js +30 -0
- package/routes/_workspace/settings/fields3.js +5 -0
- package/routes/_workspace/settings/groups2.js +74 -74
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +35 -35
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +18 -18
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/slack2.js +8 -8
- package/routes/_workspace/settings/sso2.js +50 -50
- package/routes/_workspace/settings/tokens2.js +15 -15
- package/routes/_workspace/settings/webhooks2.js +42 -42
- package/routes/_workspace/teams/_key/settings2.js +138 -76
- package/routes/_workspace2.js +320 -318
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Link as e } from "../lib/router.js";
|
|
2
2
|
import { githubAccountQuery as t, meQuery as n } from "../api/queries.js";
|
|
3
|
-
import { ChevronDownIcon as r, CommentIcon as i, FolderIcon as a, HistoryIcon as o, KeyIcon as s, LinkIcon as c,
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useQuery as
|
|
3
|
+
import { ChevronDownIcon as r, CommentIcon as i, FolderIcon as a, HistoryIcon as o, KeyIcon as s, LinkIcon as c, ListViewIcon as l, NotificationIcon as u, RepositoryIcon as d, SettingsIcon as f, ShieldIcon as p, TagIcon as m, UserIcon as h, UsersIcon as g, WebhookIcon as _, WorkerIcon as v } from "./icons.js";
|
|
4
|
+
import { useTranslations as y } from "use-intl";
|
|
5
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
6
|
+
import { useQuery as C, useSuspenseQuery as w } from "@tanstack/react-query";
|
|
7
7
|
// src/components/SettingsNav.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let { data: e } =
|
|
8
|
+
var T = "flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground", E = "bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] hover:bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] !text-[var(--theme-sidebar-active-text,var(--theme-app))] font-medium", D = { className: E };
|
|
9
|
+
function O() {
|
|
10
|
+
let { data: e } = w(n), r = y("settingsNav"), b = e?.mode === "platform", { data: x } = C(t);
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
13
|
label: r("account"),
|
|
@@ -15,31 +15,31 @@ function D() {
|
|
|
15
15
|
{
|
|
16
16
|
to: "/$workspace/settings/account",
|
|
17
17
|
label: r("profile"),
|
|
18
|
-
Icon:
|
|
18
|
+
Icon: h
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
to: "/$workspace/settings/notifications",
|
|
22
22
|
label: r("notifications"),
|
|
23
|
-
Icon:
|
|
23
|
+
Icon: u
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
to: "/$workspace/settings/runners",
|
|
27
27
|
label: r("runners"),
|
|
28
|
-
Icon:
|
|
28
|
+
Icon: v
|
|
29
29
|
},
|
|
30
|
-
...
|
|
30
|
+
...x?.enabled ? [{
|
|
31
31
|
to: "/$workspace/settings/connections",
|
|
32
32
|
label: r("connections"),
|
|
33
33
|
Icon: c
|
|
34
34
|
}] : [],
|
|
35
|
-
...
|
|
35
|
+
...b ? [] : [{
|
|
36
36
|
to: "/$workspace/settings/tokens",
|
|
37
37
|
label: r("tokens"),
|
|
38
38
|
Icon: s
|
|
39
39
|
}, {
|
|
40
40
|
to: "/$workspace/settings/sessions",
|
|
41
41
|
label: r("sessions"),
|
|
42
|
-
Icon:
|
|
42
|
+
Icon: p
|
|
43
43
|
}]
|
|
44
44
|
]
|
|
45
45
|
},
|
|
@@ -49,22 +49,22 @@ function D() {
|
|
|
49
49
|
{
|
|
50
50
|
to: "/$workspace/settings",
|
|
51
51
|
label: r("general"),
|
|
52
|
-
Icon:
|
|
52
|
+
Icon: f
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
to: "/$workspace/settings/members",
|
|
56
|
-
label: r(
|
|
57
|
-
Icon:
|
|
56
|
+
label: r(b ? "access" : "members"),
|
|
57
|
+
Icon: g
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
to: "/$workspace/settings/roles",
|
|
61
61
|
label: r("roles"),
|
|
62
|
-
Icon:
|
|
62
|
+
Icon: p
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
to: "/$workspace/settings/groups",
|
|
66
66
|
label: r("groups"),
|
|
67
|
-
Icon:
|
|
67
|
+
Icon: p
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
to: "/$workspace/settings/teams",
|
|
@@ -74,14 +74,19 @@ function D() {
|
|
|
74
74
|
{
|
|
75
75
|
to: "/$workspace/settings/labels",
|
|
76
76
|
label: r("labels"),
|
|
77
|
-
Icon:
|
|
77
|
+
Icon: m
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
to: "/$workspace/settings/fields",
|
|
81
|
+
label: r("fields"),
|
|
82
|
+
Icon: l
|
|
78
83
|
},
|
|
79
84
|
{
|
|
80
85
|
to: "/$workspace/settings/audit-log",
|
|
81
86
|
label: r("auditLog"),
|
|
82
87
|
Icon: o
|
|
83
88
|
},
|
|
84
|
-
...
|
|
89
|
+
...b ? [] : [{
|
|
85
90
|
to: "/$workspace/settings/sso",
|
|
86
91
|
label: r("sso"),
|
|
87
92
|
Icon: s
|
|
@@ -94,7 +99,7 @@ function D() {
|
|
|
94
99
|
{
|
|
95
100
|
to: "/$workspace/settings/github",
|
|
96
101
|
label: r("github"),
|
|
97
|
-
Icon:
|
|
102
|
+
Icon: d
|
|
98
103
|
},
|
|
99
104
|
{
|
|
100
105
|
to: "/$workspace/settings/slack",
|
|
@@ -104,37 +109,37 @@ function D() {
|
|
|
104
109
|
{
|
|
105
110
|
to: "/$workspace/settings/webhooks",
|
|
106
111
|
label: r("webhooks"),
|
|
107
|
-
Icon:
|
|
112
|
+
Icon: _
|
|
108
113
|
}
|
|
109
114
|
]
|
|
110
115
|
}
|
|
111
116
|
];
|
|
112
117
|
}
|
|
113
|
-
function
|
|
114
|
-
let n =
|
|
115
|
-
return /* @__PURE__ */
|
|
118
|
+
function k({ workspace: t }) {
|
|
119
|
+
let n = y("settingsNav"), i = O();
|
|
120
|
+
return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S(e, {
|
|
116
121
|
to: "/$workspace/issues",
|
|
117
122
|
params: { workspace: t },
|
|
118
123
|
className: "flex h-9 items-center gap-2 rounded-md px-2 text-sm font-semibold hover:bg-muted",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
-
}), /* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ x(r, { className: "size-4 rotate-90 text-muted-foreground" }), n("label")]
|
|
125
|
+
}), /* @__PURE__ */ x("nav", {
|
|
121
126
|
"aria-label": n("label"),
|
|
122
127
|
className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
|
|
123
|
-
children: i.map((n) => /* @__PURE__ */
|
|
128
|
+
children: i.map((n) => /* @__PURE__ */ S("div", {
|
|
124
129
|
className: "mt-4 first:mt-0",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ x("p", {
|
|
126
131
|
className: "flex h-6 items-center px-2 text-xs font-medium text-muted-foreground",
|
|
127
132
|
children: n.label
|
|
128
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ x("div", {
|
|
129
134
|
className: "mt-1 space-y-0.5",
|
|
130
|
-
children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */
|
|
135
|
+
children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */ S(e, {
|
|
131
136
|
to: n,
|
|
132
137
|
params: { workspace: t },
|
|
133
|
-
className:
|
|
134
|
-
activeProps:
|
|
138
|
+
className: T,
|
|
139
|
+
activeProps: D,
|
|
135
140
|
activeOptions: { exact: !0 },
|
|
136
141
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ x(i, { className: "size-4" }),
|
|
138
143
|
" ",
|
|
139
144
|
r
|
|
140
145
|
]
|
|
@@ -143,4 +148,4 @@ function O({ workspace: t }) {
|
|
|
143
148
|
}, n.label))
|
|
144
149
|
})] });
|
|
145
150
|
}
|
|
146
|
-
export {
|
|
151
|
+
export { k as SettingsNav, T as navItem, E as navOn, O as useSettingsPages };
|
package/components/TeamForm.js
CHANGED
|
@@ -2,73 +2,87 @@ import { api as e, unwrap as t } from "../api/client.js";
|
|
|
2
2
|
import { useNavigate as n } from "../lib/router.js";
|
|
3
3
|
import { teamsQuery as r } from "../api/queries.js";
|
|
4
4
|
import { useFormError as i } from "./settings.js";
|
|
5
|
-
import { Button as a, ErrorText as o, Input as s, Modal as c } from "@parallelworks/ui";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { useTranslations as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { useMutation as
|
|
5
|
+
import { Button as a, ErrorText as o, Input as s, Modal as c, Select as l } from "@parallelworks/ui";
|
|
6
|
+
import { useEffect as u, useState as d } from "react";
|
|
7
|
+
import { useTranslations as f } from "use-intl";
|
|
8
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { useMutation as g, useQuery as _, useQueryClient as v } from "@tanstack/react-query";
|
|
10
10
|
// src/components/TeamForm.tsx
|
|
11
|
-
function
|
|
12
|
-
let
|
|
11
|
+
function y({ workspace: n, onCreated: c, onPendingChange: y, autoFocus: b }) {
|
|
12
|
+
let x = v(), [S, C] = d(""), [w, T] = d(""), [E, D] = d(""), { data: O = [] } = _(r(n)), k = f("settings"), A = f("teamParent"), j = i(), M = S.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 3), N = g({
|
|
13
13
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams", {
|
|
14
14
|
params: { path: { workspace: n } },
|
|
15
15
|
body: {
|
|
16
|
-
name:
|
|
17
|
-
key:
|
|
16
|
+
name: S,
|
|
17
|
+
key: w || M,
|
|
18
|
+
...E && { parent: E }
|
|
18
19
|
}
|
|
19
20
|
})),
|
|
20
|
-
onMutate:
|
|
21
|
+
onMutate: j.clear,
|
|
21
22
|
onSuccess: async (e) => {
|
|
22
|
-
|
|
23
|
+
C(""), T(""), await x.invalidateQueries({ queryKey: r(n).queryKey }), c?.(e);
|
|
23
24
|
},
|
|
24
|
-
onError:
|
|
25
|
+
onError: j.set
|
|
25
26
|
});
|
|
26
|
-
return
|
|
27
|
+
return u(() => y?.(N.isPending), [N.isPending, y]), /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("form", {
|
|
27
28
|
className: "flex gap-2",
|
|
28
29
|
onSubmit: (e) => {
|
|
29
|
-
e.preventDefault(),
|
|
30
|
+
e.preventDefault(), N.mutate();
|
|
30
31
|
},
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ m(s, {
|
|
33
34
|
required: !0,
|
|
34
|
-
autoFocus:
|
|
35
|
-
placeholder:
|
|
36
|
-
value:
|
|
37
|
-
onChange: (e) =>
|
|
38
|
-
"aria-label":
|
|
35
|
+
autoFocus: b,
|
|
36
|
+
placeholder: k("teamName"),
|
|
37
|
+
value: S,
|
|
38
|
+
onChange: (e) => C(e.target.value),
|
|
39
|
+
"aria-label": k("teamName"),
|
|
39
40
|
className: "min-w-0 flex-1"
|
|
40
41
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
placeholder:
|
|
43
|
-
value:
|
|
44
|
-
onChange: (e) =>
|
|
45
|
-
"aria-label":
|
|
42
|
+
/* @__PURE__ */ m(s, {
|
|
43
|
+
placeholder: M || k("keyPlaceholder"),
|
|
44
|
+
value: w,
|
|
45
|
+
onChange: (e) => T(e.target.value.toUpperCase()),
|
|
46
|
+
"aria-label": k("key"),
|
|
46
47
|
maxLength: 10,
|
|
47
48
|
className: "w-24"
|
|
48
49
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
O.some((e) => !e.archivedAt) && /* @__PURE__ */ m(l, {
|
|
51
|
+
value: E,
|
|
52
|
+
items: [{
|
|
53
|
+
value: "",
|
|
54
|
+
label: A("none")
|
|
55
|
+
}, ...O.filter((e) => !e.archivedAt).map((e) => ({
|
|
56
|
+
value: e.key,
|
|
57
|
+
label: e.name
|
|
58
|
+
}))],
|
|
59
|
+
onValueChange: D,
|
|
60
|
+
"aria-label": A("parent"),
|
|
61
|
+
width: "content"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ m(a, {
|
|
50
64
|
type: "submit",
|
|
51
65
|
variant: "primary",
|
|
52
|
-
loading:
|
|
53
|
-
children:
|
|
66
|
+
loading: N.isPending,
|
|
67
|
+
children: k("createTeam")
|
|
54
68
|
})
|
|
55
69
|
]
|
|
56
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ m(o, {
|
|
57
71
|
size: "md",
|
|
58
72
|
className: "mt-2",
|
|
59
|
-
children:
|
|
73
|
+
children: j.error
|
|
60
74
|
})] });
|
|
61
75
|
}
|
|
62
|
-
function
|
|
63
|
-
let r =
|
|
64
|
-
return /* @__PURE__ */
|
|
76
|
+
function b({ workspace: e, onClose: t }) {
|
|
77
|
+
let r = f("teamForm"), i = n(), [a, o] = d(!1);
|
|
78
|
+
return /* @__PURE__ */ m(c, {
|
|
65
79
|
open: !0,
|
|
66
80
|
onClose: t,
|
|
67
81
|
dismissible: !a,
|
|
68
82
|
size: "lg",
|
|
69
83
|
title: r("title"),
|
|
70
84
|
description: r("description"),
|
|
71
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ m(y, {
|
|
72
86
|
workspace: e,
|
|
73
87
|
autoFocus: !0,
|
|
74
88
|
onPendingChange: o,
|
|
@@ -84,4 +98,4 @@ function v({ workspace: e, onClose: t }) {
|
|
|
84
98
|
})
|
|
85
99
|
});
|
|
86
100
|
}
|
|
87
|
-
export {
|
|
101
|
+
export { b as CreateTeamDialog, y as TeamForm };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { Link as n } from "../lib/router.js";
|
|
3
|
-
import { availableRepositoriesQuery as r, codeHostQuery as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { externalUrl as
|
|
9
|
-
import { RepositoryIssueSync as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { useState as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useMutation as
|
|
3
|
+
import { availableRepositoriesQuery as r, codeHostQuery as i, githubSettingsQuery as a, repositoriesQuery as o, teamsQuery as s } from "../api/queries.js";
|
|
4
|
+
import { useConfirm as c } from "../lib/confirm.js";
|
|
5
|
+
import { AddIcon as l, RepositoryIcon as u } from "./icons.js";
|
|
6
|
+
import { copyItem as d } from "../lib/menus.js";
|
|
7
|
+
import { useFormError as f } from "./settings.js";
|
|
8
|
+
import { externalUrl as p } from "../lib/externalUrl.js";
|
|
9
|
+
import { RepositoryIssueSync as m } from "./GitHub.js";
|
|
10
|
+
import { Button as h, Card as g, Checkbox as _, Combobox as ee, ErrorText as te, InfoTip as v, Section as y, Tooltip as b, menuDivider as x, useOpenMenu as S } from "@parallelworks/ui";
|
|
11
|
+
import { useState as C } from "react";
|
|
12
|
+
import { useTranslations as w } from "use-intl";
|
|
13
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
14
|
+
import { useMutation as D, useQuery as O, useQueryClient as ne, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
15
15
|
// src/components/TeamRepositories.tsx
|
|
16
16
|
var A = "cursor-help underline decoration-dotted underline-offset-2";
|
|
17
17
|
function j({ workspace: j, team: M, isAdmin: N }) {
|
|
18
|
-
let P =
|
|
19
|
-
...
|
|
18
|
+
let P = w("code"), F = w("common"), { data: I } = k(i(j)), { data: L } = k(o(j, M.key)), { data: R } = O({
|
|
19
|
+
...a(j),
|
|
20
20
|
enabled: N
|
|
21
|
-
}), z =
|
|
21
|
+
}), z = w("github"), [B, V] = C(!1), H = I.connections.some((e) => !e.removed), U = O({
|
|
22
22
|
...r(j, M.key),
|
|
23
23
|
enabled: B && N && H
|
|
24
|
-
}), W =
|
|
24
|
+
}), W = ne(), G = S(), K = f(), { confirm: q, dialog: J } = c(), Y = () => W.invalidateQueries({ queryKey: o(j, M.key).queryKey }), X = (e) => {
|
|
25
25
|
let [t = "", n = ""] = e.split("/");
|
|
26
26
|
return { path: {
|
|
27
27
|
workspace: j,
|
|
@@ -29,7 +29,7 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
29
29
|
owner: t,
|
|
30
30
|
name: n
|
|
31
31
|
} };
|
|
32
|
-
}, Z =
|
|
32
|
+
}, Z = D({
|
|
33
33
|
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/repositories/{owner}/{name}", {
|
|
34
34
|
params: X(n.repository),
|
|
35
35
|
body: { default: n.makeDefault }
|
|
@@ -37,11 +37,11 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
37
37
|
onMutate: K.clear,
|
|
38
38
|
onError: K.set,
|
|
39
39
|
onSettled: Y
|
|
40
|
-
}), re =
|
|
40
|
+
}), re = D({
|
|
41
41
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/repositories/{owner}/{name}", { params: X(n) })),
|
|
42
42
|
onMutate: K.clear,
|
|
43
43
|
onSettled: Y
|
|
44
|
-
}), Q =
|
|
44
|
+
}), Q = D({
|
|
45
45
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
46
46
|
params: { path: {
|
|
47
47
|
workspace: j,
|
|
@@ -51,40 +51,40 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
51
51
|
})),
|
|
52
52
|
onMutate: K.clear,
|
|
53
53
|
onError: K.set,
|
|
54
|
-
onSettled: () => W.invalidateQueries({ queryKey:
|
|
54
|
+
onSettled: () => W.invalidateQueries({ queryKey: s(j).queryKey })
|
|
55
55
|
}), $ = (e) => q({
|
|
56
56
|
title: P("unlinkConfirm", { repository: e }),
|
|
57
57
|
description: P("unlinkDetail"),
|
|
58
58
|
confirmLabel: P("unlink"),
|
|
59
59
|
onConfirm: () => re.mutateAsync(e)
|
|
60
60
|
});
|
|
61
|
-
if (I.provider === "") return /* @__PURE__ */
|
|
61
|
+
if (I.provider === "") return /* @__PURE__ */ T(y, {
|
|
62
62
|
variant: "bare",
|
|
63
63
|
headingLevel: 2,
|
|
64
64
|
collapsible: !1,
|
|
65
65
|
title: P("repositories"),
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ T("p", {
|
|
67
67
|
className: "text-sm text-muted-foreground",
|
|
68
68
|
children: P("notConfigured")
|
|
69
69
|
})
|
|
70
70
|
});
|
|
71
71
|
let ie = new Set(L.map((e) => `${e.owner}/${e.name}`.toLowerCase()));
|
|
72
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ E(y, {
|
|
73
73
|
variant: "bare",
|
|
74
74
|
headingLevel: 2,
|
|
75
75
|
collapsible: !1,
|
|
76
76
|
title: P("repositories"),
|
|
77
77
|
description: P("repositoriesDescription"),
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ E(g, {
|
|
80
80
|
size: "fill",
|
|
81
81
|
padding: "none",
|
|
82
82
|
divided: !0,
|
|
83
83
|
interactive: !1,
|
|
84
|
-
render: /* @__PURE__ */
|
|
84
|
+
render: /* @__PURE__ */ T("ul", {}),
|
|
85
85
|
children: [L.map((e) => {
|
|
86
|
-
let t = `${e.owner}/${e.name}`, n =
|
|
87
|
-
return /* @__PURE__ */
|
|
86
|
+
let t = `${e.owner}/${e.name}`, n = p(e.url), r = R?.enabled && R.repositories.find((e) => e.team === M.key && e.fullName.toLowerCase() === t.toLowerCase());
|
|
87
|
+
return /* @__PURE__ */ E("li", {
|
|
88
88
|
onContextMenu: (r) => G(r, [
|
|
89
89
|
n ? {
|
|
90
90
|
label: P("openOnHost"),
|
|
@@ -95,7 +95,7 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
95
95
|
disabled: !0,
|
|
96
96
|
onClick: () => {}
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
d(F("copyName"), t),
|
|
99
99
|
...N ? [
|
|
100
100
|
x,
|
|
101
101
|
{
|
|
@@ -114,29 +114,29 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
114
114
|
] : []
|
|
115
115
|
]),
|
|
116
116
|
className: "px-3 py-2 text-sm",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ E("div", {
|
|
118
118
|
className: "flex items-center gap-3",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ T(u, { className: "size-4 text-muted-foreground" }),
|
|
121
|
+
/* @__PURE__ */ T("a", {
|
|
122
122
|
href: n,
|
|
123
123
|
target: "_blank",
|
|
124
124
|
rel: "noopener noreferrer",
|
|
125
125
|
className: "min-w-0 truncate hover:underline",
|
|
126
126
|
children: t
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ T("span", {
|
|
129
129
|
className: "flex-1 text-xs text-muted-foreground",
|
|
130
|
-
children: e.default ? /* @__PURE__ */
|
|
130
|
+
children: e.default ? /* @__PURE__ */ T(v, {
|
|
131
131
|
text: P("defaultHint"),
|
|
132
132
|
className: A,
|
|
133
133
|
children: P("defaultRepository")
|
|
134
134
|
}) : e.private && P("private")
|
|
135
135
|
}),
|
|
136
|
-
N && !e.default && /* @__PURE__ */
|
|
136
|
+
N && !e.default && /* @__PURE__ */ T(b, {
|
|
137
137
|
content: P("makeDefaultHint"),
|
|
138
138
|
describesAnchor: !0,
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ T("button", {
|
|
140
140
|
type: "button",
|
|
141
141
|
onClick: () => Z.mutate({
|
|
142
142
|
repository: t,
|
|
@@ -146,22 +146,22 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
146
146
|
children: P("makeDefault")
|
|
147
147
|
})
|
|
148
148
|
}),
|
|
149
|
-
N && /* @__PURE__ */
|
|
149
|
+
N && /* @__PURE__ */ T("button", {
|
|
150
150
|
type: "button",
|
|
151
151
|
onClick: () => $(t),
|
|
152
152
|
className: "text-xs text-muted-foreground hover:text-danger",
|
|
153
153
|
children: P("unlink")
|
|
154
154
|
})
|
|
155
155
|
]
|
|
156
|
-
}), r && /* @__PURE__ */
|
|
156
|
+
}), r && /* @__PURE__ */ T("div", {
|
|
157
157
|
className: "mt-2 pl-7",
|
|
158
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ T(m, {
|
|
159
159
|
workspace: j,
|
|
160
160
|
repository: r,
|
|
161
161
|
teamName: M.name,
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ T("span", {
|
|
163
163
|
className: "flex-1 text-xs text-muted-foreground",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ T(v, {
|
|
165
165
|
text: z("issueSyncHint"),
|
|
166
166
|
className: A,
|
|
167
167
|
children: z("issueSync")
|
|
@@ -170,30 +170,30 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
170
170
|
})
|
|
171
171
|
})]
|
|
172
172
|
}, t);
|
|
173
|
-
}), L.length === 0 && /* @__PURE__ */
|
|
173
|
+
}), L.length === 0 && /* @__PURE__ */ T("li", {
|
|
174
174
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
175
175
|
children: P("noRepositories")
|
|
176
176
|
})]
|
|
177
177
|
}),
|
|
178
|
-
N && !H && /* @__PURE__ */
|
|
178
|
+
N && !H && /* @__PURE__ */ T("p", {
|
|
179
179
|
className: "mt-3 text-sm text-muted-foreground",
|
|
180
|
-
children: P.rich("connectFirst", { settings: (e) => /* @__PURE__ */
|
|
180
|
+
children: P.rich("connectFirst", { settings: (e) => /* @__PURE__ */ T(n, {
|
|
181
181
|
to: "/$workspace/settings/github",
|
|
182
182
|
params: { workspace: j },
|
|
183
183
|
className: "underline",
|
|
184
184
|
children: e
|
|
185
185
|
}) })
|
|
186
186
|
}),
|
|
187
|
-
N && H && /* @__PURE__ */
|
|
187
|
+
N && H && /* @__PURE__ */ T("div", {
|
|
188
188
|
className: "mt-3",
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ T(ee, {
|
|
190
190
|
open: B,
|
|
191
191
|
onOpenChange: V,
|
|
192
192
|
items: (U.data ?? []).filter((e) => !ie.has(`${e.owner}/${e.name}`.toLowerCase())).map((e) => ({
|
|
193
193
|
value: `${e.owner}/${e.name}`,
|
|
194
194
|
label: `${e.owner}/${e.name}`,
|
|
195
195
|
...e.private && { hint: P("private") },
|
|
196
|
-
icon: /* @__PURE__ */
|
|
196
|
+
icon: /* @__PURE__ */ T(u, { className: "size-3.5 text-muted-foreground" })
|
|
197
197
|
})),
|
|
198
198
|
value: null,
|
|
199
199
|
onValueChange: (e) => e !== null && Z.mutate({
|
|
@@ -203,25 +203,25 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
203
203
|
placeholder: P("linkPlaceholder"),
|
|
204
204
|
"aria-label": P("linkRepository"),
|
|
205
205
|
loading: U.isPending,
|
|
206
|
-
trigger: /* @__PURE__ */
|
|
206
|
+
trigger: /* @__PURE__ */ E(h, {
|
|
207
207
|
type: "button",
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ T(l, { className: "size-3.5" }),
|
|
210
210
|
" ",
|
|
211
211
|
P("linkRepository")
|
|
212
212
|
]
|
|
213
213
|
})
|
|
214
214
|
})
|
|
215
215
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ E("label", {
|
|
217
217
|
className: "mt-4 flex w-fit items-center gap-2 text-sm",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ T(_, {
|
|
219
219
|
checked: M.closeIssuesOnMerge,
|
|
220
220
|
disabled: !N || Q.isPending,
|
|
221
221
|
onCheckedChange: (e) => Q.mutate(e)
|
|
222
222
|
}), P("closeOnMerge")]
|
|
223
223
|
}),
|
|
224
|
-
(K.error || U.isError) && /* @__PURE__ */
|
|
224
|
+
(K.error || U.isError) && /* @__PURE__ */ T(te, {
|
|
225
225
|
size: "md",
|
|
226
226
|
className: "mt-2",
|
|
227
227
|
children: K.error ?? P("unavailable")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { statusesQuery as n } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useConfirm as r } from "../lib/confirm.js";
|
|
4
|
+
import { ChevronDownIcon as i, StatusIcon as a } from "./icons.js";
|
|
5
|
+
import { useFormError as o } from "./settings.js";
|
|
6
6
|
import { Button as s, Card as c, ErrorText as l, IconButton as u, Input as d, Section as f, Select as p } from "@parallelworks/ui";
|
|
7
7
|
import { useState as m } from "react";
|
|
8
8
|
import { useTranslations as h } from "use-intl";
|
|
@@ -17,7 +17,7 @@ var x = [
|
|
|
17
17
|
"canceled"
|
|
18
18
|
], S = (e) => e === "completed" || e === "canceled";
|
|
19
19
|
function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
20
|
-
let { data: E } = b(n(C, w)), D = h("workflow"), O = h("issues.groups"), k = h("common"), A = y(), j =
|
|
20
|
+
let { data: E } = b(n(C, w)), D = h("workflow"), O = h("issues.groups"), k = h("common"), A = y(), j = o(), [M, N] = m(null), [P, F] = m(""), [I, L] = m(""), [R, z] = m("started"), B = (e) => ({ path: {
|
|
21
21
|
workspace: C,
|
|
22
22
|
key: w,
|
|
23
23
|
statusId: e
|
|
@@ -58,7 +58,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
58
58
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/statuses/{statusId}", { params: B(n) })),
|
|
59
59
|
onMutate: j.clear,
|
|
60
60
|
onSettled: V
|
|
61
|
-
}), { confirm: G, dialog: K } =
|
|
61
|
+
}), { confirm: G, dialog: K } = r(), q = (e) => {
|
|
62
62
|
let t = E.filter((t) => t.id !== e.id);
|
|
63
63
|
return t.find((t) => t.category === e.category) ?? t.find((t) => S(t.category) === S(e.category));
|
|
64
64
|
}, J = (e) => G({
|
|
@@ -90,7 +90,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
90
90
|
children: t.map((e, n) => /* @__PURE__ */ _("li", {
|
|
91
91
|
className: "flex items-center gap-3 px-3 py-2 text-sm",
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */ g(
|
|
93
|
+
/* @__PURE__ */ g(a, { category: e.category }),
|
|
94
94
|
M === e.id ? /* @__PURE__ */ _("form", {
|
|
95
95
|
className: "flex min-w-0 flex-1 gap-2",
|
|
96
96
|
onSubmit: (t) => {
|
|
@@ -132,7 +132,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
132
132
|
/* @__PURE__ */ g(u, {
|
|
133
133
|
variant: "ghost",
|
|
134
134
|
size: "sm",
|
|
135
|
-
icon: /* @__PURE__ */ g(
|
|
135
|
+
icon: /* @__PURE__ */ g(i, { className: "rotate-180" }),
|
|
136
136
|
label: D("moveUp", { name: e.name }),
|
|
137
137
|
disabled: n === 0 || U.isPending,
|
|
138
138
|
onClick: () => U.mutate({
|
|
@@ -143,7 +143,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
143
143
|
/* @__PURE__ */ g(u, {
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
size: "sm",
|
|
146
|
-
icon: /* @__PURE__ */ g(
|
|
146
|
+
icon: /* @__PURE__ */ g(i, {}),
|
|
147
147
|
label: D("moveDown", { name: e.name }),
|
|
148
148
|
disabled: n === t.length - 1 || U.isPending,
|
|
149
149
|
onClick: () => U.mutate({
|