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