@parallelworks/tandem-web 0.150.2 → 0.151.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 +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +2 -2
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
package/pages/projects.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { usePageTitle as e } from "../lib/pageTitle.js";
|
|
2
2
|
import { Link as t, useNavigate as n } from "../lib/router.js";
|
|
3
3
|
import { projectsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { useFavorites as a } from "../lib/favorites.js";
|
|
5
|
+
import { copyItem as o, useLinkItems as s } from "../lib/menus.js";
|
|
6
|
+
import { ChevronDownIcon as c, ListViewIcon as l, PriorityIcon as u, ProjectIcon as d, TimelineIcon as f, usePriorityNames as p } from "../components/icons.js";
|
|
7
|
+
import { usePeople as m } from "../lib/people.js";
|
|
8
|
+
import { useTime as h } from "../lib/time.js";
|
|
9
|
+
import { HealthIcon as g, ProgressBar as _, ProjectStatusIcon as v, healthOf as y } from "../components/Planning.js";
|
|
10
|
+
import { projectRef as b, projectTree as x, projectsUnder as S } from "../lib/projects.js";
|
|
11
|
+
import { EntityIcon as C } from "../components/EntityIcon.js";
|
|
12
12
|
import { useCan as w } from "../lib/roles.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { FavoriteStar as
|
|
16
|
-
import { DisplayMenu as
|
|
17
|
-
import { NewProjectDialog as
|
|
18
|
-
import { Avatar as
|
|
13
|
+
import { healthStates as T, projectStatuses as ee } from "../lib/projectStates.js";
|
|
14
|
+
import { storeLayout as te, storedLayout as ne } from "../lib/projectList.js";
|
|
15
|
+
import { FavoriteStar as re } from "../components/FavoriteStar.js";
|
|
16
|
+
import { DisplayMenu as ie } from "../components/DisplayMenu.js";
|
|
17
|
+
import { NewProjectDialog as ae } from "../components/NewProjectDialog.js";
|
|
18
|
+
import { Avatar as E, Button as D, Combobox as oe, EmptyState as O, PageHeaderAddButton as k, Switch as A, Tabs as j, ToggleGroup as se, Tooltip as M, menuDivider as ce, useOpenMenu as le } from "@parallelworks/ui";
|
|
19
19
|
import { useParams as ue, useSearch as de } from "@tanstack/react-router";
|
|
20
20
|
import { useEffect as N, useId as fe, useRef as P, useState as F } from "react";
|
|
21
21
|
import { useFormatter as I, useTranslations as L } from "use-intl";
|
|
@@ -24,21 +24,21 @@ import { useSuspenseQuery as B } from "@tanstack/react-query";
|
|
|
24
24
|
import { MoreButton as V } from "@parallelworks/ui/list";
|
|
25
25
|
// src/pages/projects.tsx
|
|
26
26
|
function H() {
|
|
27
|
-
let { workspace: t, key:
|
|
28
|
-
...
|
|
29
|
-
team:
|
|
30
|
-
} :
|
|
31
|
-
e(
|
|
32
|
-
let
|
|
27
|
+
let { workspace: t, key: c } = ue({ strict: !1 }), u = de({ strict: !1 }), p = c ? {
|
|
28
|
+
...u,
|
|
29
|
+
team: c
|
|
30
|
+
} : u, m = L("planning"), h = L("common"), { data: g } = B(r(t)), { data: _ } = B(i(t)), v = _.find((e) => e.key === p.team);
|
|
31
|
+
e(v ? m("teamProjects", { team: v.name }) : m("projects"));
|
|
32
|
+
let x = c ? "list" : "timeline", C = p.view ?? ne(!!c) ?? x, T = g.filter((e) => (!v || e.teamIds.includes(v.id)) && !!e.template == (C === "templates")), E = w(t, "manage_projects"), [j, M] = F(!1), N = fe(), P = n(), I = le(), V = s(), H = p.parent ? g.find((e) => e.id === p.parent) : void 0, U = H && new Set(S(g, H.id).map((e) => e.id)), W = T.filter((e) => (!p.status || e.status === p.status) && (!p.health || y(e) === p.health) && (!U || U.has(e.id))), G = (e) => {
|
|
33
33
|
let { team: n, ...r } = Object.fromEntries(Object.entries({
|
|
34
|
-
...
|
|
34
|
+
...p,
|
|
35
35
|
...e
|
|
36
36
|
}).filter(([, e]) => e !== void 0));
|
|
37
|
-
return P(
|
|
37
|
+
return P(c ? {
|
|
38
38
|
to: "/$workspace/teams/$key/projects",
|
|
39
39
|
params: {
|
|
40
40
|
workspace: t,
|
|
41
|
-
key:
|
|
41
|
+
key: c
|
|
42
42
|
},
|
|
43
43
|
search: r,
|
|
44
44
|
replace: !0
|
|
@@ -48,24 +48,24 @@ function H() {
|
|
|
48
48
|
search: r,
|
|
49
49
|
replace: !0
|
|
50
50
|
});
|
|
51
|
-
}, K =
|
|
51
|
+
}, K = a(t), q = L("favorites"), J = (e) => [
|
|
52
52
|
{
|
|
53
|
-
label:
|
|
53
|
+
label: h("open"),
|
|
54
54
|
onClick: () => P({
|
|
55
55
|
to: "/$workspace/projects/$projectId",
|
|
56
56
|
params: {
|
|
57
57
|
workspace: t,
|
|
58
|
-
projectId:
|
|
58
|
+
projectId: b(e)
|
|
59
59
|
}
|
|
60
60
|
})
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
label:
|
|
63
|
+
label: m("viewIssues"),
|
|
64
64
|
onClick: () => P({
|
|
65
65
|
to: "/$workspace/projects/$projectId",
|
|
66
66
|
params: {
|
|
67
67
|
workspace: t,
|
|
68
|
-
projectId:
|
|
68
|
+
projectId: b(e)
|
|
69
69
|
},
|
|
70
70
|
search: { tab: "issues" }
|
|
71
71
|
})
|
|
@@ -75,8 +75,8 @@ function H() {
|
|
|
75
75
|
onClick: () => K.toggle("project", e.id)
|
|
76
76
|
},
|
|
77
77
|
ce,
|
|
78
|
-
...V(`/${t}/projects/${
|
|
79
|
-
|
|
78
|
+
...V(`/${t}/projects/${b(e)}`),
|
|
79
|
+
o(h("copyName"), e.name)
|
|
80
80
|
], Y = (e) => ({
|
|
81
81
|
workspace: t,
|
|
82
82
|
project: e,
|
|
@@ -91,49 +91,49 @@ function H() {
|
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ R("h1", {
|
|
93
93
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
94
|
-
children:
|
|
94
|
+
children: v ? m("teamProjects", { team: v.name }) : m("projects")
|
|
95
95
|
}),
|
|
96
|
-
!
|
|
96
|
+
!v && /* @__PURE__ */ R(re, {
|
|
97
97
|
workspace: t,
|
|
98
98
|
kind: "page",
|
|
99
99
|
target: "projects"
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ R("span", {
|
|
102
102
|
className: "ml-auto flex items-center gap-1",
|
|
103
|
-
children: /* @__PURE__ */ R(
|
|
104
|
-
...
|
|
103
|
+
children: /* @__PURE__ */ R(ie, {
|
|
104
|
+
...C !== "templates" && {
|
|
105
105
|
layouts: [{
|
|
106
106
|
value: "list",
|
|
107
|
-
label:
|
|
108
|
-
icon: /* @__PURE__ */ R(
|
|
107
|
+
label: m("views.list"),
|
|
108
|
+
icon: /* @__PURE__ */ R(l, {})
|
|
109
109
|
}, {
|
|
110
110
|
value: "timeline",
|
|
111
|
-
label:
|
|
112
|
-
icon: /* @__PURE__ */ R(
|
|
111
|
+
label: m("views.timeline"),
|
|
112
|
+
icon: /* @__PURE__ */ R(f, {})
|
|
113
113
|
}],
|
|
114
|
-
layout:
|
|
114
|
+
layout: C,
|
|
115
115
|
onLayoutChange: (e) => {
|
|
116
|
-
|
|
116
|
+
te(!!c, e), G({ view: e });
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
changed:
|
|
119
|
+
changed: C !== x,
|
|
120
120
|
children: /* @__PURE__ */ z("div", {
|
|
121
121
|
className: "flex items-center justify-between gap-3",
|
|
122
122
|
children: [/* @__PURE__ */ R("span", {
|
|
123
123
|
id: N,
|
|
124
124
|
className: "text-sm",
|
|
125
|
-
children:
|
|
126
|
-
}), /* @__PURE__ */ R(
|
|
125
|
+
children: m("showTemplates")
|
|
126
|
+
}), /* @__PURE__ */ R(A, {
|
|
127
127
|
size: "sm",
|
|
128
|
-
checked:
|
|
128
|
+
checked: C === "templates",
|
|
129
129
|
onCheckedChange: (e) => G({ view: e ? "templates" : void 0 }),
|
|
130
130
|
"aria-labelledby": N
|
|
131
131
|
})]
|
|
132
132
|
})
|
|
133
133
|
})
|
|
134
134
|
}),
|
|
135
|
-
|
|
136
|
-
label:
|
|
135
|
+
E && /* @__PURE__ */ R(k, {
|
|
136
|
+
label: m("newProject"),
|
|
137
137
|
onClick: () => M(!0)
|
|
138
138
|
})
|
|
139
139
|
]
|
|
@@ -142,41 +142,41 @@ function H() {
|
|
|
142
142
|
className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
143
143
|
children: [
|
|
144
144
|
/* @__PURE__ */ R(se, {
|
|
145
|
-
label:
|
|
145
|
+
label: m("filterStatus"),
|
|
146
146
|
multiple: !1,
|
|
147
|
-
all: { count:
|
|
148
|
-
options:
|
|
147
|
+
all: { count: T.length },
|
|
148
|
+
options: ee.map((e) => ({
|
|
149
149
|
value: e,
|
|
150
|
-
label:
|
|
151
|
-
count:
|
|
150
|
+
label: m(`status.${e}`),
|
|
151
|
+
count: T.filter((t) => t.status === e).length
|
|
152
152
|
})),
|
|
153
|
-
value:
|
|
153
|
+
value: p.status ? [p.status] : [],
|
|
154
154
|
onValueChange: ([e]) => G({ status: e })
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
p.health && /* @__PURE__ */ R(D, {
|
|
157
157
|
variant: "outline",
|
|
158
158
|
size: "sm",
|
|
159
159
|
"aria-pressed": !0,
|
|
160
160
|
onClick: () => G({ health: void 0 }),
|
|
161
|
-
children:
|
|
161
|
+
children: m("healthFilter", { health: m(`health.${p.health}`) })
|
|
162
162
|
}),
|
|
163
|
-
|
|
163
|
+
T.some((e) => e.parentId) && /* @__PURE__ */ R(oe, {
|
|
164
164
|
items: [{
|
|
165
165
|
value: "",
|
|
166
|
-
label:
|
|
167
|
-
}, ...
|
|
166
|
+
label: m("anyParent")
|
|
167
|
+
}, ...g.filter((e) => g.some((t) => t.parentId === e.id)).map((e) => ({
|
|
168
168
|
value: e.id,
|
|
169
169
|
label: e.name
|
|
170
170
|
}))],
|
|
171
|
-
value:
|
|
171
|
+
value: p.parent ?? "",
|
|
172
172
|
onValueChange: (e) => G({ parent: e || void 0 }),
|
|
173
|
-
placeholder:
|
|
174
|
-
"aria-label":
|
|
175
|
-
trigger: /* @__PURE__ */ R(
|
|
173
|
+
placeholder: m("parentProject"),
|
|
174
|
+
"aria-label": m("parentProject"),
|
|
175
|
+
trigger: /* @__PURE__ */ R(D, {
|
|
176
176
|
variant: "outline",
|
|
177
177
|
size: "sm",
|
|
178
178
|
className: H ? "border-(--theme-link) text-(--theme-app)" : void 0,
|
|
179
|
-
children: H ?
|
|
179
|
+
children: H ? m("underProject", { name: H.name }) : m("parentProject")
|
|
180
180
|
})
|
|
181
181
|
})
|
|
182
182
|
]
|
|
@@ -187,18 +187,18 @@ function H() {
|
|
|
187
187
|
className: "min-h-0 min-w-0 flex-1 overflow-auto",
|
|
188
188
|
children: W.length === 0 ? /* @__PURE__ */ R("div", {
|
|
189
189
|
className: "p-6",
|
|
190
|
-
children: /* @__PURE__ */ R(
|
|
191
|
-
icon: /* @__PURE__ */ R(
|
|
192
|
-
title:
|
|
193
|
-
...!
|
|
194
|
-
...
|
|
190
|
+
children: /* @__PURE__ */ R(O, {
|
|
191
|
+
icon: /* @__PURE__ */ R(d, {}),
|
|
192
|
+
title: p.status || p.health ? m("noProjectsWithStatus") : m(C === "templates" ? "noTemplates" : "noProjects"),
|
|
193
|
+
...!p.status && !p.health && { description: m(C === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
|
|
194
|
+
...E && !p.status && !p.health && C !== "templates" && { action: /* @__PURE__ */ R(D, {
|
|
195
195
|
type: "button",
|
|
196
196
|
variant: "primary",
|
|
197
197
|
onClick: () => M(!0),
|
|
198
|
-
children:
|
|
198
|
+
children: m("newProject")
|
|
199
199
|
}) }
|
|
200
200
|
})
|
|
201
|
-
}) :
|
|
201
|
+
}) : C === "timeline" ? /* @__PURE__ */ R(ge, {
|
|
202
202
|
workspace: t,
|
|
203
203
|
projects: W,
|
|
204
204
|
rowProps: Y
|
|
@@ -208,14 +208,14 @@ function H() {
|
|
|
208
208
|
})
|
|
209
209
|
}), /* @__PURE__ */ R(_e, {
|
|
210
210
|
workspace: t,
|
|
211
|
-
projects:
|
|
212
|
-
health:
|
|
213
|
-
onHealth: (e) => G({ health: e ===
|
|
211
|
+
projects: T,
|
|
212
|
+
health: p.health,
|
|
213
|
+
onHealth: (e) => G({ health: e === p.health ? void 0 : e })
|
|
214
214
|
})]
|
|
215
215
|
}),
|
|
216
|
-
j && /* @__PURE__ */ R(
|
|
216
|
+
j && /* @__PURE__ */ R(ae, {
|
|
217
217
|
workspace: t,
|
|
218
|
-
teamId:
|
|
218
|
+
teamId: v?.id,
|
|
219
219
|
onClose: () => M(!1)
|
|
220
220
|
})
|
|
221
221
|
]
|
|
@@ -223,7 +223,7 @@ function H() {
|
|
|
223
223
|
}
|
|
224
224
|
var U = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
|
|
225
225
|
function pe({ projects: e, rowProps: t }) {
|
|
226
|
-
let n = L("planning"), [r, i] = F(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) =>
|
|
226
|
+
let n = L("planning"), [r, i] = F(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) => S(e, t).map((e) => e.id))), o = (e) => i((t) => {
|
|
227
227
|
let n = new Set(t);
|
|
228
228
|
return n.delete(e) || n.add(e), n;
|
|
229
229
|
});
|
|
@@ -252,7 +252,7 @@ function pe({ projects: e, rowProps: t }) {
|
|
|
252
252
|
/* @__PURE__ */ R("span", { children: n("progressTitle") }),
|
|
253
253
|
/* @__PURE__ */ R("span", {})
|
|
254
254
|
]
|
|
255
|
-
}), /* @__PURE__ */ R("ul", { children:
|
|
255
|
+
}), /* @__PURE__ */ R("ul", { children: x(e).filter((e) => !a.has(e.project.id)).map((e) => /* @__PURE__ */ R(G, {
|
|
256
256
|
...t(e.project),
|
|
257
257
|
depth: e.depth,
|
|
258
258
|
childCount: e.children,
|
|
@@ -262,34 +262,34 @@ function pe({ projects: e, rowProps: t }) {
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function W({ project: e }) {
|
|
265
|
-
return e.icon || e.color ? /* @__PURE__ */ R(
|
|
265
|
+
return e.icon || e.color ? /* @__PURE__ */ R(C, {
|
|
266
266
|
icon: e.icon ?? "",
|
|
267
267
|
color: e.color ?? "",
|
|
268
268
|
name: e.name
|
|
269
|
-
}) : /* @__PURE__ */ R(
|
|
269
|
+
}) : /* @__PURE__ */ R(d, { className: "size-4 text-muted-foreground" });
|
|
270
270
|
}
|
|
271
|
-
function G({ workspace: e, project: n, onContextMenu: r, menu: i, depth:
|
|
272
|
-
let
|
|
271
|
+
function G({ workspace: e, project: n, onContextMenu: r, menu: i, depth: a = 0, childCount: o = 0, folded: s = !1, onFold: l }) {
|
|
272
|
+
let d = L("planning"), f = L("common"), x = h(), S = p(), { person: C } = m(e), w = n.lead ? C(n.lead) : void 0, T = y(n);
|
|
273
273
|
return /* @__PURE__ */ z("li", {
|
|
274
274
|
className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
|
|
275
275
|
children: [
|
|
276
276
|
/* @__PURE__ */ R("span", {
|
|
277
277
|
className: "flex shrink-0 justify-end pl-2 md:pl-3",
|
|
278
|
-
style: { width: `${
|
|
279
|
-
children:
|
|
278
|
+
style: { width: `${a * 1.25 + 2}rem` },
|
|
279
|
+
children: o > 0 && /* @__PURE__ */ R("button", {
|
|
280
280
|
type: "button",
|
|
281
|
-
onClick:
|
|
282
|
-
"aria-expanded": !
|
|
283
|
-
"aria-label":
|
|
281
|
+
onClick: l,
|
|
282
|
+
"aria-expanded": !s,
|
|
283
|
+
"aria-label": d(s ? "showSubProjects" : "hideSubProjects", { name: n.name }),
|
|
284
284
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
285
|
-
children: /* @__PURE__ */ R(
|
|
285
|
+
children: /* @__PURE__ */ R(c, { className: `size-3.5 transition-transform ${s ? "-rotate-90" : ""}` })
|
|
286
286
|
})
|
|
287
287
|
}),
|
|
288
288
|
/* @__PURE__ */ z(t, {
|
|
289
289
|
to: "/$workspace/projects/$projectId",
|
|
290
290
|
params: {
|
|
291
291
|
workspace: e,
|
|
292
|
-
projectId:
|
|
292
|
+
projectId: b(n)
|
|
293
293
|
},
|
|
294
294
|
onContextMenu: r,
|
|
295
295
|
className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${U}`,
|
|
@@ -309,50 +309,50 @@ function G({ workspace: e, project: n, onContextMenu: r, menu: i, depth: o = 0,
|
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ z("span", {
|
|
311
311
|
className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
|
|
312
|
-
children: [/* @__PURE__ */ R(
|
|
312
|
+
children: [/* @__PURE__ */ R(g, { state: T }), d(`health.${T}`)]
|
|
313
313
|
}),
|
|
314
314
|
/* @__PURE__ */ R(M, {
|
|
315
|
-
content:
|
|
315
|
+
content: S[n.priority],
|
|
316
316
|
children: /* @__PURE__ */ R("span", {
|
|
317
317
|
role: "img",
|
|
318
|
-
"aria-label":
|
|
318
|
+
"aria-label": S[n.priority],
|
|
319
319
|
className: "flex",
|
|
320
|
-
children: /* @__PURE__ */ R(
|
|
320
|
+
children: /* @__PURE__ */ R(u, { priority: n.priority })
|
|
321
321
|
})
|
|
322
322
|
}),
|
|
323
323
|
/* @__PURE__ */ R("span", {
|
|
324
324
|
className: "flex",
|
|
325
|
-
children:
|
|
326
|
-
content:
|
|
327
|
-
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(
|
|
328
|
-
name:
|
|
329
|
-
src:
|
|
325
|
+
children: w && /* @__PURE__ */ R(M, {
|
|
326
|
+
content: d("leadIs", { name: w.name }),
|
|
327
|
+
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(E, {
|
|
328
|
+
name: w.name,
|
|
329
|
+
src: w.avatarUrl,
|
|
330
330
|
size: "sm"
|
|
331
331
|
}) })
|
|
332
332
|
})
|
|
333
333
|
}),
|
|
334
334
|
/* @__PURE__ */ R("span", {
|
|
335
335
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
336
|
-
children: n.targetDate ?
|
|
336
|
+
children: n.targetDate ? x.day(n.targetDate) : ""
|
|
337
337
|
}),
|
|
338
|
-
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(
|
|
339
|
-
progress:
|
|
338
|
+
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(_, {
|
|
339
|
+
progress: o > 0 ? n.treeProgress : n.progress,
|
|
340
340
|
compact: !0
|
|
341
341
|
}) }),
|
|
342
342
|
/* @__PURE__ */ R(M, {
|
|
343
|
-
content:
|
|
343
|
+
content: d(`status.${n.status}`),
|
|
344
344
|
children: /* @__PURE__ */ R("span", {
|
|
345
345
|
role: "img",
|
|
346
|
-
"aria-label":
|
|
346
|
+
"aria-label": d(`status.${n.status}`),
|
|
347
347
|
className: "flex",
|
|
348
|
-
children: /* @__PURE__ */ R(
|
|
348
|
+
children: /* @__PURE__ */ R(v, { status: n.status })
|
|
349
349
|
})
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
352
|
}),
|
|
353
353
|
/* @__PURE__ */ R(V, {
|
|
354
354
|
items: i,
|
|
355
|
-
label:
|
|
355
|
+
label: f("moreActionsFor", { name: n.name })
|
|
356
356
|
})
|
|
357
357
|
]
|
|
358
358
|
});
|
|
@@ -388,22 +388,22 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
388
388
|
})} – ${v(t, {
|
|
389
389
|
month: "short",
|
|
390
390
|
year: "numeric"
|
|
391
|
-
})}`,
|
|
391
|
+
})}`, x = () => {
|
|
392
392
|
let e = o.current;
|
|
393
393
|
e && c({
|
|
394
394
|
left: e.scrollLeft,
|
|
395
395
|
width: e.clientWidth - Y
|
|
396
396
|
});
|
|
397
|
-
},
|
|
397
|
+
}, S = (e = "smooth") => {
|
|
398
398
|
let t = o.current;
|
|
399
399
|
t && t.scrollTo({
|
|
400
400
|
left: m(l) - (t.clientWidth - Y) / 2,
|
|
401
401
|
behavior: e
|
|
402
402
|
});
|
|
403
403
|
};
|
|
404
|
-
return N(() => (
|
|
404
|
+
return N(() => (S("instant"), x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x)), []), /* @__PURE__ */ R("div", {
|
|
405
405
|
ref: o,
|
|
406
|
-
onScroll:
|
|
406
|
+
onScroll: x,
|
|
407
407
|
className: "relative h-full min-h-0 overflow-auto",
|
|
408
408
|
children: /* @__PURE__ */ z("div", {
|
|
409
409
|
className: "relative",
|
|
@@ -423,10 +423,10 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
423
423
|
children: [/* @__PURE__ */ R("div", {
|
|
424
424
|
className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
|
|
425
425
|
style: { width: Y },
|
|
426
|
-
children: /* @__PURE__ */ R(
|
|
426
|
+
children: /* @__PURE__ */ R(D, {
|
|
427
427
|
type: "button",
|
|
428
428
|
size: "xs",
|
|
429
|
-
onClick: () =>
|
|
429
|
+
onClick: () => S(),
|
|
430
430
|
children: i("today")
|
|
431
431
|
})
|
|
432
432
|
}), /* @__PURE__ */ z("div", {
|
|
@@ -497,7 +497,7 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
497
497
|
to: "/$workspace/projects/$projectId",
|
|
498
498
|
params: {
|
|
499
499
|
workspace: e,
|
|
500
|
-
projectId:
|
|
500
|
+
projectId: b(n)
|
|
501
501
|
},
|
|
502
502
|
className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
|
|
503
503
|
style: {
|
|
@@ -526,7 +526,7 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
526
526
|
to: "/$workspace/projects/$projectId",
|
|
527
527
|
params: {
|
|
528
528
|
workspace: e,
|
|
529
|
-
projectId:
|
|
529
|
+
projectId: b(n)
|
|
530
530
|
},
|
|
531
531
|
className: "absolute top-1/2 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground hover:text-foreground",
|
|
532
532
|
style: d ? { left: s.left + 12 } : {
|
|
@@ -554,12 +554,12 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
function $({ workspace: e, project: n, onContextMenu: r }) {
|
|
557
|
-
let i = L("planning"), { person: a } =
|
|
557
|
+
let i = L("planning"), { person: a } = m(e), o = n.lead ? a(n.lead) : void 0, s = y(n);
|
|
558
558
|
return /* @__PURE__ */ z(t, {
|
|
559
559
|
to: "/$workspace/projects/$projectId",
|
|
560
560
|
params: {
|
|
561
561
|
workspace: e,
|
|
562
|
-
projectId:
|
|
562
|
+
projectId: b(n)
|
|
563
563
|
},
|
|
564
564
|
onContextMenu: r,
|
|
565
565
|
className: "sticky left-0 z-[2] flex shrink-0 items-center gap-2 border-r border-border bg-background px-4 group-hover:bg-muted",
|
|
@@ -575,10 +575,10 @@ function $({ workspace: e, project: n, onContextMenu: r }) {
|
|
|
575
575
|
children: /* @__PURE__ */ R("span", {
|
|
576
576
|
role: "img",
|
|
577
577
|
"aria-label": i(`health.${s}`),
|
|
578
|
-
children: /* @__PURE__ */ R(
|
|
578
|
+
children: /* @__PURE__ */ R(g, { state: s })
|
|
579
579
|
})
|
|
580
580
|
}),
|
|
581
|
-
o && /* @__PURE__ */ R(
|
|
581
|
+
o && /* @__PURE__ */ R(E, {
|
|
582
582
|
name: o.name,
|
|
583
583
|
src: o.avatarUrl,
|
|
584
584
|
size: "xs",
|
|
@@ -588,7 +588,7 @@ function $({ workspace: e, project: n, onContextMenu: r }) {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
591
|
-
let a = L("planning"), { data: o } = B(i(e)), { person: s } =
|
|
591
|
+
let a = L("planning"), { data: o } = B(i(e)), { person: s } = m(e), [c, l] = F("health"), u = (e) => t.filter(e).length, d = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", f = [...new Set(t.map((e) => e.lead ?? ""))];
|
|
592
592
|
return /* @__PURE__ */ z("aside", {
|
|
593
593
|
"aria-label": a("breakdown"),
|
|
594
594
|
className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
|
|
@@ -609,16 +609,16 @@ function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
609
609
|
}), /* @__PURE__ */ z("ul", {
|
|
610
610
|
className: "mt-2",
|
|
611
611
|
children: [
|
|
612
|
-
c === "health" &&
|
|
612
|
+
c === "health" && T.map((e) => ({
|
|
613
613
|
h: e,
|
|
614
|
-
n: u((t) =>
|
|
614
|
+
n: u((t) => y(t) === e)
|
|
615
615
|
})).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ z("button", {
|
|
616
616
|
type: "button",
|
|
617
617
|
"aria-pressed": n === e,
|
|
618
618
|
onClick: () => r(e),
|
|
619
|
-
className: `${
|
|
619
|
+
className: `${d} hover:bg-muted aria-pressed:bg-muted`,
|
|
620
620
|
children: [
|
|
621
|
-
/* @__PURE__ */ R(
|
|
621
|
+
/* @__PURE__ */ R(g, { state: e }),
|
|
622
622
|
/* @__PURE__ */ R("span", {
|
|
623
623
|
className: "flex-1 text-left",
|
|
624
624
|
children: a(`health.${e}`)
|
|
@@ -633,9 +633,9 @@ function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
633
633
|
team: e,
|
|
634
634
|
n: u((t) => t.teamIds.includes(e.id))
|
|
635
635
|
})).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */ z("li", {
|
|
636
|
-
className:
|
|
636
|
+
className: d,
|
|
637
637
|
children: [
|
|
638
|
-
/* @__PURE__ */ R(
|
|
638
|
+
/* @__PURE__ */ R(C, {
|
|
639
639
|
icon: e.icon,
|
|
640
640
|
color: e.color,
|
|
641
641
|
name: e.name
|
|
@@ -650,12 +650,12 @@ function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
650
650
|
})
|
|
651
651
|
]
|
|
652
652
|
}, e.id)),
|
|
653
|
-
c === "leads" &&
|
|
653
|
+
c === "leads" && f.map((e) => {
|
|
654
654
|
let t = e ? s(e) : void 0;
|
|
655
655
|
return /* @__PURE__ */ z("li", {
|
|
656
|
-
className:
|
|
656
|
+
className: d,
|
|
657
657
|
children: [
|
|
658
|
-
t ? /* @__PURE__ */ R(
|
|
658
|
+
t ? /* @__PURE__ */ R(E, {
|
|
659
659
|
name: t.name,
|
|
660
660
|
src: t.avatarUrl,
|
|
661
661
|
size: "xs",
|
package/pages/triage.js
CHANGED
|
@@ -4,10 +4,10 @@ import { Link as r, useNavigate as i } from "../lib/router.js";
|
|
|
4
4
|
import { issueQuery as a, teamsQuery as o } from "../api/queries.js";
|
|
5
5
|
import { triageQuery as s } from "../lib/triage.js";
|
|
6
6
|
import { PriorityIcon as c, StatusIcon as l, TriageIcon as u, usePriorityNames as d } from "../components/icons.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { usePeople as f } from "../lib/people.js";
|
|
8
|
+
import { useTime as p } from "../lib/time.js";
|
|
9
|
+
import { EntityIcon as m } from "../components/EntityIcon.js";
|
|
10
|
+
import { useCanTriage as h } from "../lib/roles.js";
|
|
11
11
|
import { actorAvatar as g } from "../lib/avatar.js";
|
|
12
12
|
import { Editor as _ } from "../components/Editor.js";
|
|
13
13
|
import { useShortcuts as v } from "../lib/shortcuts.js";
|
|
@@ -189,13 +189,13 @@ function V(e, t) {
|
|
|
189
189
|
return n.delete(t), n;
|
|
190
190
|
}
|
|
191
191
|
function H({ workspace: e, issue: t, onEligible: n, picked: i, current: a, onClick: o }) {
|
|
192
|
-
let s = j("triage"), c =
|
|
192
|
+
let s = j("triage"), c = p(), { actorName: l, avatarOf: u } = f(e), d = h(e, t.teamId);
|
|
193
193
|
D(() => n(t.id, d), [
|
|
194
194
|
n,
|
|
195
195
|
t.id,
|
|
196
196
|
d
|
|
197
197
|
]);
|
|
198
|
-
let
|
|
198
|
+
let m = t.creator;
|
|
199
199
|
return /* @__PURE__ */ N("li", {
|
|
200
200
|
id: `triage-${t.id}`,
|
|
201
201
|
"data-picked": i || void 0,
|
|
@@ -221,15 +221,15 @@ function H({ workspace: e, issue: t, onEligible: n, picked: i, current: a, onCli
|
|
|
221
221
|
/* @__PURE__ */ N("span", {
|
|
222
222
|
className: B("flex shrink-0 rounded-full", i && "ring-1 ring-human/40"),
|
|
223
223
|
children: /* @__PURE__ */ N(y, {
|
|
224
|
-
...g(
|
|
225
|
-
name: l(
|
|
226
|
-
src: u(
|
|
224
|
+
...g(m.kind),
|
|
225
|
+
name: l(m),
|
|
226
|
+
src: u(m.kind, m.handle),
|
|
227
227
|
size: "xs"
|
|
228
228
|
})
|
|
229
229
|
}),
|
|
230
230
|
/* @__PURE__ */ N("span", {
|
|
231
231
|
className: "min-w-0 flex-1 truncate",
|
|
232
|
-
children: s("from", { name: l(
|
|
232
|
+
children: s("from", { name: l(m) })
|
|
233
233
|
}),
|
|
234
234
|
/* @__PURE__ */ N("time", {
|
|
235
235
|
dateTime: t.createdAt,
|
|
@@ -243,7 +243,7 @@ function H({ workspace: e, issue: t, onEligible: n, picked: i, current: a, onCli
|
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
function U({ workspace: n, issue: i, onBack: s, onDecided: u }) {
|
|
246
|
-
let v = j("triage"), x =
|
|
246
|
+
let v = j("triage"), x = p(), C = A(), w = L(), T = d(), { data: E } = R(o(n)), { data: D } = I(a(n, i.identifier)), O = D ?? i, { actorName: k, avatarOf: z } = f(n), B = E.find((e) => e.id === O.teamId), V = h(n, O.teamId), H = F({
|
|
247
247
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
248
248
|
params: { path: {
|
|
249
249
|
workspace: n,
|
|
@@ -271,7 +271,7 @@ function U({ workspace: n, issue: i, onBack: s, onDecided: u }) {
|
|
|
271
271
|
/* @__PURE__ */ P("p", {
|
|
272
272
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
273
273
|
children: [
|
|
274
|
-
B && /* @__PURE__ */ N(
|
|
274
|
+
B && /* @__PURE__ */ N(m, {
|
|
275
275
|
icon: B.icon,
|
|
276
276
|
name: B.name,
|
|
277
277
|
className: "size-3.5"
|