@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,12 +1,12 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { useNavigate as n } from "../../../lib/router.js";
|
|
3
3
|
import { meQuery as r, membersQuery as i, workspaceAccessQuery as a, workspaceQuery as o } from "../../../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { useConfirm as s } from "../../../lib/confirm.js";
|
|
5
|
+
import { ShieldIcon as c, UserIcon as l, UsersIcon as u } from "../../../components/icons.js";
|
|
6
|
+
import { Route as d } from "./members.js";
|
|
7
|
+
import { copyItem as f } from "../../../lib/menus.js";
|
|
8
|
+
import { useCan as p, useRoleOptions as m } from "../../../lib/roles.js";
|
|
9
|
+
import { AdminOnly as h, SettingsPage as g, useFormError as _ } from "../../../components/settings.js";
|
|
10
10
|
import { PersonHoverCard as v } from "../../../components/PersonHoverCard.js";
|
|
11
11
|
import { AccessGrants as y } from "../../../components/AccessGrants.js";
|
|
12
12
|
import { Avatar as b, Button as x, Card as S, ErrorText as C, Input as ee, Modal as te, ModalTitle as ne, PageHeaderAddButton as re, SearchInput as w, Select as ie, Table as T, menuDivider as E, useOpenMenu as D } from "@parallelworks/ui";
|
|
@@ -17,7 +17,7 @@ import { useMutation as P, useQueryClient as F, useSuspenseQuery as I } from "@t
|
|
|
17
17
|
import { ListCellText as L, ListColumns as R, ListPage as z, ListRow as ae, ListToolbar as oe, NameCell as se, listTableProps as ce, useListNavigate as le, useListSearch as ue, useListView as de } from "@parallelworks/ui/list";
|
|
18
18
|
// src/routes/$workspace/settings/members.tsx?tsr-split=component
|
|
19
19
|
function B() {
|
|
20
|
-
let { workspace: e } =
|
|
20
|
+
let { workspace: e } = d.useParams(), { data: t } = I(r), n = p(e, "manage_members"), i = t?.user.username ?? "";
|
|
21
21
|
return t?.mode === "platform" ? /* @__PURE__ */ M(H, {
|
|
22
22
|
workspace: e,
|
|
23
23
|
isAdmin: n,
|
|
@@ -28,9 +28,9 @@ function B() {
|
|
|
28
28
|
myUsername: i
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function V({ workspace: a, isAdmin: o, myUsername:
|
|
32
|
-
let { data:
|
|
33
|
-
|
|
31
|
+
function V({ workspace: a, isAdmin: o, myUsername: c }) {
|
|
32
|
+
let { data: u } = I(i(a)), d = F(), p = n(), [y, S] = k(""), [w, A] = k("member"), [B, V] = k(!1), H = j("settings"), U = j("common"), W = m(a), G = _(), K = () => {
|
|
33
|
+
d.invalidateQueries({ queryKey: i(a).queryKey }), d.invalidateQueries({ queryKey: r.queryKey });
|
|
34
34
|
}, q = P({
|
|
35
35
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/members", {
|
|
36
36
|
params: { path: { workspace: a } },
|
|
@@ -62,7 +62,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
62
62
|
} } })),
|
|
63
63
|
onMutate: G.clear,
|
|
64
64
|
onSuccess: K
|
|
65
|
-
}), { confirm: fe, dialog: pe } =
|
|
65
|
+
}), { confirm: fe, dialog: pe } = s(), me = (e) => fe(e.user.username === c ? {
|
|
66
66
|
title: H("leaveTitle"),
|
|
67
67
|
description: H("leaveDescription"),
|
|
68
68
|
confirmLabel: H("leave"),
|
|
@@ -106,12 +106,12 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
106
106
|
orderBys: ve,
|
|
107
107
|
defaultOrderBy: "name",
|
|
108
108
|
facets: []
|
|
109
|
-
}), Q = X.filter.trim().toLowerCase(), $ =
|
|
109
|
+
}), Q = X.filter.trim().toLowerCase(), $ = u.filter((e) => !Q || [
|
|
110
110
|
e.user.name,
|
|
111
111
|
e.user.username,
|
|
112
112
|
e.user.email
|
|
113
113
|
].some((e) => e.toLowerCase().includes(Q)));
|
|
114
|
-
return /* @__PURE__ */ N(
|
|
114
|
+
return /* @__PURE__ */ N(g, {
|
|
115
115
|
wide: !0,
|
|
116
116
|
title: H("members"),
|
|
117
117
|
description: H("membersDescription"),
|
|
@@ -120,7 +120,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
120
120
|
word: "add",
|
|
121
121
|
onClick: () => V(!0)
|
|
122
122
|
}),
|
|
123
|
-
toolbar:
|
|
123
|
+
toolbar: u.length > 0 && /* @__PURE__ */ M(oe, {
|
|
124
124
|
view: Z,
|
|
125
125
|
search: X,
|
|
126
126
|
searchLabel: H("searchPeople"),
|
|
@@ -129,7 +129,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
129
129
|
children: [
|
|
130
130
|
/* @__PURE__ */ M("div", {
|
|
131
131
|
className: "px-4",
|
|
132
|
-
children: /* @__PURE__ */ M(
|
|
132
|
+
children: /* @__PURE__ */ M(h, {
|
|
133
133
|
workspace: a,
|
|
134
134
|
permission: "manage_members"
|
|
135
135
|
})
|
|
@@ -138,7 +138,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
138
138
|
className: "border-t border-border",
|
|
139
139
|
children: /* @__PURE__ */ M(z, {
|
|
140
140
|
view: Z,
|
|
141
|
-
total:
|
|
141
|
+
total: u.length,
|
|
142
142
|
matches: $.length,
|
|
143
143
|
count: {
|
|
144
144
|
filterActive: X.filter.trim() !== "",
|
|
@@ -146,7 +146,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
146
146
|
nounPlural: H("memberNounPlural")
|
|
147
147
|
},
|
|
148
148
|
empty: {
|
|
149
|
-
icon: /* @__PURE__ */ M(
|
|
149
|
+
icon: /* @__PURE__ */ M(l, {}),
|
|
150
150
|
title: H("noMembersYet")
|
|
151
151
|
},
|
|
152
152
|
noMatches: H("noPeopleMatch"),
|
|
@@ -170,7 +170,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
170
170
|
}] : [],
|
|
171
171
|
{
|
|
172
172
|
label: H("viewIssues"),
|
|
173
|
-
onClick: () =>
|
|
173
|
+
onClick: () => p({
|
|
174
174
|
to: "/$workspace/people/$username",
|
|
175
175
|
params: {
|
|
176
176
|
workspace: a,
|
|
@@ -178,9 +178,9 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
178
178
|
}
|
|
179
179
|
})
|
|
180
180
|
},
|
|
181
|
-
|
|
182
|
-
...o || e.user.username ===
|
|
183
|
-
label: e.user.username ===
|
|
181
|
+
f(U("copyEmail"), e.user.email),
|
|
182
|
+
...o || e.user.username === c ? [E, {
|
|
183
|
+
label: e.user.username === c ? H("leaveWorkspace") : H("removeFromWorkspace"),
|
|
184
184
|
destructive: !0,
|
|
185
185
|
onClick: () => me(e)
|
|
186
186
|
}] : []
|
|
@@ -196,7 +196,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
196
196
|
size: "md"
|
|
197
197
|
})
|
|
198
198
|
}),
|
|
199
|
-
name: e.user.username ===
|
|
199
|
+
name: e.user.username === c ? `${e.user.name} ${H("you")}` : e.user.name,
|
|
200
200
|
subtitle: e.user.username,
|
|
201
201
|
href: null,
|
|
202
202
|
children: J.isError && J.variables?.username === e.user.username && /* @__PURE__ */ M(C, {
|
|
@@ -275,8 +275,8 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
275
275
|
]
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
function H({ workspace: n, isAdmin: r, myUsername:
|
|
279
|
-
let { data:
|
|
278
|
+
function H({ workspace: n, isAdmin: r, myUsername: s }) {
|
|
279
|
+
let { data: l } = I(a(n)), { data: d } = I(i(n)), { data: f } = I(o(n)), p = F(), m = j("settings"), h = j("settingsNav"), [_, v] = k(!1), b = P({
|
|
280
280
|
mutationFn: async (r) => t(await e.PUT("/api/v1/workspaces/{workspace}/access", {
|
|
281
281
|
params: { path: { workspace: n } },
|
|
282
282
|
body: {
|
|
@@ -295,19 +295,19 @@ function H({ workspace: n, isAdmin: r, myUsername: c }) {
|
|
|
295
295
|
p.invalidateQueries({ queryKey: a(n).queryKey }), p.invalidateQueries({ queryKey: i(n).queryKey });
|
|
296
296
|
}
|
|
297
297
|
}), x = (e) => d.filter((t) => t.via?.some((t) => t.kind === e)), S = x("organizationAdmin");
|
|
298
|
-
return /* @__PURE__ */ N(
|
|
299
|
-
title:
|
|
298
|
+
return /* @__PURE__ */ N(g, {
|
|
299
|
+
title: h("access"),
|
|
300
300
|
description: m("workspaceAccessDescription"),
|
|
301
301
|
children: [/* @__PURE__ */ M(y, {
|
|
302
302
|
workspace: n,
|
|
303
303
|
resourceName: f.name,
|
|
304
|
-
access:
|
|
304
|
+
access: l,
|
|
305
305
|
save: (e) => b.mutateAsync(e),
|
|
306
306
|
openLabel: m("workspaceAccessEveryone"),
|
|
307
307
|
readOnly: !r,
|
|
308
308
|
rules: [{
|
|
309
309
|
id: "organizationAdmins",
|
|
310
|
-
icon: /* @__PURE__ */ M(
|
|
310
|
+
icon: /* @__PURE__ */ M(c, { className: "size-4" }),
|
|
311
311
|
title: m("organizationAdmins"),
|
|
312
312
|
detail: m("organizationAdminsDetail", { count: S.length }),
|
|
313
313
|
people: S.map((e) => ({
|
|
@@ -315,9 +315,9 @@ function H({ workspace: n, isAdmin: r, myUsername: c }) {
|
|
|
315
315
|
avatarUrl: e.user.avatarUrl
|
|
316
316
|
})),
|
|
317
317
|
roleId: "admin"
|
|
318
|
-
}, ...
|
|
318
|
+
}, ...l.restricted ? [] : [{
|
|
319
319
|
id: "everyone",
|
|
320
|
-
icon: /* @__PURE__ */ M(
|
|
320
|
+
icon: /* @__PURE__ */ M(u, { className: "size-4" }),
|
|
321
321
|
title: m("workspaceAccessEveryone"),
|
|
322
322
|
detail: m("peopleCount", { count: x("everyone").length }),
|
|
323
323
|
roleId: "member"
|
|
@@ -332,12 +332,12 @@ function H({ workspace: n, isAdmin: r, myUsername: c }) {
|
|
|
332
332
|
}), _ && /* @__PURE__ */ M(U, {
|
|
333
333
|
workspace: n,
|
|
334
334
|
members: d,
|
|
335
|
-
myUsername:
|
|
335
|
+
myUsername: s
|
|
336
336
|
})]
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
function U({ workspace: e, members: t, myUsername: r }) {
|
|
340
|
-
let i = j("settings"), a = j("common"), o = A(), s =
|
|
340
|
+
let i = j("settings"), a = j("common"), o = A(), s = m(e), c = D(), l = n(), [u, d] = k(""), p = (e) => e.kind === "organizationAdmin" ? i("viaOrganizationAdmin") : e.kind === "everyone" ? i("viaEveryone") : e.kind === "group" ? e.principal?.name ?? "" : i("viaGrant"), h = u.trim().toLowerCase(), g = (e) => {
|
|
341
341
|
let t = e.via ?? [], n = t.filter((e) => e.kind !== "everyone");
|
|
342
342
|
return n.length > 0 ? n : t;
|
|
343
343
|
}, _ = (e) => +!!g(e).every((e) => e.kind === "organizationAdmin"), y = t.toSorted((e, t) => _(e) - _(t)).filter((e) => !h || [
|
|
@@ -349,7 +349,7 @@ function U({ workspace: e, members: t, myUsername: r }) {
|
|
|
349
349
|
className: "mt-4",
|
|
350
350
|
children: [/* @__PURE__ */ M(w, {
|
|
351
351
|
value: u,
|
|
352
|
-
onValueChange:
|
|
352
|
+
onValueChange: d,
|
|
353
353
|
label: i("searchPeople")
|
|
354
354
|
}), /* @__PURE__ */ N(S, {
|
|
355
355
|
size: "fill",
|
|
@@ -368,7 +368,7 @@ function U({ workspace: e, members: t, myUsername: r }) {
|
|
|
368
368
|
username: t.user.username
|
|
369
369
|
}
|
|
370
370
|
})
|
|
371
|
-
},
|
|
371
|
+
}, f(a("copyEmail"), t.user.email)]),
|
|
372
372
|
className: "flex items-center gap-3 px-3 py-2",
|
|
373
373
|
children: [
|
|
374
374
|
/* @__PURE__ */ M(v, {
|
|
@@ -393,7 +393,7 @@ function U({ workspace: e, members: t, myUsername: r }) {
|
|
|
393
393
|
children: [
|
|
394
394
|
t.user.username,
|
|
395
395
|
" · ",
|
|
396
|
-
o.list(g(t).map(
|
|
396
|
+
o.list(g(t).map(p), { type: "conjunction" })
|
|
397
397
|
]
|
|
398
398
|
})]
|
|
399
399
|
}),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { meQuery as n, rolesQuery as r, workspaceAccessQuery as i } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useConfirm as a } from "../../../lib/confirm.js";
|
|
4
|
+
import { ShieldIcon as o } from "../../../components/icons.js";
|
|
5
|
+
import { Route as s } from "./roles.js";
|
|
6
|
+
import { isBuiltIn as c, permissionGroups as l, useCan as u } from "../../../lib/roles.js";
|
|
7
|
+
import { AdminOnly as d, SettingsPage as f } from "../../../components/settings.js";
|
|
8
8
|
import { AccessGrants as p } from "../../../components/AccessGrants.js";
|
|
9
9
|
import { Button as m, Callout as h, Checkbox as g, ErrorText as _, Input as v, Modal as y, PageHeaderAddButton as b, StatusBadge as x, Table as S, Textarea as C, useOpenMenu as w } from "@parallelworks/ui";
|
|
10
10
|
import { useMemo as T, useState as E } from "react";
|
|
@@ -15,7 +15,7 @@ import { useMutation as M, useQueryClient as N, useSuspenseQuery as P } from "@t
|
|
|
15
15
|
import { ListCellText as F, ListColumns as I, ListPage as L, ListRow as R, NameCell as z, listTableProps as B, useListNavigate as V, useListView as H } from "@parallelworks/ui/list";
|
|
16
16
|
// src/routes/$workspace/settings/roles.tsx?tsr-split=component
|
|
17
17
|
function U() {
|
|
18
|
-
let { workspace: i } =
|
|
18
|
+
let { workspace: i } = s.useParams(), { data: l } = P(n), { data: p } = P(r(i)), m = u(i, "manage_members") && l?.mode !== "platform", h = O("roleSettings"), g = O("roles"), v = O("common"), y = w(), C = V(), { confirm: k, dialog: U } = a(), ee = D(), te = N(), [q, J] = E(null), [Y, X] = E(null), ne = M({
|
|
19
19
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/roles/{role}", { params: { path: {
|
|
20
20
|
workspace: i,
|
|
21
21
|
role: n
|
|
@@ -46,7 +46,7 @@ function U() {
|
|
|
46
46
|
columns: re,
|
|
47
47
|
orderBys: [],
|
|
48
48
|
facets: []
|
|
49
|
-
}), Q = (e) =>
|
|
49
|
+
}), Q = (e) => c(e.id) ? g(`${e.id}.name`) : e.name, ie = (e) => c(e.id) ? g(`${e.id}.description`) : e.description, $ = (e) => k({
|
|
50
50
|
title: h("deleteTitle", { name: e.name }),
|
|
51
51
|
description: h("deleteDescription", { name: e.name }),
|
|
52
52
|
confirmLabel: v("delete"),
|
|
@@ -59,7 +59,7 @@ function U() {
|
|
|
59
59
|
destructive: !0,
|
|
60
60
|
onClick: () => $(e)
|
|
61
61
|
}] : []];
|
|
62
|
-
return /* @__PURE__ */ j(
|
|
62
|
+
return /* @__PURE__ */ j(f, {
|
|
63
63
|
wide: !0,
|
|
64
64
|
title: h("title"),
|
|
65
65
|
description: h("description"),
|
|
@@ -73,7 +73,7 @@ function U() {
|
|
|
73
73
|
className: "px-4",
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ A(W, { workspace: i }),
|
|
76
|
-
/* @__PURE__ */ A(
|
|
76
|
+
/* @__PURE__ */ A(d, {
|
|
77
77
|
workspace: i,
|
|
78
78
|
permission: "manage_members"
|
|
79
79
|
}),
|
|
@@ -100,7 +100,7 @@ function U() {
|
|
|
100
100
|
openMenu: y,
|
|
101
101
|
children: [
|
|
102
102
|
/* @__PURE__ */ A(z, {
|
|
103
|
-
icon: /* @__PURE__ */ A(
|
|
103
|
+
icon: /* @__PURE__ */ A(o, {}),
|
|
104
104
|
iconTile: !0,
|
|
105
105
|
name: Q(e),
|
|
106
106
|
subtitle: ie(e) || void 0,
|
|
@@ -131,7 +131,7 @@ function U() {
|
|
|
131
131
|
})
|
|
132
132
|
})
|
|
133
133
|
}),
|
|
134
|
-
|
|
134
|
+
l?.mode !== "platform" && /* @__PURE__ */ A(G, {
|
|
135
135
|
workspace: i,
|
|
136
136
|
readOnly: !m
|
|
137
137
|
}),
|
|
@@ -192,18 +192,18 @@ function G({ workspace: r, readOnly: a }) {
|
|
|
192
192
|
]
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function K({ workspace: i, role:
|
|
196
|
-
let f = O("roleSettings"), p = O("permissions"), h = O("common"), b = D(), x = N(), [S, w] = E(s), [T, P] = E(
|
|
195
|
+
function K({ workspace: i, role: a, name: s, readOnly: c, onDelete: u, onClose: d }) {
|
|
196
|
+
let f = O("roleSettings"), p = O("permissions"), h = O("common"), b = D(), x = N(), [S, w] = E(s), [T, P] = E(a?.description ?? ""), [F, I] = E(new Set(a?.permissions ?? ["read", "comment"])), L = M({
|
|
197
197
|
mutationFn: async () => {
|
|
198
198
|
let n = {
|
|
199
199
|
name: S.trim(),
|
|
200
200
|
description: T.trim(),
|
|
201
201
|
permissions: [...F]
|
|
202
202
|
};
|
|
203
|
-
return t(
|
|
203
|
+
return t(a ? await e.PATCH("/api/v1/workspaces/{workspace}/roles/{role}", {
|
|
204
204
|
params: { path: {
|
|
205
205
|
workspace: i,
|
|
206
|
-
role:
|
|
206
|
+
role: a.id
|
|
207
207
|
} },
|
|
208
208
|
body: n
|
|
209
209
|
}) : await e.POST("/api/v1/workspaces/{workspace}/roles", {
|
|
@@ -224,9 +224,9 @@ function K({ workspace: i, role: o, name: s, readOnly: l, onDelete: u, onClose:
|
|
|
224
224
|
size: "lg",
|
|
225
225
|
title: /* @__PURE__ */ j("span", {
|
|
226
226
|
className: "flex items-center gap-2",
|
|
227
|
-
children: [/* @__PURE__ */ A(
|
|
227
|
+
children: [/* @__PURE__ */ A(o, { className: "size-4 text-muted-foreground" }), a ? s : f("new")]
|
|
228
228
|
}),
|
|
229
|
-
...
|
|
229
|
+
...c && a?.description && { description: a.description },
|
|
230
230
|
onSubmit: () => L.mutate(),
|
|
231
231
|
footer: /* @__PURE__ */ j(k, { children: [
|
|
232
232
|
u && /* @__PURE__ */ A("button", {
|
|
@@ -238,24 +238,24 @@ function K({ workspace: i, role: o, name: s, readOnly: l, onDelete: u, onClose:
|
|
|
238
238
|
/* @__PURE__ */ A(m, {
|
|
239
239
|
type: "button",
|
|
240
240
|
onClick: d,
|
|
241
|
-
children: h(
|
|
241
|
+
children: h(c ? "close" : "cancel")
|
|
242
242
|
}),
|
|
243
|
-
!
|
|
243
|
+
!c && /* @__PURE__ */ A(m, {
|
|
244
244
|
type: "submit",
|
|
245
245
|
variant: "primary",
|
|
246
246
|
disabled: !S.trim(),
|
|
247
247
|
loading: L.isPending,
|
|
248
|
-
children:
|
|
248
|
+
children: a ? h("save") : f("create")
|
|
249
249
|
})
|
|
250
250
|
] }),
|
|
251
251
|
children: [
|
|
252
|
-
!
|
|
252
|
+
!c && /* @__PURE__ */ j("div", {
|
|
253
253
|
className: "mb-5 space-y-3",
|
|
254
254
|
children: [/* @__PURE__ */ j("label", {
|
|
255
255
|
className: "block text-xs text-muted-foreground",
|
|
256
256
|
children: [f("name"), /* @__PURE__ */ A(v, {
|
|
257
257
|
required: !0,
|
|
258
|
-
autoFocus: !
|
|
258
|
+
autoFocus: !a,
|
|
259
259
|
maxLength: 60,
|
|
260
260
|
value: S,
|
|
261
261
|
onChange: (e) => w(e.target.value),
|
|
@@ -276,7 +276,7 @@ function K({ workspace: i, role: o, name: s, readOnly: l, onDelete: u, onClose:
|
|
|
276
276
|
}),
|
|
277
277
|
/* @__PURE__ */ A("div", {
|
|
278
278
|
className: "space-y-5",
|
|
279
|
-
children:
|
|
279
|
+
children: l.map((e) => /* @__PURE__ */ j("fieldset", { children: [/* @__PURE__ */ A("legend", {
|
|
280
280
|
className: "mb-2 text-xs font-medium text-muted-foreground",
|
|
281
281
|
children: f(`groups.${e.id}`)
|
|
282
282
|
}), /* @__PURE__ */ A("div", {
|
|
@@ -286,7 +286,7 @@ function K({ workspace: i, role: o, name: s, readOnly: l, onDelete: u, onClose:
|
|
|
286
286
|
children: [/* @__PURE__ */ A(g, {
|
|
287
287
|
className: "mt-0.5",
|
|
288
288
|
checked: F.has(e),
|
|
289
|
-
disabled:
|
|
289
|
+
disabled: c || e === "read",
|
|
290
290
|
onCheckedChange: (t) => R(e, t)
|
|
291
291
|
}), /* @__PURE__ */ j("span", {
|
|
292
292
|
className: "min-w-0",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { runnersQuery as n } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useConfirm as r } from "../../../lib/confirm.js";
|
|
4
|
+
import { WorkerIcon as i } from "../../../components/icons.js";
|
|
5
|
+
import { Route as a } from "./runners.js";
|
|
6
|
+
import { copyItem as o } from "../../../lib/menus.js";
|
|
7
|
+
import { useTime as s } from "../../../lib/time.js";
|
|
8
|
+
import { SettingsPage as c } from "../../../components/settings.js";
|
|
9
9
|
import { Table as l, menuDivider as u, useOpenMenu as d } from "@parallelworks/ui";
|
|
10
10
|
import { useMemo as f } from "react";
|
|
11
11
|
import { useFormatter as p, useTranslations as m } from "use-intl";
|
|
@@ -20,17 +20,17 @@ var A = {
|
|
|
20
20
|
bypass: "runnerModeBypass"
|
|
21
21
|
};
|
|
22
22
|
function j() {
|
|
23
|
-
let { workspace: e } =
|
|
23
|
+
let { workspace: e } = a.useParams();
|
|
24
24
|
return /* @__PURE__ */ h(M, { workspace: e });
|
|
25
25
|
}
|
|
26
|
-
function M({ workspace:
|
|
27
|
-
let { data: j } = y(n(
|
|
26
|
+
function M({ workspace: a }) {
|
|
27
|
+
let { data: j } = y(n(a)), M = m("account"), N = p(), P = m("common"), F = s(), I = v(), L = O(), R = D(), z = d(), B = _({
|
|
28
28
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/runners/{runnerId}", { params: { path: {
|
|
29
|
-
workspace:
|
|
29
|
+
workspace: a,
|
|
30
30
|
runnerId: n
|
|
31
31
|
} } })),
|
|
32
|
-
onSettled: () => I.invalidateQueries({ queryKey: n(
|
|
33
|
-
}), { confirm: V, dialog: H } =
|
|
32
|
+
onSettled: () => I.invalidateQueries({ queryKey: n(a).queryKey })
|
|
33
|
+
}), { confirm: V, dialog: H } = r(), U = (e) => V({
|
|
34
34
|
title: M("revokeRunnerTitle"),
|
|
35
35
|
description: M("revokeRunnerDescription", { name: e.name }),
|
|
36
36
|
confirmLabel: M("revoke"),
|
|
@@ -54,7 +54,7 @@ function M({ workspace: i }) {
|
|
|
54
54
|
label: M("runnerColSeen"),
|
|
55
55
|
compare: (e, t) => (t.lastSeenAt ?? "").localeCompare(e.lastSeenAt ?? "")
|
|
56
56
|
}], [M, P]), K = k({
|
|
57
|
-
storageKey: `tandem-runners-${
|
|
57
|
+
storageKey: `tandem-runners-${a}`,
|
|
58
58
|
defaultShowColumnHeaders: !1,
|
|
59
59
|
columns: W,
|
|
60
60
|
orderBys: G,
|
|
@@ -66,7 +66,7 @@ function M({ workspace: i }) {
|
|
|
66
66
|
...e.harnesses,
|
|
67
67
|
...e.labels
|
|
68
68
|
].some((e) => e.toLowerCase().includes(q)));
|
|
69
|
-
return /* @__PURE__ */ g(
|
|
69
|
+
return /* @__PURE__ */ g(c, {
|
|
70
70
|
wide: !0,
|
|
71
71
|
title: M("runners"),
|
|
72
72
|
description: M.rich("runnersDescription", { code: (e) => /* @__PURE__ */ h("code", {
|
|
@@ -91,7 +91,7 @@ function M({ workspace: i }) {
|
|
|
91
91
|
nounPlural: M("runnerNounPlural")
|
|
92
92
|
},
|
|
93
93
|
empty: {
|
|
94
|
-
icon: /* @__PURE__ */ h(
|
|
94
|
+
icon: /* @__PURE__ */ h(i, {}),
|
|
95
95
|
title: M("noRunners")
|
|
96
96
|
},
|
|
97
97
|
noMatches: M("runnerNoMatches"),
|
|
@@ -102,8 +102,8 @@ function M({ workspace: i }) {
|
|
|
102
102
|
goTo: R,
|
|
103
103
|
openMenu: z,
|
|
104
104
|
items: [
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
o(M("copyRunnerId"), e.id),
|
|
106
|
+
o(P("copyName"), e.name),
|
|
107
107
|
u,
|
|
108
108
|
{
|
|
109
109
|
label: M("revoke"),
|
|
@@ -112,7 +112,7 @@ function M({ workspace: i }) {
|
|
|
112
112
|
}
|
|
113
113
|
],
|
|
114
114
|
children: [/* @__PURE__ */ h(T, {
|
|
115
|
-
icon: /* @__PURE__ */ h(
|
|
115
|
+
icon: /* @__PURE__ */ h(i, {}),
|
|
116
116
|
iconTile: !0,
|
|
117
117
|
name: e.name,
|
|
118
118
|
subtitle: N.list([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { useNavigate as n } from "../../../lib/router.js";
|
|
3
3
|
import { sessionsQuery as r } from "../../../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useConfirm as i } from "../../../lib/confirm.js";
|
|
5
|
+
import { ShieldIcon as a } from "../../../components/icons.js";
|
|
6
|
+
import { useTime as o } from "../../../lib/time.js";
|
|
7
|
+
import { SettingsPage as s, useFormError as c } from "../../../components/settings.js";
|
|
8
8
|
import { ErrorText as l, PageHeaderAction as u, Table as d, useOpenMenu as f } from "@parallelworks/ui";
|
|
9
9
|
import { useMemo as p } from "react";
|
|
10
10
|
import { useTranslations as m } from "use-intl";
|
|
@@ -14,7 +14,7 @@ import { SignOutIcon as b } from "@parallelworks/ui/icons";
|
|
|
14
14
|
import { ListCellText as x, ListColumns as S, ListPage as C, ListRow as w, ListToolbar as T, NameCell as E, listTableProps as D, useListNavigate as O, useListSearch as k, useListView as A } from "@parallelworks/ui/list";
|
|
15
15
|
// src/routes/$workspace/settings/sessions.tsx?tsr-split=component
|
|
16
16
|
function j() {
|
|
17
|
-
let { data: j } = y(r), N = m("sessions"), P =
|
|
17
|
+
let { data: j } = y(r), N = m("sessions"), P = o(), F = v(), I = n(), L = c(), R = () => F.invalidateQueries({ queryKey: r.queryKey }), z = _({
|
|
18
18
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/me/sessions/{sessionId}", { params: { path: { sessionId: n } } })),
|
|
19
19
|
onMutate: L.clear,
|
|
20
20
|
onSettled: R
|
|
@@ -28,7 +28,7 @@ function j() {
|
|
|
28
28
|
F.clear(), I({ to: "/login" });
|
|
29
29
|
},
|
|
30
30
|
onError: L.set
|
|
31
|
-
}), { confirm: H, dialog: U } =
|
|
31
|
+
}), { confirm: H, dialog: U } = i(), W = k(), G = O(), K = f(), q = j.filter((e) => !e.current).length, J = p(() => [{
|
|
32
32
|
key: "name",
|
|
33
33
|
label: N("device"),
|
|
34
34
|
headerClassName: "py-2",
|
|
@@ -55,7 +55,7 @@ function j() {
|
|
|
55
55
|
confirmLabel: N("end"),
|
|
56
56
|
onConfirm: () => z.mutateAsync(e.id)
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */ g(
|
|
58
|
+
return /* @__PURE__ */ g(s, {
|
|
59
59
|
wide: !0,
|
|
60
60
|
title: N("title"),
|
|
61
61
|
description: N("description"),
|
|
@@ -88,7 +88,7 @@ function j() {
|
|
|
88
88
|
nounPlural: N("nounPlural")
|
|
89
89
|
},
|
|
90
90
|
empty: {
|
|
91
|
-
icon: /* @__PURE__ */ h(
|
|
91
|
+
icon: /* @__PURE__ */ h(a, {}),
|
|
92
92
|
title: N("none")
|
|
93
93
|
},
|
|
94
94
|
noMatches: N("noMatches"),
|
|
@@ -107,7 +107,7 @@ function j() {
|
|
|
107
107
|
onClick: () => $(e)
|
|
108
108
|
}],
|
|
109
109
|
children: [/* @__PURE__ */ h(E, {
|
|
110
|
-
icon: /* @__PURE__ */ h(
|
|
110
|
+
icon: /* @__PURE__ */ h(a, {}),
|
|
111
111
|
iconTile: !0,
|
|
112
112
|
name: M(e.userAgent) || N("unknownBrowser"),
|
|
113
113
|
subtitle: e.current ? N("current", { created: P.relative(e.createdAt) }) : N("created", { created: P.relative(e.createdAt) }),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { slackQuery as n } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useConfirm as r } from "../../../lib/confirm.js";
|
|
4
|
+
import { Route as i } from "./slack.js";
|
|
5
|
+
import { usePeople as a } from "../../../lib/people.js";
|
|
6
|
+
import { useCan as o } from "../../../lib/roles.js";
|
|
7
|
+
import { AdminOnly as s, SettingsPage as c, useFormError as l } from "../../../components/settings.js";
|
|
8
8
|
import { externalUrl as u } from "../../../lib/externalUrl.js";
|
|
9
9
|
import { ConnectionCard as d } from "../../../components/ConnectionCard.js";
|
|
10
10
|
import { Button as f, SettingsCard as p, StatusLabel as m, buttonClasses as h } from "@parallelworks/ui";
|
|
@@ -14,7 +14,7 @@ import { useMutation as x, useQueryClient as S, useSuspenseQuery as C } from "@t
|
|
|
14
14
|
import { SlackIcon as w } from "@parallelworks/ui/brand-icons";
|
|
15
15
|
// src/routes/$workspace/settings/slack.tsx?tsr-split=component
|
|
16
16
|
function T() {
|
|
17
|
-
let { workspace: T } =
|
|
17
|
+
let { workspace: T } = i.useParams(), { slack: E } = i.useSearch(), { data: D } = C(n(T)), O = o(T, "manage_workspace"), k = _("settingsNav"), A = _("slack"), j = g(), { person: M } = a(T), N = S(), P = l(), { confirm: F, dialog: I } = r(), L = x({
|
|
18
18
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/slack/connect", { params: { path: { workspace: T } } })),
|
|
19
19
|
onMutate: P.clear,
|
|
20
20
|
onSuccess: ({ url: e }) => {
|
|
@@ -28,11 +28,11 @@ function T() {
|
|
|
28
28
|
onSuccess: () => N.invalidateQueries({ queryKey: n(T).queryKey }),
|
|
29
29
|
onError: P.set
|
|
30
30
|
});
|
|
31
|
-
return /* @__PURE__ */ b(
|
|
31
|
+
return /* @__PURE__ */ b(c, {
|
|
32
32
|
title: k("slack"),
|
|
33
33
|
description: A("pageDescription"),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ y(
|
|
35
|
+
/* @__PURE__ */ y(s, { workspace: T }),
|
|
36
36
|
I,
|
|
37
37
|
D.enabled ? /* @__PURE__ */ b("div", {
|
|
38
38
|
className: "space-y-6",
|