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