@parallelworks/tandem-web 0.138.0 → 0.139.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/components/AgentWork.js +35 -35
- package/components/AppRoot.js +4 -4
- package/components/AreaWork.js +1 -1
- package/components/BlockHandle.js +3 -3
- package/components/CommandPalette.js +27 -27
- package/components/DateChip.js +27 -27
- package/components/DocLinkPicker.js +17 -17
- package/components/Graph.js +6 -6
- package/components/HoverCards.js +30 -29
- package/components/IssueListBlock.js +83 -83
- package/components/LinkCard.js +20 -20
- package/components/MentionPicker.js +12 -12
- package/components/NewIssueDialog.js +116 -116
- package/components/NewProjectDialog.js +5 -4
- package/components/Planning.js +31 -43
- package/components/RouterLink.js +4 -4
- package/components/ShareDialog.js +12 -12
- package/components/SharedUI.js +19 -19
- package/components/SlashMenu.js +11 -11
- package/components/SubPages.js +10 -10
- package/components/UnlinkedMentions.js +10 -10
- package/components/WorkCounts.js +8 -8
- package/components/settings.js +26 -26
- package/hostedApp.js +36 -36
- package/hosting.d.ts +24 -11
- package/index.js +58 -27
- package/lib/base.js +1 -14
- package/lib/docs.js +6 -6
- package/lib/issueMenu.js +33 -33
- package/lib/knowledge.js +90 -101
- package/lib/knowledgeKinds.js +14 -0
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +15 -0
- package/lib/router.js +20 -34
- package/package.json +6 -6
- package/pages/areas.js +147 -147
- package/pages/decisions.js +40 -40
- package/pages/issues.js +4 -4
- package/pages/projects.js +232 -231
- package/pages/triage.js +86 -86
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/docs/_doc2.js +12 -12
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +327 -327
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +125 -124
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +22 -21
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/projects/_projectId3.js +264 -263
- package/routes/_workspace/projects/index.js +7 -7
- package/routes/_workspace/settings/account2.js +3 -3
- package/routes/_workspace/settings/audit-log2.js +4 -4
- package/routes/_workspace/settings/audit-log3.js +51 -51
- package/routes/_workspace/settings/labels2.js +14 -14
- package/routes/_workspace/settings/members2.js +9 -9
- package/routes/_workspace/settings/runners2.js +11 -11
- package/routes/_workspace/settings/teams2.js +15 -15
- package/routes/_workspace/settings/tokens2.js +5 -5
- package/routes/_workspace/settings/webhooks2.js +7 -7
- package/routes/_workspace/settings2.js +3 -3
- package/routes/_workspace/teams/_key/cycles/_number2.js +8 -8
- package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
- package/routes/_workspace/teams/_key/issues.js +4 -4
- package/routes/_workspace/teams/_key/projects.js +4 -4
- package/routes/_workspace/teams/_key/settings2.js +8 -8
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +15 -15
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { rememberSearch as e } from "../../../lib/listSearch.js";
|
|
2
|
+
import { redirect as t } from "../../../lib/router.js";
|
|
3
3
|
import { projectSearch as n } from "../../../lib/projectList.js";
|
|
4
4
|
import { createFileRoute as r, lazyFn as i, lazyRouteComponent as a } from "@tanstack/react-router";
|
|
5
5
|
var o = r("/$workspace/projects/")({
|
|
6
6
|
validateSearch: n,
|
|
7
7
|
beforeLoad: ({ params: n, search: r, location: i, preload: a }) => {
|
|
8
8
|
if (r.team) {
|
|
9
|
-
let { team:
|
|
10
|
-
throw
|
|
9
|
+
let { team: e, ...i } = r;
|
|
10
|
+
throw t({
|
|
11
11
|
to: "/$workspace/teams/$key/projects",
|
|
12
12
|
params: {
|
|
13
13
|
...n,
|
|
14
|
-
key:
|
|
14
|
+
key: e
|
|
15
15
|
},
|
|
16
16
|
search: i,
|
|
17
17
|
replace: !0
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
let o =
|
|
21
|
-
if (o) throw
|
|
20
|
+
let o = e(i.pathname, r, a);
|
|
21
|
+
if (o) throw t({
|
|
22
22
|
to: "/$workspace/projects",
|
|
23
23
|
params: n,
|
|
24
24
|
search: o,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useHost as n } from "../../../lib/host.js";
|
|
3
|
+
import { meQuery as r } from "../../../api/queries.js";
|
|
4
4
|
import { SettingsPage as i, useFormError as a } from "../../../components/settings.js";
|
|
5
5
|
import { setTheme as o, storedTheme as s, themeable as c, themes as l } from "../../../lib/theme.js";
|
|
6
6
|
import { Avatar as u, Button as d, ErrorText as f, Input as p, Select as m, SettingRow as h, SettingsCard as g } from "@parallelworks/ui";
|
|
@@ -10,7 +10,7 @@ import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
|
10
10
|
import { useMutation as x, useQueryClient as S, useSuspenseQuery as C } from "@tanstack/react-query";
|
|
11
11
|
// src/routes/$workspace/settings/account.tsx?tsr-split=component
|
|
12
12
|
function w() {
|
|
13
|
-
let { data: e } = C(
|
|
13
|
+
let { data: e } = C(r), t = n(), a = v("account"), o = v("settingsNav");
|
|
14
14
|
return /* @__PURE__ */ y(i, {
|
|
15
15
|
title: o("profile"),
|
|
16
16
|
description: a("profileDescription"),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { rememberSearch as e } from "../../../lib/listSearch.js";
|
|
2
|
+
import { redirect as t } from "../../../lib/router.js";
|
|
3
3
|
import { paramFields as n } from "./audit-log.js";
|
|
4
4
|
import { createFileRoute as r, lazyFn as i, lazyRouteComponent as a } from "@tanstack/react-router";
|
|
5
5
|
import { filterParamKeys as o } from "@parallelworks/ui/list";
|
|
6
6
|
var s = r("/$workspace/settings/audit-log")({
|
|
7
7
|
validateSearch: l,
|
|
8
8
|
beforeLoad: ({ params: n, search: r, location: i, preload: a }) => {
|
|
9
|
-
let o =
|
|
10
|
-
if (o) throw
|
|
9
|
+
let o = e(i.pathname, r, a);
|
|
10
|
+
if (o) throw t({
|
|
11
11
|
to: "/$workspace/settings/audit-log",
|
|
12
12
|
params: n,
|
|
13
13
|
search: o,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Link as e, useNavigate as t } from "../../../lib/router.js";
|
|
2
2
|
import { auditLogQuery as n } from "../../../api/queries.js";
|
|
3
3
|
import { CalendarIcon as r, HistoryIcon as i, UserIcon as a, usePriorityNames as o } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { paramFields as s } from "./audit-log.js";
|
|
5
|
+
import { Route as c } from "./audit-log2.js";
|
|
6
|
+
import { useTime as l } from "../../../lib/time.js";
|
|
7
7
|
import { usePeople as u } from "../../../lib/people.js";
|
|
8
8
|
import { useCan as d, useRoleName as f } from "../../../lib/roles.js";
|
|
9
9
|
import { SettingsPage as p } from "../../../components/settings.js";
|
|
@@ -32,7 +32,7 @@ var I = [
|
|
|
32
32
|
"workspace"
|
|
33
33
|
];
|
|
34
34
|
function L() {
|
|
35
|
-
let { workspace: e } =
|
|
35
|
+
let { workspace: e } = c.useParams(), t = w("audit"), n = d(e, "manage_workspace");
|
|
36
36
|
return /* @__PURE__ */ E(p, {
|
|
37
37
|
title: t("title"),
|
|
38
38
|
description: t("description"),
|
|
@@ -58,7 +58,7 @@ function R(e) {
|
|
|
58
58
|
return t;
|
|
59
59
|
}
|
|
60
60
|
function z({ workspace: e }) {
|
|
61
|
-
let o = w("audit"),
|
|
61
|
+
let o = w("audit"), l = c.useSearch(), d = t({ from: c.fullPath }), { members: f, agents: p } = u(e), h = S(() => [
|
|
62
62
|
{
|
|
63
63
|
key: "actor",
|
|
64
64
|
label: o("actor"),
|
|
@@ -125,9 +125,9 @@ function z({ workspace: e }) {
|
|
|
125
125
|
storageKey: `audit-log:${e}`,
|
|
126
126
|
fields: h,
|
|
127
127
|
store: {
|
|
128
|
-
value: N(
|
|
128
|
+
value: N(l, s),
|
|
129
129
|
onChange: (e) => d({
|
|
130
|
-
search: (t) => F(t, e,
|
|
130
|
+
search: (t) => F(t, e, s),
|
|
131
131
|
replace: !0
|
|
132
132
|
})
|
|
133
133
|
}
|
|
@@ -247,14 +247,14 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function H(e) {
|
|
250
|
-
let t = w("relations"), n = w("flow"), r = C(), i =
|
|
250
|
+
let t = w("relations"), n = w("flow"), r = C(), i = l(), a = o(), { person: s, nameOf: c } = u(e), d = f(e);
|
|
251
251
|
return (e) => {
|
|
252
|
-
let o = e.data ?? {},
|
|
252
|
+
let o = e.data ?? {}, l = (e) => String(o[e] ?? ""), u = (e) => o[e]?.name ?? "", f = (e) => a[Number(o[e])] ?? "";
|
|
253
253
|
switch (e.type) {
|
|
254
254
|
case "issue.created": return ["issueCreated", {}];
|
|
255
255
|
case "issue.title_changed": return ["issueTitleChanged", {
|
|
256
|
-
from:
|
|
257
|
-
to:
|
|
256
|
+
from: l("from"),
|
|
257
|
+
to: l("to")
|
|
258
258
|
}];
|
|
259
259
|
case "issue.body_changed": return ["issueBodyChanged", {}];
|
|
260
260
|
case "issue.status_changed": return ["issueStatusChanged", {
|
|
@@ -266,65 +266,65 @@ function H(e) {
|
|
|
266
266
|
to: f("to")
|
|
267
267
|
}];
|
|
268
268
|
case "issue.assignee_added":
|
|
269
|
-
case "issue.assignee_removed": return [e.type === "issue.assignee_added" ? "issueAssigned" : "issueUnassigned", { assignee: l(
|
|
270
|
-
case "issue.label_added": return ["issueLabelAdded", { label:
|
|
271
|
-
case "issue.label_removed": return ["issueLabelRemoved", { label:
|
|
272
|
-
case "issue.parent_changed": return o.identifier ? ["issueParentSet", { identifier:
|
|
269
|
+
case "issue.assignee_removed": return [e.type === "issue.assignee_added" ? "issueAssigned" : "issueUnassigned", { assignee: c(l("kind"), l("handle")) }];
|
|
270
|
+
case "issue.label_added": return ["issueLabelAdded", { label: l("name") }];
|
|
271
|
+
case "issue.label_removed": return ["issueLabelRemoved", { label: l("name") }];
|
|
272
|
+
case "issue.parent_changed": return o.identifier ? ["issueParentSet", { identifier: l("identifier") }] : ["issueParentCleared", {}];
|
|
273
273
|
case "issue.relation_added":
|
|
274
274
|
case "issue.relation_removed": return [e.type === "issue.relation_added" ? "issueRelationAdded" : "issueRelationRemoved", {
|
|
275
275
|
relation: t(`kinds.${B(o)}`).toLowerCase(),
|
|
276
|
-
identifier:
|
|
276
|
+
identifier: l("identifier")
|
|
277
277
|
}];
|
|
278
278
|
case "issue.pull_request_changed": return ["issuePullRequest", {
|
|
279
|
-
repository:
|
|
280
|
-
number:
|
|
279
|
+
repository: l("repository"),
|
|
280
|
+
number: l("number")
|
|
281
281
|
}];
|
|
282
282
|
case "issue.pull_request_unlinked": return ["issuePullRequestUnlinked", {
|
|
283
|
-
repository:
|
|
284
|
-
number:
|
|
283
|
+
repository: l("repository"),
|
|
284
|
+
number: l("number")
|
|
285
285
|
}];
|
|
286
286
|
case "issue.branch_changed": return ["issueBranch", {
|
|
287
|
-
branch:
|
|
287
|
+
branch: l("branch"),
|
|
288
288
|
deleted: o.deleted ? "yes" : "no"
|
|
289
289
|
}];
|
|
290
290
|
case "issue.archived": return ["issueArchived", {}];
|
|
291
291
|
case "issue.restored": return ["issueRestored", {}];
|
|
292
292
|
case "issue.deleted": return ["issueDeleted", {
|
|
293
|
-
identifier:
|
|
294
|
-
title:
|
|
293
|
+
identifier: l("identifier"),
|
|
294
|
+
title: l("title")
|
|
295
295
|
}];
|
|
296
|
-
case "issue.attachment_added": return ["issueAttachmentAdded", { file:
|
|
296
|
+
case "issue.attachment_added": return ["issueAttachmentAdded", { file: l("name") }];
|
|
297
297
|
case "issue.released": return ["issueReleased", {
|
|
298
|
-
commit:
|
|
298
|
+
commit: l("commit").slice(0, 7),
|
|
299
299
|
targets: r.list(o.targets ?? [])
|
|
300
300
|
}];
|
|
301
|
-
case "issue.stage_changed": return o.to ? ["issueStageMoved", { stage: n(`stages.${
|
|
301
|
+
case "issue.stage_changed": return o.to ? ["issueStageMoved", { stage: n(`stages.${l("to")}`) }] : ["issueStageLeft", {}];
|
|
302
302
|
case "issue.area_changed":
|
|
303
303
|
case "doc.area_changed": {
|
|
304
304
|
let t = o.to?.title, n = e.type === "doc.area_changed";
|
|
305
305
|
return t ? [n ? "docAreaSet" : "issueAreaSet", { area: t }] : [n ? "docAreaCleared" : "issueAreaCleared", {}];
|
|
306
306
|
}
|
|
307
|
-
case "issue.project_changed": return o.name ? ["issueProjectSet", { project:
|
|
308
|
-
case "issue.milestone_changed": return o.name ? ["issueMilestoneSet", { milestone:
|
|
309
|
-
case "issue.cycle_changed": return o.number ? ["issueCycleSet", { number:
|
|
307
|
+
case "issue.project_changed": return o.name ? ["issueProjectSet", { project: l("name") }] : ["issueProjectCleared", {}];
|
|
308
|
+
case "issue.milestone_changed": return o.name ? ["issueMilestoneSet", { milestone: l("name") }] : ["issueMilestoneCleared", {}];
|
|
309
|
+
case "issue.cycle_changed": return o.number ? ["issueCycleSet", { number: l("number") }] : ["issueCycleCleared", {}];
|
|
310
310
|
case "issue.estimate_changed": return Number(o.to) ? ["issueEstimateSet", { points: r.number(Number(o.to)) }] : ["issueEstimateCleared", {}];
|
|
311
|
-
case "issue.due_date_changed": return o.to ? ["issueDueDateSet", { date: i.day(
|
|
311
|
+
case "issue.due_date_changed": return o.to ? ["issueDueDateSet", { date: i.day(l("to")) }] : ["issueDueDateCleared", {}];
|
|
312
312
|
case "issue.reaction_added":
|
|
313
|
-
case "issue.reaction_removed": return [e.type === "issue.reaction_added" ? "issueReactionAdded" : "issueReactionRemoved", { emoji: _[
|
|
313
|
+
case "issue.reaction_removed": return [e.type === "issue.reaction_added" ? "issueReactionAdded" : "issueReactionRemoved", { emoji: _[l("emoji")] ?? l("emoji") }];
|
|
314
314
|
case "issue.triage_accepted": return ["issueTriageAccepted", {}];
|
|
315
315
|
case "issue.triage_declined": return ["issueTriageDeclined", {}];
|
|
316
316
|
case "comment.created": return ["commentCreated", {}];
|
|
317
317
|
case "comment.edited": return ["commentEdited", {}];
|
|
318
318
|
case "comment.deleted": return ["commentDeleted", {}];
|
|
319
319
|
case "run.created": return ["runCreated", {}];
|
|
320
|
-
case "run.state_changed": return ["runState", { state:
|
|
320
|
+
case "run.state_changed": return ["runState", { state: l("to") }];
|
|
321
321
|
case "decision.requested": return ["decisionRequested", {}];
|
|
322
322
|
case "decision.answered": return ["decisionAnswered", {}];
|
|
323
323
|
case "label.created": return ["labelCreated", {}];
|
|
324
324
|
case "label.updated": return ["labelUpdated", {}];
|
|
325
325
|
case "label.deleted": return ["labelDeleted", {}];
|
|
326
|
-
case "team.status_created": return ["statusCreated", { status:
|
|
327
|
-
case "team.status_updated": return ["statusUpdated", { status:
|
|
326
|
+
case "team.status_created": return ["statusCreated", { status: l("name") }];
|
|
327
|
+
case "team.status_updated": return ["statusUpdated", { status: l("name") }];
|
|
328
328
|
case "team.status_deleted": return ["statusDeleted", {
|
|
329
329
|
status: u("status"),
|
|
330
330
|
movedTo: u("movedTo")
|
|
@@ -342,9 +342,9 @@ function H(e) {
|
|
|
342
342
|
case "project.created": return ["projectCreated", {}];
|
|
343
343
|
case "project.updated": return ["projectUpdated", {}];
|
|
344
344
|
case "project.deleted": return ["projectDeleted", {}];
|
|
345
|
-
case "project.milestone_created": return ["milestoneCreated", { milestone:
|
|
346
|
-
case "project.milestone_updated": return ["milestoneUpdated", { milestone:
|
|
347
|
-
case "project.milestone_deleted": return ["milestoneDeleted", { milestone:
|
|
345
|
+
case "project.milestone_created": return ["milestoneCreated", { milestone: l("name") }];
|
|
346
|
+
case "project.milestone_updated": return ["milestoneUpdated", { milestone: l("name") }];
|
|
347
|
+
case "project.milestone_deleted": return ["milestoneDeleted", { milestone: l("name") }];
|
|
348
348
|
case "project.update_posted": return ["updatePosted", {}];
|
|
349
349
|
case "project.update_deleted": return ["updateDeleted", {}];
|
|
350
350
|
case "area.created": return ["areaCreated", {}];
|
|
@@ -353,19 +353,19 @@ function H(e) {
|
|
|
353
353
|
case "area.merged": return ["areaMerged", {}];
|
|
354
354
|
case "area.archived": return ["areaArchived", {}];
|
|
355
355
|
case "area.restored": return ["areaRestored", {}];
|
|
356
|
-
case "cycle.created": return ["cycleCreated", { number:
|
|
357
|
-
case "cycle.updated": return ["cycleUpdated", { number:
|
|
356
|
+
case "cycle.created": return ["cycleCreated", { number: l("number") }];
|
|
357
|
+
case "cycle.updated": return ["cycleUpdated", { number: l("number") }];
|
|
358
358
|
case "team.created": return ["teamCreated", {}];
|
|
359
359
|
case "team.updated": return ["teamUpdated", {}];
|
|
360
360
|
case "team.deleted": return ["teamDeleted", {}];
|
|
361
|
-
case "team.member_added": return ["teamMemberAdded", { person:
|
|
362
|
-
case "team.member_removed": return ["teamMemberRemoved", { person:
|
|
361
|
+
case "team.member_added": return ["teamMemberAdded", { person: s(l("username")).name }];
|
|
362
|
+
case "team.member_removed": return ["teamMemberRemoved", { person: s(l("username")).name }];
|
|
363
363
|
case "team.rotation_changed": return ["teamRotationChanged", {}];
|
|
364
|
-
case "team.rotation_handed_off": return ["teamRotationHandedOff", { person:
|
|
365
|
-
case "team.repository_linked": return ["teamRepositoryLinked", { repository:
|
|
366
|
-
case "team.repository_unlinked": return ["teamRepositoryUnlinked", { repository:
|
|
364
|
+
case "team.rotation_handed_off": return ["teamRotationHandedOff", { person: s(l("to")).name }];
|
|
365
|
+
case "team.repository_linked": return ["teamRepositoryLinked", { repository: l("repository") }];
|
|
366
|
+
case "team.repository_unlinked": return ["teamRepositoryUnlinked", { repository: l("repository") }];
|
|
367
367
|
case "doc.created": return ["docCreated", {}];
|
|
368
|
-
case "doc.title_changed": return ["docTitleChanged", { from:
|
|
368
|
+
case "doc.title_changed": return ["docTitleChanged", { from: l("from") }];
|
|
369
369
|
case "doc.body_changed": return ["docBodyChanged", {}];
|
|
370
370
|
case "doc.moved": return [e.target.kind === "doc" ? "docMoved" : "docMovedOut", {}];
|
|
371
371
|
case "doc.template_changed": return ["docTemplateChanged", { template: o.template ? "yes" : "no" }];
|
|
@@ -383,15 +383,15 @@ function H(e) {
|
|
|
383
383
|
case "knowledge.archived": return ["knowledgeArchived", {}];
|
|
384
384
|
case "knowledge.restored": return ["knowledgeRestored", {}];
|
|
385
385
|
case "agent.created": return ["agentCreated", {}];
|
|
386
|
-
case "agent.updated": return ["agentUpdated", { version:
|
|
386
|
+
case "agent.updated": return ["agentUpdated", { version: l("version") }];
|
|
387
387
|
case "workspace.created": return ["workspaceCreated", {}];
|
|
388
388
|
case "workspace.updated": return ["workspaceUpdated", {}];
|
|
389
|
-
case "workspace.role_created": return ["roleCreated", { role:
|
|
390
|
-
case "workspace.role_updated": return ["roleUpdated", { role:
|
|
391
|
-
case "workspace.role_deleted": return ["roleDeleted", { role:
|
|
389
|
+
case "workspace.role_created": return ["roleCreated", { role: l("name") }];
|
|
390
|
+
case "workspace.role_updated": return ["roleUpdated", { role: l("name") }];
|
|
391
|
+
case "workspace.role_deleted": return ["roleDeleted", { role: l("name") }];
|
|
392
392
|
case "workspace.member_role_changed": return ["memberRoleChanged", {
|
|
393
|
-
person:
|
|
394
|
-
role: d(
|
|
393
|
+
person: s(l("username")).name,
|
|
394
|
+
role: d(l("role"))
|
|
395
395
|
}];
|
|
396
396
|
case "workspace.access_changed": return ["workspaceAccessChanged", {}];
|
|
397
397
|
case "team.access_changed": return ["teamAccessChanged", {}];
|
|
@@ -2,8 +2,8 @@ import { api as e, unwrap as t } from "../../../api/client.js";
|
|
|
2
2
|
import { useNavigate as n } from "../../../lib/router.js";
|
|
3
3
|
import { labelsQuery as r } from "../../../api/queries.js";
|
|
4
4
|
import { TagIcon as i } from "../../../components/icons.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Route as a } from "./labels.js";
|
|
6
|
+
import { copyItem as o } from "../../../lib/menus.js";
|
|
7
7
|
import { useCan as s } from "../../../lib/roles.js";
|
|
8
8
|
import { AdminOnly as c, SettingsPage as l, useFormError as u } from "../../../components/settings.js";
|
|
9
9
|
import { useConfirm as d } from "../../../lib/confirm.js";
|
|
@@ -15,22 +15,22 @@ import { useMutation as D, useQueryClient as O, useSuspenseQuery as k } from "@t
|
|
|
15
15
|
import { ListCellText as A, ListColumns as j, ListPage as M, ListRow as N, ListToolbar as P, NameCell as F, listTableProps as I, useListNavigate as L, useListSearch as R, useListView as z } from "@parallelworks/ui/list";
|
|
16
16
|
// src/routes/$workspace/settings/labels.tsx?tsr-split=component
|
|
17
17
|
function B() {
|
|
18
|
-
let { workspace: e } =
|
|
18
|
+
let { workspace: e } = a.useParams();
|
|
19
19
|
return /* @__PURE__ */ T(V, {
|
|
20
20
|
workspace: e,
|
|
21
21
|
isAdmin: s(e, "manage_labels")
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function V({ workspace:
|
|
25
|
-
let { data: u } = k(r(
|
|
24
|
+
function V({ workspace: a, isAdmin: s }) {
|
|
25
|
+
let { data: u } = k(r(a)), f = n(), p = w("settings"), m = w("common"), h = R(), g = L(), _ = x(), [B, V] = C(null), U = O(), { confirm: W, dialog: G } = d(), K = D({
|
|
26
26
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/labels/{labelId}", { params: { path: {
|
|
27
|
-
workspace:
|
|
27
|
+
workspace: a,
|
|
28
28
|
labelId: n.id
|
|
29
29
|
} } })),
|
|
30
30
|
onSettled: () => {
|
|
31
|
-
U.invalidateQueries({ queryKey: r(
|
|
31
|
+
U.invalidateQueries({ queryKey: r(a).queryKey }), U.invalidateQueries({ queryKey: [
|
|
32
32
|
"workspace",
|
|
33
|
-
|
|
33
|
+
a,
|
|
34
34
|
"issues"
|
|
35
35
|
] });
|
|
36
36
|
}
|
|
@@ -54,7 +54,7 @@ function V({ workspace: o, isAdmin: s }) {
|
|
|
54
54
|
label: m("name"),
|
|
55
55
|
compare: (e, t) => e.name.localeCompare(t.name)
|
|
56
56
|
}], [m]), X = z({
|
|
57
|
-
storageKey: `tandem-labels-${
|
|
57
|
+
storageKey: `tandem-labels-${a}`,
|
|
58
58
|
defaultShowColumnHeaders: !1,
|
|
59
59
|
columns: J,
|
|
60
60
|
orderBys: Y,
|
|
@@ -80,7 +80,7 @@ function V({ workspace: o, isAdmin: s }) {
|
|
|
80
80
|
/* @__PURE__ */ T("div", {
|
|
81
81
|
className: "px-4",
|
|
82
82
|
children: /* @__PURE__ */ T(c, {
|
|
83
|
-
workspace:
|
|
83
|
+
workspace: a,
|
|
84
84
|
permission: "manage_labels"
|
|
85
85
|
})
|
|
86
86
|
}),
|
|
@@ -112,12 +112,12 @@ function V({ workspace: o, isAdmin: s }) {
|
|
|
112
112
|
label: p("viewIssues"),
|
|
113
113
|
onClick: () => f({
|
|
114
114
|
to: "/$workspace/issues",
|
|
115
|
-
params: { workspace:
|
|
115
|
+
params: { workspace: a },
|
|
116
116
|
search: { label: e.name }
|
|
117
117
|
})
|
|
118
118
|
},
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
o(m("copyName"), e.name),
|
|
120
|
+
o(p("copyColor"), e.color),
|
|
121
121
|
...s ? [
|
|
122
122
|
b,
|
|
123
123
|
{
|
|
@@ -151,7 +151,7 @@ function V({ workspace: o, isAdmin: s }) {
|
|
|
151
151
|
})
|
|
152
152
|
}),
|
|
153
153
|
(B === "new" || $) && /* @__PURE__ */ T(H, {
|
|
154
|
-
workspace:
|
|
154
|
+
workspace: a,
|
|
155
155
|
label: $,
|
|
156
156
|
onDone: () => V(null)
|
|
157
157
|
}),
|
|
@@ -2,8 +2,8 @@ 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
4
|
import { ShieldIcon as s, UserIcon as c, UsersIcon as l } from "../../../components/icons.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Route as u } from "./members.js";
|
|
6
|
+
import { copyItem as d } from "../../../lib/menus.js";
|
|
7
7
|
import { useCan as f, useRoleOptions as p } from "../../../lib/roles.js";
|
|
8
8
|
import { AdminOnly as m, SettingsPage as h, useFormError as g } from "../../../components/settings.js";
|
|
9
9
|
import { useConfirm as _ } from "../../../lib/confirm.js";
|
|
@@ -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 } = u.useParams(), { data: t } = I(r), n = f(e, "manage_members"), i = t?.user.username ?? "";
|
|
21
21
|
return t?.mode === "platform" ? /* @__PURE__ */ M(H, {
|
|
22
22
|
workspace: e,
|
|
23
23
|
isAdmin: n,
|
|
@@ -29,8 +29,8 @@ function B() {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
32
|
-
let { data: l } = I(i(a)),
|
|
33
|
-
|
|
32
|
+
let { data: l } = I(i(a)), u = F(), f = n(), [y, S] = k(""), [w, A] = k("member"), [B, V] = k(!1), H = j("settings"), U = j("common"), W = p(a), G = g(), K = () => {
|
|
33
|
+
u.invalidateQueries({ queryKey: i(a).queryKey }), u.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 } },
|
|
@@ -178,7 +178,7 @@ function V({ workspace: a, isAdmin: o, myUsername: s }) {
|
|
|
178
178
|
}
|
|
179
179
|
})
|
|
180
180
|
},
|
|
181
|
-
|
|
181
|
+
d(U("copyEmail"), e.user.email),
|
|
182
182
|
...o || e.user.username === s ? [E, {
|
|
183
183
|
label: e.user.username === s ? H("leaveWorkspace") : H("removeFromWorkspace"),
|
|
184
184
|
destructive: !0,
|
|
@@ -337,7 +337,7 @@ function H({ workspace: n, isAdmin: r, myUsername: c }) {
|
|
|
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 = p(e), c = D(), l = n(), [
|
|
340
|
+
let i = j("settings"), a = j("common"), o = A(), s = p(e), c = D(), l = n(), [u, f] = k(""), m = (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 || [
|
|
@@ -348,7 +348,7 @@ function U({ workspace: e, members: t, myUsername: r }) {
|
|
|
348
348
|
return /* @__PURE__ */ N("div", {
|
|
349
349
|
className: "mt-4",
|
|
350
350
|
children: [/* @__PURE__ */ M(w, {
|
|
351
|
-
value:
|
|
351
|
+
value: u,
|
|
352
352
|
onValueChange: f,
|
|
353
353
|
label: i("searchPeople")
|
|
354
354
|
}), /* @__PURE__ */ N(S, {
|
|
@@ -368,7 +368,7 @@ function U({ workspace: e, members: t, myUsername: r }) {
|
|
|
368
368
|
username: t.user.username
|
|
369
369
|
}
|
|
370
370
|
})
|
|
371
|
-
},
|
|
371
|
+
}, d(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, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { runnersQuery as n } from "../../../api/queries.js";
|
|
3
3
|
import { WorkerIcon as r } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Route as i } from "./runners.js";
|
|
5
|
+
import { copyItem as a } from "../../../lib/menus.js";
|
|
6
|
+
import { useTime as o } from "../../../lib/time.js";
|
|
7
7
|
import { SettingsPage as s } from "../../../components/settings.js";
|
|
8
8
|
import { useConfirm as c } from "../../../lib/confirm.js";
|
|
9
9
|
import { Table as l, menuDivider as u, useOpenMenu as d } from "@parallelworks/ui";
|
|
@@ -20,16 +20,16 @@ var A = {
|
|
|
20
20
|
bypass: "runnerModeBypass"
|
|
21
21
|
};
|
|
22
22
|
function j() {
|
|
23
|
-
let { workspace: e } =
|
|
23
|
+
let { workspace: e } = i.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: i }) {
|
|
27
|
+
let { data: j } = y(n(i)), M = m("account"), N = p(), P = m("common"), F = o(), 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: i,
|
|
30
30
|
runnerId: n
|
|
31
31
|
} } })),
|
|
32
|
-
onSettled: () => I.invalidateQueries({ queryKey: n(
|
|
32
|
+
onSettled: () => I.invalidateQueries({ queryKey: n(i).queryKey })
|
|
33
33
|
}), { confirm: V, dialog: H } = c(), U = (e) => V({
|
|
34
34
|
title: M("revokeRunnerTitle"),
|
|
35
35
|
description: M("revokeRunnerDescription", { name: e.name }),
|
|
@@ -54,7 +54,7 @@ function M({ workspace: o }) {
|
|
|
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-${i}`,
|
|
58
58
|
defaultShowColumnHeaders: !1,
|
|
59
59
|
columns: W,
|
|
60
60
|
orderBys: G,
|
|
@@ -102,8 +102,8 @@ function M({ workspace: o }) {
|
|
|
102
102
|
goTo: R,
|
|
103
103
|
openMenu: z,
|
|
104
104
|
items: [
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
a(M("copyRunnerId"), e.id),
|
|
106
|
+
a(P("copyName"), e.name),
|
|
107
107
|
u,
|
|
108
108
|
{
|
|
109
109
|
label: M("revoke"),
|
|
@@ -2,8 +2,8 @@ import { useNavigate as e } from "../../../lib/router.js";
|
|
|
2
2
|
import { teamsQuery as t } from "../../../api/queries.js";
|
|
3
3
|
import { FolderIcon as n } from "../../../components/icons.js";
|
|
4
4
|
import { teamPath as r } from "../../../lib/teamPaths.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Route as i } from "./teams.js";
|
|
6
|
+
import { copyItem as a, useLinkItems as o } from "../../../lib/menus.js";
|
|
7
7
|
import { useCan as s } from "../../../lib/roles.js";
|
|
8
8
|
import { AdminOnly as c, SettingsPage as l } from "../../../components/settings.js";
|
|
9
9
|
import { TeamForm as u } from "../../../components/TeamForm.js";
|
|
@@ -15,14 +15,14 @@ import { useSuspenseQuery as C } from "@tanstack/react-query";
|
|
|
15
15
|
import { ListCellText as w, ListColumns as T, ListPage as E, ListRow as D, ListToolbar as O, NameCell as k, listTableProps as A, useListNavigate as j, useListSearch as M, useListView as N } from "@parallelworks/ui/list";
|
|
16
16
|
// src/routes/$workspace/settings/teams.tsx?tsr-split=component
|
|
17
17
|
function P() {
|
|
18
|
-
let { workspace: e } =
|
|
18
|
+
let { workspace: e } = i.useParams();
|
|
19
19
|
return /* @__PURE__ */ x(F, {
|
|
20
20
|
workspace: e,
|
|
21
21
|
isAdmin: s(e, "manage_teams")
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function F({ workspace:
|
|
25
|
-
let { data: P } = C(t(
|
|
24
|
+
function F({ workspace: i, isAdmin: s }) {
|
|
25
|
+
let { data: P } = C(t(i)), F = e(), I = b("settings"), L = b("common"), R = o(), z = M(), B = j(), V = _(), [H, U] = y(!1), W = v(() => [{
|
|
26
26
|
key: "name",
|
|
27
27
|
label: L("name"),
|
|
28
28
|
headerClassName: "py-2",
|
|
@@ -41,7 +41,7 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
41
41
|
label: I("key"),
|
|
42
42
|
compare: (e, t) => e.key.localeCompare(t.key)
|
|
43
43
|
}], [I, L]), K = N({
|
|
44
|
-
storageKey: `tandem-teams-${
|
|
44
|
+
storageKey: `tandem-teams-${i}`,
|
|
45
45
|
defaultShowColumnHeaders: !1,
|
|
46
46
|
columns: W,
|
|
47
47
|
orderBys: G,
|
|
@@ -67,7 +67,7 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
67
67
|
/* @__PURE__ */ x("div", {
|
|
68
68
|
className: "px-4",
|
|
69
69
|
children: /* @__PURE__ */ x(c, {
|
|
70
|
-
workspace:
|
|
70
|
+
workspace: i,
|
|
71
71
|
permission: "manage_teams"
|
|
72
72
|
})
|
|
73
73
|
}),
|
|
@@ -90,7 +90,7 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
90
90
|
children: /* @__PURE__ */ S(h, {
|
|
91
91
|
...A,
|
|
92
92
|
children: [/* @__PURE__ */ x(T, { view: K }), K.applyOrder(J).map((e) => /* @__PURE__ */ S(D, {
|
|
93
|
-
href: r(
|
|
93
|
+
href: r(i, e.key, "settings"),
|
|
94
94
|
goTo: B,
|
|
95
95
|
openMenu: V,
|
|
96
96
|
items: [
|
|
@@ -99,7 +99,7 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
99
99
|
onClick: () => F({
|
|
100
100
|
to: "/$workspace/teams/$key/issues",
|
|
101
101
|
params: {
|
|
102
|
-
workspace:
|
|
102
|
+
workspace: i,
|
|
103
103
|
key: e.key
|
|
104
104
|
}
|
|
105
105
|
})
|
|
@@ -109,20 +109,20 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
109
109
|
onClick: () => F({
|
|
110
110
|
to: "/$workspace/teams/$key/settings",
|
|
111
111
|
params: {
|
|
112
|
-
workspace:
|
|
112
|
+
workspace: i,
|
|
113
113
|
key: e.key
|
|
114
114
|
}
|
|
115
115
|
})
|
|
116
116
|
},
|
|
117
117
|
g,
|
|
118
|
-
...R(r(
|
|
119
|
-
|
|
118
|
+
...R(r(i, e.key, "settings")),
|
|
119
|
+
a(L("copyKey"), e.key)
|
|
120
120
|
],
|
|
121
121
|
children: [/* @__PURE__ */ x(k, {
|
|
122
122
|
icon: /* @__PURE__ */ x(n, {}),
|
|
123
123
|
iconTile: !0,
|
|
124
124
|
name: e.name,
|
|
125
|
-
href: r(
|
|
125
|
+
href: r(i, e.key, "settings"),
|
|
126
126
|
...e.archivedAt && { badge: /* @__PURE__ */ x(m, {
|
|
127
127
|
emphasis: "outline",
|
|
128
128
|
children: I("teamArchived")
|
|
@@ -146,12 +146,12 @@ function F({ workspace: o, isAdmin: s }) {
|
|
|
146
146
|
className: "mb-4 text-sm font-semibold",
|
|
147
147
|
children: I("newTeam")
|
|
148
148
|
}), /* @__PURE__ */ x(u, {
|
|
149
|
-
workspace:
|
|
149
|
+
workspace: i,
|
|
150
150
|
autoFocus: !0,
|
|
151
151
|
onCreated: (e) => F({
|
|
152
152
|
to: "/$workspace/teams/$key/settings",
|
|
153
153
|
params: {
|
|
154
|
-
workspace:
|
|
154
|
+
workspace: i,
|
|
155
155
|
key: e.key
|
|
156
156
|
}
|
|
157
157
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { tokensQuery as n } from "../../../api/queries.js";
|
|
3
3
|
import { KeyIcon as r } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Route as i } from "./tokens.js";
|
|
5
|
+
import { copyItem as a } from "../../../lib/menus.js";
|
|
6
|
+
import { useTime as o } from "../../../lib/time.js";
|
|
7
7
|
import { SettingsPage as s, useFormError as c } from "../../../components/settings.js";
|
|
8
8
|
import { useConfirm as l } from "../../../lib/confirm.js";
|
|
9
9
|
import { OneTimeSecret as u } from "../../../components/OneTimeSecret.js";
|
|
@@ -15,7 +15,7 @@ import { useMutation as E, useQueryClient as D, useSuspenseQuery as O } from "@t
|
|
|
15
15
|
import { ListCellText as k, ListColumns as A, ListPage as j, ListRow as M, ListToolbar as N, NameCell as P, listTableProps as F, useListNavigate as I, useListSearch as L, useListView as R } from "@parallelworks/ui/list";
|
|
16
16
|
// src/routes/$workspace/settings/tokens.tsx?tsr-split=component
|
|
17
17
|
function z() {
|
|
18
|
-
let { workspace: c } =
|
|
18
|
+
let { workspace: c } = i.useParams(), { data: d } = O(n), f = C("account"), p = C("common"), m = o(), h = D(), _ = L(), z = I(), V = b(), [H, U] = S(!1), [W, G] = S(null), K = E({
|
|
19
19
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/me/tokens/{tokenId}", { params: { path: { tokenId: n } } })),
|
|
20
20
|
onSettled: () => h.invalidateQueries({ queryKey: n.queryKey })
|
|
21
21
|
}), { confirm: q, dialog: J } = l(), Y = (e) => q({
|
|
@@ -107,7 +107,7 @@ function z() {
|
|
|
107
107
|
goTo: z,
|
|
108
108
|
openMenu: V,
|
|
109
109
|
items: [
|
|
110
|
-
|
|
110
|
+
a(p("copyName"), e.name),
|
|
111
111
|
y,
|
|
112
112
|
{
|
|
113
113
|
label: f("revoke"),
|