@parallelworks/tandem-web 0.164.1 → 0.166.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 +38 -3
- package/_virtual/_virtual_i18n/es/common.js +38 -3
- package/_virtual/_virtual_i18n/ja/common.js +38 -3
- package/_virtual/_virtual_i18n/ko/common.js +38 -3
- package/_virtual/_virtual_i18n/zh/common.js +38 -3
- package/api/mutations.js +6 -5
- package/components/ShortcutSheet.js +142 -0
- package/components/icons.js +2 -3
- package/lib/eachLimited.js +15 -0
- package/lib/issueMenu.js +148 -122
- package/lib/notificationRead.js +22 -0
- package/lib/notifications.js +66 -57
- package/lib/shortcutName.js +7 -0
- package/lib/shortcuts.js +14 -20
- package/package.json +1 -1
- package/pages/issues.js +309 -257
- package/pages/triage.js +2 -0
- package/routes/_workspace/notifications2.js +261 -218
- package/routes/_workspace2.js +413 -406
package/routes/_workspace2.js
CHANGED
|
@@ -2,498 +2,501 @@ import { api as e } from "../api/client.js";
|
|
|
2
2
|
import { useHost as t } from "../lib/host.js";
|
|
3
3
|
import { Route as n } from "./_workspace.js";
|
|
4
4
|
import { useLocation as r, useNavigate as i } from "../lib/router.js";
|
|
5
|
-
import { inboxQuery as a, issuesQuery as o, meQuery as s, myTeamsQuery as c, notificationsQuery as l, workspaceQuery as
|
|
6
|
-
import { useFavorites as
|
|
7
|
-
import { copyItem as
|
|
8
|
-
import { docKey as
|
|
9
|
-
import { HostPanelProvider as
|
|
10
|
-
import { AddIcon as
|
|
11
|
-
import { NewIssueContext as
|
|
12
|
-
import { usePeople as
|
|
13
|
-
import { EntityIcon as
|
|
14
|
-
import { isBuiltIn as
|
|
15
|
-
import { isViewAt as
|
|
16
|
-
import { teamPageOf as
|
|
17
|
-
import { SettingsNav as
|
|
18
|
-
import { useSavedViews as
|
|
19
|
-
import { PersonHoverCard as
|
|
20
|
-
import { HoverCards as
|
|
21
|
-
import { useShortcuts as
|
|
22
|
-
import { AppLauncher as
|
|
23
|
-
import { PaletteSelectionContext as
|
|
24
|
-
import { CommandPalette as
|
|
25
|
-
import { DocsTree as
|
|
26
|
-
import { FavoritesNav as
|
|
27
|
-
import { HostActions as
|
|
28
|
-
import { HostPanel as
|
|
29
|
-
import { Logo as
|
|
30
|
-
import { CreateTeamDialog as
|
|
31
|
-
import { NewIssueDialog as
|
|
32
|
-
import { ShareDialogHost as
|
|
5
|
+
import { inboxQuery as a, issuesQuery as o, meQuery as s, myTeamsQuery as c, notificationsQuery as l, workspaceQuery as u } from "../api/queries.js";
|
|
6
|
+
import { useFavorites as d } from "../lib/favorites.js";
|
|
7
|
+
import { copyItem as f, useLinkItems as ee } from "../lib/menus.js";
|
|
8
|
+
import { docKey as p } from "../lib/docs.js";
|
|
9
|
+
import { HostPanelProvider as te, useHostPanel as m } from "../lib/hostPanel.js";
|
|
10
|
+
import { AddIcon as h, AgentIcon as ne, AreaIcon as re, ChartIcon as ie, ChevronDownIcon as ae, CycleIcon as oe, InboxIcon as se, LibraryIcon as ce, ListViewIcon as le, NotificationIcon as ue, ProjectIcon as de, SearchIcon as g, TriageIcon as fe, UserIcon as pe, UsersIcon as _ } from "../components/icons.js";
|
|
11
|
+
import { NewIssueContext as me } from "../lib/newIssue.js";
|
|
12
|
+
import { usePeople as v } from "../lib/people.js";
|
|
13
|
+
import { EntityIcon as he } from "../components/EntityIcon.js";
|
|
14
|
+
import { isBuiltIn as ge, useCan as _e } from "../lib/roles.js";
|
|
15
|
+
import { isViewAt as y } from "../lib/refs.js";
|
|
16
|
+
import { teamPageOf as ve, teamPath as ye } from "../lib/teamPaths.js";
|
|
17
|
+
import { SettingsNav as be } from "../components/SettingsNav.js";
|
|
18
|
+
import { useSavedViews as b, useViewMenu as x, viewHref as xe } from "../lib/views.js";
|
|
19
|
+
import { PersonHoverCard as S } from "../components/PersonHoverCard.js";
|
|
20
|
+
import { HoverCards as Se } from "../components/HoverCards.js";
|
|
21
|
+
import { useShortcuts as Ce } from "../lib/shortcuts.js";
|
|
22
|
+
import { AppLauncher as C } from "../components/AppLauncher.js";
|
|
23
|
+
import { PaletteSelectionContext as we } from "../lib/palette.js";
|
|
24
|
+
import { CommandPalette as Te } from "../components/CommandPalette.js";
|
|
25
|
+
import { DocsTree as Ee } from "../components/DocsTree.js";
|
|
26
|
+
import { FavoritesNav as De } from "../components/FavoritesNav.js";
|
|
27
|
+
import { HostActions as w } from "../components/HostActions.js";
|
|
28
|
+
import { HostPanel as T } from "../components/HostPanel.js";
|
|
29
|
+
import { Logo as Oe } from "../components/Logo.js";
|
|
30
|
+
import { CreateTeamDialog as ke } from "../components/TeamForm.js";
|
|
31
|
+
import { NewIssueDialog as Ae } from "../components/NewIssueDialog.js";
|
|
32
|
+
import { ShareDialogHost as je } from "../components/ShareDialog.js";
|
|
33
|
+
import { ShortcutSheet as Me } from "../components/ShortcutSheet.js";
|
|
33
34
|
import { hostSignOut as Ne } from "../lib/hostSignOut.js";
|
|
34
35
|
import { useInstall as Pe } from "../lib/install.js";
|
|
35
36
|
import { LiveProvider as Fe, useLive as Ie } from "../lib/live.js";
|
|
36
37
|
import { usePushSync as Le } from "../lib/notifications.js";
|
|
37
|
-
import { ActionMenu as Re, Avatar as ze, AvatarGroup as Be, Combobox as Ve, CountBadge as
|
|
38
|
-
import { Outlet as
|
|
39
|
-
import { Suspense as
|
|
40
|
-
import { useLocale as
|
|
41
|
-
import { Fragment as
|
|
42
|
-
import { useQuery as
|
|
43
|
-
import { MoreButton as
|
|
44
|
-
import { AppFrame as
|
|
45
|
-
import { createPortal as
|
|
38
|
+
import { ActionMenu as Re, Avatar as ze, AvatarGroup as Be, Combobox as Ve, CountBadge as He, IconButton as E, Kbd as Ue, Tooltip as We, menuDivider as D, useOpenMenu as Ge } from "@parallelworks/ui";
|
|
39
|
+
import { Outlet as Ke, useParams as qe } from "@tanstack/react-router";
|
|
40
|
+
import { Suspense as Je, useCallback as Ye, useEffect as O, useMemo as Xe, useState as k } from "react";
|
|
41
|
+
import { useLocale as Ze, useTranslations as A } from "use-intl";
|
|
42
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
43
|
+
import { useQuery as P, useQueryClient as Qe, useSuspenseQuery as F } from "@tanstack/react-query";
|
|
44
|
+
import { MoreButton as $e } from "@parallelworks/ui/list";
|
|
45
|
+
import { AppFrame as et, AppFrameNavGroup as I, AppFrameNavItem as L, AppFrameToggle as R, useAppFrame as z } from "@parallelworks/ui/app-frame";
|
|
46
|
+
import { createPortal as tt } from "react-dom";
|
|
46
47
|
// src/routes/$workspace.tsx?tsr-split=component
|
|
47
|
-
function
|
|
48
|
+
function nt(e, t) {
|
|
48
49
|
let [n, r] = e.slice(`/${t}/docs/`.length).split("/");
|
|
49
|
-
return e.startsWith(`/${t}/docs/`) && n && r === void 0 ?
|
|
50
|
+
return e.startsWith(`/${t}/docs/`) && n && r === void 0 ? p(n) : void 0;
|
|
50
51
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
let { workspace:
|
|
52
|
+
var B = "inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-[color-mix(in_oklab,currentColor_20%,transparent)] bg-[color-mix(in_oklab,currentColor_6%,transparent)] text-sm font-medium hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)]", rt = "absolute top-1.5 right-3 size-2 rounded-full bg-primary", V = (...e) => e.filter(Boolean).join(" ");
|
|
53
|
+
function H() {
|
|
54
|
+
let { workspace: p } = n.useParams(), { data: m } = F(s), { data: _ } = F(u(p)), { data: v } = F(c(p)), y = t(), [b, x] = k(null), [xe, S] = k(!1), T = _e(p, "manage_teams"), { canInstall: Ie, install: Be } = Pe(), z = i(), tt = Qe(), H = Ge(), U = d(p), W = A("workspace"), G = A("common"), K = Ze(), q = A("favorites"), gt = A("roles"), _t = ee(), vt = (e) => [
|
|
54
55
|
{
|
|
55
|
-
label:
|
|
56
|
-
onClick: () =>
|
|
56
|
+
label: G("open"),
|
|
57
|
+
onClick: () => z({
|
|
57
58
|
to: "/$workspace/teams/$key/issues",
|
|
58
59
|
params: {
|
|
59
|
-
workspace:
|
|
60
|
+
workspace: p,
|
|
60
61
|
key: e.key
|
|
61
62
|
}
|
|
62
63
|
})
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
|
-
label:
|
|
66
|
+
label: W("newIssueInTeam"),
|
|
66
67
|
shortcut: "C",
|
|
67
68
|
onClick: () => Z({ team: e.key })
|
|
68
69
|
},
|
|
69
70
|
...e.cyclesEnabled ? [{
|
|
70
|
-
label:
|
|
71
|
-
onClick: () =>
|
|
71
|
+
label: W("cycles"),
|
|
72
|
+
onClick: () => z({
|
|
72
73
|
to: "/$workspace/teams/$key/cycles",
|
|
73
74
|
params: {
|
|
74
|
-
workspace:
|
|
75
|
+
workspace: p,
|
|
75
76
|
key: e.key
|
|
76
77
|
}
|
|
77
78
|
})
|
|
78
79
|
}] : [],
|
|
79
80
|
{
|
|
80
|
-
label:
|
|
81
|
-
onClick: () =>
|
|
81
|
+
label: W("teamSettings"),
|
|
82
|
+
onClick: () => z({
|
|
82
83
|
to: "/$workspace/teams/$key/settings",
|
|
83
84
|
params: {
|
|
84
|
-
workspace:
|
|
85
|
+
workspace: p,
|
|
85
86
|
key: e.key
|
|
86
87
|
}
|
|
87
88
|
})
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
|
-
label:
|
|
91
|
-
onClick: () =>
|
|
91
|
+
label: U.find("team", e.id) ? q("remove") : q("add"),
|
|
92
|
+
onClick: () => U.toggle("team", e.id)
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
-
...
|
|
95
|
-
|
|
96
|
-
],
|
|
97
|
-
label:
|
|
98
|
-
onClick: () =>
|
|
99
|
-
}), J = r(), [
|
|
100
|
-
let e =
|
|
94
|
+
D,
|
|
95
|
+
..._t(ye(p, e.key, "issues")),
|
|
96
|
+
f(G("copyKey"), e.key)
|
|
97
|
+
], yt = (e) => ({
|
|
98
|
+
label: U.find("page", e) ? q("remove") : q("add"),
|
|
99
|
+
onClick: () => U.toggle("page", e)
|
|
100
|
+
}), J = r(), [bt, xt] = k(() => dt().expanded), [St, Ct] = k(() => dt().width), wt = Xe(() => {
|
|
101
|
+
let e = ve(J.pathname, p), t = e?.page === "issues" ? e.team : void 0, n = J.pathname === `/${p}/issues` || t !== void 0, r = J.search, i = n && !r.saved;
|
|
101
102
|
return {
|
|
102
|
-
mine: i && !t && (r.assignee ===
|
|
103
|
+
mine: i && !t && (r.assignee === m?.user.username || r.creator === m?.user.username),
|
|
103
104
|
team: i && !r.assignee ? t : void 0,
|
|
104
105
|
saved: n ? r.saved : void 0
|
|
105
106
|
};
|
|
106
107
|
}, [
|
|
107
108
|
J.pathname,
|
|
108
109
|
J.search,
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
p,
|
|
111
|
+
m?.user.username
|
|
111
112
|
]), Y = (e, t) => {
|
|
112
|
-
let n =
|
|
113
|
+
let n = ve(J.pathname, p);
|
|
113
114
|
return n?.page === e && n.team === t;
|
|
114
|
-
}, [
|
|
115
|
+
}, [Tt, Et] = k(() => ut(p)), Dt = (e, t) => Et((n) => {
|
|
115
116
|
let r = new Set(n);
|
|
116
|
-
return t ? r.delete(e) : r.add(e),
|
|
117
|
-
}), X = J.pathname.startsWith(`/${
|
|
118
|
-
...o(
|
|
119
|
-
enabled:
|
|
120
|
-
}),
|
|
117
|
+
return t ? r.delete(e) : r.add(e), pt(p, r), r;
|
|
118
|
+
}), X = J.pathname.startsWith(`/${p}/settings`), { data: Ot = [] } = P(a(p)), kt = v.some((e) => e.triageEnabled && !e.archivedAt), { data: At } = P({
|
|
119
|
+
...o(p, { triage: "only" }),
|
|
120
|
+
enabled: kt
|
|
121
|
+
}), jt = (e) => At?.issues.filter((t) => t.teamId === e).length ?? 0, { data: Mt } = P(l(p)), Nt = Mt?.unread ?? 0;
|
|
121
122
|
Le();
|
|
122
|
-
let { key:
|
|
123
|
-
...
|
|
123
|
+
let { key: Pt } = qe({ strict: !1 }), Z = Ye((e) => x({
|
|
124
|
+
...Pt && { team: Pt },
|
|
124
125
|
...e
|
|
125
|
-
}), [
|
|
126
|
-
|
|
127
|
-
let [
|
|
128
|
-
|
|
126
|
+
}), [Pt]);
|
|
127
|
+
Ce({ c: () => Z() }, b === null);
|
|
128
|
+
let [Ft, It] = k(!1);
|
|
129
|
+
Ce({ "?": () => It(!0) });
|
|
130
|
+
let [Lt, Q] = k(!1), [Rt, zt] = k([]);
|
|
131
|
+
if (O(() => {
|
|
129
132
|
let e = (e) => {
|
|
130
|
-
!e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented ||
|
|
133
|
+
!e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented || mt() || (e.preventDefault(), Q(!0));
|
|
131
134
|
};
|
|
132
135
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
133
|
-
}, []), !
|
|
134
|
-
let
|
|
135
|
-
$ === void 0 ? (await e.POST("/api/v1/auth/logout"),
|
|
136
|
-
},
|
|
137
|
-
let t = /* @__PURE__ */
|
|
138
|
-
items: [...
|
|
136
|
+
}, []), !m) return null;
|
|
137
|
+
let Bt = m.mode === "platform", Vt = Ie && !Bt, $ = m.signOutUrl, Ht = !y && (!Bt || $ !== void 0), Ut = async () => {
|
|
138
|
+
$ === void 0 ? (await e.POST("/api/v1/auth/logout"), tt.clear(), z({ to: "/login" })) : await Ne($);
|
|
139
|
+
}, Wt = X ? void 0 : ({ expanded: e }) => {
|
|
140
|
+
let t = /* @__PURE__ */ M(Ve, {
|
|
141
|
+
items: [...m.workspaces.map((e) => ({
|
|
139
142
|
value: e.slug,
|
|
140
143
|
label: e.name,
|
|
141
|
-
hint:
|
|
142
|
-
})), ...
|
|
144
|
+
hint: ge(e.role) ? gt(`${e.role}.name`) : gt("custom")
|
|
145
|
+
})), ...m.canCreateWorkspace ? [{
|
|
143
146
|
value: "__new",
|
|
144
|
-
label:
|
|
147
|
+
label: W("createWorkspace")
|
|
145
148
|
}] : []],
|
|
146
|
-
value:
|
|
147
|
-
onValueChange: (e) =>
|
|
149
|
+
value: p,
|
|
150
|
+
onValueChange: (e) => z(e === "__new" ? { to: "/new" } : {
|
|
148
151
|
to: "/$workspace/issues",
|
|
149
|
-
params: { workspace: e ??
|
|
152
|
+
params: { workspace: e ?? p }
|
|
150
153
|
}),
|
|
151
|
-
placeholder:
|
|
152
|
-
"aria-label":
|
|
153
|
-
trigger: /* @__PURE__ */
|
|
154
|
+
placeholder: W("switchWorkspacePlaceholder"),
|
|
155
|
+
"aria-label": W("switchWorkspace"),
|
|
156
|
+
trigger: /* @__PURE__ */ N("button", {
|
|
154
157
|
type: "button",
|
|
155
|
-
"aria-label": e ? void 0 :
|
|
156
|
-
onContextMenu: (e) =>
|
|
158
|
+
"aria-label": e ? void 0 : _.name,
|
|
159
|
+
onContextMenu: (e) => H(e, [
|
|
157
160
|
{
|
|
158
|
-
label:
|
|
159
|
-
onClick: () =>
|
|
161
|
+
label: W("workspaceSettings"),
|
|
162
|
+
onClick: () => z({
|
|
160
163
|
to: "/$workspace/settings",
|
|
161
|
-
params: { workspace:
|
|
164
|
+
params: { workspace: p }
|
|
162
165
|
})
|
|
163
166
|
},
|
|
164
167
|
{
|
|
165
|
-
label:
|
|
166
|
-
items: [...
|
|
168
|
+
label: W("switchWorkspace"),
|
|
169
|
+
items: [...m.workspaces.map((e) => ({
|
|
167
170
|
label: e.name,
|
|
168
|
-
checked: e.slug ===
|
|
169
|
-
onClick: () =>
|
|
171
|
+
checked: e.slug === p,
|
|
172
|
+
onClick: () => z({
|
|
170
173
|
to: "/$workspace/issues",
|
|
171
174
|
params: { workspace: e.slug }
|
|
172
175
|
})
|
|
173
|
-
})), ...
|
|
174
|
-
label:
|
|
175
|
-
onClick: () =>
|
|
176
|
+
})), ...m.canCreateWorkspace ? [D, {
|
|
177
|
+
label: W("createWorkspace"),
|
|
178
|
+
onClick: () => z({ to: "/new" })
|
|
176
179
|
}] : []]
|
|
177
180
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
...
|
|
181
|
-
label:
|
|
182
|
-
onClick:
|
|
181
|
+
D,
|
|
182
|
+
f(W("copyWorkspaceSlug"), p),
|
|
183
|
+
...Ht ? [D, {
|
|
184
|
+
label: W("signOut"),
|
|
185
|
+
onClick: Ut
|
|
183
186
|
}] : []
|
|
184
187
|
]),
|
|
185
|
-
className:
|
|
186
|
-
children: [
|
|
187
|
-
icon:
|
|
188
|
-
color:
|
|
189
|
-
name:
|
|
188
|
+
className: V("flex h-9 items-center gap-2 rounded-md text-left hover:bg-muted", e ? "w-full px-2" : "w-9 justify-center"),
|
|
189
|
+
children: [_.icon ? /* @__PURE__ */ M(he, {
|
|
190
|
+
icon: _.icon,
|
|
191
|
+
color: _.color,
|
|
192
|
+
name: _.name,
|
|
190
193
|
className: "size-6 text-base"
|
|
191
|
-
}) : /* @__PURE__ */
|
|
194
|
+
}) : /* @__PURE__ */ M(Oe, { withName: !1 }), e && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", {
|
|
192
195
|
className: "min-w-0 flex-1 truncate text-sm font-semibold",
|
|
193
|
-
children:
|
|
194
|
-
}), /* @__PURE__ */
|
|
196
|
+
children: _.name
|
|
197
|
+
}), /* @__PURE__ */ M(ae, { className: "size-3.5 text-muted-foreground" })] })]
|
|
195
198
|
})
|
|
196
199
|
});
|
|
197
|
-
return e ? /* @__PURE__ */
|
|
200
|
+
return e ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("div", {
|
|
198
201
|
className: "flex items-center gap-1",
|
|
199
202
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ M("div", {
|
|
201
204
|
className: "min-w-0 flex-1",
|
|
202
205
|
children: t
|
|
203
206
|
}),
|
|
204
|
-
!
|
|
205
|
-
!
|
|
206
|
-
apps:
|
|
207
|
+
!y && /* @__PURE__ */ M(w, { className: "hidden md:flex" }),
|
|
208
|
+
!y && /* @__PURE__ */ M(C, {
|
|
209
|
+
apps: m.apps ?? [],
|
|
207
210
|
className: "hidden md:block"
|
|
208
211
|
})
|
|
209
212
|
]
|
|
210
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ N("div", {
|
|
211
214
|
className: "mt-3 flex gap-1.5",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ N("button", {
|
|
213
216
|
type: "button",
|
|
214
217
|
onClick: () => Z(),
|
|
215
|
-
className:
|
|
218
|
+
className: V(B, "min-w-0 flex-1 gap-2 px-2"),
|
|
216
219
|
children: [
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ M(h, { className: "size-3.5" }),
|
|
221
|
+
/* @__PURE__ */ M("span", {
|
|
219
222
|
className: "flex-1 text-left",
|
|
220
|
-
children:
|
|
223
|
+
children: W("newIssue")
|
|
221
224
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ M(Ue, {
|
|
223
226
|
keys: "C",
|
|
224
227
|
size: "xs",
|
|
225
228
|
variant: "plain"
|
|
226
229
|
})
|
|
227
230
|
]
|
|
228
|
-
}), /* @__PURE__ */
|
|
229
|
-
content:
|
|
231
|
+
}), /* @__PURE__ */ M(We, {
|
|
232
|
+
content: W("openPalette"),
|
|
230
233
|
shortcut: "Mod+K",
|
|
231
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ M("button", {
|
|
232
235
|
type: "button",
|
|
233
236
|
onClick: () => Q(!0),
|
|
234
|
-
"aria-label":
|
|
237
|
+
"aria-label": W("openPalette"),
|
|
235
238
|
"aria-keyshortcuts": "Meta+K Control+K",
|
|
236
|
-
className:
|
|
237
|
-
children: /* @__PURE__ */
|
|
239
|
+
className: B,
|
|
240
|
+
children: /* @__PURE__ */ M(g, { className: "size-3.5" })
|
|
238
241
|
})
|
|
239
242
|
})]
|
|
240
|
-
})] }) : /* @__PURE__ */
|
|
243
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
241
244
|
className: "flex flex-col items-center gap-1.5",
|
|
242
245
|
children: [
|
|
243
246
|
t,
|
|
244
|
-
!
|
|
245
|
-
!
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
content:
|
|
247
|
+
!y && /* @__PURE__ */ M(C, { apps: m.apps ?? [] }),
|
|
248
|
+
!y && /* @__PURE__ */ M(w, { className: "flex-col" }),
|
|
249
|
+
/* @__PURE__ */ M(We, {
|
|
250
|
+
content: W("newIssue"),
|
|
248
251
|
shortcut: "C",
|
|
249
252
|
side: "right",
|
|
250
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ M("button", {
|
|
251
254
|
type: "button",
|
|
252
255
|
onClick: () => Z(),
|
|
253
|
-
"aria-label":
|
|
254
|
-
className:
|
|
255
|
-
children: /* @__PURE__ */
|
|
256
|
+
"aria-label": W("newIssue"),
|
|
257
|
+
className: B,
|
|
258
|
+
children: /* @__PURE__ */ M(h, { className: "size-3.5" })
|
|
256
259
|
})
|
|
257
260
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
content:
|
|
261
|
+
/* @__PURE__ */ M(We, {
|
|
262
|
+
content: W("openPalette"),
|
|
260
263
|
shortcut: "Mod+K",
|
|
261
264
|
side: "right",
|
|
262
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ M("button", {
|
|
263
266
|
type: "button",
|
|
264
267
|
onClick: () => Q(!0),
|
|
265
|
-
"aria-label":
|
|
268
|
+
"aria-label": W("openPalette"),
|
|
266
269
|
"aria-keyshortcuts": "Meta+K Control+K",
|
|
267
|
-
className:
|
|
268
|
-
children: /* @__PURE__ */
|
|
270
|
+
className: B,
|
|
271
|
+
children: /* @__PURE__ */ M(g, { className: "size-3.5" })
|
|
269
272
|
})
|
|
270
273
|
})
|
|
271
274
|
]
|
|
272
275
|
});
|
|
273
|
-
},
|
|
274
|
-
if (X) return /* @__PURE__ */
|
|
275
|
-
let n = !e, r = (e) => J.pathname === e || J.pathname.startsWith(`${e}/`), i = (e, t) => (n) =>
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
...
|
|
279
|
-
]), a = (e) => (t) =>
|
|
276
|
+
}, Gt = ({ expanded: e, mobileOpen: t }) => {
|
|
277
|
+
if (X) return /* @__PURE__ */ M(be, { workspace: p });
|
|
278
|
+
let n = !e, r = (e) => J.pathname === e || J.pathname.startsWith(`${e}/`), i = (e, t) => (n) => H(n, [
|
|
279
|
+
yt(e),
|
|
280
|
+
D,
|
|
281
|
+
..._t(t)
|
|
282
|
+
]), a = (e) => (t) => H(t, _t(e)), o = (e, t) => /* @__PURE__ */ N("span", {
|
|
280
283
|
className: "relative flex",
|
|
281
|
-
children: [e, n && t && /* @__PURE__ */
|
|
282
|
-
}), s =
|
|
283
|
-
let t = (t) =>
|
|
284
|
-
return /* @__PURE__ */
|
|
284
|
+
children: [e, n && t && /* @__PURE__ */ M("span", { className: rt })]
|
|
285
|
+
}), s = v.filter((e) => !e.archivedAt), c = new Set(s.map((e) => e.id)), l = (e) => s.filter((t) => (t.parentId && c.has(t.parentId) ? t.parentId : "") === e), u = (e) => {
|
|
286
|
+
let t = (t) => ye(p, e.key, t), r = Ot.filter((t) => t.identifier.startsWith(`${e.key}-`)).length;
|
|
287
|
+
return /* @__PURE__ */ N(I, {
|
|
285
288
|
label: e.name,
|
|
286
|
-
icon: o(/* @__PURE__ */
|
|
289
|
+
icon: o(/* @__PURE__ */ M(he, {
|
|
287
290
|
icon: e.icon,
|
|
288
291
|
color: e.color,
|
|
289
292
|
name: e.name
|
|
290
|
-
}),
|
|
291
|
-
selected:
|
|
292
|
-
open: !
|
|
293
|
-
onOpenChange: (t) =>
|
|
294
|
-
onContextMenu: (t) =>
|
|
295
|
-
action: /* @__PURE__ */
|
|
296
|
-
items: () =>
|
|
297
|
-
label:
|
|
293
|
+
}), jt(e.id) > 0),
|
|
294
|
+
selected: ve(J.pathname, p)?.team === e.key,
|
|
295
|
+
open: !Tt.has(e.key),
|
|
296
|
+
onOpenChange: (t) => Dt(e.key, t),
|
|
297
|
+
onContextMenu: (t) => H(t, vt(e)),
|
|
298
|
+
action: /* @__PURE__ */ M($e, {
|
|
299
|
+
items: () => vt(e),
|
|
300
|
+
label: G("moreActionsFor", { name: e.name })
|
|
298
301
|
}),
|
|
299
302
|
children: [
|
|
300
|
-
e.triageEnabled && /* @__PURE__ */
|
|
301
|
-
label:
|
|
302
|
-
icon: /* @__PURE__ */
|
|
303
|
+
e.triageEnabled && /* @__PURE__ */ M(L, {
|
|
304
|
+
label: W("triage"),
|
|
305
|
+
icon: /* @__PURE__ */ M(fe, { className: "size-4" }),
|
|
303
306
|
href: t("triage"),
|
|
304
307
|
selected: Y("triage", e.key),
|
|
305
308
|
onContextMenu: a(t("triage")),
|
|
306
|
-
badge: /* @__PURE__ */
|
|
307
|
-
count:
|
|
308
|
-
locale:
|
|
309
|
-
label:
|
|
309
|
+
badge: /* @__PURE__ */ M(He, {
|
|
310
|
+
count: jt(e.id),
|
|
311
|
+
locale: K,
|
|
312
|
+
label: W("triageCount")
|
|
310
313
|
})
|
|
311
314
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
label:
|
|
314
|
-
icon: /* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ M(L, {
|
|
316
|
+
label: W("issues"),
|
|
317
|
+
icon: /* @__PURE__ */ M(le, { className: "size-4" }),
|
|
315
318
|
href: t("issues"),
|
|
316
|
-
selected:
|
|
319
|
+
selected: wt.team === e.key,
|
|
317
320
|
onContextMenu: a(t("issues"))
|
|
318
321
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
label:
|
|
321
|
-
icon: /* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ M(L, {
|
|
323
|
+
label: W("projects"),
|
|
324
|
+
icon: /* @__PURE__ */ M(de, { className: "size-4" }),
|
|
322
325
|
href: t("projects"),
|
|
323
326
|
selected: Y("projects", e.key),
|
|
324
327
|
onContextMenu: a(t("projects"))
|
|
325
328
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
label:
|
|
328
|
-
icon: /* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ M(L, {
|
|
330
|
+
label: W("areas"),
|
|
331
|
+
icon: /* @__PURE__ */ M(re, { className: "size-4" }),
|
|
329
332
|
href: t("areas"),
|
|
330
333
|
selected: Y("areas", e.key),
|
|
331
334
|
onContextMenu: a(t("areas"))
|
|
332
335
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
label:
|
|
335
|
-
icon: /* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ M(L, {
|
|
337
|
+
label: W("decisions"),
|
|
338
|
+
icon: /* @__PURE__ */ M(se, { className: "size-4" }),
|
|
336
339
|
href: t("decisions"),
|
|
337
340
|
selected: Y("decisions", e.key),
|
|
338
341
|
onContextMenu: a(t("decisions")),
|
|
339
|
-
badge: /* @__PURE__ */
|
|
342
|
+
badge: /* @__PURE__ */ M(He, {
|
|
340
343
|
count: r,
|
|
341
|
-
locale:
|
|
342
|
-
label:
|
|
344
|
+
locale: K,
|
|
345
|
+
label: W("waitingCount"),
|
|
343
346
|
className: "bg-agent! text-agent-foreground!"
|
|
344
347
|
})
|
|
345
348
|
}),
|
|
346
|
-
!n && /* @__PURE__ */
|
|
347
|
-
workspace:
|
|
349
|
+
!n && /* @__PURE__ */ M(Ee, {
|
|
350
|
+
workspace: p,
|
|
348
351
|
team: e,
|
|
349
|
-
current:
|
|
352
|
+
current: nt(J.pathname, p)
|
|
350
353
|
}),
|
|
351
|
-
e.cyclesEnabled && /* @__PURE__ */
|
|
352
|
-
label:
|
|
353
|
-
icon: /* @__PURE__ */
|
|
354
|
+
e.cyclesEnabled && /* @__PURE__ */ M(L, {
|
|
355
|
+
label: W("cycles"),
|
|
356
|
+
icon: /* @__PURE__ */ M(oe, { className: "size-4" }),
|
|
354
357
|
href: t("cycles"),
|
|
355
358
|
selected: Y("cycles", e.key)
|
|
356
359
|
}),
|
|
357
|
-
l(e.id).map(
|
|
360
|
+
l(e.id).map(u)
|
|
358
361
|
]
|
|
359
362
|
}, e.id);
|
|
360
|
-
},
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
t && /* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
label:
|
|
365
|
-
icon: o(/* @__PURE__ */
|
|
366
|
-
href: `/${
|
|
367
|
-
selected: r(`/${
|
|
368
|
-
onContextMenu: a(`/${
|
|
369
|
-
badge: /* @__PURE__ */
|
|
370
|
-
count:
|
|
371
|
-
locale:
|
|
372
|
-
label:
|
|
363
|
+
}, d = l("").map(u), f = `/${p}/issues?assignee=${encodeURIComponent(m.user.username)}`;
|
|
364
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
365
|
+
t && /* @__PURE__ */ M(it, {}),
|
|
366
|
+
/* @__PURE__ */ M(L, {
|
|
367
|
+
label: W("notifications"),
|
|
368
|
+
icon: o(/* @__PURE__ */ M(ue, { className: "size-4" }), Nt > 0),
|
|
369
|
+
href: `/${p}/notifications`,
|
|
370
|
+
selected: r(`/${p}/notifications`),
|
|
371
|
+
onContextMenu: a(`/${p}/notifications`),
|
|
372
|
+
badge: /* @__PURE__ */ M(He, {
|
|
373
|
+
count: Nt,
|
|
374
|
+
locale: K,
|
|
375
|
+
label: W("unreadCount")
|
|
373
376
|
})
|
|
374
377
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
label:
|
|
377
|
-
icon: /* @__PURE__ */
|
|
378
|
-
href:
|
|
379
|
-
selected:
|
|
380
|
-
onContextMenu: i("my-issues",
|
|
378
|
+
/* @__PURE__ */ M(L, {
|
|
379
|
+
label: W("myIssues"),
|
|
380
|
+
icon: /* @__PURE__ */ M(pe, { className: "size-4" }),
|
|
381
|
+
href: f,
|
|
382
|
+
selected: wt.mine,
|
|
383
|
+
onContextMenu: i("my-issues", f)
|
|
381
384
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
label:
|
|
384
|
-
icon: /* @__PURE__ */
|
|
385
|
-
href: `/${
|
|
386
|
-
selected: r(`/${
|
|
387
|
-
onContextMenu: i("projects", `/${
|
|
385
|
+
/* @__PURE__ */ M(L, {
|
|
386
|
+
label: W("projects"),
|
|
387
|
+
icon: /* @__PURE__ */ M(de, { className: "size-4" }),
|
|
388
|
+
href: `/${p}/projects`,
|
|
389
|
+
selected: r(`/${p}/projects`),
|
|
390
|
+
onContextMenu: i("projects", `/${p}/projects`)
|
|
388
391
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
label:
|
|
391
|
-
icon: /* @__PURE__ */
|
|
392
|
-
href: `/${
|
|
393
|
-
selected: r(`/${
|
|
392
|
+
/* @__PURE__ */ M(L, {
|
|
393
|
+
label: W("dashboards"),
|
|
394
|
+
icon: /* @__PURE__ */ M(ie, { className: "size-4" }),
|
|
395
|
+
href: `/${p}/dashboards`,
|
|
396
|
+
selected: r(`/${p}/dashboards`)
|
|
394
397
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
label:
|
|
397
|
-
icon: /* @__PURE__ */
|
|
398
|
-
href: `/${
|
|
399
|
-
selected: r(`/${
|
|
400
|
-
onContextMenu: i("knowledge", `/${
|
|
398
|
+
/* @__PURE__ */ M(L, {
|
|
399
|
+
label: W("knowledge"),
|
|
400
|
+
icon: /* @__PURE__ */ M(ce, { className: "size-4" }),
|
|
401
|
+
href: `/${p}/knowledge`,
|
|
402
|
+
selected: r(`/${p}/knowledge`),
|
|
403
|
+
onContextMenu: i("knowledge", `/${p}/knowledge`)
|
|
401
404
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
label:
|
|
404
|
-
icon: /* @__PURE__ */
|
|
405
|
-
href: `/${
|
|
406
|
-
selected: r(`/${
|
|
407
|
-
onContextMenu: i("agents", `/${
|
|
405
|
+
/* @__PURE__ */ M(L, {
|
|
406
|
+
label: W("agents"),
|
|
407
|
+
icon: /* @__PURE__ */ M(ne, { className: "size-4" }),
|
|
408
|
+
href: `/${p}/agents`,
|
|
409
|
+
selected: r(`/${p}/agents`),
|
|
410
|
+
onContextMenu: i("agents", `/${p}/agents`)
|
|
408
411
|
}),
|
|
409
|
-
n ? /* @__PURE__ */
|
|
412
|
+
n ? /* @__PURE__ */ M("div", {
|
|
410
413
|
className: "mt-4 border-t border-border pt-4",
|
|
411
|
-
children:
|
|
412
|
-
}) : /* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
workspace:
|
|
415
|
-
current:
|
|
414
|
+
children: d
|
|
415
|
+
}) : /* @__PURE__ */ N(j, { children: [
|
|
416
|
+
/* @__PURE__ */ M(lt, {
|
|
417
|
+
workspace: p,
|
|
418
|
+
current: wt.saved
|
|
416
419
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
workspace:
|
|
419
|
-
myUsername:
|
|
420
|
+
/* @__PURE__ */ M(De, {
|
|
421
|
+
workspace: p,
|
|
422
|
+
myUsername: m.user.username,
|
|
420
423
|
currentHref: J.pathname + J.searchStr
|
|
421
424
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
label:
|
|
425
|
+
/* @__PURE__ */ N(I, {
|
|
426
|
+
label: W("teams"),
|
|
424
427
|
collapsible: !1,
|
|
425
|
-
action:
|
|
428
|
+
action: T && /* @__PURE__ */ M(E, {
|
|
426
429
|
variant: "ghost",
|
|
427
430
|
size: "xs",
|
|
428
|
-
icon: /* @__PURE__ */
|
|
429
|
-
label:
|
|
430
|
-
onClick: () =>
|
|
431
|
+
icon: /* @__PURE__ */ M(h, {}),
|
|
432
|
+
label: W("createTeam"),
|
|
433
|
+
onClick: () => S(!0)
|
|
431
434
|
}),
|
|
432
|
-
children: [
|
|
433
|
-
label:
|
|
434
|
-
icon: /* @__PURE__ */
|
|
435
|
-
onClick: () =>
|
|
436
|
-
}) : /* @__PURE__ */
|
|
435
|
+
children: [d, v.length === 0 && (T ? /* @__PURE__ */ M(L, {
|
|
436
|
+
label: W("createFirstTeam"),
|
|
437
|
+
icon: /* @__PURE__ */ M(h, { className: "size-4" }),
|
|
438
|
+
onClick: () => S(!0)
|
|
439
|
+
}) : /* @__PURE__ */ M("p", {
|
|
437
440
|
className: "px-2 text-sm text-muted-foreground",
|
|
438
|
-
children:
|
|
441
|
+
children: W("noTeams")
|
|
439
442
|
}))]
|
|
440
443
|
})
|
|
441
444
|
] })
|
|
442
445
|
] });
|
|
443
|
-
},
|
|
446
|
+
}, Kt = X ? void 0 : ({ expanded: e, isMobile: t }) => {
|
|
444
447
|
let n = [
|
|
445
448
|
{
|
|
446
|
-
label:
|
|
447
|
-
onClick: () =>
|
|
449
|
+
label: W("myAccount"),
|
|
450
|
+
onClick: () => z({
|
|
448
451
|
to: "/$workspace/settings/account",
|
|
449
|
-
params: { workspace:
|
|
452
|
+
params: { workspace: p }
|
|
450
453
|
})
|
|
451
454
|
},
|
|
452
455
|
{
|
|
453
|
-
label:
|
|
454
|
-
onClick: () =>
|
|
456
|
+
label: W("settings"),
|
|
457
|
+
onClick: () => z({
|
|
455
458
|
to: "/$workspace/settings",
|
|
456
|
-
params: { workspace:
|
|
459
|
+
params: { workspace: p }
|
|
457
460
|
})
|
|
458
461
|
},
|
|
459
|
-
...
|
|
460
|
-
label:
|
|
462
|
+
...Vt ? [{
|
|
463
|
+
label: W("installApp"),
|
|
461
464
|
onClick: Be
|
|
462
465
|
}] : [],
|
|
463
|
-
...
|
|
464
|
-
label:
|
|
465
|
-
onClick:
|
|
466
|
+
...Ht ? [D, {
|
|
467
|
+
label: W("signOut"),
|
|
468
|
+
onClick: Ut
|
|
466
469
|
}] : []
|
|
467
|
-
], r = /* @__PURE__ */
|
|
468
|
-
name:
|
|
469
|
-
src:
|
|
470
|
+
], r = /* @__PURE__ */ M(ze, {
|
|
471
|
+
name: m.user.name,
|
|
472
|
+
src: m.user.avatarUrl,
|
|
470
473
|
size: "sm",
|
|
471
474
|
decorative: !0
|
|
472
475
|
});
|
|
473
|
-
return e ? /* @__PURE__ */
|
|
474
|
-
myUsername:
|
|
475
|
-
workspace:
|
|
476
|
-
}), /* @__PURE__ */
|
|
476
|
+
return e ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(ct, {
|
|
477
|
+
myUsername: m.user.username,
|
|
478
|
+
workspace: p
|
|
479
|
+
}), /* @__PURE__ */ N("div", {
|
|
477
480
|
className: "flex items-center gap-1",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
479
|
-
label:
|
|
481
|
+
children: [/* @__PURE__ */ M(Re, {
|
|
482
|
+
label: W("accountMenu", { name: m.user.name }),
|
|
480
483
|
side: "top",
|
|
481
484
|
align: "start",
|
|
482
485
|
matchTriggerWidth: !0,
|
|
483
486
|
items: n,
|
|
484
|
-
trigger: /* @__PURE__ */
|
|
487
|
+
trigger: /* @__PURE__ */ N("button", {
|
|
485
488
|
type: "button",
|
|
486
489
|
className: "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-1.5 text-left hover:bg-muted",
|
|
487
|
-
children: [r, /* @__PURE__ */
|
|
490
|
+
children: [r, /* @__PURE__ */ M("span", {
|
|
488
491
|
className: "min-w-0 flex-1 truncate text-sm",
|
|
489
|
-
children:
|
|
492
|
+
children: m.user.name
|
|
490
493
|
})]
|
|
491
494
|
})
|
|
492
|
-
}), !t && /* @__PURE__ */
|
|
493
|
-
})] }) : /* @__PURE__ */
|
|
495
|
+
}), !t && /* @__PURE__ */ M(R, {})]
|
|
496
|
+
})] }) : /* @__PURE__ */ N("div", {
|
|
494
497
|
className: "flex flex-col items-center gap-2",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
496
|
-
label:
|
|
498
|
+
children: [/* @__PURE__ */ M(R, {}), /* @__PURE__ */ M(Re, {
|
|
499
|
+
label: W("accountMenu", { name: m.user.name }),
|
|
497
500
|
side: "right",
|
|
498
501
|
align: "end",
|
|
499
502
|
items: n,
|
|
@@ -502,45 +505,45 @@ function U() {
|
|
|
502
505
|
children: r
|
|
503
506
|
})]
|
|
504
507
|
});
|
|
505
|
-
},
|
|
506
|
-
workspace:
|
|
507
|
-
name:
|
|
508
|
-
apps:
|
|
509
|
-
unread:
|
|
508
|
+
}, qt = /* @__PURE__ */ M(at, {
|
|
509
|
+
workspace: p,
|
|
510
|
+
name: _.name,
|
|
511
|
+
apps: m.apps ?? [],
|
|
512
|
+
unread: Nt,
|
|
510
513
|
onSearch: () => Q(!0),
|
|
511
514
|
onNewIssue: () => Z()
|
|
512
515
|
});
|
|
513
|
-
return /* @__PURE__ */
|
|
514
|
-
workspace:
|
|
515
|
-
children: /* @__PURE__ */
|
|
516
|
-
actions:
|
|
517
|
-
children: /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ M(Fe, {
|
|
517
|
+
workspace: p,
|
|
518
|
+
children: /* @__PURE__ */ M(te, {
|
|
519
|
+
actions: m.actions ?? [],
|
|
520
|
+
children: /* @__PURE__ */ M(me.Provider, {
|
|
518
521
|
value: Z,
|
|
519
|
-
children: /* @__PURE__ */
|
|
520
|
-
value:
|
|
522
|
+
children: /* @__PURE__ */ N(we.Provider, {
|
|
523
|
+
value: zt,
|
|
521
524
|
children: [
|
|
522
|
-
|
|
523
|
-
sidebar:
|
|
524
|
-
brand:
|
|
525
|
-
navigation:
|
|
526
|
-
header:
|
|
527
|
-
presence: /* @__PURE__ */
|
|
528
|
-
myUsername:
|
|
529
|
-
workspace:
|
|
525
|
+
y ? /* @__PURE__ */ M(ot, {
|
|
526
|
+
sidebar: y.sidebar,
|
|
527
|
+
brand: Wt,
|
|
528
|
+
navigation: Gt,
|
|
529
|
+
header: qt,
|
|
530
|
+
presence: /* @__PURE__ */ M(ct, {
|
|
531
|
+
myUsername: m.user.username,
|
|
532
|
+
workspace: p
|
|
530
533
|
}),
|
|
531
|
-
children: /* @__PURE__ */
|
|
532
|
-
}) : /* @__PURE__ */
|
|
533
|
-
expanded:
|
|
534
|
+
children: /* @__PURE__ */ M(st, { children: /* @__PURE__ */ M(Ke, {}) })
|
|
535
|
+
}) : /* @__PURE__ */ M(et, {
|
|
536
|
+
expanded: bt || X,
|
|
534
537
|
onExpandedChange: (e) => {
|
|
535
|
-
|
|
538
|
+
xt(e), ft({
|
|
536
539
|
expanded: e,
|
|
537
|
-
width:
|
|
540
|
+
width: St
|
|
538
541
|
});
|
|
539
542
|
},
|
|
540
|
-
width:
|
|
543
|
+
width: St,
|
|
541
544
|
onWidthChange: (e) => {
|
|
542
|
-
|
|
543
|
-
expanded:
|
|
545
|
+
Ct(e), ft({
|
|
546
|
+
expanded: bt,
|
|
544
547
|
width: e
|
|
545
548
|
});
|
|
546
549
|
},
|
|
@@ -548,43 +551,47 @@ function U() {
|
|
|
548
551
|
navigationResetKey: X ? "settings" : "workspace",
|
|
549
552
|
mainClassName: "flex flex-col overflow-hidden",
|
|
550
553
|
labels: {
|
|
551
|
-
navigation:
|
|
552
|
-
skipToContent:
|
|
553
|
-
openNavigation:
|
|
554
|
-
closeNavigation:
|
|
555
|
-
expandSidebar:
|
|
556
|
-
collapseSidebar:
|
|
557
|
-
resizeSidebar:
|
|
554
|
+
navigation: W("navigation"),
|
|
555
|
+
skipToContent: W("skipToContent"),
|
|
556
|
+
openNavigation: W("openNav"),
|
|
557
|
+
closeNavigation: W("closeNav"),
|
|
558
|
+
expandSidebar: W("expandSidebar"),
|
|
559
|
+
collapseSidebar: W("collapseSidebar"),
|
|
560
|
+
resizeSidebar: W("resizeSidebar")
|
|
558
561
|
},
|
|
559
|
-
header:
|
|
560
|
-
brand:
|
|
561
|
-
navigation:
|
|
562
|
-
footer:
|
|
563
|
-
children: /* @__PURE__ */
|
|
562
|
+
header: qt,
|
|
563
|
+
brand: Wt,
|
|
564
|
+
navigation: Gt,
|
|
565
|
+
footer: Kt,
|
|
566
|
+
children: /* @__PURE__ */ M(st, { children: /* @__PURE__ */ M(Ke, {}) })
|
|
564
567
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
!
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
workspace:
|
|
569
|
-
open:
|
|
568
|
+
/* @__PURE__ */ M(Se, { workspace: p }),
|
|
569
|
+
!Bt && /* @__PURE__ */ M(ht, {}),
|
|
570
|
+
/* @__PURE__ */ M(Te, {
|
|
571
|
+
workspace: p,
|
|
572
|
+
open: Lt,
|
|
570
573
|
onClose: () => Q(!1),
|
|
571
|
-
selection:
|
|
574
|
+
selection: Rt
|
|
572
575
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
onClose: () =>
|
|
576
|
+
/* @__PURE__ */ M(je, { workspace: p }),
|
|
577
|
+
/* @__PURE__ */ M(Me, {
|
|
578
|
+
open: Ft,
|
|
579
|
+
onClose: () => It(!1)
|
|
577
580
|
}),
|
|
578
|
-
|
|
579
|
-
workspace:
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
...
|
|
585
|
-
...
|
|
586
|
-
...
|
|
587
|
-
|
|
581
|
+
xe && /* @__PURE__ */ M(ke, {
|
|
582
|
+
workspace: p,
|
|
583
|
+
onClose: () => S(!1)
|
|
584
|
+
}),
|
|
585
|
+
b && /* @__PURE__ */ M(Je, { children: /* @__PURE__ */ M(Ae, {
|
|
586
|
+
workspace: p,
|
|
587
|
+
...b.team && { defaultTeam: b.team },
|
|
588
|
+
...b.title && { defaultTitle: b.title },
|
|
589
|
+
...b.body && { defaultBody: b.body },
|
|
590
|
+
...b.area && { defaultArea: b.area },
|
|
591
|
+
...b.origin && { origin: b.origin },
|
|
592
|
+
...b.fields && { defaults: b.fields },
|
|
593
|
+
...b.onCreated && { onCreated: b.onCreated },
|
|
594
|
+
onClose: () => x(null)
|
|
588
595
|
}) })
|
|
589
596
|
]
|
|
590
597
|
})
|
|
@@ -592,90 +599,90 @@ function U() {
|
|
|
592
599
|
})
|
|
593
600
|
});
|
|
594
601
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
602
|
+
function it() {
|
|
603
|
+
return O(() => {
|
|
597
604
|
document.querySelector(".pw-frame-drawer [aria-current=\"page\"]")?.scrollIntoView({ block: "nearest" });
|
|
598
605
|
}, []), null;
|
|
599
606
|
}
|
|
600
|
-
function
|
|
601
|
-
let { isMobile: s } =
|
|
602
|
-
return s ? /* @__PURE__ */
|
|
607
|
+
function at({ workspace: e, name: n, apps: r, unread: i, onSearch: a, onNewIssue: o }) {
|
|
608
|
+
let { isMobile: s } = z(), c = t(), l = A("workspace");
|
|
609
|
+
return s ? /* @__PURE__ */ N("div", {
|
|
603
610
|
className: "flex h-12 items-center gap-1 border-b border-border px-1",
|
|
604
611
|
children: [
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ M(R, {}),
|
|
613
|
+
/* @__PURE__ */ M("span", {
|
|
607
614
|
className: "min-w-0 flex-1 truncate text-sm font-semibold",
|
|
608
615
|
children: n
|
|
609
616
|
}),
|
|
610
|
-
!c && /* @__PURE__ */
|
|
611
|
-
!c && /* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
617
|
+
!c && /* @__PURE__ */ M(w, {}),
|
|
618
|
+
!c && /* @__PURE__ */ M(C, { apps: r }),
|
|
619
|
+
/* @__PURE__ */ M(E, {
|
|
613
620
|
variant: "ghost",
|
|
614
621
|
size: "lg",
|
|
615
|
-
icon: /* @__PURE__ */
|
|
622
|
+
icon: /* @__PURE__ */ M(g, {}),
|
|
616
623
|
label: l("openPalette"),
|
|
617
624
|
onClick: a
|
|
618
625
|
}),
|
|
619
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ M(E, {
|
|
620
627
|
variant: "ghost",
|
|
621
628
|
size: "lg",
|
|
622
|
-
icon: /* @__PURE__ */
|
|
629
|
+
icon: /* @__PURE__ */ M(ue, {}),
|
|
623
630
|
label: l("notifications"),
|
|
624
631
|
href: `/${e}/notifications`,
|
|
625
632
|
dot: i > 0
|
|
626
633
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ M(E, {
|
|
628
635
|
variant: "ghost",
|
|
629
636
|
size: "lg",
|
|
630
|
-
icon: /* @__PURE__ */
|
|
637
|
+
icon: /* @__PURE__ */ M(h, {}),
|
|
631
638
|
label: l("newIssue"),
|
|
632
639
|
onClick: o
|
|
633
640
|
})
|
|
634
641
|
]
|
|
635
642
|
}) : null;
|
|
636
643
|
}
|
|
637
|
-
function
|
|
638
|
-
let o =
|
|
639
|
-
return /* @__PURE__ */
|
|
644
|
+
function ot({ sidebar: e, brand: t, navigation: n, header: r, presence: i, children: a }) {
|
|
645
|
+
let o = z();
|
|
646
|
+
return /* @__PURE__ */ N(j, { children: [e && tt(/* @__PURE__ */ N("div", {
|
|
640
647
|
className: "tandem-hosted-sidebar flex flex-col gap-3",
|
|
641
648
|
children: [
|
|
642
649
|
t?.(o),
|
|
643
650
|
n(o),
|
|
644
651
|
o.expanded && i
|
|
645
652
|
]
|
|
646
|
-
}), e), /* @__PURE__ */
|
|
653
|
+
}), e), /* @__PURE__ */ N("div", {
|
|
647
654
|
className: "flex h-full min-h-0 flex-col",
|
|
648
655
|
children: [r, a]
|
|
649
656
|
})] });
|
|
650
657
|
}
|
|
651
|
-
function
|
|
652
|
-
let { state: t } =
|
|
653
|
-
return /* @__PURE__ */
|
|
654
|
-
className:
|
|
658
|
+
function st({ children: e }) {
|
|
659
|
+
let { state: t } = m(), n = t?.open && t.maximized;
|
|
660
|
+
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
661
|
+
className: V("min-h-0 min-w-0 flex-1 overflow-y-auto bg-card", n && "hidden"),
|
|
655
662
|
children: e
|
|
656
|
-
}), /* @__PURE__ */
|
|
663
|
+
}), /* @__PURE__ */ M(T, {})] });
|
|
657
664
|
}
|
|
658
|
-
function
|
|
659
|
-
let { people: n, page: r } = Ie(), { person: i } =
|
|
665
|
+
function ct({ myUsername: e, workspace: t }) {
|
|
666
|
+
let { people: n, page: r } = Ie(), { person: i } = v(t), a = A("workspace"), o = new Set(n.map((e) => e.username).filter((t) => t !== e));
|
|
660
667
|
if (o.size === 0) return null;
|
|
661
668
|
let s = [...new Set(n.filter((t) => t.username !== e && t.page === r).map((e) => e.username))];
|
|
662
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ N("div", {
|
|
663
670
|
className: "flex items-center gap-2 px-2 pb-2 text-xs text-muted-foreground",
|
|
664
|
-
children: [s.length > 0 && /* @__PURE__ */
|
|
671
|
+
children: [s.length > 0 && /* @__PURE__ */ M(Be, {
|
|
665
672
|
size: "xs",
|
|
666
673
|
max: 5,
|
|
667
674
|
showOverflow: !1,
|
|
668
675
|
ringColor: "var(--theme-sidebar-bg, var(--theme-muted-panel-bg))",
|
|
669
676
|
label: a("onThisPage", { count: s.length }),
|
|
670
|
-
children: s.map((e) => /* @__PURE__ */
|
|
677
|
+
children: s.map((e) => /* @__PURE__ */ M(S, {
|
|
671
678
|
workspace: t,
|
|
672
679
|
handle: e,
|
|
673
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ M(ze, {
|
|
674
681
|
name: i(e).name,
|
|
675
682
|
src: i(e).avatarUrl
|
|
676
683
|
})
|
|
677
684
|
}, e))
|
|
678
|
-
}), /* @__PURE__ */
|
|
685
|
+
}), /* @__PURE__ */ M("span", { children: s.length === 1 ? a("oneOnThisPage", {
|
|
679
686
|
name: i(s[0] ?? "").name,
|
|
680
687
|
count: o.size
|
|
681
688
|
}) : s.length > 1 ? a("othersOnThisPage", {
|
|
@@ -684,38 +691,38 @@ function ot({ myUsername: e, workspace: t }) {
|
|
|
684
691
|
}) : a("online", { count: o.size }) })]
|
|
685
692
|
});
|
|
686
693
|
}
|
|
687
|
-
function
|
|
688
|
-
let n =
|
|
689
|
-
return a.length === 0 ? s : /* @__PURE__ */
|
|
694
|
+
function lt({ workspace: e, current: t }) {
|
|
695
|
+
let n = A("savedViews"), r = A("common"), i = Ge(), { views: a } = b(e), { menu: o, dialogs: s } = x(e);
|
|
696
|
+
return a.length === 0 ? s : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(I, {
|
|
690
697
|
label: n("title"),
|
|
691
698
|
collapsible: !1,
|
|
692
|
-
children: a.map((a) => /* @__PURE__ */
|
|
699
|
+
children: a.map((a) => /* @__PURE__ */ M(L, {
|
|
693
700
|
label: a.name,
|
|
694
|
-
icon: a.shared ? /* @__PURE__ */
|
|
695
|
-
href:
|
|
696
|
-
selected:
|
|
701
|
+
icon: a.shared ? /* @__PURE__ */ M(_, { className: "size-4" }) : /* @__PURE__ */ M(le, { className: "size-4" }),
|
|
702
|
+
href: xe(e, a),
|
|
703
|
+
selected: y(a, t),
|
|
697
704
|
title: a.shared ? n("sharedBy", { owner: a.owner }) : n("onlyYou"),
|
|
698
705
|
onContextMenu: (e) => i(e, o(a)),
|
|
699
|
-
action: /* @__PURE__ */
|
|
706
|
+
action: /* @__PURE__ */ M($e, {
|
|
700
707
|
items: () => o(a),
|
|
701
708
|
label: r("moreActionsFor", { name: a.name })
|
|
702
709
|
})
|
|
703
710
|
}, a.id))
|
|
704
711
|
}), s] });
|
|
705
712
|
}
|
|
706
|
-
var
|
|
707
|
-
function
|
|
713
|
+
var U = (e) => `tandem:collapsed-teams:${e}`;
|
|
714
|
+
function ut(e) {
|
|
708
715
|
try {
|
|
709
|
-
let t = JSON.parse(localStorage.getItem(
|
|
716
|
+
let t = JSON.parse(localStorage.getItem(U(e)) ?? "[]");
|
|
710
717
|
return new Set(Array.isArray(t) ? t.filter((e) => typeof e == "string") : []);
|
|
711
718
|
} catch {
|
|
712
719
|
return /* @__PURE__ */ new Set();
|
|
713
720
|
}
|
|
714
721
|
}
|
|
715
|
-
var
|
|
716
|
-
function
|
|
722
|
+
var W = "tandem:sidebar";
|
|
723
|
+
function dt() {
|
|
717
724
|
try {
|
|
718
|
-
let e = JSON.parse(localStorage.getItem(
|
|
725
|
+
let e = JSON.parse(localStorage.getItem(W) ?? "{}");
|
|
719
726
|
return {
|
|
720
727
|
expanded: e?.expanded !== !1,
|
|
721
728
|
width: typeof e?.width == "number" ? e.width : 240
|
|
@@ -727,21 +734,21 @@ function lt() {
|
|
|
727
734
|
};
|
|
728
735
|
}
|
|
729
736
|
}
|
|
730
|
-
function
|
|
737
|
+
function ft(e) {
|
|
731
738
|
try {
|
|
732
|
-
localStorage.setItem(
|
|
739
|
+
localStorage.setItem(W, JSON.stringify(e));
|
|
733
740
|
} catch {}
|
|
734
741
|
}
|
|
735
|
-
function
|
|
742
|
+
function pt(e, t) {
|
|
736
743
|
try {
|
|
737
|
-
localStorage.setItem(
|
|
744
|
+
localStorage.setItem(U(e), JSON.stringify([...t]));
|
|
738
745
|
} catch {}
|
|
739
746
|
}
|
|
740
|
-
function
|
|
747
|
+
function mt() {
|
|
741
748
|
return Array.from(document.querySelectorAll("[aria-keyshortcuts]")).some((e) => /\b(Meta|Control)\+F\b/.test(e.getAttribute("aria-keyshortcuts") ?? "") && e.getClientRects().length > 0);
|
|
742
749
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
750
|
+
function ht() {
|
|
751
|
+
return O(() => {
|
|
745
752
|
let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
746
753
|
try {
|
|
747
754
|
if (!t || sessionStorage.getItem("tandem:time-zone") === t) return;
|
|
@@ -750,4 +757,4 @@ function pt() {
|
|
|
750
757
|
e.PATCH("/api/v1/me", { body: { timeZone: t } }).catch(() => {});
|
|
751
758
|
}, []), null;
|
|
752
759
|
}
|
|
753
|
-
export {
|
|
760
|
+
export { H as component };
|