@parallelworks/tandem-web 0.189.7 → 0.189.9
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 +11 -2
- package/_virtual/_virtual_i18n/es/common.js +11 -2
- package/_virtual/_virtual_i18n/ja/common.js +11 -2
- package/_virtual/_virtual_i18n/ko/common.js +11 -2
- package/_virtual/_virtual_i18n/zh/common.js +11 -2
- package/components/Attachments.js +11 -11
- package/components/IssueView.js +98 -101
- package/components/TriageBanner.js +137 -192
- package/components/editorPlugins.js +3 -3
- package/package.json +1 -1
- package/pages/triage.js +229 -160
package/pages/triage.js
CHANGED
|
@@ -1,279 +1,348 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import { ListFavoriteStar as
|
|
4
|
-
import { IssueView as
|
|
5
|
-
import { TriageIcon as
|
|
6
|
-
import { actorAvatar as
|
|
7
|
-
import { usePageTitle as
|
|
8
|
-
import { usePeople as
|
|
9
|
-
import { useCanTriage as
|
|
10
|
-
import { Link as
|
|
11
|
-
import { useShortcuts as
|
|
12
|
-
import { teamPath as
|
|
13
|
-
import { triageQuery as
|
|
14
|
-
import { hasOpened as
|
|
15
|
-
import { Avatar as
|
|
16
|
-
import { useParams as
|
|
17
|
-
import { Suspense as
|
|
18
|
-
import { useErrorMessage as
|
|
19
|
-
import { useTranslations as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { useMutation as
|
|
2
|
+
import { meQuery as n, statusesQuery as r, teamsQuery as i, triageVisitsQuery as a } from "../api/queries.js";
|
|
3
|
+
import { ListFavoriteStar as o } from "../components/FavoriteStar.js";
|
|
4
|
+
import { IssueView as s } from "../components/IssueView.js";
|
|
5
|
+
import { TriageIcon as c } from "../components/icons.js";
|
|
6
|
+
import { actorAvatar as l } from "../lib/avatar.js";
|
|
7
|
+
import { usePageTitle as u } from "../lib/pageTitle.js";
|
|
8
|
+
import { usePeople as d } from "../lib/people.js";
|
|
9
|
+
import { useCanTriage as f } from "../lib/roles.js";
|
|
10
|
+
import { Link as p, useNavigate as m } from "../lib/router.js";
|
|
11
|
+
import { useShortcuts as ee } from "../lib/shortcuts.js";
|
|
12
|
+
import { teamPath as te } from "../lib/teamPaths.js";
|
|
13
|
+
import { triageQuery as ne, useVisitTriage as re } from "../lib/triage.js";
|
|
14
|
+
import { hasOpened as ie } from "../lib/triageSeen.js";
|
|
15
|
+
import { Avatar as h, Button as g, EmptyState as _, RelativeTime as v, toast as y } from "@parallelworks/ui";
|
|
16
|
+
import { CatchBoundary as ae, useParams as oe, useSearch as se } from "@tanstack/react-router";
|
|
17
|
+
import { Suspense as ce, useCallback as le, useEffect as b, useRef as x, useState as S } from "react";
|
|
18
|
+
import { useErrorMessage as ue } from "@parallelworks/problem/react";
|
|
19
|
+
import { useTranslations as C } from "use-intl";
|
|
20
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
21
|
+
import { useMutation as E, useQuery as D, useQueryClient as de, useSuspenseQuery as fe } from "@tanstack/react-query";
|
|
22
22
|
// src/pages/triage.tsx
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
}, []),
|
|
29
|
-
|
|
30
|
-
let { data:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
id:
|
|
34
|
-
identifier:
|
|
23
|
+
function O() {
|
|
24
|
+
let l = C("triage"), { workspace: d, key: f } = oe({ strict: !1 }), { issue: h } = se({ strict: !1 }), { data: v } = fe(ne(d, f)), { data: O } = fe(i(d)), j = f ? O.find((e) => e.key === f) : void 0, me = C("favorites");
|
|
25
|
+
u(l("title"));
|
|
26
|
+
let M = v.issues, N = ue(), P = de(), [F, he] = S(/* @__PURE__ */ new Set()), [I, L] = S(/* @__PURE__ */ new Set()), ge = le((e, t) => {
|
|
27
|
+
he((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : A(n, e));
|
|
28
|
+
}, []), R = M.filter((e) => F.has(e.id)), z = R.filter((e) => I.has(e.id)), _e = m(), B = M.findIndex((e) => e.identifier === h?.toUpperCase()), V = x(null), H = M[B], U = x(-1);
|
|
29
|
+
B >= 0 && (U.current = B);
|
|
30
|
+
let { data: W } = D(a(d)), { mutate: G } = re(d), K = x(/* @__PURE__ */ new Set());
|
|
31
|
+
b(() => {
|
|
32
|
+
H && W && !W.includes(H.id) && !K.current.has(H.id) && (K.current.add(H.id), G({
|
|
33
|
+
id: H.id,
|
|
34
|
+
identifier: H.identifier
|
|
35
35
|
}));
|
|
36
36
|
}, [
|
|
37
|
+
H,
|
|
37
38
|
W,
|
|
38
|
-
|
|
39
|
-
q
|
|
39
|
+
G
|
|
40
40
|
]);
|
|
41
|
-
let
|
|
41
|
+
let q = (e) => _e({
|
|
42
42
|
to: ".",
|
|
43
43
|
search: e ? { issue: e.identifier.toLowerCase() } : {},
|
|
44
44
|
replace: !0
|
|
45
|
-
}),
|
|
46
|
-
F.has(e.id) && L((t) => t.has(e.id) ?
|
|
47
|
-
},
|
|
45
|
+
}), J = (e) => {
|
|
46
|
+
F.has(e.id) && L((t) => t.has(e.id) ? A(t, e.id) : new Set(t).add(e.id));
|
|
47
|
+
}, Y = (e, t) => {
|
|
48
48
|
let [n, r] = e < t ? [e, t] : [t, e];
|
|
49
|
-
L(new Set(
|
|
50
|
-
},
|
|
51
|
-
let n =
|
|
52
|
-
n && (e.metaKey || e.ctrlKey ? (e.preventDefault(),
|
|
53
|
-
},
|
|
54
|
-
if (
|
|
55
|
-
let n =
|
|
56
|
-
t && ((
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
!
|
|
49
|
+
L(new Set(M.slice(n, r + 1).filter((e) => F.has(e.id)).map((e) => e.id)));
|
|
50
|
+
}, ve = (e, t) => {
|
|
51
|
+
let n = M[t];
|
|
52
|
+
n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), J(n), V.current = t) : e.shiftKey && (e.preventDefault(), Y(V.current ?? (B >= 0 ? B : t), t)));
|
|
53
|
+
}, X = (e, t) => {
|
|
54
|
+
if (M.length === 0) return;
|
|
55
|
+
let n = B < 0 ? 0 : Math.min(Math.max(B + e, 0), M.length - 1);
|
|
56
|
+
t && ((V.current === null || I.size === 0) && (V.current = Math.max(B, 0)), Y(V.current, n)), q(M[n]);
|
|
57
|
+
}, Z = x(void 0);
|
|
58
|
+
H && (Z.current = H), b(() => {
|
|
59
|
+
!h || B >= 0 || (Z.current && Z.current.identifier.toLowerCase() === h.toLowerCase() && Se(Z.current.identifier), U.current < 0 || M.length === 0 ? q(void 0) : q(M[Math.min(U.current, M.length - 1)]));
|
|
60
60
|
});
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
let { data: ye } = D(n), be = E({
|
|
62
|
+
mutationFn: async ({ is: n, before: i }) => {
|
|
63
|
+
let a = O.find((e) => e.id === n.teamId)?.key ?? "", o = (await P.fetchQuery(r(d, a))).find((e) => e.category === "triage");
|
|
64
|
+
if (!o) return;
|
|
65
|
+
let s = i ? n.assignees.filter((e) => !i.assignees.some((t) => t.kind === e.kind && t.handle === e.handle)) : [];
|
|
66
|
+
t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
67
|
+
params: { path: {
|
|
68
|
+
workspace: d,
|
|
69
|
+
identifier: n.identifier
|
|
70
|
+
} },
|
|
71
|
+
body: {
|
|
72
|
+
statusId: o.id,
|
|
73
|
+
...s.length > 0 && { removeAssignees: s.map((e) => ({
|
|
74
|
+
kind: e.kind,
|
|
75
|
+
handle: e.handle
|
|
76
|
+
})) },
|
|
77
|
+
...i && !i.cycle && n.cycle && { cycleId: "" }
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
},
|
|
81
|
+
onSuccess: (e, { is: t }) => (Q.current.delete(t.identifier), P.invalidateQueries({ queryKey: [
|
|
82
|
+
"workspace",
|
|
83
|
+
d,
|
|
84
|
+
"issues"
|
|
85
|
+
] })),
|
|
86
|
+
onError: (e) => y.error(N(e))
|
|
87
|
+
}), xe = (e) => {
|
|
88
|
+
let t = M.findIndex((t) => t.id === e.id);
|
|
89
|
+
e.id === H?.id && q(M[t + 1] ?? M[t - 1]), Se(e.identifier);
|
|
90
|
+
}, Q = x(/* @__PURE__ */ new Set()), Se = (t) => {
|
|
91
|
+
if (Q.current.has(t)) return;
|
|
92
|
+
Q.current.add(t);
|
|
93
|
+
let n = M.find((e) => e.identifier === t) ?? (Z.current?.identifier === t ? Z.current : void 0);
|
|
94
|
+
e.GET("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
95
|
+
workspace: d,
|
|
96
|
+
identifier: t
|
|
97
|
+
} } }).then(({ data: e }) => {
|
|
98
|
+
!e || e.triage ? Q.current.delete(t) : Ce(e, n);
|
|
99
|
+
});
|
|
100
|
+
}, Ce = (e, t) => {
|
|
101
|
+
let n = ye && e.assignees.some((e) => e.kind === "user" && e.handle === ye.user.username), r = [
|
|
102
|
+
e.status.name,
|
|
103
|
+
e.cycle?.name,
|
|
104
|
+
n ? l("assignedToYou") : e.assignees.length > 0 && l("assignedTo", { name: e.assignees.map((e) => e.handle).join(", ") })
|
|
105
|
+
].filter(Boolean);
|
|
106
|
+
y.success(r.join(" · "), {
|
|
107
|
+
title: /* @__PURE__ */ w(p, {
|
|
108
|
+
to: "/$workspace/issues/$identifier",
|
|
109
|
+
params: {
|
|
110
|
+
workspace: d,
|
|
111
|
+
identifier: e.identifier
|
|
112
|
+
},
|
|
113
|
+
children: l(e.status.category === "canceled" ? "declinedToast" : "acceptedToast", { key: e.identifier })
|
|
114
|
+
}),
|
|
115
|
+
action: {
|
|
116
|
+
label: l("undo"),
|
|
117
|
+
onClick: () => be.mutate({
|
|
118
|
+
is: e,
|
|
119
|
+
before: t
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
});
|
|
64
123
|
};
|
|
65
|
-
|
|
66
|
-
j: () =>
|
|
67
|
-
k: () =>
|
|
68
|
-
J: () =>
|
|
69
|
-
K: () =>
|
|
70
|
-
ArrowDown: (e) =>
|
|
71
|
-
ArrowUp: (e) =>
|
|
124
|
+
ee({
|
|
125
|
+
j: () => X(1, !1),
|
|
126
|
+
k: () => X(-1, !1),
|
|
127
|
+
J: () => X(1, !0),
|
|
128
|
+
K: () => X(-1, !0),
|
|
129
|
+
ArrowDown: (e) => X(1, e.shiftKey),
|
|
130
|
+
ArrowUp: (e) => X(-1, e.shiftKey),
|
|
72
131
|
x: () => {
|
|
73
|
-
|
|
132
|
+
H && (J(H), V.current = B);
|
|
74
133
|
},
|
|
75
|
-
Enter: () =>
|
|
134
|
+
Enter: () => H && _e({
|
|
76
135
|
to: "/$workspace/issues/$identifier",
|
|
77
136
|
params: {
|
|
78
|
-
workspace:
|
|
79
|
-
identifier:
|
|
137
|
+
workspace: d,
|
|
138
|
+
identifier: H.identifier
|
|
80
139
|
}
|
|
81
140
|
}),
|
|
82
|
-
"Mod+a": () => L(new Set(
|
|
141
|
+
"Mod+a": () => L(new Set(M.map((e) => e.id))),
|
|
83
142
|
"Shift+Mod+a": () => L(/* @__PURE__ */ new Set()),
|
|
84
|
-
Escape: () => I.size > 0 ? L(/* @__PURE__ */ new Set()) :
|
|
85
|
-
}),
|
|
86
|
-
let e =
|
|
143
|
+
Escape: () => I.size > 0 ? L(/* @__PURE__ */ new Set()) : q(void 0)
|
|
144
|
+
}), b(() => {
|
|
145
|
+
let e = H && document.getElementById(`triage-${H.id}`);
|
|
87
146
|
e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
|
|
88
|
-
}, [
|
|
89
|
-
let $ =
|
|
90
|
-
mutationFn: async (n) => (await Promise.allSettled(
|
|
147
|
+
}, [H]);
|
|
148
|
+
let $ = E({
|
|
149
|
+
mutationFn: async (n) => (await Promise.allSettled(z.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
91
150
|
params: { path: {
|
|
92
|
-
workspace:
|
|
151
|
+
workspace: d,
|
|
93
152
|
identifier: r.identifier
|
|
94
153
|
} },
|
|
95
154
|
body: { decision: n }
|
|
96
155
|
}))))).filter((e) => e.status === "rejected"),
|
|
97
156
|
onSuccess: (e) => {
|
|
98
|
-
if (
|
|
157
|
+
if (H && I.has(H.id)) {
|
|
99
158
|
let e = (e) => !I.has(e.id);
|
|
100
|
-
|
|
159
|
+
q(M.slice(B + 1).find(e) ?? M.slice(0, B).findLast(e));
|
|
101
160
|
}
|
|
102
161
|
L(/* @__PURE__ */ new Set());
|
|
103
162
|
let t = e[0];
|
|
104
|
-
t &&
|
|
163
|
+
t && y.error(l("bulkFailed", {
|
|
105
164
|
count: e.length,
|
|
106
|
-
reason:
|
|
165
|
+
reason: N(t.reason)
|
|
107
166
|
}));
|
|
108
167
|
},
|
|
109
|
-
onSettled: () =>
|
|
168
|
+
onSettled: () => P.invalidateQueries({ queryKey: [
|
|
110
169
|
"workspace",
|
|
111
|
-
|
|
170
|
+
d,
|
|
112
171
|
"issues"
|
|
113
172
|
] })
|
|
114
173
|
});
|
|
115
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ T("div", {
|
|
116
175
|
className: "flex h-full flex-col",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ T("header", {
|
|
118
177
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
119
178
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ w("h1", {
|
|
121
180
|
className: "text-sm font-semibold",
|
|
122
|
-
children:
|
|
181
|
+
children: l("title")
|
|
123
182
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
workspace:
|
|
183
|
+
/* @__PURE__ */ w(o, {
|
|
184
|
+
workspace: d,
|
|
126
185
|
page: "triage",
|
|
127
|
-
team:
|
|
128
|
-
href:
|
|
129
|
-
label:
|
|
130
|
-
team:
|
|
131
|
-
page:
|
|
186
|
+
team: j && {
|
|
187
|
+
href: te(d, j.key, "triage"),
|
|
188
|
+
label: me("teamPage", {
|
|
189
|
+
team: j.name,
|
|
190
|
+
page: l("title")
|
|
132
191
|
})
|
|
133
192
|
}
|
|
134
193
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ w("span", {
|
|
136
195
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
137
|
-
children:
|
|
196
|
+
children: M.length
|
|
138
197
|
}),
|
|
139
|
-
|
|
198
|
+
z.length > 0 && /* @__PURE__ */ T("div", {
|
|
140
199
|
className: "ml-auto flex items-center gap-2",
|
|
141
200
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ w("span", {
|
|
143
202
|
className: "text-xs font-medium text-human",
|
|
144
|
-
children:
|
|
203
|
+
children: l("selected", { count: z.length })
|
|
145
204
|
}),
|
|
146
|
-
|
|
205
|
+
z.length < R.length && /* @__PURE__ */ w("button", {
|
|
147
206
|
type: "button",
|
|
148
|
-
onClick: () => L(new Set(
|
|
207
|
+
onClick: () => L(new Set(R.map((e) => e.id))),
|
|
149
208
|
className: "text-xs hover:underline",
|
|
150
|
-
children:
|
|
209
|
+
children: l("selectAll")
|
|
151
210
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ w("button", {
|
|
153
212
|
type: "button",
|
|
154
213
|
onClick: () => L(/* @__PURE__ */ new Set()),
|
|
155
214
|
className: "text-xs hover:underline",
|
|
156
|
-
children:
|
|
215
|
+
children: l("clear")
|
|
157
216
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ w(g, {
|
|
159
218
|
variant: "outline",
|
|
160
219
|
size: "sm",
|
|
161
|
-
title:
|
|
220
|
+
title: l("declineHelp"),
|
|
162
221
|
loading: $.isPending && $.variables === "decline",
|
|
163
222
|
disabled: $.isPending,
|
|
164
223
|
onClick: () => $.mutate("decline"),
|
|
165
|
-
children:
|
|
224
|
+
children: l("declineCount", { count: z.length })
|
|
166
225
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ w(g, {
|
|
168
227
|
variant: "primary",
|
|
169
228
|
size: "sm",
|
|
170
|
-
title:
|
|
229
|
+
title: l("acceptHelp"),
|
|
171
230
|
loading: $.isPending && $.variables === "accept",
|
|
172
231
|
disabled: $.isPending,
|
|
173
232
|
onClick: () => $.mutate("accept"),
|
|
174
|
-
children:
|
|
233
|
+
children: l("acceptCount", { count: z.length })
|
|
175
234
|
})
|
|
176
235
|
]
|
|
177
236
|
})
|
|
178
237
|
]
|
|
179
|
-
}),
|
|
238
|
+
}), M.length === 0 ? /* @__PURE__ */ w("div", {
|
|
180
239
|
className: "min-h-0 flex-1 overflow-y-auto p-6",
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
icon: /* @__PURE__ */
|
|
183
|
-
title:
|
|
184
|
-
description:
|
|
240
|
+
children: /* @__PURE__ */ w(_, {
|
|
241
|
+
icon: /* @__PURE__ */ w(c, {}),
|
|
242
|
+
title: l("empty"),
|
|
243
|
+
description: l("emptyDescription")
|
|
185
244
|
})
|
|
186
|
-
}) : /* @__PURE__ */
|
|
245
|
+
}) : /* @__PURE__ */ T("div", {
|
|
187
246
|
className: "flex min-h-0 flex-1",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
189
|
-
"aria-label":
|
|
190
|
-
className:
|
|
191
|
-
children:
|
|
192
|
-
workspace:
|
|
247
|
+
children: [/* @__PURE__ */ w("ul", {
|
|
248
|
+
"aria-label": l("title"),
|
|
249
|
+
className: k("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", H ? "hidden" : "flex"),
|
|
250
|
+
children: M.map((e, t) => /* @__PURE__ */ w(pe, {
|
|
251
|
+
workspace: d,
|
|
193
252
|
issue: e,
|
|
194
|
-
onEligible:
|
|
253
|
+
onEligible: ge,
|
|
195
254
|
picked: I.has(e.id) && F.has(e.id),
|
|
196
|
-
current: t ===
|
|
197
|
-
opened:
|
|
198
|
-
onClick: (e) =>
|
|
255
|
+
current: t === B,
|
|
256
|
+
opened: ie(e.id, { data: W }),
|
|
257
|
+
onClick: (e) => ve(e, t)
|
|
199
258
|
}, e.id))
|
|
200
|
-
}), /* @__PURE__ */
|
|
201
|
-
className:
|
|
202
|
-
children:
|
|
259
|
+
}), /* @__PURE__ */ w("div", {
|
|
260
|
+
className: k("min-w-0 flex-1 overflow-y-auto md:block", H ? "block" : "hidden"),
|
|
261
|
+
children: H ? /* @__PURE__ */ T("div", {
|
|
203
262
|
className: "flex h-full flex-col",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ w("button", {
|
|
205
264
|
type: "button",
|
|
206
|
-
onClick: () =>
|
|
265
|
+
onClick: () => q(void 0),
|
|
207
266
|
className: "px-4 pt-3 text-left text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
208
|
-
children:
|
|
209
|
-
}), /* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
267
|
+
children: l("back")
|
|
268
|
+
}), /* @__PURE__ */ w(ae, {
|
|
269
|
+
getResetKey: () => H.id,
|
|
270
|
+
errorComponent: () => /* @__PURE__ */ w("div", {
|
|
271
|
+
className: "px-6 py-24",
|
|
272
|
+
children: /* @__PURE__ */ w(_, {
|
|
273
|
+
title: l("paneFailed"),
|
|
274
|
+
description: l("paneFailedHelp")
|
|
275
|
+
})
|
|
276
|
+
}),
|
|
277
|
+
children: /* @__PURE__ */ w(ce, { children: /* @__PURE__ */ w(s, {
|
|
278
|
+
workspace: d,
|
|
279
|
+
identifier: H.identifier,
|
|
280
|
+
inPane: !0,
|
|
281
|
+
onTriaged: xe
|
|
282
|
+
}) })
|
|
283
|
+
})]
|
|
284
|
+
}, H.id) : /* @__PURE__ */ w("div", {
|
|
216
285
|
className: "px-6 py-24",
|
|
217
|
-
children: /* @__PURE__ */
|
|
218
|
-
title:
|
|
219
|
-
description:
|
|
286
|
+
children: /* @__PURE__ */ w(_, {
|
|
287
|
+
title: l("noneSelected"),
|
|
288
|
+
description: l("shortcuts")
|
|
220
289
|
})
|
|
221
290
|
})
|
|
222
291
|
})]
|
|
223
292
|
})]
|
|
224
293
|
});
|
|
225
294
|
}
|
|
226
|
-
var
|
|
227
|
-
function
|
|
295
|
+
var k = (...e) => e.filter(Boolean).join(" ");
|
|
296
|
+
function A(e, t) {
|
|
228
297
|
let n = new Set(e);
|
|
229
298
|
return n.delete(t), n;
|
|
230
299
|
}
|
|
231
|
-
function
|
|
232
|
-
let { actorName:
|
|
233
|
-
|
|
300
|
+
function pe({ workspace: e, issue: t, onEligible: n, picked: r, current: i, opened: a, onClick: o }) {
|
|
301
|
+
let { actorName: s, avatarOf: c } = d(e), u = f(e, t.teamId);
|
|
302
|
+
b(() => n(t.id, u), [
|
|
234
303
|
n,
|
|
235
304
|
t.id,
|
|
236
|
-
|
|
305
|
+
u
|
|
237
306
|
]);
|
|
238
307
|
let m = t.creator;
|
|
239
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ w("li", {
|
|
240
309
|
id: `triage-${t.id}`,
|
|
241
310
|
"data-picked": r || void 0,
|
|
242
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ w(p, {
|
|
243
312
|
to: ".",
|
|
244
313
|
search: { issue: t.identifier.toLowerCase() },
|
|
245
314
|
replace: !0,
|
|
246
315
|
onClick: o,
|
|
247
316
|
"aria-current": i || void 0,
|
|
248
|
-
className:
|
|
249
|
-
children: /* @__PURE__ */
|
|
317
|
+
className: k("flex gap-3 px-2 py-2.5 select-none", r ? "bg-human-soft" : k("rounded-md", i ? "bg-muted" : "hover:bg-muted")),
|
|
318
|
+
children: /* @__PURE__ */ T("span", {
|
|
250
319
|
className: "min-w-0 flex-1",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ T("span", {
|
|
252
321
|
className: "flex items-baseline gap-2 text-sm",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
254
|
-
className:
|
|
322
|
+
children: [/* @__PURE__ */ w("span", {
|
|
323
|
+
className: k("min-w-0 flex-1 truncate", a ? "text-muted-foreground" : "font-medium text-foreground"),
|
|
255
324
|
children: t.title
|
|
256
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ w("span", {
|
|
257
326
|
className: "shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
258
327
|
children: t.identifier
|
|
259
328
|
})]
|
|
260
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ T("span", {
|
|
261
330
|
className: "mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
262
331
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
className:
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
...
|
|
267
|
-
name:
|
|
268
|
-
src:
|
|
332
|
+
/* @__PURE__ */ w("span", {
|
|
333
|
+
className: k("shrink-0 rounded-full", r && "ring-1 ring-human/40"),
|
|
334
|
+
children: /* @__PURE__ */ w(h, {
|
|
335
|
+
...l(m.kind),
|
|
336
|
+
name: s(m),
|
|
337
|
+
src: c(m.kind, m.handle),
|
|
269
338
|
size: "xs"
|
|
270
339
|
})
|
|
271
340
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ w("span", {
|
|
273
342
|
className: "min-w-0 flex-1 truncate",
|
|
274
|
-
children:
|
|
343
|
+
children: s(m)
|
|
275
344
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ w(v, {
|
|
277
346
|
value: t.createdAt,
|
|
278
347
|
format: "long",
|
|
279
348
|
exact: "medium",
|
|
@@ -285,4 +354,4 @@ function N({ workspace: e, issue: t, onEligible: n, picked: r, current: i, opene
|
|
|
285
354
|
})
|
|
286
355
|
});
|
|
287
356
|
}
|
|
288
|
-
export {
|
|
357
|
+
export { O as TriagePage };
|