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