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