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