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