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