@parallelworks/tandem-web 0.154.0 → 0.155.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 +12 -1
- package/_virtual/_virtual_i18n/es/common.js +12 -1
- package/_virtual/_virtual_i18n/ja/common.js +12 -1
- package/_virtual/_virtual_i18n/ko/common.js +12 -1
- package/_virtual/_virtual_i18n/zh/common.js +12 -1
- package/api/queries.js +90 -80
- package/components/AgentWork.js +142 -137
- package/components/CodeHostSettings.js +4 -1
- package/components/GitHub.js +24 -12
- package/components/IssueCode.js +82 -75
- package/components/SettingsNav.js +74 -65
- package/components/TeamRepositories.js +58 -55
- package/components/icons.js +33 -29
- package/package.json +1 -1
- package/routeTree.gen.js +197 -191
- package/routes/_workspace/issues/_identifier2.js +37 -37
- package/routes/_workspace/settings/gitlab.js +6 -0
- package/routes/_workspace/settings/gitlab2.js +54 -0
- package/routes/_workspace/settings/gitlab3.js +4 -0
- package/routes/login2.js +5 -5
|
@@ -92,7 +92,10 @@ function k({ workspace: n, isAdmin: i, result: c }) {
|
|
|
92
92
|
children: m(`result.${c}`)
|
|
93
93
|
}),
|
|
94
94
|
/* @__PURE__ */ C(u, {
|
|
95
|
-
icon: /* @__PURE__ */ C(o, {
|
|
95
|
+
icon: /* @__PURE__ */ C(o, {
|
|
96
|
+
provider: h.provider,
|
|
97
|
+
className: "size-7"
|
|
98
|
+
}),
|
|
96
99
|
name: m("provider"),
|
|
97
100
|
status: h.connections.length > 0 ? m("linkedCount", { count: h.connections.length }) : m("description"),
|
|
98
101
|
error: _.error,
|
package/components/GitHub.js
CHANGED
|
@@ -375,7 +375,7 @@ function G({ source: e, link: t }) {
|
|
|
375
375
|
className: "font-medium",
|
|
376
376
|
children: t ? n.rich("sharedThread", {
|
|
377
377
|
source: e,
|
|
378
|
-
name:
|
|
378
|
+
name: Y(t.url),
|
|
379
379
|
link: (e) => /* @__PURE__ */ D("a", {
|
|
380
380
|
href: t.url,
|
|
381
381
|
target: "_blank",
|
|
@@ -393,37 +393,49 @@ function G({ source: e, link: t }) {
|
|
|
393
393
|
function K({ links: e }) {
|
|
394
394
|
return /* @__PURE__ */ D("ul", {
|
|
395
395
|
className: "space-y-1 px-2 text-sm",
|
|
396
|
-
children: e.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */
|
|
396
|
+
children: e.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ O("a", {
|
|
397
397
|
href: e.url,
|
|
398
398
|
target: "_blank",
|
|
399
399
|
rel: "noreferrer",
|
|
400
|
-
className: "
|
|
401
|
-
children:
|
|
400
|
+
className: "flex min-w-0 items-center gap-1.5 text-muted-foreground hover:text-foreground hover:underline",
|
|
401
|
+
children: [q.has(e.connector) && /* @__PURE__ */ D(s, {
|
|
402
|
+
provider: e.connector,
|
|
403
|
+
className: "size-3.5"
|
|
404
|
+
}), /* @__PURE__ */ D("span", {
|
|
405
|
+
className: "truncate",
|
|
406
|
+
children: Y(e.url)
|
|
407
|
+
})]
|
|
402
408
|
}) }, `${e.connector}:${e.externalId}`))
|
|
403
409
|
});
|
|
404
410
|
}
|
|
405
|
-
|
|
411
|
+
var q = /* @__PURE__ */ new Set(["github", "gitlab"]);
|
|
412
|
+
function J({ links: e }) {
|
|
406
413
|
let t = T("code");
|
|
407
|
-
return e.filter((e) => e.connector
|
|
414
|
+
return e.filter((e) => q.has(e.connector)).map((e) => /* @__PURE__ */ D(y, {
|
|
408
415
|
content: t("openOnHost"),
|
|
409
416
|
children: /* @__PURE__ */ O("a", {
|
|
410
417
|
href: e.url,
|
|
411
418
|
target: "_blank",
|
|
412
419
|
rel: "noreferrer",
|
|
413
420
|
className: "inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md border border-border px-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
414
|
-
children: [/* @__PURE__ */ D(s, {
|
|
421
|
+
children: [/* @__PURE__ */ D(s, {
|
|
422
|
+
provider: e.connector,
|
|
423
|
+
className: "size-3.5"
|
|
424
|
+
}), /* @__PURE__ */ D("span", {
|
|
415
425
|
className: "truncate",
|
|
416
|
-
children:
|
|
426
|
+
children: Y(e.url)
|
|
417
427
|
})]
|
|
418
428
|
})
|
|
419
429
|
}, e.externalId));
|
|
420
430
|
}
|
|
421
|
-
function
|
|
431
|
+
function Y(e) {
|
|
422
432
|
try {
|
|
423
|
-
let t = new URL(e), n = t.pathname.match(/^\/(
|
|
424
|
-
|
|
433
|
+
let t = new URL(e), n = t.pathname.match(/^\/(.+?)\/-\/(issues|merge_requests)\/(\d+)/);
|
|
434
|
+
if (n) return `${n[1]}${n[2] === "issues" ? "#" : "!"}${n[3]}`;
|
|
435
|
+
let r = t.pathname.match(/^\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
436
|
+
return r ? `${r[1]}#${r[2]}` : `${t.host}${t.pathname}`;
|
|
425
437
|
} catch {
|
|
426
438
|
return e;
|
|
427
439
|
}
|
|
428
440
|
}
|
|
429
|
-
export { R as GitHubAccount, B as GitHubSettings,
|
|
441
|
+
export { R as GitHubAccount, B as GitHubSettings, J as IssueLinkChips, K as IssueLinks, U as RepositoryIssueSync, G as SharedThreadHeader, Y as linkName };
|
package/components/IssueCode.js
CHANGED
|
@@ -3,60 +3,63 @@ import { branchName as n } from "../lib/branch.js";
|
|
|
3
3
|
import { branchesQuery as r, pullRequestsQuery as i, repositoriesQuery as a } from "../api/queries.js";
|
|
4
4
|
import { copyItem as o } from "../lib/menus.js";
|
|
5
5
|
import { externalUrl as s } from "../lib/externalUrl.js";
|
|
6
|
-
import { BranchIcon as c, CloseIcon as l,
|
|
7
|
-
import { useCan as
|
|
8
|
-
import { Card as
|
|
9
|
-
import { useTranslations as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useMutation as
|
|
6
|
+
import { BranchIcon as c, CloseIcon as l, CodeHostIcon as u, PullRequestIcon as d } from "./icons.js";
|
|
7
|
+
import { useCan as f } from "../lib/roles.js";
|
|
8
|
+
import { Card as p, CopyButton as m, IconButton as h, useOpenMenu as g } from "@parallelworks/ui";
|
|
9
|
+
import { useTranslations as _ } from "use-intl";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { useMutation as b, useQuery as x, useQueryClient as S, useSuspenseQuery as C } from "@tanstack/react-query";
|
|
12
12
|
// src/components/IssueCode.tsx
|
|
13
|
-
var
|
|
13
|
+
var w = {
|
|
14
14
|
open: "text-success",
|
|
15
15
|
draft: "text-muted-foreground",
|
|
16
16
|
merged: "text-primary",
|
|
17
17
|
closed: "text-danger"
|
|
18
|
-
},
|
|
18
|
+
}, T = {
|
|
19
19
|
pending: "text-warning",
|
|
20
20
|
passing: "text-success",
|
|
21
21
|
failing: "text-danger"
|
|
22
|
-
},
|
|
23
|
-
function
|
|
24
|
-
|
|
22
|
+
}, E = (e) => e.state === "open" && e.draft ? "draft" : e.state;
|
|
23
|
+
function D(e) {
|
|
24
|
+
return `${e.provider === "gitlab" ? "!" : "#"}${e.number}`;
|
|
25
|
+
}
|
|
26
|
+
function O({ workspace: O, identifier: k, title: A }) {
|
|
27
|
+
let j = _("code"), M = _("common"), { data: N } = C(i(O, k)), { data: P } = C(r(O, k)), F = g(), I = new Set(N.map((e) => `${e.repository} ${e.headRef}`)), L = P.filter((e) => !I.has(`${e.repository} ${e.name}`)), R = k.slice(0, k.lastIndexOf("-")), { data: z = [] } = x(a(O, R)), B = f(O, "edit_issues"), V = S(), H = b({
|
|
25
28
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/pull-requests/{pullRequestId}", { params: { path: {
|
|
26
|
-
workspace:
|
|
27
|
-
identifier:
|
|
29
|
+
workspace: O,
|
|
30
|
+
identifier: k,
|
|
28
31
|
pullRequestId: n
|
|
29
32
|
} } })),
|
|
30
33
|
onSettled: () => {
|
|
31
|
-
|
|
34
|
+
V.invalidateQueries({ queryKey: i(O, k).queryKey }), V.invalidateQueries({ queryKey: r(O, k).queryKey });
|
|
32
35
|
}
|
|
33
36
|
});
|
|
34
|
-
if (
|
|
35
|
-
if (
|
|
36
|
-
let e = n(
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
if (N.length === 0 && L.length === 0) {
|
|
38
|
+
if (z.length === 0) return null;
|
|
39
|
+
let e = n(k, A);
|
|
40
|
+
return /* @__PURE__ */ y("section", {
|
|
38
41
|
className: "mt-6",
|
|
39
|
-
"aria-label":
|
|
40
|
-
children: [/* @__PURE__ */
|
|
42
|
+
"aria-label": j("pullRequests"),
|
|
43
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
41
44
|
className: "text-xs font-medium text-muted-foreground",
|
|
42
|
-
children:
|
|
43
|
-
}), /* @__PURE__ */
|
|
45
|
+
children: j("pullRequests")
|
|
46
|
+
}), /* @__PURE__ */ y("div", {
|
|
44
47
|
className: "mt-1 flex items-start gap-3 rounded-xl border border-dashed border-border px-3 py-2",
|
|
45
48
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ v(c, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }),
|
|
50
|
+
/* @__PURE__ */ y("div", {
|
|
48
51
|
className: "min-w-0 flex-1",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ v("p", {
|
|
50
53
|
className: "text-sm text-muted-foreground",
|
|
51
|
-
children:
|
|
52
|
-
}), /* @__PURE__ */
|
|
54
|
+
children: j("linkByBranch")
|
|
55
|
+
}), /* @__PURE__ */ v("code", {
|
|
53
56
|
className: "mt-1 block truncate font-mono text-xs",
|
|
54
57
|
children: e
|
|
55
58
|
})]
|
|
56
59
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ v(m, {
|
|
58
61
|
text: e,
|
|
59
|
-
label:
|
|
62
|
+
label: j("branchName"),
|
|
60
63
|
size: "sm",
|
|
61
64
|
variant: "ghost"
|
|
62
65
|
})
|
|
@@ -64,105 +67,109 @@ function E({ workspace: E, identifier: D, title: O }) {
|
|
|
64
67
|
})]
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
|
-
let
|
|
68
|
-
label:
|
|
70
|
+
let U = (e) => e ? {
|
|
71
|
+
label: j("openOnHost"),
|
|
69
72
|
href: e,
|
|
70
73
|
target: "_blank"
|
|
71
74
|
} : {
|
|
72
|
-
label:
|
|
75
|
+
label: j("openOnHost"),
|
|
73
76
|
disabled: !0,
|
|
74
77
|
onClick: () => {}
|
|
75
78
|
};
|
|
76
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ y("section", {
|
|
77
80
|
className: "mt-6",
|
|
78
|
-
"aria-label":
|
|
79
|
-
children: [/* @__PURE__ */
|
|
81
|
+
"aria-label": j("pullRequests"),
|
|
82
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
80
83
|
className: "text-xs font-medium text-muted-foreground",
|
|
81
|
-
children:
|
|
82
|
-
}), /* @__PURE__ */
|
|
84
|
+
children: j("pullRequests")
|
|
85
|
+
}), /* @__PURE__ */ y(p, {
|
|
83
86
|
size: "fill",
|
|
84
87
|
padding: "none",
|
|
85
88
|
divided: !0,
|
|
86
89
|
interactive: !1,
|
|
87
|
-
render: /* @__PURE__ */
|
|
90
|
+
render: /* @__PURE__ */ v("ul", {}),
|
|
88
91
|
className: "mt-1",
|
|
89
|
-
children: [
|
|
90
|
-
let t =
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
+
children: [N.map((e) => {
|
|
93
|
+
let t = E(e), n = s(e.url);
|
|
94
|
+
return /* @__PURE__ */ y("li", {
|
|
92
95
|
className: "group flex items-center hover:bg-muted",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ y("a", {
|
|
94
97
|
href: n,
|
|
95
98
|
target: "_blank",
|
|
96
99
|
rel: "noopener noreferrer",
|
|
97
|
-
onContextMenu: (t) =>
|
|
98
|
-
|
|
99
|
-
o(
|
|
100
|
-
o(
|
|
101
|
-
...
|
|
102
|
-
label:
|
|
103
|
-
onClick: () =>
|
|
100
|
+
onContextMenu: (t) => F(t, [
|
|
101
|
+
U(n),
|
|
102
|
+
o(M("copyLink"), e.url),
|
|
103
|
+
o(j("copyBranch"), e.headRef),
|
|
104
|
+
...B ? [{
|
|
105
|
+
label: j("unlinkPullRequest"),
|
|
106
|
+
onClick: () => H.mutate(e.id)
|
|
104
107
|
}] : []
|
|
105
108
|
]),
|
|
106
109
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
107
110
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */ v(
|
|
111
|
+
/* @__PURE__ */ v(d, { className: `size-4 ${w[t]}` }),
|
|
112
|
+
/* @__PURE__ */ v(u, {
|
|
113
|
+
provider: e.provider,
|
|
114
|
+
className: "size-3.5 text-muted-foreground"
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ y("span", {
|
|
110
117
|
className: "min-w-0 flex-1 truncate",
|
|
111
118
|
children: [
|
|
112
119
|
e.title,
|
|
113
120
|
" ",
|
|
114
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ v("span", {
|
|
115
122
|
className: "text-muted-foreground",
|
|
116
|
-
children:
|
|
123
|
+
children: j("pullRequestRef", {
|
|
117
124
|
repository: e.repository,
|
|
118
|
-
number: e
|
|
125
|
+
number: D(e)
|
|
119
126
|
})
|
|
120
127
|
})
|
|
121
128
|
]
|
|
122
129
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ y("span", {
|
|
124
131
|
className: "flex items-center gap-3 text-xs",
|
|
125
132
|
children: [
|
|
126
|
-
e.state === "open" && e.checks !== "none" && /* @__PURE__ */
|
|
127
|
-
className:
|
|
128
|
-
children:
|
|
133
|
+
e.state === "open" && e.checks !== "none" && /* @__PURE__ */ v("span", {
|
|
134
|
+
className: T[e.checks],
|
|
135
|
+
children: j(`checks.${e.checks}`)
|
|
129
136
|
}),
|
|
130
|
-
e.state === "open" && e.review !== "none" && /* @__PURE__ */
|
|
137
|
+
e.state === "open" && e.review !== "none" && /* @__PURE__ */ v("span", {
|
|
131
138
|
className: e.review === "approved" ? "text-success" : "text-danger",
|
|
132
|
-
children:
|
|
139
|
+
children: j(`review.${e.review}`)
|
|
133
140
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
className:
|
|
136
|
-
children:
|
|
141
|
+
/* @__PURE__ */ v("span", {
|
|
142
|
+
className: w[t],
|
|
143
|
+
children: j(`state.${t}`)
|
|
137
144
|
})
|
|
138
145
|
]
|
|
139
146
|
})
|
|
140
147
|
]
|
|
141
|
-
}),
|
|
142
|
-
icon: /* @__PURE__ */
|
|
143
|
-
label:
|
|
148
|
+
}), B && /* @__PURE__ */ v(h, {
|
|
149
|
+
icon: /* @__PURE__ */ v(l, {}),
|
|
150
|
+
label: j("unlinkPullRequest"),
|
|
144
151
|
variant: "ghost",
|
|
145
152
|
size: "sm",
|
|
146
153
|
className: "mr-1.5 shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",
|
|
147
|
-
disabled:
|
|
148
|
-
onClick: () =>
|
|
154
|
+
disabled: H.isPending,
|
|
155
|
+
onClick: () => H.mutate(e.id)
|
|
149
156
|
})]
|
|
150
157
|
}, `${e.repository}#${e.number}`);
|
|
151
|
-
}),
|
|
158
|
+
}), L.map((e) => {
|
|
152
159
|
let t = s(e.url);
|
|
153
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ v("li", { children: /* @__PURE__ */ y("a", {
|
|
154
161
|
href: t,
|
|
155
162
|
target: "_blank",
|
|
156
163
|
rel: "noopener noreferrer",
|
|
157
|
-
onContextMenu: (n) =>
|
|
164
|
+
onContextMenu: (n) => F(n, [U(t), o(j("copyBranch"), e.name)]),
|
|
158
165
|
className: "flex items-center gap-3 px-3 py-2 text-sm hover:bg-muted",
|
|
159
166
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ v(c, { className: "size-4 text-muted-foreground" }),
|
|
168
|
+
/* @__PURE__ */ v("span", {
|
|
162
169
|
className: "min-w-0 flex-1 truncate font-mono text-xs",
|
|
163
170
|
children: e.name
|
|
164
171
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ v("span", {
|
|
166
173
|
className: "text-xs text-muted-foreground",
|
|
167
174
|
children: e.repository
|
|
168
175
|
})
|
|
@@ -172,4 +179,4 @@ function E({ workspace: E, identifier: D, title: O }) {
|
|
|
172
179
|
})]
|
|
173
180
|
});
|
|
174
181
|
}
|
|
175
|
-
export {
|
|
182
|
+
export { O as IssueCode, D as pullRequestNumber };
|
|
@@ -1,153 +1,162 @@
|
|
|
1
1
|
import { usePathname as e } from "../lib/router.js";
|
|
2
|
-
import { githubAccountQuery as t,
|
|
3
|
-
import { ChevronDownIcon as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { githubAccountQuery as t, gitlabQuery as n, meQuery as r } from "../api/queries.js";
|
|
3
|
+
import { ChevronDownIcon as i, CloudIcon as a, CommentIcon as o, FolderIcon as s, HistoryIcon as c, InboxIcon as l, KeyIcon as u, LinkIcon as d, ListViewIcon as f, MigrationIcon as p, NotificationIcon as m, RepositoryIcon as h, SettingsIcon as g, ShieldIcon as _, TagIcon as v, UserIcon as y, UsersIcon as b, WebhookIcon as x, WorkerIcon as S } from "./icons.js";
|
|
4
|
+
import { useParams as C } from "@tanstack/react-router";
|
|
5
|
+
import { useTranslations as w } from "use-intl";
|
|
6
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
7
|
+
import { useQuery as O, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
8
|
+
import { AppFrameNavGroup as A, AppFrameNavItem as j } from "@parallelworks/ui/app-frame";
|
|
8
9
|
// src/components/SettingsNav.tsx
|
|
9
|
-
function
|
|
10
|
-
let { data: e } =
|
|
10
|
+
function M() {
|
|
11
|
+
let { data: e } = k(r), i = w("settingsNav"), T = e?.mode === "platform", { data: E } = O(t), { workspace: D } = C({ strict: !1 }), { data: A } = O({
|
|
12
|
+
...n(D ?? ""),
|
|
13
|
+
enabled: !!D
|
|
14
|
+
});
|
|
11
15
|
return [
|
|
12
16
|
{
|
|
13
|
-
label:
|
|
17
|
+
label: i("account"),
|
|
14
18
|
items: [
|
|
15
19
|
{
|
|
16
20
|
to: "/$workspace/settings/account",
|
|
17
|
-
label:
|
|
18
|
-
Icon:
|
|
21
|
+
label: i("profile"),
|
|
22
|
+
Icon: y
|
|
19
23
|
},
|
|
20
24
|
{
|
|
21
25
|
to: "/$workspace/settings/notifications",
|
|
22
|
-
label:
|
|
23
|
-
Icon:
|
|
26
|
+
label: i("notifications"),
|
|
27
|
+
Icon: m
|
|
24
28
|
},
|
|
25
29
|
{
|
|
26
30
|
to: "/$workspace/settings/runners",
|
|
27
|
-
label:
|
|
28
|
-
Icon:
|
|
31
|
+
label: i("runners"),
|
|
32
|
+
Icon: S
|
|
29
33
|
},
|
|
30
|
-
...
|
|
34
|
+
...E?.enabled ? [{
|
|
31
35
|
to: "/$workspace/settings/connections",
|
|
32
|
-
label:
|
|
33
|
-
Icon:
|
|
36
|
+
label: i("connections"),
|
|
37
|
+
Icon: d
|
|
34
38
|
}] : [],
|
|
35
|
-
...
|
|
39
|
+
...T ? [] : [{
|
|
36
40
|
to: "/$workspace/settings/tokens",
|
|
37
|
-
label:
|
|
38
|
-
Icon:
|
|
41
|
+
label: i("tokens"),
|
|
42
|
+
Icon: u
|
|
39
43
|
}, {
|
|
40
44
|
to: "/$workspace/settings/sessions",
|
|
41
|
-
label:
|
|
42
|
-
Icon:
|
|
45
|
+
label: i("sessions"),
|
|
46
|
+
Icon: _
|
|
43
47
|
}]
|
|
44
48
|
]
|
|
45
49
|
},
|
|
46
50
|
{
|
|
47
|
-
label:
|
|
51
|
+
label: i("workspace"),
|
|
48
52
|
items: [
|
|
49
53
|
{
|
|
50
54
|
to: "/$workspace/settings",
|
|
51
|
-
label:
|
|
52
|
-
Icon:
|
|
55
|
+
label: i("general"),
|
|
56
|
+
Icon: g
|
|
53
57
|
},
|
|
54
58
|
{
|
|
55
59
|
to: "/$workspace/settings/members",
|
|
56
|
-
label:
|
|
57
|
-
Icon:
|
|
60
|
+
label: i(T ? "access" : "members"),
|
|
61
|
+
Icon: b
|
|
58
62
|
},
|
|
59
63
|
{
|
|
60
64
|
to: "/$workspace/settings/roles",
|
|
61
|
-
label:
|
|
62
|
-
Icon:
|
|
65
|
+
label: i("roles"),
|
|
66
|
+
Icon: _
|
|
63
67
|
},
|
|
64
68
|
{
|
|
65
69
|
to: "/$workspace/settings/groups",
|
|
66
|
-
label:
|
|
67
|
-
Icon:
|
|
70
|
+
label: i("groups"),
|
|
71
|
+
Icon: _
|
|
68
72
|
},
|
|
69
73
|
{
|
|
70
74
|
to: "/$workspace/settings/teams",
|
|
71
|
-
label:
|
|
72
|
-
Icon:
|
|
75
|
+
label: i("teams"),
|
|
76
|
+
Icon: s
|
|
73
77
|
},
|
|
74
78
|
{
|
|
75
79
|
to: "/$workspace/settings/labels",
|
|
76
|
-
label:
|
|
77
|
-
Icon:
|
|
80
|
+
label: i("labels"),
|
|
81
|
+
Icon: v
|
|
78
82
|
},
|
|
79
83
|
{
|
|
80
84
|
to: "/$workspace/settings/fields",
|
|
81
|
-
label:
|
|
82
|
-
Icon:
|
|
85
|
+
label: i("fields"),
|
|
86
|
+
Icon: f
|
|
83
87
|
},
|
|
84
88
|
{
|
|
85
89
|
to: "/$workspace/settings/audit-log",
|
|
86
|
-
label:
|
|
87
|
-
Icon:
|
|
90
|
+
label: i("auditLog"),
|
|
91
|
+
Icon: c
|
|
88
92
|
},
|
|
89
|
-
...
|
|
93
|
+
...T ? [] : [{
|
|
90
94
|
to: "/$workspace/settings/sso",
|
|
91
|
-
label:
|
|
92
|
-
Icon:
|
|
95
|
+
label: i("sso"),
|
|
96
|
+
Icon: u
|
|
93
97
|
}]
|
|
94
98
|
]
|
|
95
99
|
},
|
|
96
100
|
{
|
|
97
|
-
label:
|
|
101
|
+
label: i("integrations"),
|
|
98
102
|
items: [
|
|
99
103
|
{
|
|
100
104
|
to: "/$workspace/settings/github",
|
|
101
|
-
label:
|
|
102
|
-
Icon:
|
|
105
|
+
label: i("github"),
|
|
106
|
+
Icon: h
|
|
103
107
|
},
|
|
108
|
+
...A?.enabled ? [{
|
|
109
|
+
to: "/$workspace/settings/gitlab",
|
|
110
|
+
label: i("gitlab"),
|
|
111
|
+
Icon: h
|
|
112
|
+
}] : [],
|
|
104
113
|
{
|
|
105
114
|
to: "/$workspace/settings/slack",
|
|
106
|
-
label:
|
|
107
|
-
Icon:
|
|
115
|
+
label: i("slack"),
|
|
116
|
+
Icon: o
|
|
108
117
|
},
|
|
109
118
|
{
|
|
110
119
|
to: "/$workspace/settings/zendesk",
|
|
111
|
-
label:
|
|
112
|
-
Icon:
|
|
120
|
+
label: i("zendesk"),
|
|
121
|
+
Icon: l
|
|
113
122
|
},
|
|
114
123
|
{
|
|
115
124
|
to: "/$workspace/settings/webhooks",
|
|
116
|
-
label:
|
|
117
|
-
Icon:
|
|
125
|
+
label: i("webhooks"),
|
|
126
|
+
Icon: x
|
|
118
127
|
},
|
|
119
128
|
{
|
|
120
129
|
to: "/$workspace/settings/parallelworks",
|
|
121
|
-
label:
|
|
122
|
-
Icon:
|
|
130
|
+
label: i("parallelWorks"),
|
|
131
|
+
Icon: a
|
|
123
132
|
},
|
|
124
133
|
{
|
|
125
134
|
to: "/$workspace/settings/import",
|
|
126
|
-
label:
|
|
127
|
-
Icon:
|
|
135
|
+
label: i("import"),
|
|
136
|
+
Icon: p
|
|
128
137
|
}
|
|
129
138
|
]
|
|
130
139
|
}
|
|
131
140
|
];
|
|
132
141
|
}
|
|
133
|
-
function
|
|
134
|
-
let n =
|
|
135
|
-
return /* @__PURE__ */ T
|
|
142
|
+
function N({ workspace: t }) {
|
|
143
|
+
let n = w("settingsNav"), r = M(), a = e();
|
|
144
|
+
return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(j, {
|
|
136
145
|
label: n("label"),
|
|
137
|
-
icon: /* @__PURE__ */
|
|
146
|
+
icon: /* @__PURE__ */ E(i, { className: "size-4 rotate-90" }),
|
|
138
147
|
href: `/${t}/issues`,
|
|
139
148
|
className: "font-semibold"
|
|
140
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ E("nav", {
|
|
141
150
|
"aria-label": n("label"),
|
|
142
151
|
className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
|
|
143
|
-
children:
|
|
152
|
+
children: r.map((e) => /* @__PURE__ */ E(A, {
|
|
144
153
|
label: e.label,
|
|
145
154
|
collapsible: !1,
|
|
146
155
|
children: e.items.map(({ to: e, label: n, Icon: r }) => {
|
|
147
156
|
let i = e.replace("$workspace", t);
|
|
148
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ E(j, {
|
|
149
158
|
label: n,
|
|
150
|
-
icon: /* @__PURE__ */
|
|
159
|
+
icon: /* @__PURE__ */ E(r, { className: "size-4" }),
|
|
151
160
|
href: i,
|
|
152
161
|
selected: a === i
|
|
153
162
|
}, e);
|
|
@@ -155,4 +164,4 @@ function j({ workspace: t }) {
|
|
|
155
164
|
}, e.label))
|
|
156
165
|
})] });
|
|
157
166
|
}
|
|
158
|
-
export {
|
|
167
|
+
export { N as SettingsNav, M as useSettingsPages };
|