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