@parallelworks/tandem-web 0.153.1 → 0.155.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 +41 -1
- package/_virtual/_virtual_i18n/es/common.js +41 -1
- package/_virtual/_virtual_i18n/ja/common.js +41 -1
- package/_virtual/_virtual_i18n/ko/common.js +41 -1
- package/_virtual/_virtual_i18n/zh/common.js +41 -1
- package/api/queries.js +110 -78
- package/components/AgentWork.js +142 -137
- package/components/CodeHostSettings.js +4 -1
- package/components/ConnectionCard.js +10 -11
- package/components/GitHub.js +24 -12
- package/components/IssueCode.js +82 -75
- package/components/IssueZendesk.js +68 -0
- package/components/SettingsNav.js +77 -63
- package/components/TeamRepositories.js +58 -55
- package/components/icons.js +33 -29
- package/package.json +1 -1
- package/routeTree.gen.js +188 -176
- package/routes/_workspace/issues/_identifier2.js +285 -280
- package/routes/_workspace/settings/gitlab.js +6 -0
- package/routes/_workspace/settings/gitlab2.js +54 -0
- package/routes/_workspace/settings/gitlab3.js +4 -0
- package/routes/_workspace/settings/zendesk.js +6 -0
- package/routes/_workspace/settings/zendesk2.js +97 -0
- package/routes/_workspace/settings/zendesk3.js +4 -0
- package/routes/login2.js +5 -5
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createFileRoute as e, lazyFn as t, lazyRouteComponent as n } from "@tanstack/react-router";
|
|
2
|
+
var r = e("/$workspace/settings/gitlab")({
|
|
3
|
+
loader: t(() => import("./gitlab3.js"), "loader"),
|
|
4
|
+
component: n(() => import("./gitlab2.js"), "component")
|
|
5
|
+
});
|
|
6
|
+
export { r as Route };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { gitlabQuery as e } from "../../../api/queries.js";
|
|
2
|
+
import { externalUrl as t } from "../../../lib/externalUrl.js";
|
|
3
|
+
import { useCan as n } from "../../../lib/roles.js";
|
|
4
|
+
import { SettingsPage as r } from "../../../components/settings.js";
|
|
5
|
+
import { Route as i } from "./gitlab.js";
|
|
6
|
+
import { SettingsCard as a, StatusLabel as o, buttonClasses as s } from "@parallelworks/ui";
|
|
7
|
+
import { useFormatter as c, useTranslations as l } from "use-intl";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { useSuspenseQuery as f } from "@tanstack/react-query";
|
|
10
|
+
import { GitLabIcon as p } from "@parallelworks/ui/brand-icons";
|
|
11
|
+
// src/routes/$workspace/settings/gitlab.tsx?tsr-split=component
|
|
12
|
+
function m() {
|
|
13
|
+
let { workspace: m } = i.useParams(), { data: h } = f(e(m)), g = n(m, "manage_workspace"), _ = l("settingsNav"), v = l("gitlab"), y = c(), b = h.settingsUrl ? t(h.settingsUrl) : void 0;
|
|
14
|
+
return /* @__PURE__ */ u(r, {
|
|
15
|
+
title: _("gitlab"),
|
|
16
|
+
description: v("pageDescription"),
|
|
17
|
+
children: h.enabled ? /* @__PURE__ */ u(a, {
|
|
18
|
+
title: v("groups"),
|
|
19
|
+
description: v("groupsHelp"),
|
|
20
|
+
...g && b && { action: /* @__PURE__ */ u("a", {
|
|
21
|
+
href: b,
|
|
22
|
+
className: s({ size: "sm" }),
|
|
23
|
+
children: v("manage")
|
|
24
|
+
}) },
|
|
25
|
+
children: h.groups.length === 0 ? /* @__PURE__ */ u("p", {
|
|
26
|
+
className: "px-3 py-3 text-sm text-muted-foreground",
|
|
27
|
+
children: v("none")
|
|
28
|
+
}) : /* @__PURE__ */ u("ul", {
|
|
29
|
+
className: "divide-y divide-border",
|
|
30
|
+
children: h.groups.map((e) => /* @__PURE__ */ d("li", {
|
|
31
|
+
className: "flex min-h-10 items-center gap-3 px-3 py-1.5",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ u(p, { className: "size-4 shrink-0" }),
|
|
34
|
+
/* @__PURE__ */ u("span", {
|
|
35
|
+
className: "min-w-0 flex-1 truncate font-mono text-sm",
|
|
36
|
+
children: e.path
|
|
37
|
+
}),
|
|
38
|
+
e.removed ? /* @__PURE__ */ u(o, {
|
|
39
|
+
off: !0,
|
|
40
|
+
children: v("removed")
|
|
41
|
+
}) : /* @__PURE__ */ u("span", {
|
|
42
|
+
className: "text-xs text-muted-foreground",
|
|
43
|
+
children: v("since", { date: y.dateTime(new Date(e.createdAt), { dateStyle: "medium" }) })
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}, e.path))
|
|
47
|
+
})
|
|
48
|
+
}) : /* @__PURE__ */ u(a, { children: /* @__PURE__ */ u("p", {
|
|
49
|
+
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
50
|
+
children: v("notConfigured")
|
|
51
|
+
}) })
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export { m as component };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createFileRoute as e, lazyFn as t, lazyRouteComponent as n } from "@tanstack/react-router";
|
|
2
|
+
var r = e("/$workspace/settings/zendesk")({
|
|
3
|
+
loader: t(() => import("./zendesk3.js"), "loader"),
|
|
4
|
+
component: n(() => import("./zendesk2.js"), "component")
|
|
5
|
+
});
|
|
6
|
+
export { r as Route };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
+
import { teamsQuery as n, zendeskQuery as r } from "../../../api/queries.js";
|
|
3
|
+
import { InboxIcon as i } from "../../../components/icons.js";
|
|
4
|
+
import { usePeople as a } from "../../../lib/people.js";
|
|
5
|
+
import { useCan as o } from "../../../lib/roles.js";
|
|
6
|
+
import { AdminOnly as s, SettingsPage as c, useFormError as l } from "../../../components/settings.js";
|
|
7
|
+
import { Route as u } from "./zendesk.js";
|
|
8
|
+
import { ConnectionCard as d } from "../../../components/ConnectionCard.js";
|
|
9
|
+
import { SettingRow as f, SettingsCard as p, StatusLabel as m, Switch as h, buttonClasses as g } from "@parallelworks/ui";
|
|
10
|
+
import { useFormatter as _, useTranslations as v } from "use-intl";
|
|
11
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
+
import { useMutation as S, useQueryClient as C, useSuspenseQuery as w } from "@tanstack/react-query";
|
|
13
|
+
// src/routes/$workspace/settings/zendesk.tsx?tsr-split=component
|
|
14
|
+
function T() {
|
|
15
|
+
let { workspace: T } = u.useParams(), { data: E } = w(r(T)), { data: D } = w(n(T)), O = o(T, "manage_workspace"), k = v("settingsNav"), A = v("zendesk"), j = _(), { person: M } = a(T), N = C(), P = l(), F = S({
|
|
16
|
+
mutationFn: async ({ teamId: n, on: r }) => t(await e.PUT("/api/v1/workspaces/{workspace}/zendesk/teams/{teamId}", {
|
|
17
|
+
params: { path: {
|
|
18
|
+
workspace: T,
|
|
19
|
+
teamId: n
|
|
20
|
+
} },
|
|
21
|
+
body: { reopen: r }
|
|
22
|
+
})),
|
|
23
|
+
onMutate: P.clear,
|
|
24
|
+
onSuccess: () => N.invalidateQueries({ queryKey: r(T).queryKey }),
|
|
25
|
+
onError: P.set
|
|
26
|
+
}), I = new Set(E.teams.filter((e) => e.reopen).map((e) => e.teamId));
|
|
27
|
+
return /* @__PURE__ */ x(c, {
|
|
28
|
+
title: k("zendesk"),
|
|
29
|
+
description: A("pageDescription"),
|
|
30
|
+
children: [/* @__PURE__ */ b(s, { workspace: T }), E.enabled ? /* @__PURE__ */ x("div", {
|
|
31
|
+
className: "space-y-6",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ b("p", {
|
|
34
|
+
className: "text-sm text-muted-foreground",
|
|
35
|
+
children: A("managedByHost")
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ b(d, {
|
|
38
|
+
icon: /* @__PURE__ */ b(i, { className: "size-6" }),
|
|
39
|
+
name: k("zendesk"),
|
|
40
|
+
status: E.connected ? A("connectedTo", {
|
|
41
|
+
account: E.subdomain ?? "",
|
|
42
|
+
person: M(E.connectedBy ?? "").name,
|
|
43
|
+
date: j.dateTime(new Date(E.connectedAt ?? ""), { dateStyle: "medium" })
|
|
44
|
+
}) : A("description"),
|
|
45
|
+
action: /* @__PURE__ */ x(y, { children: [!E.connected && /* @__PURE__ */ b(m, {
|
|
46
|
+
off: !0,
|
|
47
|
+
children: A("notConnected")
|
|
48
|
+
}), O && E.settingsUrl && /* @__PURE__ */ b("a", {
|
|
49
|
+
href: E.settingsUrl,
|
|
50
|
+
className: g({
|
|
51
|
+
variant: "outline",
|
|
52
|
+
size: "sm"
|
|
53
|
+
}),
|
|
54
|
+
children: A("openSettings")
|
|
55
|
+
})] })
|
|
56
|
+
}),
|
|
57
|
+
D.length > 0 && /* @__PURE__ */ b(p, {
|
|
58
|
+
title: A("reopenTitle"),
|
|
59
|
+
description: A("reopenDescription"),
|
|
60
|
+
children: D.map((e) => /* @__PURE__ */ b(f, {
|
|
61
|
+
label: `${e.name} (${e.key})`,
|
|
62
|
+
error: F.variables?.teamId === e.id ? P.error : null,
|
|
63
|
+
children: /* @__PURE__ */ b(h, {
|
|
64
|
+
"aria-label": A("reopenTeam", { team: e.name }),
|
|
65
|
+
checked: I.has(e.id),
|
|
66
|
+
disabled: !O || F.isPending,
|
|
67
|
+
onCheckedChange: (t) => F.mutate({
|
|
68
|
+
teamId: e.id,
|
|
69
|
+
on: t
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
}, e.id))
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ x("section", {
|
|
75
|
+
className: "space-y-2 text-sm",
|
|
76
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
77
|
+
className: "font-medium",
|
|
78
|
+
children: A("howTitle")
|
|
79
|
+
}), /* @__PURE__ */ x("ol", {
|
|
80
|
+
className: "list-decimal space-y-1.5 pl-5 text-muted-foreground",
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ b("li", { children: A("howFile") }),
|
|
83
|
+
/* @__PURE__ */ b("li", { children: A("howSidebar") }),
|
|
84
|
+
/* @__PURE__ */ b("li", { children: A("howIssue") }),
|
|
85
|
+
/* @__PURE__ */ b("li", { children: A("howClose") }),
|
|
86
|
+
/* @__PURE__ */ b("li", { children: A("howPeople") })
|
|
87
|
+
]
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}) : /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b("p", {
|
|
92
|
+
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
93
|
+
children: A("notConfigured")
|
|
94
|
+
}) })]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export { T as component };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { teamsQuery as e, zendeskQuery as t } from "../../../api/queries.js";
|
|
2
|
+
// src/routes/$workspace/settings/zendesk.tsx?tsr-split=loader
|
|
3
|
+
var n = ({ context: { queryClient: n }, params: { workspace: r } }) => Promise.all([n.ensureQueryData(t(r)), n.ensureQueryData(e(r))]);
|
|
4
|
+
export { n as loader };
|
package/routes/login2.js
CHANGED
|
@@ -10,8 +10,8 @@ import { useErrorMessage as p } from "@parallelworks/problem/react";
|
|
|
10
10
|
import { useTranslations as m } from "use-intl";
|
|
11
11
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
12
|
import { useQueryClient as _, useSuspenseQuery as v } from "@tanstack/react-query";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { OIDCIcon as y } from "@parallelworks/ui/brand-icons";
|
|
14
|
+
import { KeyIcon as b, MailIcon as x } from "@parallelworks/ui/icons";
|
|
15
15
|
// src/routes/login.tsx?tsr-split=component
|
|
16
16
|
var S = [
|
|
17
17
|
"refused",
|
|
@@ -76,18 +76,18 @@ function w() {
|
|
|
76
76
|
children: [
|
|
77
77
|
E.oidc && /* @__PURE__ */ h(d, {
|
|
78
78
|
href: `/auth/login?next=${encodeURIComponent(k)}`,
|
|
79
|
-
icon: /* @__PURE__ */ h(
|
|
79
|
+
icon: /* @__PURE__ */ h(y, { className: "size-5" }),
|
|
80
80
|
label: E.oidcName ? S("continueWith", { name: E.oidcName }) : S("sso"),
|
|
81
81
|
description: S("ssoDescription")
|
|
82
82
|
}),
|
|
83
83
|
E.sso && /* @__PURE__ */ h(d, {
|
|
84
|
-
icon: /* @__PURE__ */ h(
|
|
84
|
+
icon: /* @__PURE__ */ h(x, { className: "size-5" }),
|
|
85
85
|
label: S("workEmailMethod"),
|
|
86
86
|
description: S("ssoHint"),
|
|
87
87
|
onClick: () => V("work")
|
|
88
88
|
}),
|
|
89
89
|
E.devLogin && /* @__PURE__ */ h(d, {
|
|
90
|
-
icon: /* @__PURE__ */ h(
|
|
90
|
+
icon: /* @__PURE__ */ h(b, { className: "size-5" }),
|
|
91
91
|
label: S("devMethod"),
|
|
92
92
|
description: S("devHint"),
|
|
93
93
|
onClick: () => V("dev")
|