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