@parallelworks/tandem-web 0.139.0 → 0.139.2
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/components/AppRoot.js +9 -8
- package/components/SettingsNav.js +6 -6
- package/components/settings.js +10 -10
- package/hostedApp.js +47 -45
- package/lib/pageTitle.js +22 -10
- package/package.json +1 -1
- package/pages/areas.js +112 -112
- package/pages/decisions.js +36 -36
- package/pages/issues.js +34 -34
- package/pages/projects.js +109 -109
- package/pages/triage.js +64 -64
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +185 -185
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +484 -484
- package/routes/_workspace/knowledge/_term2.js +166 -166
- package/routes/_workspace/knowledge/index2.js +33 -33
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +215 -215
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +38 -38
- package/routes/_workspace/teams/_key/settings2.js +131 -131
- package/routes/_workspace2.js +394 -394
- package/routes/docs/route2.js +5 -5
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { PersonHoverCard as
|
|
9
|
-
import { Editor as
|
|
10
|
-
import { useArchiveNotifications as
|
|
1
|
+
import { usePageTitle as e } from "../../lib/pageTitle.js";
|
|
2
|
+
import { Link as t, useNavigate as n } from "../../lib/router.js";
|
|
3
|
+
import { Route as r } from "./notifications.js";
|
|
4
|
+
import { eventsQuery as i, issueDecisionsQuery as a, issueQuery as o, notificationsQuery as s, teamsQuery as c } from "../../api/queries.js";
|
|
5
|
+
import { ArchiveIcon as l, CheckIcon as u, FileTextIcon as d, InboxIcon as f, PriorityIcon as p, ProjectIcon as m, StatusIcon as h, usePriorityNames as g } from "../../components/icons.js";
|
|
6
|
+
import { copyItem as _, useLinkItems as v } from "../../lib/menus.js";
|
|
7
|
+
import { usePeople as y } from "../../lib/people.js";
|
|
8
|
+
import { PersonHoverCard as b } from "../../components/PersonHoverCard.js";
|
|
9
|
+
import { Editor as x } from "../../components/Editor.js";
|
|
10
|
+
import { useArchiveNotifications as ee, useReadNotifications as S, useUnreadNotifications as te } from "../../lib/notifications.js";
|
|
11
11
|
import { useShortcuts as ne } from "../../lib/shortcuts.js";
|
|
12
12
|
import { parseApproval as C } from "../../lib/approval.js";
|
|
13
13
|
import { DecisionCard as w } from "../../components/AgentWork.js";
|
|
@@ -88,34 +88,34 @@ function le(e, t) {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
function J() {
|
|
91
|
-
let { workspace:
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
let
|
|
95
|
-
return ce(
|
|
91
|
+
let { workspace: t } = r.useParams(), { issue: i } = r.useSearch(), a = R("notifications"), o = n(), { data: { notifications: d, unread: p } } = oe(s(t));
|
|
92
|
+
e(p > 0 ? `${a("title")} (${p})` : a("title"));
|
|
93
|
+
let m = S(t), h = te(t), g = ee(t), { data: _ = [] } = H(c(t)), v = le(t, _), y = v.activeFilterCount > 0, b = (v.filters.state ?? []).includes("unread"), x = v.filters.kind ?? [], C = v.filters.team ?? [], w = L(() => {
|
|
94
|
+
let e = d.filter((e) => (x.length === 0 || x.some((t) => G[t]?.includes(e.reason))) && (C.length === 0 || !!e.identifier && C.includes(q(e.identifier))));
|
|
95
|
+
return ce(t, e).filter((e) => !b || e.unread.length > 0 || e.key === i);
|
|
96
96
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
y,
|
|
97
|
+
t,
|
|
98
|
+
d,
|
|
100
99
|
b,
|
|
100
|
+
x,
|
|
101
101
|
C,
|
|
102
|
-
|
|
103
|
-
]), T = w.findIndex((e) => e.key ===
|
|
104
|
-
|
|
102
|
+
i
|
|
103
|
+
]), T = w.findIndex((e) => e.key === i), E = T >= 0 ? w[T] : void 0, [D, O] = ae(/* @__PURE__ */ new Set()), A = ie(null), N = L(() => w.filter((e) => D.has(e.key)), [w, D]), P = (e) => {
|
|
104
|
+
o({
|
|
105
105
|
to: "/$workspace/notifications",
|
|
106
|
-
params: { workspace:
|
|
107
|
-
search:
|
|
106
|
+
params: { workspace: t },
|
|
107
|
+
search: e ? { issue: e.key } : {},
|
|
108
108
|
replace: !0
|
|
109
|
-
}),
|
|
109
|
+
}), e && e.unread.length > 0 && m.mutate(e.unread);
|
|
110
110
|
}, F = (e) => {
|
|
111
111
|
let t = e.flatMap((e) => e.unread);
|
|
112
|
-
t.length > 0 ?
|
|
112
|
+
t.length > 0 ? m.mutate(t) : h.mutate(e.flatMap((e) => e.items.map((e) => e.id)));
|
|
113
113
|
}, I = (e) => {
|
|
114
|
-
if (
|
|
114
|
+
if (g.mutate(e.flatMap((e) => e.items.map((e) => e.id))), O(/* @__PURE__ */ new Set()), E && e.includes(E)) {
|
|
115
115
|
let t = w.filter((t) => !e.includes(t));
|
|
116
116
|
P(t[t.findIndex((e) => w.indexOf(e) > T)] ?? t.at(-1));
|
|
117
117
|
}
|
|
118
|
-
}, U = (e) =>
|
|
118
|
+
}, U = (e) => o({ to: e.href }), K = N.length > 0 ? N : E ? [E] : [], J = (e) => O((t) => {
|
|
119
119
|
let n = new Set(t);
|
|
120
120
|
return n.has(e.key) ? n.delete(e.key) : n.add(e.key), n;
|
|
121
121
|
}), Y = (e, t) => {
|
|
@@ -161,41 +161,41 @@ function J() {
|
|
|
161
161
|
children: [
|
|
162
162
|
/* @__PURE__ */ B("h1", {
|
|
163
163
|
className: "text-sm font-semibold",
|
|
164
|
-
children:
|
|
164
|
+
children: a("title")
|
|
165
165
|
}),
|
|
166
166
|
/* @__PURE__ */ B("span", {
|
|
167
167
|
className: "min-w-0 flex-1 truncate text-xs text-muted-foreground",
|
|
168
|
-
children:
|
|
168
|
+
children: a("unreadCount", { count: p })
|
|
169
169
|
}),
|
|
170
|
-
/* @__PURE__ */ B(se, { view:
|
|
171
|
-
|
|
170
|
+
/* @__PURE__ */ B(se, { view: v }),
|
|
171
|
+
p > 0 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
|
|
172
172
|
type: "button",
|
|
173
173
|
size: "sm",
|
|
174
|
-
loading:
|
|
175
|
-
onClick: () =>
|
|
174
|
+
loading: m.isPending,
|
|
175
|
+
onClick: () => m.mutate(void 0),
|
|
176
176
|
className: "@max-3xl:hidden",
|
|
177
|
-
children:
|
|
177
|
+
children: a("markAllRead")
|
|
178
178
|
}), /* @__PURE__ */ B(M, {
|
|
179
|
-
icon: /* @__PURE__ */ B(
|
|
180
|
-
label:
|
|
179
|
+
icon: /* @__PURE__ */ B(u, {}),
|
|
180
|
+
label: a("markAllRead"),
|
|
181
181
|
size: "sm",
|
|
182
|
-
disabled:
|
|
183
|
-
onClick: () =>
|
|
182
|
+
disabled: m.isPending,
|
|
183
|
+
onClick: () => m.mutate(void 0),
|
|
184
184
|
className: "@3xl:hidden"
|
|
185
185
|
})] }),
|
|
186
186
|
w.some((e) => e.unread.length === 0) && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
|
|
187
187
|
type: "button",
|
|
188
188
|
size: "sm",
|
|
189
|
-
loading:
|
|
190
|
-
onClick: () =>
|
|
189
|
+
loading: g.isPending,
|
|
190
|
+
onClick: () => g.mutate(void 0),
|
|
191
191
|
className: "@max-3xl:hidden",
|
|
192
|
-
children:
|
|
192
|
+
children: a("archiveRead")
|
|
193
193
|
}), /* @__PURE__ */ B(M, {
|
|
194
|
-
icon: /* @__PURE__ */ B(
|
|
195
|
-
label:
|
|
194
|
+
icon: /* @__PURE__ */ B(l, {}),
|
|
195
|
+
label: a("archiveRead"),
|
|
196
196
|
size: "sm",
|
|
197
|
-
disabled:
|
|
198
|
-
onClick: () =>
|
|
197
|
+
disabled: g.isPending,
|
|
198
|
+
onClick: () => g.mutate(void 0),
|
|
199
199
|
className: "@3xl:hidden"
|
|
200
200
|
})] })
|
|
201
201
|
]
|
|
@@ -205,13 +205,13 @@ function J() {
|
|
|
205
205
|
children: [
|
|
206
206
|
/* @__PURE__ */ B("span", {
|
|
207
207
|
className: "font-medium text-human",
|
|
208
|
-
children:
|
|
208
|
+
children: a("selected", { count: N.length })
|
|
209
209
|
}),
|
|
210
210
|
N.length < w.length && /* @__PURE__ */ B("button", {
|
|
211
211
|
type: "button",
|
|
212
212
|
onClick: () => O(new Set(w.map((e) => e.key))),
|
|
213
213
|
className: "hover:underline",
|
|
214
|
-
children:
|
|
214
|
+
children: a("selectAll", { count: w.length })
|
|
215
215
|
}),
|
|
216
216
|
/* @__PURE__ */ V("div", {
|
|
217
217
|
className: "ml-auto flex items-center gap-1.5",
|
|
@@ -219,27 +219,27 @@ function J() {
|
|
|
219
219
|
/* @__PURE__ */ B(k, {
|
|
220
220
|
type: "button",
|
|
221
221
|
size: "sm",
|
|
222
|
-
onClick: () =>
|
|
222
|
+
onClick: () => m.mutate(N.flatMap((e) => e.unread)),
|
|
223
223
|
disabled: N.every((e) => e.unread.length === 0),
|
|
224
|
-
children:
|
|
224
|
+
children: a("markRead")
|
|
225
225
|
}),
|
|
226
226
|
/* @__PURE__ */ B(k, {
|
|
227
227
|
type: "button",
|
|
228
228
|
size: "sm",
|
|
229
|
-
onClick: () =>
|
|
230
|
-
children:
|
|
229
|
+
onClick: () => h.mutate(N.flatMap((e) => e.items.map((e) => e.id))),
|
|
230
|
+
children: a("markUnread")
|
|
231
231
|
}),
|
|
232
232
|
/* @__PURE__ */ B(k, {
|
|
233
233
|
type: "button",
|
|
234
234
|
size: "sm",
|
|
235
235
|
onClick: () => I(N),
|
|
236
|
-
children:
|
|
236
|
+
children: a("archive")
|
|
237
237
|
}),
|
|
238
238
|
/* @__PURE__ */ B("button", {
|
|
239
239
|
type: "button",
|
|
240
240
|
onClick: () => O(/* @__PURE__ */ new Set()),
|
|
241
241
|
className: "shrink-0 px-1 hover:underline",
|
|
242
|
-
children:
|
|
242
|
+
children: a("clear")
|
|
243
243
|
})
|
|
244
244
|
]
|
|
245
245
|
})
|
|
@@ -247,43 +247,43 @@ function J() {
|
|
|
247
247
|
}),
|
|
248
248
|
w.length === 0 ? /* @__PURE__ */ B("div", {
|
|
249
249
|
className: "min-h-0 flex-1 overflow-y-auto p-6",
|
|
250
|
-
children:
|
|
251
|
-
icon: /* @__PURE__ */ B(
|
|
252
|
-
title:
|
|
250
|
+
children: y ? /* @__PURE__ */ B(j, {
|
|
251
|
+
icon: /* @__PURE__ */ B(f, {}),
|
|
252
|
+
title: a("noneMatch"),
|
|
253
253
|
action: /* @__PURE__ */ B(k, {
|
|
254
254
|
type: "button",
|
|
255
255
|
size: "sm",
|
|
256
|
-
onClick:
|
|
257
|
-
children:
|
|
256
|
+
onClick: v.clearFilters,
|
|
257
|
+
children: a("showEverything")
|
|
258
258
|
})
|
|
259
259
|
}) : /* @__PURE__ */ B(j, {
|
|
260
|
-
icon: /* @__PURE__ */ B(
|
|
261
|
-
title:
|
|
262
|
-
description:
|
|
260
|
+
icon: /* @__PURE__ */ B(f, {}),
|
|
261
|
+
title: a("emptyTitle"),
|
|
262
|
+
description: a("emptyDescription")
|
|
263
263
|
})
|
|
264
264
|
}) : /* @__PURE__ */ V("div", {
|
|
265
265
|
className: "flex min-h-0 flex-1",
|
|
266
266
|
children: [/* @__PURE__ */ B("ul", {
|
|
267
|
-
"aria-label":
|
|
267
|
+
"aria-label": a("title"),
|
|
268
268
|
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", E ? "hidden" : "flex"),
|
|
269
|
-
children: w.map((
|
|
270
|
-
workspace:
|
|
271
|
-
group:
|
|
272
|
-
selected:
|
|
273
|
-
picked: D.has(
|
|
269
|
+
children: w.map((e) => /* @__PURE__ */ B(ue, {
|
|
270
|
+
workspace: t,
|
|
271
|
+
group: e,
|
|
272
|
+
selected: e === E,
|
|
273
|
+
picked: D.has(e.key),
|
|
274
274
|
actions: Q
|
|
275
|
-
},
|
|
275
|
+
}, e.key))
|
|
276
276
|
}), /* @__PURE__ */ B("div", {
|
|
277
277
|
className: W("min-w-0 flex-1 overflow-y-auto md:block", E ? "block" : "hidden"),
|
|
278
278
|
children: E ? /* @__PURE__ */ B(de, {
|
|
279
|
-
workspace:
|
|
279
|
+
workspace: t,
|
|
280
280
|
group: E,
|
|
281
281
|
actions: Q
|
|
282
282
|
}) : /* @__PURE__ */ B("div", {
|
|
283
283
|
className: "px-6 py-24",
|
|
284
284
|
children: /* @__PURE__ */ B(j, {
|
|
285
|
-
title:
|
|
286
|
-
description:
|
|
285
|
+
title: a("noneSelected"),
|
|
286
|
+
description: a("shortcuts")
|
|
287
287
|
})
|
|
288
288
|
})
|
|
289
289
|
})]
|
|
@@ -292,7 +292,7 @@ function J() {
|
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
function Y(e) {
|
|
295
|
-
let t = R("notifications"), n =
|
|
295
|
+
let t = R("notifications"), n = v();
|
|
296
296
|
return (r) => {
|
|
297
297
|
let [i] = r;
|
|
298
298
|
return [
|
|
@@ -309,22 +309,22 @@ function Y(e) {
|
|
|
309
309
|
...r.length === 1 && i ? [
|
|
310
310
|
F,
|
|
311
311
|
...n(i.href),
|
|
312
|
-
...i.identifier ? [
|
|
312
|
+
...i.identifier ? [_(t("copyId"), i.identifier)] : []
|
|
313
313
|
] : []
|
|
314
314
|
];
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
function X(e) {
|
|
318
|
-
let { actorName: t } =
|
|
318
|
+
let { actorName: t } = y(e);
|
|
319
319
|
return (e) => e.actor.kind === "agent" && e.agentName ? e.agentName : t(e.actor);
|
|
320
320
|
}
|
|
321
|
-
function ue({ workspace:
|
|
322
|
-
let o = R("notifications"), { avatarOf: s } =
|
|
321
|
+
function ue({ workspace: e, group: n, selected: r, picked: i, actions: a }) {
|
|
322
|
+
let o = R("notifications"), { avatarOf: s } = y(e), c = X(e), l = I(), u = Y(a), d = n.items[0], f = c(d), p = n.unread.length > 0;
|
|
323
323
|
return /* @__PURE__ */ B("li", {
|
|
324
324
|
id: `inbox-${n.key}`,
|
|
325
|
-
children: /* @__PURE__ */ V(
|
|
325
|
+
children: /* @__PURE__ */ V(t, {
|
|
326
326
|
to: "/$workspace/notifications",
|
|
327
|
-
params: { workspace:
|
|
327
|
+
params: { workspace: e },
|
|
328
328
|
search: { issue: n.key },
|
|
329
329
|
replace: !0,
|
|
330
330
|
onClick: (e) => {
|
|
@@ -395,7 +395,7 @@ function ue({ workspace: t, group: n, selected: r, picked: i, actions: a }) {
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
function Z({ workspace: e, identifier: t }) {
|
|
398
|
-
let { data: n } = H(
|
|
398
|
+
let { data: n } = H(o(e, t)), r = g(), { nameOf: i, avatarOf: a } = y(e);
|
|
399
399
|
return n ? /* @__PURE__ */ V("section", {
|
|
400
400
|
className: "mt-5 rounded-lg border border-border px-4 py-3",
|
|
401
401
|
children: [/* @__PURE__ */ V("div", {
|
|
@@ -403,17 +403,17 @@ function Z({ workspace: e, identifier: t }) {
|
|
|
403
403
|
children: [
|
|
404
404
|
/* @__PURE__ */ V("span", {
|
|
405
405
|
className: "inline-flex items-center gap-1.5",
|
|
406
|
-
children: [/* @__PURE__ */ B(
|
|
406
|
+
children: [/* @__PURE__ */ B(h, { category: n.status.category }), n.status.name]
|
|
407
407
|
}),
|
|
408
408
|
n.priority > 0 && /* @__PURE__ */ V("span", {
|
|
409
409
|
className: "inline-flex items-center gap-1.5",
|
|
410
|
-
children: [/* @__PURE__ */ B(
|
|
410
|
+
children: [/* @__PURE__ */ B(p, { priority: n.priority }), r[n.priority]]
|
|
411
411
|
}),
|
|
412
412
|
n.assignees.map((e) => /* @__PURE__ */ V("span", {
|
|
413
413
|
className: "inline-flex items-center gap-1.5",
|
|
414
414
|
children: [/* @__PURE__ */ B(O, {
|
|
415
415
|
name: i(e.kind, e.handle),
|
|
416
|
-
src:
|
|
416
|
+
src: a(e.kind, e.handle),
|
|
417
417
|
size: "xs",
|
|
418
418
|
decorative: !0
|
|
419
419
|
}), i(e.kind, e.handle)]
|
|
@@ -421,15 +421,15 @@ function Z({ workspace: e, identifier: t }) {
|
|
|
421
421
|
]
|
|
422
422
|
}), n.body.trim() && /* @__PURE__ */ B("div", {
|
|
423
423
|
className: "mt-3 max-h-72 overflow-y-auto text-sm",
|
|
424
|
-
children: /* @__PURE__ */ B(
|
|
424
|
+
children: /* @__PURE__ */ B(x, {
|
|
425
425
|
value: n.body,
|
|
426
426
|
editable: !1
|
|
427
427
|
})
|
|
428
428
|
})]
|
|
429
429
|
}) : null;
|
|
430
430
|
}
|
|
431
|
-
function de({ workspace:
|
|
432
|
-
let i = R("notifications"), { avatarOf: a } =
|
|
431
|
+
function de({ workspace: e, group: n, actions: r }) {
|
|
432
|
+
let i = R("notifications"), { avatarOf: a } = y(e), o = X(e), s = I(), c = Y(r);
|
|
433
433
|
return /* @__PURE__ */ V("article", {
|
|
434
434
|
className: "w-full px-4 py-5 md:px-8",
|
|
435
435
|
onContextMenu: (e) => s(e, c([n])),
|
|
@@ -446,7 +446,7 @@ function de({ workspace: t, group: n, actions: r }) {
|
|
|
446
446
|
}),
|
|
447
447
|
/* @__PURE__ */ B("h2", {
|
|
448
448
|
className: "mt-0.5 text-sm font-semibold",
|
|
449
|
-
children: /* @__PURE__ */ B(
|
|
449
|
+
children: /* @__PURE__ */ B(t, {
|
|
450
450
|
to: n.href,
|
|
451
451
|
className: "hover:underline",
|
|
452
452
|
children: n.issueTitle
|
|
@@ -455,7 +455,7 @@ function de({ workspace: t, group: n, actions: r }) {
|
|
|
455
455
|
/* @__PURE__ */ V("div", {
|
|
456
456
|
className: "mt-3 flex flex-wrap gap-2",
|
|
457
457
|
children: [
|
|
458
|
-
/* @__PURE__ */ B(
|
|
458
|
+
/* @__PURE__ */ B(t, {
|
|
459
459
|
to: n.href,
|
|
460
460
|
className: P({
|
|
461
461
|
variant: "primary",
|
|
@@ -478,10 +478,10 @@ function de({ workspace: t, group: n, actions: r }) {
|
|
|
478
478
|
]
|
|
479
479
|
}),
|
|
480
480
|
n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(Z, {
|
|
481
|
-
workspace:
|
|
481
|
+
workspace: e,
|
|
482
482
|
identifier: n.identifier
|
|
483
483
|
}), /* @__PURE__ */ B(he, {
|
|
484
|
-
workspace:
|
|
484
|
+
workspace: e,
|
|
485
485
|
identifier: n.identifier
|
|
486
486
|
})] }),
|
|
487
487
|
/* @__PURE__ */ B(A, {
|
|
@@ -491,18 +491,18 @@ function de({ workspace: t, group: n, actions: r }) {
|
|
|
491
491
|
interactive: !1,
|
|
492
492
|
render: /* @__PURE__ */ B("ol", {}),
|
|
493
493
|
className: "mt-5 overflow-hidden",
|
|
494
|
-
children: n.items.map((
|
|
495
|
-
let n = o(
|
|
494
|
+
children: n.items.map((t) => {
|
|
495
|
+
let n = o(t);
|
|
496
496
|
return /* @__PURE__ */ V("li", {
|
|
497
497
|
className: "flex gap-3 px-3 py-3",
|
|
498
|
-
children: [/* @__PURE__ */ B(
|
|
499
|
-
workspace:
|
|
500
|
-
kind:
|
|
501
|
-
handle:
|
|
498
|
+
children: [/* @__PURE__ */ B(b, {
|
|
499
|
+
workspace: e,
|
|
500
|
+
kind: t.actor.kind,
|
|
501
|
+
handle: t.actor.handle,
|
|
502
502
|
className: "inline-flex shrink-0 self-start",
|
|
503
503
|
children: /* @__PURE__ */ B(O, {
|
|
504
504
|
name: n,
|
|
505
|
-
src: a(
|
|
505
|
+
src: a(t.actor.kind, t.actor.handle),
|
|
506
506
|
size: "sm"
|
|
507
507
|
})
|
|
508
508
|
}), /* @__PURE__ */ V("div", {
|
|
@@ -510,25 +510,25 @@ function de({ workspace: t, group: n, actions: r }) {
|
|
|
510
510
|
children: [/* @__PURE__ */ V("p", {
|
|
511
511
|
className: "flex items-baseline gap-2 text-sm",
|
|
512
512
|
children: [/* @__PURE__ */ B("span", {
|
|
513
|
-
className: W("flex-1", !
|
|
514
|
-
children: i(
|
|
513
|
+
className: W("flex-1", !t.readAt && "font-medium"),
|
|
514
|
+
children: i(t.reason, {
|
|
515
515
|
actor: n,
|
|
516
|
-
agent:
|
|
517
|
-
date: K(
|
|
516
|
+
agent: t.agentName ?? n,
|
|
517
|
+
date: K(t)
|
|
518
518
|
})
|
|
519
519
|
}), /* @__PURE__ */ B(N, {
|
|
520
|
-
value:
|
|
520
|
+
value: t.createdAt,
|
|
521
521
|
format: "compact",
|
|
522
522
|
exact: "medium",
|
|
523
523
|
className: "text-xs text-muted-foreground"
|
|
524
524
|
})]
|
|
525
|
-
}),
|
|
525
|
+
}), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(pe, { text: t.excerpt })]
|
|
526
526
|
})]
|
|
527
|
-
},
|
|
527
|
+
}, t.id);
|
|
528
528
|
})
|
|
529
529
|
}),
|
|
530
530
|
n.identifier && /* @__PURE__ */ B(fe, {
|
|
531
|
-
workspace:
|
|
531
|
+
workspace: e,
|
|
532
532
|
identifier: n.identifier,
|
|
533
533
|
since: n.items.at(-1)?.createdAt ?? ""
|
|
534
534
|
})
|
|
@@ -541,13 +541,13 @@ var Q = /* @__PURE__ */ new Set([
|
|
|
541
541
|
"decision.requested"
|
|
542
542
|
]);
|
|
543
543
|
function fe({ workspace: e, identifier: t, since: n }) {
|
|
544
|
-
let
|
|
544
|
+
let r = R("notifications"), { data: a = [] } = H(i(e, t)), o = a.filter((e) => e.createdAt >= n && !Q.has(e.type) && !e.type.startsWith("comment.") && !e.type.startsWith("issue.reaction_") && e.type !== "issue.body_changed");
|
|
545
545
|
return o.length === 0 ? null : /* @__PURE__ */ V("section", {
|
|
546
546
|
className: "mt-6",
|
|
547
|
-
"aria-label":
|
|
547
|
+
"aria-label": r("alsoHappened"),
|
|
548
548
|
children: [/* @__PURE__ */ B("h3", {
|
|
549
549
|
className: "text-xs font-medium text-muted-foreground",
|
|
550
|
-
children:
|
|
550
|
+
children: r("alsoHappened")
|
|
551
551
|
}), /* @__PURE__ */ B(T, {
|
|
552
552
|
className: "mt-2",
|
|
553
553
|
children: o.map((t) => /* @__PURE__ */ B(E, {
|
|
@@ -574,7 +574,7 @@ function pe({ text: e }) {
|
|
|
574
574
|
]
|
|
575
575
|
}) : /* @__PURE__ */ B("div", {
|
|
576
576
|
className: "mt-1 min-w-0 text-sm text-muted-foreground",
|
|
577
|
-
children: /* @__PURE__ */ B(
|
|
577
|
+
children: /* @__PURE__ */ B(x, {
|
|
578
578
|
value: e.replace(/<!--[\s\S]*?(-->|$)/g, "").trim(),
|
|
579
579
|
editable: !1
|
|
580
580
|
})
|
|
@@ -588,14 +588,14 @@ function me({ text: e }) {
|
|
|
588
588
|
}) : D(e);
|
|
589
589
|
}
|
|
590
590
|
function he({ workspace: e, identifier: t }) {
|
|
591
|
-
let n = R("notifications"), { data: r = [] } = H(
|
|
592
|
-
return
|
|
591
|
+
let n = R("notifications"), { data: r = [] } = H(a(e, t)), i = r.filter((e) => !e.answer && !e.canceled);
|
|
592
|
+
return i.length === 0 ? null : /* @__PURE__ */ V("section", {
|
|
593
593
|
"aria-label": n("waitingOnYou"),
|
|
594
594
|
className: "mt-5 space-y-3",
|
|
595
595
|
children: [/* @__PURE__ */ B("h3", {
|
|
596
596
|
className: "text-xs font-medium text-muted-foreground",
|
|
597
597
|
children: n("waitingOnYou")
|
|
598
|
-
}),
|
|
598
|
+
}), i.map((t) => /* @__PURE__ */ B(w, {
|
|
599
599
|
workspace: e,
|
|
600
600
|
decision: t
|
|
601
601
|
}, t.id))]
|
|
@@ -608,7 +608,7 @@ function $({ group: e }) {
|
|
|
608
608
|
children: e.identifier
|
|
609
609
|
}) : /* @__PURE__ */ V("span", {
|
|
610
610
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground",
|
|
611
|
-
children: [e.kind === "doc" ? /* @__PURE__ */ B(
|
|
611
|
+
children: [e.kind === "doc" ? /* @__PURE__ */ B(d, { className: "size-3" }) : /* @__PURE__ */ B(m, { className: "size-3" }), t(e.kind === "doc" ? "aboutDoc" : "aboutProject")]
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
614
|
export { J as component };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { usePageTitle as e } from "../../../lib/pageTitle.js";
|
|
2
|
+
import { Link as t } from "../../../lib/router.js";
|
|
3
|
+
import { membersQuery as n, projectsQuery as r, teamMembersQuery as i, teamsQuery as a } from "../../../api/queries.js";
|
|
4
|
+
import { MailIcon as o, UserIcon as s } from "../../../components/icons.js";
|
|
5
|
+
import { Route as c } from "./_username.js";
|
|
6
6
|
import { useRoleName as l } from "../../../lib/roles.js";
|
|
7
7
|
import { EntityIcon as u } from "../../../components/EntityIcon.js";
|
|
8
8
|
import { projectRef as d } from "../../../lib/projects.js";
|
|
@@ -14,20 +14,20 @@ import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
|
14
14
|
import { useQueries as x, useQuery as S, useSuspenseQuery as C } from "@tanstack/react-query";
|
|
15
15
|
// src/routes/$workspace/people/$username.tsx?tsr-split=component
|
|
16
16
|
function w() {
|
|
17
|
-
let { workspace:
|
|
18
|
-
if (
|
|
17
|
+
let { workspace: t, username: r } = c.useParams(), { tab: i } = c.useSearch(), a = v("person"), u = l(t), { data: d } = C(n(t)), x = d.find((e) => e.user.username === r);
|
|
18
|
+
if (e(x?.user.name ?? r), !x) return /* @__PURE__ */ y("div", {
|
|
19
19
|
className: "flex h-full items-center justify-center p-6",
|
|
20
20
|
children: /* @__PURE__ */ y(h, {
|
|
21
|
-
icon: /* @__PURE__ */ y(
|
|
22
|
-
title:
|
|
23
|
-
description:
|
|
21
|
+
icon: /* @__PURE__ */ y(s, {}),
|
|
22
|
+
title: a("notFound"),
|
|
23
|
+
description: a("notFoundDetail")
|
|
24
24
|
})
|
|
25
25
|
});
|
|
26
26
|
let { user: S } = x;
|
|
27
27
|
return /* @__PURE__ */ b("div", {
|
|
28
28
|
className: "flex h-full min-h-0 flex-col",
|
|
29
29
|
children: [/* @__PURE__ */ b("section", {
|
|
30
|
-
"aria-label":
|
|
30
|
+
"aria-label": a("profile"),
|
|
31
31
|
className: "flex shrink-0 flex-wrap items-start gap-4 border-b border-border px-4 py-5 md:px-6",
|
|
32
32
|
children: [/* @__PURE__ */ y(m, {
|
|
33
33
|
name: S.name,
|
|
@@ -51,45 +51,45 @@ function w() {
|
|
|
51
51
|
children: [/* @__PURE__ */ y("span", { children: `@${S.username}` }), S.email && /* @__PURE__ */ b("a", {
|
|
52
52
|
href: `mailto:${S.email}`,
|
|
53
53
|
className: "inline-flex items-center gap-1.5 hover:text-foreground",
|
|
54
|
-
children: [/* @__PURE__ */ y(
|
|
54
|
+
children: [/* @__PURE__ */ y(o, { className: "size-3.5" }), S.email]
|
|
55
55
|
})]
|
|
56
56
|
}),
|
|
57
57
|
/* @__PURE__ */ y(T, {
|
|
58
|
-
workspace:
|
|
59
|
-
username:
|
|
58
|
+
workspace: t,
|
|
59
|
+
username: r
|
|
60
60
|
}),
|
|
61
61
|
/* @__PURE__ */ y(_, {
|
|
62
62
|
variant: "segmented",
|
|
63
63
|
size: "sm",
|
|
64
|
-
label:
|
|
65
|
-
items: ["issues", "activity"].map((
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
href: `/${
|
|
64
|
+
label: a("sections"),
|
|
65
|
+
items: ["issues", "activity"].map((e) => ({
|
|
66
|
+
value: e,
|
|
67
|
+
label: a(`section.${e}`),
|
|
68
|
+
href: `/${t}/people/${encodeURIComponent(r)}${e === "activity" ? "?tab=activity" : ""}`
|
|
69
69
|
})),
|
|
70
|
-
value:
|
|
70
|
+
value: i === "activity" ? "activity" : "issues"
|
|
71
71
|
})
|
|
72
72
|
]
|
|
73
73
|
})]
|
|
74
74
|
}), /* @__PURE__ */ y("div", {
|
|
75
75
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
76
|
-
children:
|
|
77
|
-
workspace:
|
|
78
|
-
username:
|
|
79
|
-
}) : /* @__PURE__ */ y(f, { person:
|
|
76
|
+
children: i === "activity" ? /* @__PURE__ */ y(p, {
|
|
77
|
+
workspace: t,
|
|
78
|
+
username: r
|
|
79
|
+
}) : /* @__PURE__ */ y(f, { person: r })
|
|
80
80
|
})]
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function T({ workspace:
|
|
84
|
-
let o = v("person"), { data: s = [] } = S(
|
|
83
|
+
function T({ workspace: e, username: n }) {
|
|
84
|
+
let o = v("person"), { data: s = [] } = S(a(e)), { data: c = [] } = S(r(e)), l = s.filter((e) => !e.archivedAt), f = x({ queries: l.map((t) => i(e, t.key)) }), p = l.filter((e, t) => f[t]?.data?.includes(n)), m = (e) => e !== "completed" && e !== "canceled", h = c.filter((e) => m(e.status) && (e.lead === n || e.members.includes(n))), g = "inline-flex max-w-56 items-center gap-1.5 rounded-md border border-border px-2 py-0.5 text-xs hover:bg-muted";
|
|
85
85
|
return /* @__PURE__ */ b("dl", {
|
|
86
86
|
className: "space-y-1.5 text-xs",
|
|
87
87
|
children: [p.length > 0 && /* @__PURE__ */ y(E, {
|
|
88
88
|
label: o("teams"),
|
|
89
|
-
children: p.map((n) => /* @__PURE__ */ b(
|
|
89
|
+
children: p.map((n) => /* @__PURE__ */ b(t, {
|
|
90
90
|
to: "/$workspace/teams/$key/issues",
|
|
91
91
|
params: {
|
|
92
|
-
workspace:
|
|
92
|
+
workspace: e,
|
|
93
93
|
key: n.key
|
|
94
94
|
},
|
|
95
95
|
className: g,
|
|
@@ -104,29 +104,29 @@ function T({ workspace: t, username: a }) {
|
|
|
104
104
|
}, n.id))
|
|
105
105
|
}), h.length > 0 && /* @__PURE__ */ y(E, {
|
|
106
106
|
label: o("projects"),
|
|
107
|
-
children: h.map((
|
|
107
|
+
children: h.map((r) => /* @__PURE__ */ b(t, {
|
|
108
108
|
to: "/$workspace/projects/$projectId",
|
|
109
109
|
params: {
|
|
110
|
-
workspace:
|
|
111
|
-
projectId: d(
|
|
110
|
+
workspace: e,
|
|
111
|
+
projectId: d(r)
|
|
112
112
|
},
|
|
113
113
|
className: g,
|
|
114
114
|
children: [
|
|
115
115
|
/* @__PURE__ */ y(u, {
|
|
116
|
-
icon:
|
|
117
|
-
name:
|
|
116
|
+
icon: r.icon ?? "",
|
|
117
|
+
name: r.name,
|
|
118
118
|
className: "size-3.5"
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ y("span", {
|
|
121
121
|
className: "truncate",
|
|
122
|
-
children:
|
|
122
|
+
children: r.name
|
|
123
123
|
}),
|
|
124
|
-
|
|
124
|
+
r.lead === n && /* @__PURE__ */ y("span", {
|
|
125
125
|
className: "text-muted-foreground",
|
|
126
126
|
children: o("lead")
|
|
127
127
|
})
|
|
128
128
|
]
|
|
129
|
-
},
|
|
129
|
+
}, r.id))
|
|
130
130
|
})]
|
|
131
131
|
});
|
|
132
132
|
}
|