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