@parallelworks/tandem-web 0.139.2 → 0.140.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 +23 -0
- package/_virtual/_virtual_i18n/es/common.js +23 -0
- package/_virtual/_virtual_i18n/ja/common.js +23 -0
- package/_virtual/_virtual_i18n/ko/common.js +23 -0
- package/_virtual/_virtual_i18n/zh/common.js +23 -0
- package/api/queries.js +80 -70
- package/components/SettingsNav.js +55 -47
- package/index.js +32 -26
- package/package.json +1 -1
- package/routeTree.gen.js +164 -158
- package/routes/_workspace/settings/slack.js +12 -0
- package/routes/_workspace/settings/slack2.js +109 -0
- package/routes/_workspace/settings/slack3.js +4 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Link as e } from "../lib/router.js";
|
|
2
2
|
import { githubAccountQuery as t, meQuery as n } from "../api/queries.js";
|
|
3
|
-
import { ChevronDownIcon as r,
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useQuery as
|
|
3
|
+
import { ChevronDownIcon as r, CommentIcon as i, FolderIcon as a, HistoryIcon as o, KeyIcon as s, LinkIcon as c, NotificationIcon as l, RepositoryIcon as u, SettingsIcon as d, ShieldIcon as f, TagIcon as p, UserIcon as m, UsersIcon as h, WebhookIcon as g, WorkerIcon as _ } from "./icons.js";
|
|
4
|
+
import { useTranslations as v } from "use-intl";
|
|
5
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
|
+
import { useQuery as S, useSuspenseQuery as C } from "@tanstack/react-query";
|
|
7
7
|
// src/components/SettingsNav.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let { data: e } =
|
|
8
|
+
var w = "flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground", T = "bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] hover:bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] !text-[var(--theme-sidebar-active-text,var(--theme-app))] font-medium", E = { className: T };
|
|
9
|
+
function D() {
|
|
10
|
+
let { data: e } = C(n), r = v("settingsNav"), y = e?.mode === "platform", { data: b } = S(t);
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
13
|
label: r("account"),
|
|
@@ -15,31 +15,31 @@ function E() {
|
|
|
15
15
|
{
|
|
16
16
|
to: "/$workspace/settings/account",
|
|
17
17
|
label: r("profile"),
|
|
18
|
-
Icon:
|
|
18
|
+
Icon: m
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
to: "/$workspace/settings/notifications",
|
|
22
22
|
label: r("notifications"),
|
|
23
|
-
Icon:
|
|
23
|
+
Icon: l
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
to: "/$workspace/settings/runners",
|
|
27
27
|
label: r("runners"),
|
|
28
|
-
Icon:
|
|
28
|
+
Icon: _
|
|
29
29
|
},
|
|
30
|
-
...
|
|
30
|
+
...b?.enabled ? [{
|
|
31
31
|
to: "/$workspace/settings/connections",
|
|
32
32
|
label: r("connections"),
|
|
33
|
-
Icon:
|
|
33
|
+
Icon: c
|
|
34
34
|
}] : [],
|
|
35
|
-
...
|
|
35
|
+
...y ? [] : [{
|
|
36
36
|
to: "/$workspace/settings/tokens",
|
|
37
37
|
label: r("tokens"),
|
|
38
|
-
Icon:
|
|
38
|
+
Icon: s
|
|
39
39
|
}, {
|
|
40
40
|
to: "/$workspace/settings/sessions",
|
|
41
41
|
label: r("sessions"),
|
|
42
|
-
Icon:
|
|
42
|
+
Icon: f
|
|
43
43
|
}]
|
|
44
44
|
]
|
|
45
45
|
},
|
|
@@ -49,84 +49,92 @@ function E() {
|
|
|
49
49
|
{
|
|
50
50
|
to: "/$workspace/settings",
|
|
51
51
|
label: r("general"),
|
|
52
|
-
Icon:
|
|
52
|
+
Icon: d
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
to: "/$workspace/settings/members",
|
|
56
|
-
label: r(
|
|
57
|
-
Icon:
|
|
56
|
+
label: r(y ? "access" : "members"),
|
|
57
|
+
Icon: h
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
to: "/$workspace/settings/roles",
|
|
61
61
|
label: r("roles"),
|
|
62
|
-
Icon:
|
|
62
|
+
Icon: f
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
to: "/$workspace/settings/groups",
|
|
66
66
|
label: r("groups"),
|
|
67
|
-
Icon:
|
|
67
|
+
Icon: f
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
to: "/$workspace/settings/teams",
|
|
71
71
|
label: r("teams"),
|
|
72
|
-
Icon:
|
|
72
|
+
Icon: a
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
to: "/$workspace/settings/labels",
|
|
76
76
|
label: r("labels"),
|
|
77
|
-
Icon:
|
|
77
|
+
Icon: p
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
to: "/$workspace/settings/audit-log",
|
|
81
81
|
label: r("auditLog"),
|
|
82
|
-
Icon:
|
|
82
|
+
Icon: o
|
|
83
83
|
},
|
|
84
|
-
...
|
|
84
|
+
...y ? [] : [{
|
|
85
85
|
to: "/$workspace/settings/sso",
|
|
86
86
|
label: r("sso"),
|
|
87
|
-
Icon:
|
|
87
|
+
Icon: s
|
|
88
88
|
}]
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
label: r("integrations"),
|
|
93
|
-
items: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
items: [
|
|
94
|
+
{
|
|
95
|
+
to: "/$workspace/settings/github",
|
|
96
|
+
label: r("github"),
|
|
97
|
+
Icon: u
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
to: "/$workspace/settings/slack",
|
|
101
|
+
label: r("slack"),
|
|
102
|
+
Icon: i
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
to: "/$workspace/settings/webhooks",
|
|
106
|
+
label: r("webhooks"),
|
|
107
|
+
Icon: g
|
|
108
|
+
}
|
|
109
|
+
]
|
|
102
110
|
}
|
|
103
111
|
];
|
|
104
112
|
}
|
|
105
|
-
function
|
|
106
|
-
let n =
|
|
107
|
-
return /* @__PURE__ */
|
|
113
|
+
function O({ workspace: t }) {
|
|
114
|
+
let n = v("settingsNav"), i = D();
|
|
115
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x(e, {
|
|
108
116
|
to: "/$workspace/issues",
|
|
109
117
|
params: { workspace: t },
|
|
110
118
|
className: "flex h-9 items-center gap-2 rounded-md px-2 text-sm font-semibold hover:bg-muted",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
112
|
-
}), /* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ b(r, { className: "size-4 rotate-90 text-muted-foreground" }), n("label")]
|
|
120
|
+
}), /* @__PURE__ */ b("nav", {
|
|
113
121
|
"aria-label": n("label"),
|
|
114
122
|
className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
|
|
115
|
-
children: i.map((n) => /* @__PURE__ */
|
|
123
|
+
children: i.map((n) => /* @__PURE__ */ x("div", {
|
|
116
124
|
className: "mt-4 first:mt-0",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ b("p", {
|
|
118
126
|
className: "flex h-6 items-center px-2 text-xs font-medium text-muted-foreground",
|
|
119
127
|
children: n.label
|
|
120
|
-
}), /* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ b("div", {
|
|
121
129
|
className: "mt-1 space-y-0.5",
|
|
122
|
-
children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */
|
|
130
|
+
children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */ x(e, {
|
|
123
131
|
to: n,
|
|
124
132
|
params: { workspace: t },
|
|
125
|
-
className:
|
|
126
|
-
activeProps:
|
|
133
|
+
className: w,
|
|
134
|
+
activeProps: E,
|
|
127
135
|
activeOptions: { exact: !0 },
|
|
128
136
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ b(i, { className: "size-4" }),
|
|
130
138
|
" ",
|
|
131
139
|
r
|
|
132
140
|
]
|
|
@@ -135,4 +143,4 @@ function D({ workspace: t }) {
|
|
|
135
143
|
}, n.label))
|
|
136
144
|
})] });
|
|
137
145
|
}
|
|
138
|
-
export {
|
|
146
|
+
export { O as SettingsNav, w as navItem, T as navOn, D as useSettingsPages };
|
package/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { ErrorMessage as r, Pending as i } from "./components/status.js";
|
|
|
3
3
|
import { issueAddresses as a } from "./lib/branch.js";
|
|
4
4
|
import { ErrorPage as o } from "@parallelworks/ui";
|
|
5
5
|
import { notFound as s, redirect as c } from "@tanstack/react-router";
|
|
6
|
-
import {
|
|
7
|
-
import { jsx as
|
|
6
|
+
import { use as l } from "react";
|
|
7
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
8
8
|
// src/integration.tsx
|
|
9
|
-
var
|
|
9
|
+
var d = /* @__PURE__ */ new Set([
|
|
10
10
|
"api",
|
|
11
11
|
"auth",
|
|
12
12
|
".well-known",
|
|
@@ -17,14 +17,17 @@ var f = l(() => import("./hostedApp.js")), p = /* @__PURE__ */ new Set([
|
|
|
17
17
|
"readyz",
|
|
18
18
|
"problems"
|
|
19
19
|
]);
|
|
20
|
-
function
|
|
21
|
-
t(
|
|
22
|
-
let m, g = () => (
|
|
20
|
+
function f({ mountPath: f }) {
|
|
21
|
+
t(f);
|
|
22
|
+
let m, g, _ = () => (g ??= Promise.all([import("./hostedApp.js"), import("./lib/queryClient.js").then((e) => e.createQueryClient())]).then(([e, t]) => (m = {
|
|
23
|
+
HostedApp: e.default,
|
|
24
|
+
client: t
|
|
25
|
+
}, m)), g), v, y, b, x = !1, S = async (e) => {
|
|
23
26
|
let t = v, r = y;
|
|
24
27
|
throw !t || !r ? Error("Tandem: call mount and connect before opening a page") : (b ??= import("./pages.js").then(({ splitPages: e }) => {
|
|
25
28
|
let i = e();
|
|
26
29
|
for (let e of i.frameless) Object.assign(e.options, { path: n + e.options.path });
|
|
27
|
-
|
|
30
|
+
p(r.framed, i.framed), p(r.frameless, i.frameless), t.setRoutes(t.buildRouteTree()), x = !0;
|
|
28
31
|
}), await b, c({
|
|
29
32
|
href: e,
|
|
30
33
|
replace: !0
|
|
@@ -32,21 +35,24 @@ function m({ mountPath: l }) {
|
|
|
32
35
|
};
|
|
33
36
|
return {
|
|
34
37
|
mountPath: n,
|
|
35
|
-
contains:
|
|
36
|
-
hosts: (t) =>
|
|
38
|
+
contains: h,
|
|
39
|
+
hosts: (t) => h(t) && !d.has(e(t).split("/")[1] ?? ""),
|
|
37
40
|
route: {
|
|
38
|
-
beforeLoad: async ({ location: e }) =>
|
|
41
|
+
beforeLoad: async ({ location: e }) => {
|
|
42
|
+
let t = _();
|
|
43
|
+
return x || await S(e.href), { queryClient: (await t).client };
|
|
44
|
+
},
|
|
39
45
|
pendingComponent: i,
|
|
40
|
-
errorComponent: ({ error: e }) => /* @__PURE__ */
|
|
41
|
-
notFoundComponent: (e) => /* @__PURE__ */
|
|
46
|
+
errorComponent: ({ error: e }) => /* @__PURE__ */ u(r, { error: e }),
|
|
47
|
+
notFoundComponent: (e) => /* @__PURE__ */ u("div", {
|
|
42
48
|
className: "flex h-full",
|
|
43
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ u(o, { status: 404 })
|
|
44
50
|
})
|
|
45
51
|
},
|
|
46
52
|
placeholder: {
|
|
47
53
|
beforeLoad: async ({ location: e }) => {
|
|
48
54
|
if (x) throw s();
|
|
49
|
-
await S(e.href);
|
|
55
|
+
_(), await S(e.href);
|
|
50
56
|
},
|
|
51
57
|
pendingComponent: i
|
|
52
58
|
},
|
|
@@ -60,27 +66,27 @@ function m({ mountPath: l }) {
|
|
|
60
66
|
v = e;
|
|
61
67
|
},
|
|
62
68
|
rewrite: {
|
|
63
|
-
input: (e) =>
|
|
64
|
-
output: (e) =>
|
|
69
|
+
input: (e) => h(e.url.pathname) ? a.input?.(e) : void 0,
|
|
70
|
+
output: (e) => h(e.url.pathname) ? a.output?.(e) : void 0
|
|
65
71
|
},
|
|
66
72
|
Provider({ host: e, children: t }) {
|
|
67
|
-
let n =
|
|
68
|
-
return /* @__PURE__ */
|
|
73
|
+
let { HostedApp: n, client: r } = m ?? l(_());
|
|
74
|
+
return /* @__PURE__ */ u(n, {
|
|
69
75
|
host: e,
|
|
70
|
-
queryClient:
|
|
76
|
+
queryClient: r,
|
|
71
77
|
children: t
|
|
72
78
|
});
|
|
73
79
|
}
|
|
74
80
|
};
|
|
75
81
|
}
|
|
76
|
-
function
|
|
82
|
+
function p(e, t) {
|
|
77
83
|
for (let n of t) Object.assign(n.options, { getParentRoute: () => e });
|
|
78
|
-
e.addChildren([...
|
|
79
|
-
e.options.preloadStaleTime ??= 0, e.options.pendingComponent ??= i, e.options.errorComponent ??= ({ error: e }) => /* @__PURE__ */
|
|
84
|
+
e.addChildren([...m(e), ...t]), g(t, (e) => {
|
|
85
|
+
e.options.preloadStaleTime ??= 0, e.options.pendingComponent ??= i, e.options.errorComponent ??= ({ error: e }) => /* @__PURE__ */ u(r, { error: e });
|
|
80
86
|
});
|
|
81
87
|
}
|
|
82
|
-
var
|
|
83
|
-
function
|
|
84
|
-
for (let n of e) t(n), n.children &&
|
|
88
|
+
var m = (e) => Array.isArray(e.children) ? e.children : Object.values(e.children ?? {}), h = (e) => e === n || e.startsWith(`${n}/`);
|
|
89
|
+
function g(e, t) {
|
|
90
|
+
for (let n of e) t(n), n.children && g(m(n), t);
|
|
85
91
|
}
|
|
86
|
-
export {
|
|
92
|
+
export { f as createTandem };
|