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