@webx-ui/module-auth 0.11.0 → 0.12.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/dist/index.js +609 -597
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { inject as xe, defineComponent as Q, computed as
|
|
1
|
+
import { inject as xe, defineComponent as Q, computed as L, ref as W, useTemplateRef as oe, onBeforeUnmount as nt, resolveComponent as Y, openBlock as m, createBlock as _, withCtx as t, createVNode as a, withModifiers as Oe, createCommentVNode as E, createElementVNode as S, createTextVNode as c, toDisplayString as i, watch as de, unref as e, isRef as Ve, normalizeClass as Be, createElementBlock as H, resolveDynamicComponent as Ee, createSlots as Ae, Fragment as ue, renderList as Ce, onMounted as Ie, h as De } from "vue";
|
|
2
2
|
import { useTranslate as G, HttpError as st, useAdmin as X, useI18n as Ne, useErrorText as re, rowMenuWidth as ot, WxDate as ae, WxRowMenu as Se, WxFilterChips as Me, WxListScreen as Ke, WxScreen as it, useTheme as ut } from "@webx-ui/module-admin";
|
|
3
3
|
import { useRouter as rt, useRoute as ct } from "vue-router";
|
|
4
|
-
import { useModal as _e, WxDialog as be, WxFormItem as M, WxInput as le, WxSelect as ne, WxSpace as se, WxCheckbox as Le, WxText as
|
|
4
|
+
import { useModal as _e, WxDialog as be, WxFormItem as M, WxInput as le, WxSelect as ne, WxSpace as se, WxCheckbox as Le, WxText as B, WxButton as N, toast as K, useElementWidth as ge, WxTable as ke, WxEntityCard as we, WxBadge as q, WxAvatar as dt, WxIcon as ee, confirm as ze, WxAlert as qe, WxRadioGroup as mt, createModal as he, WxHeading as me, WxCard as $e, WxSkeleton as vt, WxTabs as pt, WxTab as ye, WxThemeSwitch as ft } from "@webx-ui/core";
|
|
5
5
|
const He = /* @__PURE__ */ Symbol("webx-auth");
|
|
6
6
|
function We() {
|
|
7
7
|
const s = xe(He, null);
|
|
@@ -82,98 +82,98 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
|
|
|
82
82
|
},
|
|
83
83
|
emits: ["success"],
|
|
84
84
|
setup(s, { expose: r, emit: l }) {
|
|
85
|
-
const u = s, v = l, y = We(),
|
|
86
|
-
email: u.emailLabel ??
|
|
87
|
-
password: u.passwordLabel ??
|
|
88
|
-
remember: u.rememberLabel ??
|
|
89
|
-
submit: u.submitLabel ??
|
|
90
|
-
capsLock: u.capsLockWarning ??
|
|
91
|
-
reveal: u.revealLabel ??
|
|
92
|
-
hide: u.hideLabel ??
|
|
93
|
-
})), h =
|
|
85
|
+
const u = s, v = l, y = We(), A = G("webx-auth"), o = L(() => ({
|
|
86
|
+
email: u.emailLabel ?? A("card.email"),
|
|
87
|
+
password: u.passwordLabel ?? A("card.password"),
|
|
88
|
+
remember: u.rememberLabel ?? A("card.remember"),
|
|
89
|
+
submit: u.submitLabel ?? A("card.submit"),
|
|
90
|
+
capsLock: u.capsLockWarning ?? A("card.caps-lock"),
|
|
91
|
+
reveal: u.revealLabel ?? A("card.reveal"),
|
|
92
|
+
hide: u.hideLabel ?? A("card.hide")
|
|
93
|
+
})), h = W(""), U = W(""), d = W(!1), k = W(!1), V = W(!1), p = W(!1), g = W(""), b = W({}), w = W(0), F = oe("emailField");
|
|
94
94
|
let C = null;
|
|
95
|
-
nt(
|
|
96
|
-
const
|
|
97
|
-
() => u.throttleMessage === void 0 ?
|
|
95
|
+
nt(O);
|
|
96
|
+
const D = L(() => w.value > 0), n = L(
|
|
97
|
+
() => u.throttleMessage === void 0 ? A("card.throttled", { seconds: w.value }) : u.throttleMessage.replace(":seconds", String(w.value))
|
|
98
98
|
);
|
|
99
|
-
async function
|
|
100
|
-
if (!(
|
|
101
|
-
|
|
99
|
+
async function x() {
|
|
100
|
+
if (!(k.value || D.value)) {
|
|
101
|
+
k.value = !0, g.value = "", b.value = {};
|
|
102
102
|
try {
|
|
103
103
|
await y.login({
|
|
104
104
|
email: h.value,
|
|
105
|
-
password:
|
|
105
|
+
password: U.value,
|
|
106
106
|
remember: d.value
|
|
107
|
-
}),
|
|
107
|
+
}), U.value = "", v("success");
|
|
108
108
|
} catch (f) {
|
|
109
|
-
|
|
109
|
+
P(f);
|
|
110
110
|
} finally {
|
|
111
|
-
|
|
111
|
+
k.value = !1;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function P(f) {
|
|
116
116
|
if (!(f instanceof st)) {
|
|
117
117
|
g.value = f instanceof Error ? f.message : String(f);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
if (f.isValidation) {
|
|
121
|
-
|
|
121
|
+
b.value = f.errors;
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
if (f.isThrottled) {
|
|
125
|
-
|
|
125
|
+
J(f.retryAfter ?? 60);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
g.value = f.message;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
function J(f) {
|
|
131
|
+
O(), w.value = f, C = setInterval(() => {
|
|
132
|
+
w.value -= 1, w.value <= 0 && O();
|
|
133
133
|
}, 1e3);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
C !== null && (clearInterval(C), C = null),
|
|
135
|
+
function O() {
|
|
136
|
+
C !== null && (clearInterval(C), C = null), w.value = 0;
|
|
137
137
|
}
|
|
138
138
|
function z(f) {
|
|
139
139
|
p.value = f.getModifierState("CapsLock");
|
|
140
140
|
}
|
|
141
|
-
return r({ focus: () =>
|
|
142
|
-
const
|
|
143
|
-
return m(),
|
|
141
|
+
return r({ focus: () => F.value?.focus() }), (f, R) => {
|
|
142
|
+
const $ = Y("wx-alert"), Z = Y("wx-icon"), fe = Y("wx-input"), I = Y("wx-form-item"), j = Y("wx-checkbox"), T = Y("wx-button"), ie = Y("wx-form"), lt = Y("wx-card");
|
|
143
|
+
return m(), _(lt, {
|
|
144
144
|
class: "wx-login",
|
|
145
145
|
padding: 24
|
|
146
146
|
}, {
|
|
147
147
|
default: t(() => [
|
|
148
148
|
a(ie, {
|
|
149
|
-
errors:
|
|
150
|
-
disabled:
|
|
149
|
+
errors: b.value,
|
|
150
|
+
disabled: k.value,
|
|
151
151
|
gap: "md",
|
|
152
|
-
onSubmit: Oe(
|
|
152
|
+
onSubmit: Oe(x, ["prevent"])
|
|
153
153
|
}, {
|
|
154
154
|
default: t(() => [
|
|
155
|
-
g.value !== "" ? (m(),
|
|
155
|
+
g.value !== "" ? (m(), _($, {
|
|
156
156
|
key: 0,
|
|
157
157
|
type: "danger",
|
|
158
158
|
variant: "soft",
|
|
159
159
|
live: "",
|
|
160
160
|
description: g.value,
|
|
161
161
|
class: "wx-login__message"
|
|
162
|
-
}, null, 8, ["description"])) :
|
|
162
|
+
}, null, 8, ["description"])) : D.value ? (m(), _($, {
|
|
163
163
|
key: 1,
|
|
164
164
|
type: "warning",
|
|
165
165
|
variant: "soft",
|
|
166
166
|
live: "",
|
|
167
167
|
description: n.value,
|
|
168
168
|
class: "wx-login__message"
|
|
169
|
-
}, null, 8, ["description"])) :
|
|
170
|
-
a(
|
|
169
|
+
}, null, 8, ["description"])) : E("", !0),
|
|
170
|
+
a(I, { name: "email" }, {
|
|
171
171
|
default: t(() => [
|
|
172
172
|
a(fe, {
|
|
173
173
|
ref_key: "emailField",
|
|
174
|
-
ref:
|
|
174
|
+
ref: F,
|
|
175
175
|
modelValue: h.value,
|
|
176
|
-
"onUpdate:modelValue":
|
|
176
|
+
"onUpdate:modelValue": R[0] || (R[0] = (ce) => h.value = ce),
|
|
177
177
|
type: "email",
|
|
178
178
|
placeholder: o.value.email,
|
|
179
179
|
"aria-label": o.value.email,
|
|
@@ -183,22 +183,22 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
|
|
|
183
183
|
size: "lg"
|
|
184
184
|
}, {
|
|
185
185
|
prefix: t(() => [
|
|
186
|
-
a(
|
|
186
|
+
a(Z, { name: "mail" })
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
189
|
}, 8, ["modelValue", "placeholder", "aria-label", "autofocus"])
|
|
190
190
|
]),
|
|
191
191
|
_: 1
|
|
192
192
|
}),
|
|
193
|
-
a(
|
|
193
|
+
a(I, {
|
|
194
194
|
name: "password",
|
|
195
195
|
help: p.value ? o.value.capsLock : void 0
|
|
196
196
|
}, {
|
|
197
197
|
default: t(() => [
|
|
198
198
|
a(fe, {
|
|
199
|
-
modelValue:
|
|
200
|
-
"onUpdate:modelValue":
|
|
201
|
-
type:
|
|
199
|
+
modelValue: U.value,
|
|
200
|
+
"onUpdate:modelValue": R[2] || (R[2] = (ce) => U.value = ce),
|
|
201
|
+
type: V.value ? "text" : "password",
|
|
202
202
|
placeholder: o.value.password,
|
|
203
203
|
"aria-label": o.value.password,
|
|
204
204
|
autocomplete: "current-password",
|
|
@@ -207,20 +207,20 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
|
|
|
207
207
|
onKeyup: z
|
|
208
208
|
}, {
|
|
209
209
|
prefix: t(() => [
|
|
210
|
-
a(
|
|
210
|
+
a(Z, { name: "lock" })
|
|
211
211
|
]),
|
|
212
212
|
suffix: t(() => [
|
|
213
213
|
S("button", {
|
|
214
214
|
type: "button",
|
|
215
215
|
class: "wx-login__reveal",
|
|
216
|
-
title:
|
|
217
|
-
"aria-label":
|
|
218
|
-
"aria-pressed":
|
|
216
|
+
title: V.value ? o.value.hide : o.value.reveal,
|
|
217
|
+
"aria-label": V.value ? o.value.hide : o.value.reveal,
|
|
218
|
+
"aria-pressed": V.value,
|
|
219
219
|
tabindex: "-1",
|
|
220
|
-
onClick:
|
|
220
|
+
onClick: R[1] || (R[1] = (ce) => V.value = !V.value)
|
|
221
221
|
}, [
|
|
222
|
-
a(
|
|
223
|
-
name:
|
|
222
|
+
a(Z, {
|
|
223
|
+
name: V.value ? "eye-off" : "eye"
|
|
224
224
|
}, null, 8, ["name"])
|
|
225
225
|
], 8, bt)
|
|
226
226
|
]),
|
|
@@ -229,20 +229,20 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
|
|
|
229
229
|
]),
|
|
230
230
|
_: 1
|
|
231
231
|
}, 8, ["help"]),
|
|
232
|
-
s.remember ? (m(),
|
|
232
|
+
s.remember ? (m(), _(j, {
|
|
233
233
|
key: 2,
|
|
234
234
|
modelValue: d.value,
|
|
235
|
-
"onUpdate:modelValue":
|
|
235
|
+
"onUpdate:modelValue": R[3] || (R[3] = (ce) => d.value = ce),
|
|
236
236
|
label: o.value.remember,
|
|
237
237
|
class: "wx-login__remember"
|
|
238
|
-
}, null, 8, ["modelValue", "label"])) :
|
|
239
|
-
a(
|
|
238
|
+
}, null, 8, ["modelValue", "label"])) : E("", !0),
|
|
239
|
+
a(T, {
|
|
240
240
|
type: "primary",
|
|
241
241
|
"native-type": "submit",
|
|
242
242
|
size: "lg",
|
|
243
243
|
block: "",
|
|
244
|
-
loading:
|
|
245
|
-
disabled:
|
|
244
|
+
loading: k.value,
|
|
245
|
+
disabled: D.value
|
|
246
246
|
}, {
|
|
247
247
|
default: t(() => [
|
|
248
248
|
c(i(o.value.submit), 1)
|
|
@@ -520,7 +520,7 @@ function pe(s) {
|
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
522
|
const Te = /* @__PURE__ */ new WeakSet();
|
|
523
|
-
function
|
|
523
|
+
function te() {
|
|
524
524
|
try {
|
|
525
525
|
const { i18n: s } = X();
|
|
526
526
|
Te.has(s) || (s.defaults("webx-auth", Qe), Te.add(s));
|
|
@@ -537,9 +537,9 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
537
537
|
avatarField: { default: void 0 }
|
|
538
538
|
},
|
|
539
539
|
setup(s) {
|
|
540
|
-
const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(),
|
|
541
|
-
|
|
542
|
-
const h = G("webx-auth"),
|
|
540
|
+
const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), A = pe(y), o = Ne();
|
|
541
|
+
te();
|
|
542
|
+
const h = G("webx-auth"), U = re(), d = W([]), k = W(!1), V = W({}), p = W({
|
|
543
543
|
name: "",
|
|
544
544
|
email: "",
|
|
545
545
|
password: "",
|
|
@@ -548,16 +548,16 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
548
548
|
is_super: !1,
|
|
549
549
|
locale: null,
|
|
550
550
|
roles: []
|
|
551
|
-
}), g =
|
|
551
|
+
}), g = L({
|
|
552
552
|
get: () => p.value.avatar ? { path: p.value.avatar } : null,
|
|
553
553
|
set: (n) => {
|
|
554
554
|
p.value.avatar = n?.path ?? null;
|
|
555
555
|
}
|
|
556
|
-
}),
|
|
556
|
+
}), b = L(() => r.admin !== null), w = L(() => d.value.map((n) => ({ value: n.id, label: n.name }))), F = L(() => [
|
|
557
557
|
{ value: "auto", label: h("admins.locale-auto") },
|
|
558
558
|
...o.state.panelLocales.map((n) => ({ value: n.code, label: n.nativeName }))
|
|
559
559
|
]);
|
|
560
|
-
|
|
560
|
+
A.roles().then((n) => d.value = n), de(
|
|
561
561
|
() => r.admin,
|
|
562
562
|
(n) => {
|
|
563
563
|
p.value = {
|
|
@@ -568,16 +568,16 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
568
568
|
is_active: n?.is_active ?? !0,
|
|
569
569
|
is_super: n?.is_super ?? !1,
|
|
570
570
|
locale: n?.locale ?? "auto",
|
|
571
|
-
roles: n?.roles.map((
|
|
572
|
-
},
|
|
571
|
+
roles: n?.roles.map((x) => x.id) ?? []
|
|
572
|
+
}, V.value = {};
|
|
573
573
|
},
|
|
574
574
|
{ immediate: !0 }
|
|
575
575
|
);
|
|
576
576
|
function C(n) {
|
|
577
|
-
return
|
|
577
|
+
return V.value[n]?.[0];
|
|
578
578
|
}
|
|
579
|
-
async function
|
|
580
|
-
|
|
579
|
+
async function D() {
|
|
580
|
+
k.value = !0, V.value = {};
|
|
581
581
|
const n = {
|
|
582
582
|
name: p.value.name,
|
|
583
583
|
email: p.value.email,
|
|
@@ -589,19 +589,19 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
589
589
|
};
|
|
590
590
|
p.value.password && (n.password = p.value.password);
|
|
591
591
|
try {
|
|
592
|
-
const
|
|
593
|
-
K.success(h(
|
|
594
|
-
} catch (
|
|
595
|
-
const
|
|
596
|
-
|
|
592
|
+
const x = r.admin ? await A.update(r.admin.id, n) : await A.create(n);
|
|
593
|
+
K.success(h(b.value ? "admins.updated" : "admins.created")), l(x);
|
|
594
|
+
} catch (x) {
|
|
595
|
+
const P = x.body;
|
|
596
|
+
P?.errors ? V.value = P.errors : K.danger(U(x));
|
|
597
597
|
} finally {
|
|
598
|
-
|
|
598
|
+
k.value = !1;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
return (n,
|
|
601
|
+
return (n, x) => (m(), _(e(be), {
|
|
602
602
|
open: e(v),
|
|
603
|
-
"onUpdate:open":
|
|
604
|
-
title:
|
|
603
|
+
"onUpdate:open": x[9] || (x[9] = (P) => Ve(v) ? v.value = P : null),
|
|
604
|
+
title: b.value ? e(h)("admins.edit-short") : e(h)("admins.new-short"),
|
|
605
605
|
width: 720
|
|
606
606
|
}, {
|
|
607
607
|
footer: t(() => [
|
|
@@ -609,7 +609,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
609
609
|
default: t(() => [
|
|
610
610
|
a(e(N), {
|
|
611
611
|
variant: "outline",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: x[8] || (x[8] = (P) => e(u)())
|
|
613
613
|
}, {
|
|
614
614
|
default: t(() => [
|
|
615
615
|
c(i(e(h)("admins.cancel")), 1)
|
|
@@ -618,8 +618,8 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
618
618
|
}),
|
|
619
619
|
a(e(N), {
|
|
620
620
|
type: "primary",
|
|
621
|
-
loading:
|
|
622
|
-
onClick:
|
|
621
|
+
loading: k.value,
|
|
622
|
+
onClick: D
|
|
623
623
|
}, {
|
|
624
624
|
default: t(() => [
|
|
625
625
|
c(i(e(h)("admins.save")), 1)
|
|
@@ -636,14 +636,14 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
636
636
|
class: Be(["wx-admin-form__grid", { "has-aside": s.avatarField }])
|
|
637
637
|
}, [
|
|
638
638
|
s.avatarField ? (m(), H("div", xt, [
|
|
639
|
-
(m(),
|
|
639
|
+
(m(), _(Ee(s.avatarField), {
|
|
640
640
|
modelValue: g.value,
|
|
641
|
-
"onUpdate:modelValue":
|
|
641
|
+
"onUpdate:modelValue": x[0] || (x[0] = (P) => g.value = P),
|
|
642
642
|
label: e(h)("admins.avatar"),
|
|
643
643
|
aspect: "1/1",
|
|
644
644
|
captions: !1
|
|
645
645
|
}, null, 8, ["modelValue", "label"]))
|
|
646
|
-
])) :
|
|
646
|
+
])) : E("", !0),
|
|
647
647
|
S("div", Ct, [
|
|
648
648
|
a(e(M), {
|
|
649
649
|
label: e(h)("admins.name"),
|
|
@@ -652,7 +652,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
652
652
|
default: t(() => [
|
|
653
653
|
a(e(le), {
|
|
654
654
|
modelValue: p.value.name,
|
|
655
|
-
"onUpdate:modelValue":
|
|
655
|
+
"onUpdate:modelValue": x[1] || (x[1] = (P) => p.value.name = P),
|
|
656
656
|
name: "name"
|
|
657
657
|
}, null, 8, ["modelValue"])
|
|
658
658
|
]),
|
|
@@ -665,7 +665,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
665
665
|
default: t(() => [
|
|
666
666
|
a(e(le), {
|
|
667
667
|
modelValue: p.value.email,
|
|
668
|
-
"onUpdate:modelValue":
|
|
668
|
+
"onUpdate:modelValue": x[2] || (x[2] = (P) => p.value.email = P),
|
|
669
669
|
type: "email",
|
|
670
670
|
name: "email",
|
|
671
671
|
autocomplete: "off"
|
|
@@ -676,12 +676,12 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
676
676
|
a(e(M), {
|
|
677
677
|
label: e(h)("admins.password"),
|
|
678
678
|
error: C("password"),
|
|
679
|
-
help:
|
|
679
|
+
help: b.value ? e(h)("admins.password-keep") : e(h)("admins.password-hint")
|
|
680
680
|
}, {
|
|
681
681
|
default: t(() => [
|
|
682
682
|
a(e(le), {
|
|
683
683
|
modelValue: p.value.password,
|
|
684
|
-
"onUpdate:modelValue":
|
|
684
|
+
"onUpdate:modelValue": x[3] || (x[3] = (P) => p.value.password = P),
|
|
685
685
|
type: "password",
|
|
686
686
|
name: "password",
|
|
687
687
|
autocomplete: "new-password"
|
|
@@ -696,8 +696,8 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
696
696
|
default: t(() => [
|
|
697
697
|
a(e(ne), {
|
|
698
698
|
modelValue: p.value.roles,
|
|
699
|
-
"onUpdate:modelValue":
|
|
700
|
-
options:
|
|
699
|
+
"onUpdate:modelValue": x[4] || (x[4] = (P) => p.value.roles = P),
|
|
700
|
+
options: w.value,
|
|
701
701
|
multiple: ""
|
|
702
702
|
}, null, 8, ["modelValue", "options"])
|
|
703
703
|
]),
|
|
@@ -709,8 +709,8 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
709
709
|
default: t(() => [
|
|
710
710
|
a(e(ne), {
|
|
711
711
|
modelValue: p.value.locale,
|
|
712
|
-
"onUpdate:modelValue":
|
|
713
|
-
options:
|
|
712
|
+
"onUpdate:modelValue": x[5] || (x[5] = (P) => p.value.locale = P),
|
|
713
|
+
options: F.value
|
|
714
714
|
}, null, 8, ["modelValue", "options"])
|
|
715
715
|
]),
|
|
716
716
|
_: 1
|
|
@@ -719,18 +719,18 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
719
719
|
default: t(() => [
|
|
720
720
|
a(e(Le), {
|
|
721
721
|
modelValue: p.value.is_active,
|
|
722
|
-
"onUpdate:modelValue":
|
|
722
|
+
"onUpdate:modelValue": x[6] || (x[6] = (P) => p.value.is_active = P),
|
|
723
723
|
label: e(h)("admins.active")
|
|
724
724
|
}, null, 8, ["modelValue", "label"]),
|
|
725
725
|
a(e(Le), {
|
|
726
726
|
modelValue: p.value.is_super,
|
|
727
|
-
"onUpdate:modelValue":
|
|
727
|
+
"onUpdate:modelValue": x[7] || (x[7] = (P) => p.value.is_super = P),
|
|
728
728
|
label: e(h)("admins.super")
|
|
729
729
|
}, null, 8, ["modelValue", "label"])
|
|
730
730
|
]),
|
|
731
731
|
_: 1
|
|
732
732
|
}),
|
|
733
|
-
a(e(
|
|
733
|
+
a(e(B), {
|
|
734
734
|
size: "sm",
|
|
735
735
|
tone: "muted"
|
|
736
736
|
}, {
|
|
@@ -757,33 +757,33 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
757
757
|
},
|
|
758
758
|
emits: ["open", "chosen", "selection", "remove"],
|
|
759
759
|
setup(s, { expose: r, emit: l }) {
|
|
760
|
-
const u = s, v = l, y = X(),
|
|
761
|
-
|
|
762
|
-
const o = oe("root"), h = ge(o),
|
|
763
|
-
let
|
|
764
|
-
const n =
|
|
760
|
+
const u = s, v = l, y = X(), A = pe(y);
|
|
761
|
+
te();
|
|
762
|
+
const o = oe("root"), h = ge(o), U = L(() => h.value > 0 && h.value < Ue), d = G("webx-auth"), k = G("webx-admin"), V = W(null), p = W([]), g = W(!1), b = W("all"), w = W("any"), F = W([]), C = W({});
|
|
763
|
+
let D = { page: 1, perPage: 20, sort: null, search: "" };
|
|
764
|
+
const n = L(() => [
|
|
765
765
|
{ value: "all", label: d("admins.all-roles") },
|
|
766
|
-
...p.value.map((
|
|
767
|
-
]),
|
|
766
|
+
...p.value.map((I) => ({ value: I.slug, label: I.name }))
|
|
767
|
+
]), x = L(() => [
|
|
768
768
|
{ value: "any", label: d("admins.any-state") },
|
|
769
769
|
{ value: "yes", label: d("admins.only-active") },
|
|
770
770
|
{ value: "no", label: d("admins.only-inactive") }
|
|
771
|
-
]),
|
|
772
|
-
const
|
|
773
|
-
return j &&
|
|
771
|
+
]), P = L(() => {
|
|
772
|
+
const I = [], j = p.value.find((T) => T.slug === b.value);
|
|
773
|
+
return j && I.push({
|
|
774
774
|
key: "role",
|
|
775
775
|
label: `${d("admins.filter-role")}: ${j.name}`,
|
|
776
|
-
clear: () =>
|
|
777
|
-
}),
|
|
776
|
+
clear: () => b.value = "all"
|
|
777
|
+
}), w.value !== "any" && I.push({
|
|
778
778
|
key: "state",
|
|
779
|
-
label: `${d("admins.filter-state")}: ${
|
|
780
|
-
clear: () =>
|
|
781
|
-
}),
|
|
779
|
+
label: `${d("admins.filter-state")}: ${w.value === "yes" ? d("admins.only-active") : d("admins.only-inactive")}`,
|
|
780
|
+
clear: () => w.value = "any"
|
|
781
|
+
}), I;
|
|
782
782
|
});
|
|
783
|
-
function
|
|
784
|
-
|
|
783
|
+
function J() {
|
|
784
|
+
b.value = "all", w.value = "any";
|
|
785
785
|
}
|
|
786
|
-
const
|
|
786
|
+
const O = L(() => U.value ? [{ key: "card", label: "" }] : [
|
|
787
787
|
{ key: "name", label: d("admins.name"), sortable: !0 },
|
|
788
788
|
{ key: "email", label: d("admins.email"), sortable: !0, hideBelow: 560 },
|
|
789
789
|
{ key: "roles", label: d("admins.roles"), hideBelow: 760 },
|
|
@@ -807,92 +807,92 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
807
807
|
hideOnCards: !0
|
|
808
808
|
}
|
|
809
809
|
]);
|
|
810
|
-
|
|
811
|
-
async function z(
|
|
812
|
-
|
|
810
|
+
A.roles().then((I) => p.value = I), de([b, w], () => z(D));
|
|
811
|
+
async function z(I) {
|
|
812
|
+
D = I, g.value = !0;
|
|
813
813
|
try {
|
|
814
|
-
|
|
815
|
-
q:
|
|
816
|
-
role:
|
|
817
|
-
active:
|
|
818
|
-
sort:
|
|
819
|
-
page:
|
|
820
|
-
per_page:
|
|
814
|
+
V.value = await A.list({
|
|
815
|
+
q: I.search,
|
|
816
|
+
role: b.value === "all" ? null : b.value,
|
|
817
|
+
active: w.value === "any" ? null : w.value,
|
|
818
|
+
sort: I.sort ? `${I.sort.order === "desc" ? "-" : ""}${I.sort.key}` : "name",
|
|
819
|
+
page: I.page,
|
|
820
|
+
per_page: I.perPage
|
|
821
821
|
}), f();
|
|
822
822
|
} finally {
|
|
823
823
|
g.value = !1;
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
async function f() {
|
|
827
|
-
const
|
|
828
|
-
if (
|
|
829
|
-
for (const j of
|
|
827
|
+
const I = u.resolveAvatar;
|
|
828
|
+
if (I)
|
|
829
|
+
for (const j of V.value?.data ?? []) {
|
|
830
830
|
if (!j.avatar || C.value[j.avatar]) continue;
|
|
831
|
-
const
|
|
832
|
-
|
|
831
|
+
const T = await I(j.avatar);
|
|
832
|
+
T && (C.value = { ...C.value, [j.avatar]: T });
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function R(I) {
|
|
836
836
|
return [
|
|
837
837
|
{
|
|
838
838
|
key: "delete",
|
|
839
839
|
icon: "trash",
|
|
840
840
|
label: d("admins.delete"),
|
|
841
841
|
danger: !0,
|
|
842
|
-
run: () => v("remove",
|
|
842
|
+
run: () => v("remove", I)
|
|
843
843
|
}
|
|
844
844
|
];
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function $(I) {
|
|
847
847
|
if (u.picking) {
|
|
848
|
-
v("chosen", [
|
|
848
|
+
v("chosen", [I]);
|
|
849
849
|
return;
|
|
850
850
|
}
|
|
851
|
-
v("open",
|
|
851
|
+
v("open", I);
|
|
852
852
|
}
|
|
853
|
-
const
|
|
854
|
-
function fe(
|
|
855
|
-
|
|
853
|
+
const Z = L(() => !(u.picking && u.multiple));
|
|
854
|
+
function fe(I, j) {
|
|
855
|
+
F.value = j, v("selection", j);
|
|
856
856
|
}
|
|
857
|
-
return r({ reload: () => z(
|
|
857
|
+
return r({ reload: () => z(D), chosen: () => F.value }), (I, j) => (m(), H("div", {
|
|
858
858
|
ref_key: "root",
|
|
859
859
|
ref: o,
|
|
860
860
|
class: "wx-admin-list"
|
|
861
861
|
}, [
|
|
862
862
|
a(e(ke), {
|
|
863
|
-
data:
|
|
864
|
-
columns:
|
|
863
|
+
data: V.value,
|
|
864
|
+
columns: O.value,
|
|
865
865
|
"row-key": "id",
|
|
866
866
|
searchable: "",
|
|
867
|
-
clickable:
|
|
868
|
-
hover:
|
|
867
|
+
clickable: Z.value,
|
|
868
|
+
hover: Z.value,
|
|
869
869
|
flush: "",
|
|
870
870
|
loading: g.value,
|
|
871
871
|
"search-placeholder": e(d)("admins.search"),
|
|
872
872
|
"empty-text": e(d)("admins.empty"),
|
|
873
873
|
selectable: s.picking && s.multiple,
|
|
874
|
-
"select-row-label": e(
|
|
875
|
-
"select-all-label": e(
|
|
874
|
+
"select-row-label": e(k)("filters.select-row"),
|
|
875
|
+
"select-all-label": e(k)("filters.select-all"),
|
|
876
876
|
"cards-below": Ue,
|
|
877
|
-
"filters-count":
|
|
878
|
-
"filters-label": e(
|
|
879
|
-
onRowClick:
|
|
877
|
+
"filters-count": P.value.length,
|
|
878
|
+
"filters-label": e(k)("filters.title"),
|
|
879
|
+
onRowClick: $,
|
|
880
880
|
onStateChange: z,
|
|
881
881
|
onSelectionChange: fe
|
|
882
882
|
}, Ae({
|
|
883
|
-
"cell-name": t(({ row:
|
|
883
|
+
"cell-name": t(({ row: T }) => [
|
|
884
884
|
a(e(se), {
|
|
885
885
|
size: "sm",
|
|
886
886
|
align: "center"
|
|
887
887
|
}, {
|
|
888
888
|
default: t(() => [
|
|
889
889
|
a(e(dt), {
|
|
890
|
-
name:
|
|
891
|
-
src:
|
|
890
|
+
name: T.name,
|
|
891
|
+
src: T.avatar ? C.value[T.avatar] : void 0,
|
|
892
892
|
size: "sm"
|
|
893
893
|
}, null, 8, ["name", "src"]),
|
|
894
|
-
S("span", null, i(
|
|
895
|
-
|
|
894
|
+
S("span", null, i(T.name), 1),
|
|
895
|
+
T.is_super ? (m(), _(e(q), {
|
|
896
896
|
key: 0,
|
|
897
897
|
type: "warning"
|
|
898
898
|
}, {
|
|
@@ -900,19 +900,19 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
900
900
|
c(i(e(d)("admins.super")), 1)
|
|
901
901
|
]),
|
|
902
902
|
_: 1
|
|
903
|
-
})) :
|
|
903
|
+
})) : E("", !0)
|
|
904
904
|
]),
|
|
905
905
|
_: 2
|
|
906
906
|
}, 1024)
|
|
907
907
|
]),
|
|
908
|
-
"cell-roles": t(({ row:
|
|
909
|
-
|
|
908
|
+
"cell-roles": t(({ row: T }) => [
|
|
909
|
+
T.roles.length > 0 ? (m(), _(e(se), {
|
|
910
910
|
key: 0,
|
|
911
911
|
size: "xs",
|
|
912
912
|
wrap: ""
|
|
913
913
|
}, {
|
|
914
914
|
default: t(() => [
|
|
915
|
-
(m(!0), H(ue, null, Ce(
|
|
915
|
+
(m(!0), H(ue, null, Ce(T.roles, (ie) => (m(), _(e(q), {
|
|
916
916
|
key: ie.id
|
|
917
917
|
}, {
|
|
918
918
|
default: t(() => [
|
|
@@ -922,7 +922,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
922
922
|
}, 1024))), 128))
|
|
923
923
|
]),
|
|
924
924
|
_: 2
|
|
925
|
-
}, 1024)) : (m(),
|
|
925
|
+
}, 1024)) : (m(), _(e(B), {
|
|
926
926
|
key: 1,
|
|
927
927
|
size: "sm",
|
|
928
928
|
tone: "muted"
|
|
@@ -933,47 +933,47 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
933
933
|
_: 1
|
|
934
934
|
}))
|
|
935
935
|
]),
|
|
936
|
-
"cell-is_active": t(({ row:
|
|
936
|
+
"cell-is_active": t(({ row: T }) => [
|
|
937
937
|
a(e(q), {
|
|
938
|
-
type:
|
|
938
|
+
type: T.is_active ? "success" : "default",
|
|
939
939
|
dot: ""
|
|
940
940
|
}, {
|
|
941
941
|
default: t(() => [
|
|
942
|
-
c(i(
|
|
942
|
+
c(i(T.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
|
|
943
943
|
]),
|
|
944
944
|
_: 2
|
|
945
945
|
}, 1032, ["type"])
|
|
946
946
|
]),
|
|
947
|
-
"card-actions": t(({ row:
|
|
948
|
-
s.removable ? (m(),
|
|
947
|
+
"card-actions": t(({ row: T }) => [
|
|
948
|
+
s.removable ? (m(), _(e(Se), {
|
|
949
949
|
key: 0,
|
|
950
|
-
actions:
|
|
951
|
-
label:
|
|
952
|
-
}, null, 8, ["actions", "label"])) :
|
|
950
|
+
actions: R(T),
|
|
951
|
+
label: T.name
|
|
952
|
+
}, null, 8, ["actions", "label"])) : E("", !0)
|
|
953
953
|
]),
|
|
954
|
-
"cell-actions": t(({ row:
|
|
954
|
+
"cell-actions": t(({ row: T }) => [
|
|
955
955
|
a(e(Se), {
|
|
956
|
-
actions:
|
|
957
|
-
label:
|
|
956
|
+
actions: R(T),
|
|
957
|
+
label: T.name
|
|
958
958
|
}, null, 8, ["actions", "label"])
|
|
959
959
|
]),
|
|
960
|
-
"cell-last_login_at": t(({ row:
|
|
960
|
+
"cell-last_login_at": t(({ row: T }) => [
|
|
961
961
|
a(e(ae), {
|
|
962
|
-
value:
|
|
963
|
-
tone:
|
|
962
|
+
value: T.last_login_at,
|
|
963
|
+
tone: T.last_login_at ? "default" : "muted",
|
|
964
964
|
compact: ""
|
|
965
965
|
}, null, 8, ["value", "tone"])
|
|
966
966
|
]),
|
|
967
|
-
"cell-card": t(({ row:
|
|
967
|
+
"cell-card": t(({ row: T }) => [
|
|
968
968
|
a(e(we), {
|
|
969
969
|
variant: "plain",
|
|
970
970
|
shape: "circle",
|
|
971
|
-
title:
|
|
972
|
-
image:
|
|
973
|
-
subtitle:
|
|
971
|
+
title: T.name,
|
|
972
|
+
image: T.avatar ? C.value[T.avatar] : void 0,
|
|
973
|
+
subtitle: T.email
|
|
974
974
|
}, {
|
|
975
975
|
meta: t(() => [
|
|
976
|
-
|
|
976
|
+
T.is_super ? (m(), _(e(q), {
|
|
977
977
|
key: 0,
|
|
978
978
|
type: "warning",
|
|
979
979
|
size: "sm"
|
|
@@ -982,8 +982,8 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
982
982
|
c(i(e(d)("admins.super")), 1)
|
|
983
983
|
]),
|
|
984
984
|
_: 1
|
|
985
|
-
})) :
|
|
986
|
-
(m(!0), H(ue, null, Ce(
|
|
985
|
+
})) : E("", !0),
|
|
986
|
+
(m(!0), H(ue, null, Ce(T.roles, (ie) => (m(), _(e(q), {
|
|
987
987
|
key: ie.id,
|
|
988
988
|
size: "sm"
|
|
989
989
|
}, {
|
|
@@ -993,12 +993,12 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
993
993
|
_: 2
|
|
994
994
|
}, 1024))), 128)),
|
|
995
995
|
a(e(q), {
|
|
996
|
-
type:
|
|
996
|
+
type: T.is_active ? "success" : "default",
|
|
997
997
|
dot: "",
|
|
998
998
|
size: "sm"
|
|
999
999
|
}, {
|
|
1000
1000
|
default: t(() => [
|
|
1001
|
-
c(i(
|
|
1001
|
+
c(i(T.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
|
|
1002
1002
|
]),
|
|
1003
1003
|
_: 2
|
|
1004
1004
|
}, 1032, ["type"])
|
|
@@ -1016,8 +1016,8 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1016
1016
|
}, {
|
|
1017
1017
|
default: t(() => [
|
|
1018
1018
|
a(e(ne), {
|
|
1019
|
-
modelValue:
|
|
1020
|
-
"onUpdate:modelValue": j[0] || (j[0] = (
|
|
1019
|
+
modelValue: b.value,
|
|
1020
|
+
"onUpdate:modelValue": j[0] || (j[0] = (T) => b.value = T),
|
|
1021
1021
|
options: n.value,
|
|
1022
1022
|
size: "sm"
|
|
1023
1023
|
}, null, 8, ["modelValue", "options"])
|
|
@@ -1029,36 +1029,36 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1029
1029
|
}, {
|
|
1030
1030
|
default: t(() => [
|
|
1031
1031
|
a(e(ne), {
|
|
1032
|
-
modelValue:
|
|
1033
|
-
"onUpdate:modelValue": j[1] || (j[1] = (
|
|
1034
|
-
options:
|
|
1032
|
+
modelValue: w.value,
|
|
1033
|
+
"onUpdate:modelValue": j[1] || (j[1] = (T) => w.value = T),
|
|
1034
|
+
options: x.value,
|
|
1035
1035
|
size: "sm"
|
|
1036
1036
|
}, null, 8, ["modelValue", "options"])
|
|
1037
1037
|
]),
|
|
1038
1038
|
_: 1
|
|
1039
1039
|
}, 8, ["label"]),
|
|
1040
|
-
|
|
1040
|
+
P.value.length > 0 ? (m(), _(e(N), {
|
|
1041
1041
|
key: 0,
|
|
1042
1042
|
variant: "text",
|
|
1043
1043
|
size: "sm",
|
|
1044
1044
|
block: "",
|
|
1045
|
-
onClick:
|
|
1045
|
+
onClick: J
|
|
1046
1046
|
}, {
|
|
1047
1047
|
icon: t(() => [
|
|
1048
|
-
a(e(
|
|
1048
|
+
a(e(ee), { name: "close" })
|
|
1049
1049
|
]),
|
|
1050
1050
|
default: t(() => [
|
|
1051
|
-
c(" " + i(e(
|
|
1051
|
+
c(" " + i(e(k)("filters.reset")), 1)
|
|
1052
1052
|
]),
|
|
1053
1053
|
_: 1
|
|
1054
|
-
})) :
|
|
1054
|
+
})) : E("", !0)
|
|
1055
1055
|
]),
|
|
1056
1056
|
key: "0"
|
|
1057
1057
|
} : void 0,
|
|
1058
1058
|
s.filters ? {
|
|
1059
1059
|
name: "applied",
|
|
1060
1060
|
fn: t(() => [
|
|
1061
|
-
a(e(Me), { filters:
|
|
1061
|
+
a(e(Me), { filters: P.value }, null, 8, ["filters"])
|
|
1062
1062
|
]),
|
|
1063
1063
|
key: "1"
|
|
1064
1064
|
} : void 0
|
|
@@ -1078,48 +1078,48 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1078
1078
|
__name: "CallList",
|
|
1079
1079
|
setup(s, { expose: r }) {
|
|
1080
1080
|
const l = X(), u = pe(l);
|
|
1081
|
-
|
|
1082
|
-
const v = oe("root"), y = ge(v),
|
|
1083
|
-
let
|
|
1084
|
-
function
|
|
1081
|
+
te();
|
|
1082
|
+
const v = oe("root"), y = ge(v), A = L(() => y.value > 0 && y.value < Pe), o = G("webx-auth"), h = G("webx-admin"), U = W(null), d = W({ users: [], tools: [] }), k = W(!1), V = W("all"), p = W("all"), g = W("any");
|
|
1083
|
+
let b = { page: 1, perPage: 30, sort: null, search: "" };
|
|
1084
|
+
function w(f) {
|
|
1085
1085
|
return f === null ? o("calls.local") : f.name ?? o("calls.deleted", { id: f.id });
|
|
1086
1086
|
}
|
|
1087
|
-
const
|
|
1087
|
+
const F = L(() => [
|
|
1088
1088
|
{ value: "all", label: o("calls.everybody") },
|
|
1089
1089
|
...d.value.users.map((f) => ({
|
|
1090
1090
|
value: f.id === null ? "none" : String(f.id),
|
|
1091
|
-
label:
|
|
1091
|
+
label: w(f.id === null ? null : { id: f.id, name: f.name })
|
|
1092
1092
|
}))
|
|
1093
|
-
]), C =
|
|
1093
|
+
]), C = L(() => [
|
|
1094
1094
|
{ value: "all", label: o("calls.all-tools") },
|
|
1095
1095
|
...d.value.tools.map((f) => ({ value: f, label: f }))
|
|
1096
|
-
]),
|
|
1096
|
+
]), D = L(() => [
|
|
1097
1097
|
{ value: "any", label: o("calls.any-outcome") },
|
|
1098
1098
|
{ value: "ok", label: o("calls.only-answered") },
|
|
1099
1099
|
{ value: "failed", label: o("calls.only-refused") },
|
|
1100
1100
|
{ value: "dry", label: o("calls.only-dry") }
|
|
1101
|
-
]), n =
|
|
1102
|
-
const f = [],
|
|
1103
|
-
|
|
1101
|
+
]), n = L(() => {
|
|
1102
|
+
const f = [], R = F.value.find((Z) => Z.value === V.value);
|
|
1103
|
+
V.value !== "all" && R && f.push({
|
|
1104
1104
|
key: "user",
|
|
1105
|
-
label: `${o("calls.filter-user")}: ${
|
|
1106
|
-
clear: () =>
|
|
1105
|
+
label: `${o("calls.filter-user")}: ${R.label}`,
|
|
1106
|
+
clear: () => V.value = "all"
|
|
1107
1107
|
}), p.value !== "all" && f.push({
|
|
1108
1108
|
key: "tool",
|
|
1109
1109
|
label: `${o("calls.filter-tool")}: ${p.value}`,
|
|
1110
1110
|
clear: () => p.value = "all"
|
|
1111
1111
|
});
|
|
1112
|
-
const
|
|
1113
|
-
return g.value !== "any" &&
|
|
1112
|
+
const $ = D.value.find((Z) => Z.value === g.value);
|
|
1113
|
+
return g.value !== "any" && $ && f.push({
|
|
1114
1114
|
key: "outcome",
|
|
1115
|
-
label: `${o("calls.filter-outcome")}: ${
|
|
1115
|
+
label: `${o("calls.filter-outcome")}: ${$.label}`,
|
|
1116
1116
|
clear: () => g.value = "any"
|
|
1117
1117
|
}), f;
|
|
1118
1118
|
});
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1119
|
+
function x() {
|
|
1120
|
+
V.value = "all", p.value = "all", g.value = "any";
|
|
1121
1121
|
}
|
|
1122
|
-
const
|
|
1122
|
+
const P = L(() => A.value ? [{ key: "card", label: "" }] : [
|
|
1123
1123
|
{ key: "at", label: o("calls.when") },
|
|
1124
1124
|
{ key: "user", label: o("calls.who"), hideBelow: 640 },
|
|
1125
1125
|
{ key: "tool", label: o("calls.tool") },
|
|
@@ -1127,46 +1127,46 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1127
1127
|
{ key: "duration_ms", label: o("calls.took"), align: "right", hideBelow: 820 },
|
|
1128
1128
|
{ key: "client", label: o("calls.client"), hideBelow: 960 }
|
|
1129
1129
|
]);
|
|
1130
|
-
de([
|
|
1131
|
-
async function
|
|
1132
|
-
|
|
1130
|
+
de([V, p, g], () => J({ ...b, page: 1 }));
|
|
1131
|
+
async function J(f) {
|
|
1132
|
+
b = f, k.value = !0;
|
|
1133
1133
|
try {
|
|
1134
|
-
|
|
1135
|
-
user:
|
|
1134
|
+
U.value = await u.calls({
|
|
1135
|
+
user: V.value === "all" ? null : V.value,
|
|
1136
1136
|
tool: p.value === "all" ? null : p.value,
|
|
1137
1137
|
outcome: g.value === "any" ? null : g.value,
|
|
1138
1138
|
page: f.page,
|
|
1139
1139
|
per_page: f.perPage
|
|
1140
|
-
}), d.value =
|
|
1140
|
+
}), d.value = U.value.filters;
|
|
1141
1141
|
} finally {
|
|
1142
|
-
|
|
1142
|
+
k.value = !1;
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function O(f) {
|
|
1146
1146
|
return f.ok ? f.dry_run ? { type: "info", label: o("calls.dry-run") } : { type: "success", label: o("calls.answered") } : { type: "danger", label: o("calls.refused") };
|
|
1147
1147
|
}
|
|
1148
1148
|
function z(f) {
|
|
1149
1149
|
return f.arguments !== null || f.error !== null;
|
|
1150
1150
|
}
|
|
1151
|
-
return r({ reload: () =>
|
|
1151
|
+
return r({ reload: () => J(b) }), (f, R) => (m(), H("div", {
|
|
1152
1152
|
ref_key: "root",
|
|
1153
1153
|
ref: v,
|
|
1154
1154
|
class: "wx-call-list"
|
|
1155
1155
|
}, [
|
|
1156
1156
|
a(e(ke), {
|
|
1157
|
-
data:
|
|
1158
|
-
columns:
|
|
1157
|
+
data: U.value,
|
|
1158
|
+
columns: P.value,
|
|
1159
1159
|
"row-key": "id",
|
|
1160
1160
|
flush: "",
|
|
1161
|
-
loading:
|
|
1161
|
+
loading: k.value,
|
|
1162
1162
|
clickable: !1,
|
|
1163
|
-
expandable: !
|
|
1163
|
+
expandable: !A.value,
|
|
1164
1164
|
"expandable-if": z,
|
|
1165
1165
|
"empty-text": e(o)("calls.empty"),
|
|
1166
1166
|
"cards-below": Pe,
|
|
1167
1167
|
"filters-count": n.value.length,
|
|
1168
1168
|
"filters-label": e(h)("filters.title"),
|
|
1169
|
-
onStateChange:
|
|
1169
|
+
onStateChange: J
|
|
1170
1170
|
}, {
|
|
1171
1171
|
filters: t(() => [
|
|
1172
1172
|
a(e(M), {
|
|
@@ -1174,9 +1174,9 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1174
1174
|
}, {
|
|
1175
1175
|
default: t(() => [
|
|
1176
1176
|
a(e(ne), {
|
|
1177
|
-
modelValue:
|
|
1178
|
-
"onUpdate:modelValue":
|
|
1179
|
-
options:
|
|
1177
|
+
modelValue: V.value,
|
|
1178
|
+
"onUpdate:modelValue": R[0] || (R[0] = ($) => V.value = $),
|
|
1179
|
+
options: F.value,
|
|
1180
1180
|
size: "sm"
|
|
1181
1181
|
}, null, 8, ["modelValue", "options"])
|
|
1182
1182
|
]),
|
|
@@ -1188,7 +1188,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1188
1188
|
default: t(() => [
|
|
1189
1189
|
a(e(ne), {
|
|
1190
1190
|
modelValue: p.value,
|
|
1191
|
-
"onUpdate:modelValue":
|
|
1191
|
+
"onUpdate:modelValue": R[1] || (R[1] = ($) => p.value = $),
|
|
1192
1192
|
options: C.value,
|
|
1193
1193
|
size: "sm"
|
|
1194
1194
|
}, null, 8, ["modelValue", "options"])
|
|
@@ -1201,105 +1201,105 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1201
1201
|
default: t(() => [
|
|
1202
1202
|
a(e(ne), {
|
|
1203
1203
|
modelValue: g.value,
|
|
1204
|
-
"onUpdate:modelValue":
|
|
1205
|
-
options:
|
|
1204
|
+
"onUpdate:modelValue": R[2] || (R[2] = ($) => g.value = $),
|
|
1205
|
+
options: D.value,
|
|
1206
1206
|
size: "sm"
|
|
1207
1207
|
}, null, 8, ["modelValue", "options"])
|
|
1208
1208
|
]),
|
|
1209
1209
|
_: 1
|
|
1210
1210
|
}, 8, ["label"]),
|
|
1211
|
-
n.value.length > 0 ? (m(),
|
|
1211
|
+
n.value.length > 0 ? (m(), _(e(N), {
|
|
1212
1212
|
key: 0,
|
|
1213
1213
|
variant: "text",
|
|
1214
1214
|
size: "sm",
|
|
1215
1215
|
block: "",
|
|
1216
|
-
onClick:
|
|
1216
|
+
onClick: x
|
|
1217
1217
|
}, {
|
|
1218
1218
|
icon: t(() => [
|
|
1219
|
-
a(e(
|
|
1219
|
+
a(e(ee), { name: "close" })
|
|
1220
1220
|
]),
|
|
1221
1221
|
default: t(() => [
|
|
1222
1222
|
c(" " + i(e(h)("filters.reset")), 1)
|
|
1223
1223
|
]),
|
|
1224
1224
|
_: 1
|
|
1225
|
-
})) :
|
|
1225
|
+
})) : E("", !0)
|
|
1226
1226
|
]),
|
|
1227
1227
|
applied: t(() => [
|
|
1228
1228
|
a(e(Me), { filters: n.value }, null, 8, ["filters"])
|
|
1229
1229
|
]),
|
|
1230
|
-
"cell-at": t(({ row:
|
|
1230
|
+
"cell-at": t(({ row: $ }) => [
|
|
1231
1231
|
a(e(ae), {
|
|
1232
|
-
value:
|
|
1232
|
+
value: $.at,
|
|
1233
1233
|
tone: "default",
|
|
1234
1234
|
compact: ""
|
|
1235
1235
|
}, null, 8, ["value"])
|
|
1236
1236
|
]),
|
|
1237
|
-
"cell-user": t(({ row:
|
|
1238
|
-
a(e(
|
|
1239
|
-
tone:
|
|
1237
|
+
"cell-user": t(({ row: $ }) => [
|
|
1238
|
+
a(e(B), {
|
|
1239
|
+
tone: $.user === null || $.user.name === null ? "muted" : "default"
|
|
1240
1240
|
}, {
|
|
1241
1241
|
default: t(() => [
|
|
1242
|
-
c(i(
|
|
1242
|
+
c(i(w($.user)), 1)
|
|
1243
1243
|
]),
|
|
1244
1244
|
_: 2
|
|
1245
1245
|
}, 1032, ["tone"])
|
|
1246
1246
|
]),
|
|
1247
|
-
"cell-tool": t(({ row:
|
|
1248
|
-
a(e(
|
|
1247
|
+
"cell-tool": t(({ row: $ }) => [
|
|
1248
|
+
a(e(B), {
|
|
1249
1249
|
mono: "",
|
|
1250
1250
|
size: "sm"
|
|
1251
1251
|
}, {
|
|
1252
1252
|
default: t(() => [
|
|
1253
|
-
c(i(
|
|
1253
|
+
c(i($.tool), 1)
|
|
1254
1254
|
]),
|
|
1255
1255
|
_: 2
|
|
1256
1256
|
}, 1024)
|
|
1257
1257
|
]),
|
|
1258
|
-
"cell-outcome": t(({ row:
|
|
1258
|
+
"cell-outcome": t(({ row: $ }) => [
|
|
1259
1259
|
a(e(q), {
|
|
1260
|
-
type:
|
|
1260
|
+
type: O($).type,
|
|
1261
1261
|
dot: ""
|
|
1262
1262
|
}, {
|
|
1263
1263
|
default: t(() => [
|
|
1264
|
-
c(i(
|
|
1264
|
+
c(i(O($).label), 1)
|
|
1265
1265
|
]),
|
|
1266
1266
|
_: 2
|
|
1267
1267
|
}, 1032, ["type"])
|
|
1268
1268
|
]),
|
|
1269
|
-
"cell-duration_ms": t(({ row:
|
|
1270
|
-
a(e(
|
|
1269
|
+
"cell-duration_ms": t(({ row: $ }) => [
|
|
1270
|
+
a(e(B), {
|
|
1271
1271
|
size: "sm",
|
|
1272
1272
|
tone: "muted"
|
|
1273
1273
|
}, {
|
|
1274
1274
|
default: t(() => [
|
|
1275
|
-
c(i(e(o)("calls.ms", { count:
|
|
1275
|
+
c(i(e(o)("calls.ms", { count: $.duration_ms })), 1)
|
|
1276
1276
|
]),
|
|
1277
1277
|
_: 2
|
|
1278
1278
|
}, 1024)
|
|
1279
1279
|
]),
|
|
1280
|
-
"cell-client": t(({ row:
|
|
1281
|
-
|
|
1280
|
+
"cell-client": t(({ row: $ }) => [
|
|
1281
|
+
$.client ? (m(), _(e(B), {
|
|
1282
1282
|
key: 0,
|
|
1283
1283
|
size: "sm"
|
|
1284
1284
|
}, {
|
|
1285
1285
|
default: t(() => [
|
|
1286
|
-
c(i(
|
|
1286
|
+
c(i($.client), 1)
|
|
1287
1287
|
]),
|
|
1288
1288
|
_: 2
|
|
1289
|
-
}, 1024)) : (m(),
|
|
1289
|
+
}, 1024)) : (m(), _(e(B), {
|
|
1290
1290
|
key: 1,
|
|
1291
1291
|
size: "sm",
|
|
1292
1292
|
tone: "muted"
|
|
1293
1293
|
}, {
|
|
1294
|
-
default: t(() => [...
|
|
1294
|
+
default: t(() => [...R[3] || (R[3] = [
|
|
1295
1295
|
c("—", -1)
|
|
1296
1296
|
])]),
|
|
1297
1297
|
_: 1
|
|
1298
1298
|
}))
|
|
1299
1299
|
]),
|
|
1300
|
-
expanded: t(({ row:
|
|
1300
|
+
expanded: t(({ row: $ }) => [
|
|
1301
1301
|
S("div", Vt, [
|
|
1302
|
-
|
|
1302
|
+
$.error ? (m(), _(e(B), {
|
|
1303
1303
|
key: 0,
|
|
1304
1304
|
tone: "danger",
|
|
1305
1305
|
size: "sm",
|
|
@@ -1307,12 +1307,12 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1307
1307
|
}, {
|
|
1308
1308
|
default: t(() => [
|
|
1309
1309
|
S("strong", null, i(e(o)("calls.error")) + ":", 1),
|
|
1310
|
-
c(" " + i(
|
|
1310
|
+
c(" " + i($.error), 1)
|
|
1311
1311
|
]),
|
|
1312
1312
|
_: 2
|
|
1313
|
-
}, 1024)) :
|
|
1313
|
+
}, 1024)) : E("", !0),
|
|
1314
1314
|
S("div", At, [
|
|
1315
|
-
a(e(
|
|
1315
|
+
a(e(B), {
|
|
1316
1316
|
size: "sm",
|
|
1317
1317
|
weight: "semibold"
|
|
1318
1318
|
}, {
|
|
@@ -1321,7 +1321,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1321
1321
|
]),
|
|
1322
1322
|
_: 1
|
|
1323
1323
|
}),
|
|
1324
|
-
a(e(
|
|
1324
|
+
a(e(B), {
|
|
1325
1325
|
size: "xs",
|
|
1326
1326
|
tone: "muted"
|
|
1327
1327
|
}, {
|
|
@@ -1331,7 +1331,7 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1331
1331
|
_: 1
|
|
1332
1332
|
})
|
|
1333
1333
|
]),
|
|
1334
|
-
|
|
1334
|
+
$.arguments ? (m(), H("pre", zt, i($.arguments), 1)) : (m(), _(e(B), {
|
|
1335
1335
|
key: 2,
|
|
1336
1336
|
size: "sm",
|
|
1337
1337
|
tone: "muted"
|
|
@@ -1343,62 +1343,62 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1343
1343
|
}))
|
|
1344
1344
|
])
|
|
1345
1345
|
]),
|
|
1346
|
-
"cell-card": t(({ row:
|
|
1346
|
+
"cell-card": t(({ row: $ }) => [
|
|
1347
1347
|
a(e(we), {
|
|
1348
1348
|
variant: "plain",
|
|
1349
|
-
title:
|
|
1350
|
-
subtitle:
|
|
1349
|
+
title: $.tool,
|
|
1350
|
+
subtitle: w($.user)
|
|
1351
1351
|
}, {
|
|
1352
1352
|
media: t(() => [
|
|
1353
1353
|
S("span", Wt, [
|
|
1354
|
-
a(e(
|
|
1354
|
+
a(e(ee), { name: "sliders" })
|
|
1355
1355
|
])
|
|
1356
1356
|
]),
|
|
1357
1357
|
meta: t(() => [
|
|
1358
1358
|
a(e(q), {
|
|
1359
|
-
type:
|
|
1359
|
+
type: O($).type,
|
|
1360
1360
|
dot: "",
|
|
1361
1361
|
size: "sm"
|
|
1362
1362
|
}, {
|
|
1363
1363
|
default: t(() => [
|
|
1364
|
-
c(i(
|
|
1364
|
+
c(i(O($).label), 1)
|
|
1365
1365
|
]),
|
|
1366
1366
|
_: 2
|
|
1367
1367
|
}, 1032, ["type"]),
|
|
1368
1368
|
a(e(ae), {
|
|
1369
|
-
value:
|
|
1369
|
+
value: $.at,
|
|
1370
1370
|
compact: ""
|
|
1371
1371
|
}, null, 8, ["value"]),
|
|
1372
|
-
|
|
1372
|
+
$.client ? (m(), _(e(B), {
|
|
1373
1373
|
key: 0,
|
|
1374
1374
|
size: "xs",
|
|
1375
1375
|
tone: "muted"
|
|
1376
1376
|
}, {
|
|
1377
1377
|
default: t(() => [
|
|
1378
|
-
c(i(
|
|
1378
|
+
c(i($.client), 1)
|
|
1379
1379
|
]),
|
|
1380
1380
|
_: 2
|
|
1381
|
-
}, 1024)) :
|
|
1381
|
+
}, 1024)) : E("", !0)
|
|
1382
1382
|
]),
|
|
1383
1383
|
default: t(() => [
|
|
1384
|
-
z(
|
|
1384
|
+
z($) ? (m(), _(e(se), {
|
|
1385
1385
|
key: 0,
|
|
1386
1386
|
direction: "vertical",
|
|
1387
1387
|
size: "xs",
|
|
1388
1388
|
class: "wx-call-list__card-details"
|
|
1389
1389
|
}, {
|
|
1390
1390
|
default: t(() => [
|
|
1391
|
-
|
|
1391
|
+
$.error ? (m(), _(e(B), {
|
|
1392
1392
|
key: 0,
|
|
1393
1393
|
tone: "danger",
|
|
1394
1394
|
size: "sm"
|
|
1395
1395
|
}, {
|
|
1396
1396
|
default: t(() => [
|
|
1397
|
-
c(i(
|
|
1397
|
+
c(i($.error), 1)
|
|
1398
1398
|
]),
|
|
1399
1399
|
_: 2
|
|
1400
|
-
}, 1024)) :
|
|
1401
|
-
|
|
1400
|
+
}, 1024)) : E("", !0),
|
|
1401
|
+
$.arguments ? (m(), _(e(B), {
|
|
1402
1402
|
key: 1,
|
|
1403
1403
|
size: "xs",
|
|
1404
1404
|
tone: "muted"
|
|
@@ -1407,11 +1407,11 @@ const wt = { class: "wx-admin-form" }, xt = {
|
|
|
1407
1407
|
c(i(e(o)("calls.request")), 1)
|
|
1408
1408
|
]),
|
|
1409
1409
|
_: 1
|
|
1410
|
-
})) :
|
|
1411
|
-
|
|
1410
|
+
})) : E("", !0),
|
|
1411
|
+
$.arguments ? (m(), H("pre", St, i($.arguments), 1)) : E("", !0)
|
|
1412
1412
|
]),
|
|
1413
1413
|
_: 2
|
|
1414
|
-
}, 1024)) :
|
|
1414
|
+
}, 1024)) : E("", !0)
|
|
1415
1415
|
]),
|
|
1416
1416
|
_: 2
|
|
1417
1417
|
}, 1032, ["title", "subtitle"])
|
|
@@ -1442,8 +1442,8 @@ const Ut = {
|
|
|
1442
1442
|
},
|
|
1443
1443
|
setup(s, { expose: r }) {
|
|
1444
1444
|
const l = s, u = X(), v = Tt(u);
|
|
1445
|
-
|
|
1446
|
-
const y = G("webx-auth"),
|
|
1445
|
+
te();
|
|
1446
|
+
const y = G("webx-auth"), A = re(), o = oe("root"), h = ge(o), U = L(() => h.value > 0 && h.value < Fe), d = W([]), k = W(!1), V = W(null), p = L(() => U.value ? [{ key: "card", label: "" }] : [
|
|
1447
1447
|
{ key: "client", label: y("connections.client"), minWidth: 210 },
|
|
1448
1448
|
...l.scope === "all" ? [{ key: "user", label: y("connections.who"), minWidth: 140 }] : [],
|
|
1449
1449
|
{ key: "read_only", label: y("connections.allowed"), minWidth: 160 },
|
|
@@ -1454,23 +1454,23 @@ const Ut = {
|
|
|
1454
1454
|
function g(C) {
|
|
1455
1455
|
return C.user.name ?? y("calls.deleted", { id: C.user.id });
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function b(C) {
|
|
1458
1458
|
if (C.read_only) return y("connections.read-only");
|
|
1459
1459
|
if (l.scope !== "all") return y("connections.full-you");
|
|
1460
|
-
const
|
|
1461
|
-
return y("connections.full", { name:
|
|
1460
|
+
const D = C.user.name?.split(" ")[0];
|
|
1461
|
+
return y("connections.full", { name: D || g(C) });
|
|
1462
1462
|
}
|
|
1463
|
-
async function
|
|
1464
|
-
|
|
1463
|
+
async function w() {
|
|
1464
|
+
k.value = !0;
|
|
1465
1465
|
try {
|
|
1466
1466
|
d.value = (await v.list(l.scope)).data;
|
|
1467
1467
|
} catch (C) {
|
|
1468
|
-
K.danger(
|
|
1468
|
+
K.danger(A(C));
|
|
1469
1469
|
} finally {
|
|
1470
|
-
|
|
1470
|
+
k.value = !1;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
async function
|
|
1473
|
+
async function F(C) {
|
|
1474
1474
|
if (await ze({
|
|
1475
1475
|
title: y("connections.confirm-title", { client: C.client }),
|
|
1476
1476
|
message: y("connections.confirm-text"),
|
|
@@ -1478,18 +1478,18 @@ const Ut = {
|
|
|
1478
1478
|
cancelText: y("connections.cancel"),
|
|
1479
1479
|
tone: "danger"
|
|
1480
1480
|
})) {
|
|
1481
|
-
|
|
1481
|
+
V.value = C.id;
|
|
1482
1482
|
try {
|
|
1483
1483
|
const n = await v.disconnect(C.id);
|
|
1484
|
-
d.value = d.value.map((
|
|
1484
|
+
d.value = d.value.map((x) => x.id === n.id ? n : x), K.success(y("connections.done", { client: C.client }));
|
|
1485
1485
|
} catch (n) {
|
|
1486
|
-
K.danger(
|
|
1486
|
+
K.danger(A(n));
|
|
1487
1487
|
} finally {
|
|
1488
|
-
|
|
1488
|
+
V.value = null;
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
return de(() => l.scope,
|
|
1492
|
+
return de(() => l.scope, w, { immediate: !0 }), r({ reload: w }), (C, D) => (m(), H("div", {
|
|
1493
1493
|
ref_key: "root",
|
|
1494
1494
|
ref: o,
|
|
1495
1495
|
class: "wx-connection-list"
|
|
@@ -1499,7 +1499,7 @@ const Ut = {
|
|
|
1499
1499
|
columns: p.value,
|
|
1500
1500
|
"row-key": "id",
|
|
1501
1501
|
flush: "",
|
|
1502
|
-
loading:
|
|
1502
|
+
loading: k.value,
|
|
1503
1503
|
clickable: !1,
|
|
1504
1504
|
"empty-text": s.scope === "all" ? e(y)("connections.empty-all") : e(y)("connections.empty"),
|
|
1505
1505
|
"cards-below": Fe,
|
|
@@ -1511,7 +1511,7 @@ const Ut = {
|
|
|
1511
1511
|
size: "none"
|
|
1512
1512
|
}, {
|
|
1513
1513
|
default: t(() => [
|
|
1514
|
-
a(e(
|
|
1514
|
+
a(e(B), {
|
|
1515
1515
|
tone: n.revoked_at ? "muted" : "default",
|
|
1516
1516
|
weight: "medium"
|
|
1517
1517
|
}, {
|
|
@@ -1520,7 +1520,7 @@ const Ut = {
|
|
|
1520
1520
|
]),
|
|
1521
1521
|
_: 2
|
|
1522
1522
|
}, 1032, ["tone"]),
|
|
1523
|
-
a(e(
|
|
1523
|
+
a(e(B), {
|
|
1524
1524
|
size: "xs",
|
|
1525
1525
|
tone: "muted"
|
|
1526
1526
|
}, {
|
|
@@ -1534,7 +1534,7 @@ const Ut = {
|
|
|
1534
1534
|
}, 1024)
|
|
1535
1535
|
]),
|
|
1536
1536
|
"cell-user": t(({ row: n }) => [
|
|
1537
|
-
a(e(
|
|
1537
|
+
a(e(B), {
|
|
1538
1538
|
tone: n.user.name === null ? "muted" : "default"
|
|
1539
1539
|
}, {
|
|
1540
1540
|
default: t(() => [
|
|
@@ -1544,7 +1544,7 @@ const Ut = {
|
|
|
1544
1544
|
}, 1032, ["tone"])
|
|
1545
1545
|
]),
|
|
1546
1546
|
"cell-read_only": t(({ row: n }) => [
|
|
1547
|
-
n.revoked_at ? (m(),
|
|
1547
|
+
n.revoked_at ? (m(), _(e(q), {
|
|
1548
1548
|
key: 0,
|
|
1549
1549
|
type: "default",
|
|
1550
1550
|
dot: ""
|
|
@@ -1553,13 +1553,13 @@ const Ut = {
|
|
|
1553
1553
|
c(i(e(y)("connections.disconnected")), 1)
|
|
1554
1554
|
]),
|
|
1555
1555
|
_: 1
|
|
1556
|
-
})) : (m(),
|
|
1556
|
+
})) : (m(), _(e(q), {
|
|
1557
1557
|
key: 1,
|
|
1558
1558
|
type: n.read_only ? "info" : "success",
|
|
1559
1559
|
dot: ""
|
|
1560
1560
|
}, {
|
|
1561
1561
|
default: t(() => [
|
|
1562
|
-
c(i(
|
|
1562
|
+
c(i(b(n)), 1)
|
|
1563
1563
|
]),
|
|
1564
1564
|
_: 2
|
|
1565
1565
|
}, 1032, ["type"]))
|
|
@@ -1572,12 +1572,12 @@ const Ut = {
|
|
|
1572
1572
|
}, null, 8, ["value"])
|
|
1573
1573
|
]),
|
|
1574
1574
|
"cell-last_used_at": t(({ row: n }) => [
|
|
1575
|
-
n.last_used_at ? (m(),
|
|
1575
|
+
n.last_used_at ? (m(), _(e(ae), {
|
|
1576
1576
|
key: 0,
|
|
1577
1577
|
value: n.last_used_at,
|
|
1578
1578
|
tone: "default",
|
|
1579
1579
|
compact: ""
|
|
1580
|
-
}, null, 8, ["value"])) : (m(),
|
|
1580
|
+
}, null, 8, ["value"])) : (m(), _(e(B), {
|
|
1581
1581
|
key: 1,
|
|
1582
1582
|
size: "sm",
|
|
1583
1583
|
tone: "muted"
|
|
@@ -1589,13 +1589,13 @@ const Ut = {
|
|
|
1589
1589
|
}))
|
|
1590
1590
|
]),
|
|
1591
1591
|
"cell-end": t(({ row: n }) => [
|
|
1592
|
-
n.revoked_at ?
|
|
1592
|
+
n.revoked_at ? E("", !0) : (m(), _(e(N), {
|
|
1593
1593
|
key: 0,
|
|
1594
1594
|
type: "danger",
|
|
1595
1595
|
variant: "text",
|
|
1596
1596
|
size: "sm",
|
|
1597
|
-
loading:
|
|
1598
|
-
onClick: (
|
|
1597
|
+
loading: V.value === n.id,
|
|
1598
|
+
onClick: (x) => F(n)
|
|
1599
1599
|
}, {
|
|
1600
1600
|
default: t(() => [
|
|
1601
1601
|
c(i(e(y)("connections.disconnect")), 1)
|
|
@@ -1611,11 +1611,11 @@ const Ut = {
|
|
|
1611
1611
|
}, {
|
|
1612
1612
|
media: t(() => [
|
|
1613
1613
|
S("span", Ut, [
|
|
1614
|
-
a(e(
|
|
1614
|
+
a(e(ee), { name: "link" })
|
|
1615
1615
|
])
|
|
1616
1616
|
]),
|
|
1617
1617
|
meta: t(() => [
|
|
1618
|
-
n.revoked_at ? (m(),
|
|
1618
|
+
n.revoked_at ? (m(), _(e(q), {
|
|
1619
1619
|
key: 0,
|
|
1620
1620
|
type: "default",
|
|
1621
1621
|
dot: "",
|
|
@@ -1625,18 +1625,18 @@ const Ut = {
|
|
|
1625
1625
|
c(i(e(y)("connections.disconnected")), 1)
|
|
1626
1626
|
]),
|
|
1627
1627
|
_: 1
|
|
1628
|
-
})) : (m(),
|
|
1628
|
+
})) : (m(), _(e(q), {
|
|
1629
1629
|
key: 1,
|
|
1630
1630
|
type: n.read_only ? "info" : "success",
|
|
1631
1631
|
dot: "",
|
|
1632
1632
|
size: "sm"
|
|
1633
1633
|
}, {
|
|
1634
1634
|
default: t(() => [
|
|
1635
|
-
c(i(
|
|
1635
|
+
c(i(b(n)), 1)
|
|
1636
1636
|
]),
|
|
1637
1637
|
_: 2
|
|
1638
1638
|
}, 1032, ["type"])),
|
|
1639
|
-
s.scope === "all" ? (m(),
|
|
1639
|
+
s.scope === "all" ? (m(), _(e(B), {
|
|
1640
1640
|
key: 2,
|
|
1641
1641
|
size: "xs",
|
|
1642
1642
|
tone: "muted"
|
|
@@ -1645,12 +1645,12 @@ const Ut = {
|
|
|
1645
1645
|
c(i(g(n)), 1)
|
|
1646
1646
|
]),
|
|
1647
1647
|
_: 2
|
|
1648
|
-
}, 1024)) :
|
|
1649
|
-
n.last_used_at ? (m(),
|
|
1648
|
+
}, 1024)) : E("", !0),
|
|
1649
|
+
n.last_used_at ? (m(), _(e(ae), {
|
|
1650
1650
|
key: 3,
|
|
1651
1651
|
value: n.last_used_at,
|
|
1652
1652
|
compact: ""
|
|
1653
|
-
}, null, 8, ["value"])) : (m(),
|
|
1653
|
+
}, null, 8, ["value"])) : (m(), _(e(B), {
|
|
1654
1654
|
key: 4,
|
|
1655
1655
|
size: "xs",
|
|
1656
1656
|
tone: "muted"
|
|
@@ -1662,13 +1662,13 @@ const Ut = {
|
|
|
1662
1662
|
}))
|
|
1663
1663
|
]),
|
|
1664
1664
|
actions: t(() => [
|
|
1665
|
-
n.revoked_at ?
|
|
1665
|
+
n.revoked_at ? E("", !0) : (m(), _(e(N), {
|
|
1666
1666
|
key: 0,
|
|
1667
1667
|
type: "danger",
|
|
1668
1668
|
variant: "text",
|
|
1669
1669
|
size: "sm",
|
|
1670
|
-
loading:
|
|
1671
|
-
onClick: (
|
|
1670
|
+
loading: V.value === n.id,
|
|
1671
|
+
onClick: (x) => F(n)
|
|
1672
1672
|
}, {
|
|
1673
1673
|
default: t(() => [
|
|
1674
1674
|
c(i(e(y)("connections.disconnect")), 1)
|
|
@@ -1724,46 +1724,46 @@ const Ft = {
|
|
|
1724
1724
|
}, Bt = /* @__PURE__ */ Q({
|
|
1725
1725
|
__name: "KeyDialog",
|
|
1726
1726
|
setup(s) {
|
|
1727
|
-
const { open: r, resolve: l, dismiss: u } = _e(), v = X(), y = tt(v),
|
|
1728
|
-
|
|
1729
|
-
const o = G("webx-auth"), h = re(),
|
|
1727
|
+
const { open: r, resolve: l, dismiss: u } = _e(), v = X(), y = tt(v), A = pe(v);
|
|
1728
|
+
te();
|
|
1729
|
+
const o = G("webx-auth"), h = re(), U = [30, 90, 365, 1095, 3650], d = W({
|
|
1730
1730
|
name: "",
|
|
1731
1731
|
admin: null,
|
|
1732
1732
|
access: "everything",
|
|
1733
1733
|
scopes: [],
|
|
1734
1734
|
days: 365
|
|
1735
|
-
}),
|
|
1736
|
-
() =>
|
|
1737
|
-
), C =
|
|
1735
|
+
}), k = W([]), V = W([]), p = W(!1), g = W({}), b = W(null), w = W(!1), F = L(
|
|
1736
|
+
() => k.value.filter((z) => z !== "mcp:use").map((z) => ({ value: z, label: z }))
|
|
1737
|
+
), C = L(() => [
|
|
1738
1738
|
{ value: "everything", label: o("keys.everything") },
|
|
1739
1739
|
{ value: "chosen", label: o("keys.chosen") }
|
|
1740
|
-
]),
|
|
1741
|
-
() =>
|
|
1742
|
-
), n =
|
|
1740
|
+
]), D = L(
|
|
1741
|
+
() => U.map((z) => ({ value: z, label: o(`keys.days-${z}`) }))
|
|
1742
|
+
), n = L(() => {
|
|
1743
1743
|
const z = v.state.manifest?.modules.find((f) => f.id === "connect")?.meta;
|
|
1744
1744
|
return typeof z?.url == "string" ? z.url : "";
|
|
1745
1745
|
});
|
|
1746
1746
|
y.list().then(
|
|
1747
|
-
(z) =>
|
|
1747
|
+
(z) => k.value = z.scopes,
|
|
1748
1748
|
(z) => K.danger(h(z))
|
|
1749
|
-
),
|
|
1750
|
-
(z) =>
|
|
1749
|
+
), A.list({ active: "yes", per_page: 100, sort: "name" }).then(
|
|
1750
|
+
(z) => V.value = z.data.map((f) => ({
|
|
1751
1751
|
value: f.id,
|
|
1752
1752
|
label: `${f.name} · ${f.email}`
|
|
1753
1753
|
})),
|
|
1754
1754
|
(z) => K.danger(h(z))
|
|
1755
1755
|
);
|
|
1756
|
-
function
|
|
1756
|
+
function x(z) {
|
|
1757
1757
|
return g.value[z]?.[0] ?? g.value[`${z}.0`]?.[0];
|
|
1758
1758
|
}
|
|
1759
|
-
async function
|
|
1759
|
+
async function P() {
|
|
1760
1760
|
if (g.value = {}, d.value.access === "chosen" && d.value.scopes.length === 0) {
|
|
1761
1761
|
g.value = { scopes: [o("keys.scopes-required")] };
|
|
1762
1762
|
return;
|
|
1763
1763
|
}
|
|
1764
1764
|
p.value = !0;
|
|
1765
1765
|
try {
|
|
1766
|
-
|
|
1766
|
+
b.value = await y.issue({
|
|
1767
1767
|
name: d.value.name,
|
|
1768
1768
|
admin: d.value.admin ?? 0,
|
|
1769
1769
|
scopes: d.value.access === "chosen" ? d.value.scopes : [],
|
|
@@ -1776,25 +1776,25 @@ const Ft = {
|
|
|
1776
1776
|
p.value = !1;
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
|
-
async function
|
|
1780
|
-
|
|
1779
|
+
async function J() {
|
|
1780
|
+
b.value !== null && (await et(b.value.token) ? w.value = !0 : K.danger(o("keys.copy-failed")));
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1783
|
-
|
|
1782
|
+
function O() {
|
|
1783
|
+
b.value ? l(b.value.key) : u();
|
|
1784
1784
|
}
|
|
1785
|
-
return (z, f) => (m(),
|
|
1785
|
+
return (z, f) => (m(), _(e(be), {
|
|
1786
1786
|
open: e(r),
|
|
1787
|
-
title:
|
|
1787
|
+
title: b.value ? e(o)("keys.issued-title") : e(o)("keys.issue"),
|
|
1788
1788
|
width: 640,
|
|
1789
|
-
"onUpdate:open": f[5] || (f[5] = (
|
|
1789
|
+
"onUpdate:open": f[5] || (f[5] = (R) => R ? void 0 : O())
|
|
1790
1790
|
}, {
|
|
1791
1791
|
footer: t(() => [
|
|
1792
1792
|
a(e(se), { size: "sm" }, {
|
|
1793
1793
|
default: t(() => [
|
|
1794
|
-
|
|
1794
|
+
b.value ? (m(), _(e(N), {
|
|
1795
1795
|
key: 0,
|
|
1796
1796
|
type: "primary",
|
|
1797
|
-
onClick:
|
|
1797
|
+
onClick: O
|
|
1798
1798
|
}, {
|
|
1799
1799
|
default: t(() => [
|
|
1800
1800
|
c(i(e(o)("keys.done")), 1)
|
|
@@ -1803,7 +1803,7 @@ const Ft = {
|
|
|
1803
1803
|
})) : (m(), H(ue, { key: 1 }, [
|
|
1804
1804
|
a(e(N), {
|
|
1805
1805
|
variant: "outline",
|
|
1806
|
-
onClick:
|
|
1806
|
+
onClick: O
|
|
1807
1807
|
}, {
|
|
1808
1808
|
default: t(() => [
|
|
1809
1809
|
c(i(e(o)("keys.cancel")), 1)
|
|
@@ -1813,7 +1813,7 @@ const Ft = {
|
|
|
1813
1813
|
a(e(N), {
|
|
1814
1814
|
type: "primary",
|
|
1815
1815
|
loading: p.value,
|
|
1816
|
-
onClick:
|
|
1816
|
+
onClick: P
|
|
1817
1817
|
}, {
|
|
1818
1818
|
default: t(() => [
|
|
1819
1819
|
c(i(e(o)("keys.issue-short")), 1)
|
|
@@ -1826,7 +1826,7 @@ const Ft = {
|
|
|
1826
1826
|
})
|
|
1827
1827
|
]),
|
|
1828
1828
|
default: t(() => [
|
|
1829
|
-
|
|
1829
|
+
b.value ? (m(), H("div", Ft, [
|
|
1830
1830
|
a(e(qe), {
|
|
1831
1831
|
type: "warning",
|
|
1832
1832
|
closable: !1
|
|
@@ -1842,21 +1842,21 @@ const Ft = {
|
|
|
1842
1842
|
default: t(() => [
|
|
1843
1843
|
S("div", Rt, [
|
|
1844
1844
|
a(e(le), {
|
|
1845
|
-
"model-value":
|
|
1845
|
+
"model-value": b.value.token,
|
|
1846
1846
|
readonly: "",
|
|
1847
1847
|
name: "token"
|
|
1848
1848
|
}, null, 8, ["model-value"]),
|
|
1849
1849
|
a(e(N), {
|
|
1850
1850
|
type: "primary",
|
|
1851
|
-
onClick:
|
|
1851
|
+
onClick: J
|
|
1852
1852
|
}, {
|
|
1853
1853
|
icon: t(() => [
|
|
1854
|
-
a(e(
|
|
1855
|
-
name:
|
|
1854
|
+
a(e(ee), {
|
|
1855
|
+
name: w.value ? "check" : "copy"
|
|
1856
1856
|
}, null, 8, ["name"])
|
|
1857
1857
|
]),
|
|
1858
1858
|
default: t(() => [
|
|
1859
|
-
c(" " + i(
|
|
1859
|
+
c(" " + i(w.value ? e(o)("keys.copied") : e(o)("keys.copy")), 1)
|
|
1860
1860
|
]),
|
|
1861
1861
|
_: 1
|
|
1862
1862
|
})
|
|
@@ -1864,7 +1864,7 @@ const Ft = {
|
|
|
1864
1864
|
]),
|
|
1865
1865
|
_: 1
|
|
1866
1866
|
}, 8, ["label"]),
|
|
1867
|
-
n.value ? (m(),
|
|
1867
|
+
n.value ? (m(), _(e(M), {
|
|
1868
1868
|
key: 0,
|
|
1869
1869
|
label: e(o)("keys.address")
|
|
1870
1870
|
}, {
|
|
@@ -1876,8 +1876,8 @@ const Ft = {
|
|
|
1876
1876
|
}, null, 8, ["model-value"])
|
|
1877
1877
|
]),
|
|
1878
1878
|
_: 1
|
|
1879
|
-
}, 8, ["label"])) :
|
|
1880
|
-
a(e(
|
|
1879
|
+
}, 8, ["label"])) : E("", !0),
|
|
1880
|
+
a(e(B), {
|
|
1881
1881
|
size: "sm",
|
|
1882
1882
|
tone: "muted"
|
|
1883
1883
|
}, {
|
|
@@ -1887,7 +1887,7 @@ const Ft = {
|
|
|
1887
1887
|
_: 1
|
|
1888
1888
|
})
|
|
1889
1889
|
])) : (m(), H("div", Ot, [
|
|
1890
|
-
a(e(
|
|
1890
|
+
a(e(B), {
|
|
1891
1891
|
size: "sm",
|
|
1892
1892
|
tone: "muted"
|
|
1893
1893
|
}, {
|
|
@@ -1898,13 +1898,13 @@ const Ft = {
|
|
|
1898
1898
|
}),
|
|
1899
1899
|
a(e(M), {
|
|
1900
1900
|
label: e(o)("keys.name"),
|
|
1901
|
-
error:
|
|
1901
|
+
error: x("name"),
|
|
1902
1902
|
help: e(o)("keys.name-hint")
|
|
1903
1903
|
}, {
|
|
1904
1904
|
default: t(() => [
|
|
1905
1905
|
a(e(le), {
|
|
1906
1906
|
modelValue: d.value.name,
|
|
1907
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
1907
|
+
"onUpdate:modelValue": f[0] || (f[0] = (R) => d.value.name = R),
|
|
1908
1908
|
name: "name",
|
|
1909
1909
|
autocomplete: "off"
|
|
1910
1910
|
}, null, 8, ["modelValue"])
|
|
@@ -1913,14 +1913,14 @@ const Ft = {
|
|
|
1913
1913
|
}, 8, ["label", "error", "help"]),
|
|
1914
1914
|
a(e(M), {
|
|
1915
1915
|
label: e(o)("keys.who"),
|
|
1916
|
-
error:
|
|
1916
|
+
error: x("admin"),
|
|
1917
1917
|
help: e(o)("keys.who-hint")
|
|
1918
1918
|
}, {
|
|
1919
1919
|
default: t(() => [
|
|
1920
1920
|
a(e(ne), {
|
|
1921
1921
|
modelValue: d.value.admin,
|
|
1922
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
1923
|
-
options:
|
|
1922
|
+
"onUpdate:modelValue": f[1] || (f[1] = (R) => d.value.admin = R),
|
|
1923
|
+
options: V.value,
|
|
1924
1924
|
filterable: "",
|
|
1925
1925
|
name: "admin"
|
|
1926
1926
|
}, null, 8, ["modelValue", "options"])
|
|
@@ -1933,41 +1933,41 @@ const Ft = {
|
|
|
1933
1933
|
default: t(() => [
|
|
1934
1934
|
a(e(mt), {
|
|
1935
1935
|
modelValue: d.value.access,
|
|
1936
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
1936
|
+
"onUpdate:modelValue": f[2] || (f[2] = (R) => d.value.access = R),
|
|
1937
1937
|
options: C.value,
|
|
1938
1938
|
name: "access"
|
|
1939
1939
|
}, null, 8, ["modelValue", "options"])
|
|
1940
1940
|
]),
|
|
1941
1941
|
_: 1
|
|
1942
1942
|
}, 8, ["label"]),
|
|
1943
|
-
d.value.access === "chosen" ? (m(),
|
|
1943
|
+
d.value.access === "chosen" ? (m(), _(e(M), {
|
|
1944
1944
|
key: 0,
|
|
1945
1945
|
label: e(o)("keys.scopes"),
|
|
1946
|
-
error:
|
|
1946
|
+
error: x("scopes"),
|
|
1947
1947
|
help: e(o)("keys.scopes-hint")
|
|
1948
1948
|
}, {
|
|
1949
1949
|
default: t(() => [
|
|
1950
1950
|
a(e(ne), {
|
|
1951
1951
|
modelValue: d.value.scopes,
|
|
1952
|
-
"onUpdate:modelValue": f[3] || (f[3] = (
|
|
1953
|
-
options:
|
|
1952
|
+
"onUpdate:modelValue": f[3] || (f[3] = (R) => d.value.scopes = R),
|
|
1953
|
+
options: F.value,
|
|
1954
1954
|
multiple: "",
|
|
1955
1955
|
filterable: "",
|
|
1956
1956
|
name: "scopes"
|
|
1957
1957
|
}, null, 8, ["modelValue", "options"])
|
|
1958
1958
|
]),
|
|
1959
1959
|
_: 1
|
|
1960
|
-
}, 8, ["label", "error", "help"])) :
|
|
1960
|
+
}, 8, ["label", "error", "help"])) : E("", !0),
|
|
1961
1961
|
a(e(M), {
|
|
1962
1962
|
label: e(o)("keys.lifetime"),
|
|
1963
|
-
error:
|
|
1963
|
+
error: x("days"),
|
|
1964
1964
|
help: e(o)("keys.lifetime-hint")
|
|
1965
1965
|
}, {
|
|
1966
1966
|
default: t(() => [
|
|
1967
1967
|
a(e(ne), {
|
|
1968
1968
|
modelValue: d.value.days,
|
|
1969
|
-
"onUpdate:modelValue": f[4] || (f[4] = (
|
|
1970
|
-
options:
|
|
1969
|
+
"onUpdate:modelValue": f[4] || (f[4] = (R) => d.value.days = R),
|
|
1970
|
+
options: D.value,
|
|
1971
1971
|
name: "days"
|
|
1972
1972
|
}, null, 8, ["modelValue", "options"])
|
|
1973
1973
|
]),
|
|
@@ -1985,8 +1985,8 @@ const Ft = {
|
|
|
1985
1985
|
__name: "KeyList",
|
|
1986
1986
|
setup(s, { expose: r }) {
|
|
1987
1987
|
const l = X(), u = tt(l);
|
|
1988
|
-
|
|
1989
|
-
const v = G("webx-auth"), y = re(),
|
|
1988
|
+
te();
|
|
1989
|
+
const v = G("webx-auth"), y = re(), A = oe("root"), o = ge(A), h = L(() => o.value > 0 && o.value < Re), U = W([]), d = W(!1), k = W(null), V = L(() => h.value ? [{ key: "card", label: "" }] : [
|
|
1990
1990
|
{ key: "name", label: v("keys.name"), minWidth: 200 },
|
|
1991
1991
|
{ key: "user", label: v("keys.who"), minWidth: 140 },
|
|
1992
1992
|
{ key: "scopes", label: v("keys.allowed"), minWidth: 180 },
|
|
@@ -2000,20 +2000,20 @@ const Ft = {
|
|
|
2000
2000
|
function g(C) {
|
|
2001
2001
|
return C.created_by?.name ? v("keys.issued-by", { name: C.created_by.name }) : v("keys.issued-console");
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function b(C) {
|
|
2004
2004
|
return C.everything ? v("keys.full", { name: C.user.name?.split(" ")[0] || p(C) }) : C.scopes.join(", ");
|
|
2005
2005
|
}
|
|
2006
|
-
async function
|
|
2006
|
+
async function w() {
|
|
2007
2007
|
d.value = !0;
|
|
2008
2008
|
try {
|
|
2009
|
-
|
|
2009
|
+
U.value = (await u.list()).data;
|
|
2010
2010
|
} catch (C) {
|
|
2011
2011
|
K.danger(y(C));
|
|
2012
2012
|
} finally {
|
|
2013
2013
|
d.value = !1;
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
async function
|
|
2016
|
+
async function F(C) {
|
|
2017
2017
|
if (await ze({
|
|
2018
2018
|
title: v("keys.confirm-title", { name: C.name }),
|
|
2019
2019
|
message: v("keys.confirm-text"),
|
|
@@ -2021,25 +2021,25 @@ const Ft = {
|
|
|
2021
2021
|
cancelText: v("keys.cancel"),
|
|
2022
2022
|
tone: "danger"
|
|
2023
2023
|
})) {
|
|
2024
|
-
|
|
2024
|
+
k.value = C.id;
|
|
2025
2025
|
try {
|
|
2026
2026
|
const n = await u.revoke(C.id);
|
|
2027
|
-
|
|
2027
|
+
U.value = U.value.map((x) => x.id === n.id ? n : x), K.success(v("keys.revoked-done", { name: C.name }));
|
|
2028
2028
|
} catch (n) {
|
|
2029
2029
|
K.danger(y(n));
|
|
2030
2030
|
} finally {
|
|
2031
|
-
|
|
2031
|
+
k.value = null;
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
|
-
return Ie(
|
|
2035
|
+
return Ie(w), r({ reload: w }), (C, D) => (m(), H("div", {
|
|
2036
2036
|
ref_key: "root",
|
|
2037
|
-
ref:
|
|
2037
|
+
ref: A,
|
|
2038
2038
|
class: "wx-key-list"
|
|
2039
2039
|
}, [
|
|
2040
2040
|
a(e(ke), {
|
|
2041
|
-
data:
|
|
2042
|
-
columns:
|
|
2041
|
+
data: U.value,
|
|
2042
|
+
columns: V.value,
|
|
2043
2043
|
"row-key": "id",
|
|
2044
2044
|
flush: "",
|
|
2045
2045
|
loading: d.value,
|
|
@@ -2054,7 +2054,7 @@ const Ft = {
|
|
|
2054
2054
|
size: "none"
|
|
2055
2055
|
}, {
|
|
2056
2056
|
default: t(() => [
|
|
2057
|
-
a(e(
|
|
2057
|
+
a(e(B), {
|
|
2058
2058
|
tone: n.state === "live" ? "default" : "muted",
|
|
2059
2059
|
weight: "medium"
|
|
2060
2060
|
}, {
|
|
@@ -2063,7 +2063,7 @@ const Ft = {
|
|
|
2063
2063
|
]),
|
|
2064
2064
|
_: 2
|
|
2065
2065
|
}, 1032, ["tone"]),
|
|
2066
|
-
a(e(
|
|
2066
|
+
a(e(B), {
|
|
2067
2067
|
size: "xs",
|
|
2068
2068
|
tone: "muted"
|
|
2069
2069
|
}, {
|
|
@@ -2082,7 +2082,7 @@ const Ft = {
|
|
|
2082
2082
|
}, 1024)
|
|
2083
2083
|
]),
|
|
2084
2084
|
"cell-user": t(({ row: n }) => [
|
|
2085
|
-
a(e(
|
|
2085
|
+
a(e(B), {
|
|
2086
2086
|
tone: n.user.name === null ? "muted" : "default"
|
|
2087
2087
|
}, {
|
|
2088
2088
|
default: t(() => [
|
|
@@ -2092,7 +2092,7 @@ const Ft = {
|
|
|
2092
2092
|
}, 1032, ["tone"])
|
|
2093
2093
|
]),
|
|
2094
2094
|
"cell-scopes": t(({ row: n }) => [
|
|
2095
|
-
n.state === "revoked" ? (m(),
|
|
2095
|
+
n.state === "revoked" ? (m(), _(e(q), {
|
|
2096
2096
|
key: 0,
|
|
2097
2097
|
type: "default",
|
|
2098
2098
|
dot: ""
|
|
@@ -2101,7 +2101,7 @@ const Ft = {
|
|
|
2101
2101
|
c(i(e(v)("keys.revoked")), 1)
|
|
2102
2102
|
]),
|
|
2103
2103
|
_: 1
|
|
2104
|
-
})) : n.state === "expired" ? (m(),
|
|
2104
|
+
})) : n.state === "expired" ? (m(), _(e(q), {
|
|
2105
2105
|
key: 1,
|
|
2106
2106
|
type: "default",
|
|
2107
2107
|
dot: ""
|
|
@@ -2110,30 +2110,30 @@ const Ft = {
|
|
|
2110
2110
|
c(i(e(v)("keys.expired")), 1)
|
|
2111
2111
|
]),
|
|
2112
2112
|
_: 1
|
|
2113
|
-
})) : (m(),
|
|
2113
|
+
})) : (m(), _(e(q), {
|
|
2114
2114
|
key: 2,
|
|
2115
2115
|
type: n.everything ? "success" : "info",
|
|
2116
2116
|
dot: ""
|
|
2117
2117
|
}, {
|
|
2118
2118
|
default: t(() => [
|
|
2119
|
-
c(i(
|
|
2119
|
+
c(i(b(n)), 1)
|
|
2120
2120
|
]),
|
|
2121
2121
|
_: 2
|
|
2122
2122
|
}, 1032, ["type"]))
|
|
2123
2123
|
]),
|
|
2124
2124
|
"cell-expires_at": t(({ row: n }) => [
|
|
2125
|
-
n.expires_at ? (m(),
|
|
2125
|
+
n.expires_at ? (m(), _(e(ae), {
|
|
2126
2126
|
key: 0,
|
|
2127
2127
|
value: n.expires_at,
|
|
2128
2128
|
compact: ""
|
|
2129
|
-
}, null, 8, ["value"])) :
|
|
2129
|
+
}, null, 8, ["value"])) : E("", !0)
|
|
2130
2130
|
]),
|
|
2131
2131
|
"cell-last_used_at": t(({ row: n }) => [
|
|
2132
|
-
n.last_used_at ? (m(),
|
|
2132
|
+
n.last_used_at ? (m(), _(e(ae), {
|
|
2133
2133
|
key: 0,
|
|
2134
2134
|
value: n.last_used_at,
|
|
2135
2135
|
compact: ""
|
|
2136
|
-
}, null, 8, ["value"])) : (m(),
|
|
2136
|
+
}, null, 8, ["value"])) : (m(), _(e(B), {
|
|
2137
2137
|
key: 1,
|
|
2138
2138
|
size: "sm",
|
|
2139
2139
|
tone: "muted"
|
|
@@ -2145,19 +2145,19 @@ const Ft = {
|
|
|
2145
2145
|
}))
|
|
2146
2146
|
]),
|
|
2147
2147
|
"cell-end": t(({ row: n }) => [
|
|
2148
|
-
n.state === "live" ? (m(),
|
|
2148
|
+
n.state === "live" ? (m(), _(e(N), {
|
|
2149
2149
|
key: 0,
|
|
2150
2150
|
type: "danger",
|
|
2151
2151
|
variant: "text",
|
|
2152
2152
|
size: "sm",
|
|
2153
|
-
loading:
|
|
2154
|
-
onClick: (
|
|
2153
|
+
loading: k.value === n.id,
|
|
2154
|
+
onClick: (x) => F(n)
|
|
2155
2155
|
}, {
|
|
2156
2156
|
default: t(() => [
|
|
2157
2157
|
c(i(e(v)("keys.revoke")), 1)
|
|
2158
2158
|
]),
|
|
2159
2159
|
_: 1
|
|
2160
|
-
}, 8, ["loading", "onClick"])) :
|
|
2160
|
+
}, 8, ["loading", "onClick"])) : E("", !0)
|
|
2161
2161
|
]),
|
|
2162
2162
|
"cell-card": t(({ row: n }) => [
|
|
2163
2163
|
a(e(we), {
|
|
@@ -2167,11 +2167,11 @@ const Ft = {
|
|
|
2167
2167
|
}, {
|
|
2168
2168
|
media: t(() => [
|
|
2169
2169
|
S("span", Et, [
|
|
2170
|
-
a(e(
|
|
2170
|
+
a(e(ee), { name: "lock" })
|
|
2171
2171
|
])
|
|
2172
2172
|
]),
|
|
2173
2173
|
meta: t(() => [
|
|
2174
|
-
n.state === "revoked" ? (m(),
|
|
2174
|
+
n.state === "revoked" ? (m(), _(e(q), {
|
|
2175
2175
|
key: 0,
|
|
2176
2176
|
type: "default",
|
|
2177
2177
|
dot: "",
|
|
@@ -2181,7 +2181,7 @@ const Ft = {
|
|
|
2181
2181
|
c(i(e(v)("keys.revoked")), 1)
|
|
2182
2182
|
]),
|
|
2183
2183
|
_: 1
|
|
2184
|
-
})) : n.state === "expired" ? (m(),
|
|
2184
|
+
})) : n.state === "expired" ? (m(), _(e(q), {
|
|
2185
2185
|
key: 1,
|
|
2186
2186
|
type: "default",
|
|
2187
2187
|
dot: "",
|
|
@@ -2191,18 +2191,18 @@ const Ft = {
|
|
|
2191
2191
|
c(i(e(v)("keys.expired")), 1)
|
|
2192
2192
|
]),
|
|
2193
2193
|
_: 1
|
|
2194
|
-
})) : (m(),
|
|
2194
|
+
})) : (m(), _(e(q), {
|
|
2195
2195
|
key: 2,
|
|
2196
2196
|
type: n.everything ? "success" : "info",
|
|
2197
2197
|
dot: "",
|
|
2198
2198
|
size: "sm"
|
|
2199
2199
|
}, {
|
|
2200
2200
|
default: t(() => [
|
|
2201
|
-
c(i(
|
|
2201
|
+
c(i(b(n)), 1)
|
|
2202
2202
|
]),
|
|
2203
2203
|
_: 2
|
|
2204
2204
|
}, 1032, ["type"])),
|
|
2205
|
-
n.expires_at ? (m(),
|
|
2205
|
+
n.expires_at ? (m(), _(e(B), {
|
|
2206
2206
|
key: 3,
|
|
2207
2207
|
size: "xs",
|
|
2208
2208
|
tone: "muted"
|
|
@@ -2215,22 +2215,22 @@ const Ft = {
|
|
|
2215
2215
|
}, null, 8, ["value"])
|
|
2216
2216
|
]),
|
|
2217
2217
|
_: 2
|
|
2218
|
-
}, 1024)) :
|
|
2218
|
+
}, 1024)) : E("", !0)
|
|
2219
2219
|
]),
|
|
2220
2220
|
actions: t(() => [
|
|
2221
|
-
n.state === "live" ? (m(),
|
|
2221
|
+
n.state === "live" ? (m(), _(e(N), {
|
|
2222
2222
|
key: 0,
|
|
2223
2223
|
type: "danger",
|
|
2224
2224
|
variant: "text",
|
|
2225
2225
|
size: "sm",
|
|
2226
|
-
loading:
|
|
2227
|
-
onClick: (
|
|
2226
|
+
loading: k.value === n.id,
|
|
2227
|
+
onClick: (x) => F(n)
|
|
2228
2228
|
}, {
|
|
2229
2229
|
default: t(() => [
|
|
2230
2230
|
c(i(e(v)("keys.revoke")), 1)
|
|
2231
2231
|
]),
|
|
2232
2232
|
_: 1
|
|
2233
|
-
}, 8, ["loading", "onClick"])) :
|
|
2233
|
+
}, 8, ["loading", "onClick"])) : E("", !0)
|
|
2234
2234
|
]),
|
|
2235
2235
|
_: 2
|
|
2236
2236
|
}, 1032, ["title", "subtitle"])
|
|
@@ -2248,27 +2248,27 @@ const Ft = {
|
|
|
2248
2248
|
resolveAvatar: { type: Function, default: void 0 }
|
|
2249
2249
|
},
|
|
2250
2250
|
setup(s) {
|
|
2251
|
-
const r = s, l = X(), u = pe(l), v = r.avatarField ?? Ye(l) ?? void 0, y = r.resolveAvatar ?? Je(l) ?? void 0,
|
|
2252
|
-
|
|
2253
|
-
const h = G("webx-auth"),
|
|
2254
|
-
() => l.state.manifest?.modules.find((
|
|
2255
|
-
), C =
|
|
2256
|
-
const
|
|
2257
|
-
return
|
|
2258
|
-
}),
|
|
2251
|
+
const r = s, l = X(), u = pe(l), v = r.avatarField ?? Ye(l) ?? void 0, y = r.resolveAvatar ?? Je(l) ?? void 0, A = rt(), o = ct();
|
|
2252
|
+
te();
|
|
2253
|
+
const h = G("webx-auth"), U = re(), d = oe("list"), k = oe("keys"), V = W(null), p = he($t), g = he(Bt), b = l.can("admins.manage"), w = l.can("admins.audit"), F = L(
|
|
2254
|
+
() => l.state.manifest?.modules.find((O) => O.id === "admins")?.title ?? h("admins.title")
|
|
2255
|
+
), C = L(() => {
|
|
2256
|
+
const O = [{ value: "admins", label: F.value }];
|
|
2257
|
+
return w && O.push({ value: "calls", label: h("calls.title") }), b && O.push({ value: "connections", label: h("connections.title") }), b && O.push({ value: "keys", label: h("keys.title") }), O.length > 1 ? O : void 0;
|
|
2258
|
+
}), D = L({
|
|
2259
2259
|
get: () => r.current,
|
|
2260
|
-
set: (
|
|
2261
|
-
const z =
|
|
2262
|
-
z !== o.path &&
|
|
2260
|
+
set: (O) => {
|
|
2261
|
+
const z = O === "admins" ? r.base : `${r.base}/${String(O)}`;
|
|
2262
|
+
z !== o.path && A.push(z);
|
|
2263
2263
|
}
|
|
2264
|
-
}), n =
|
|
2264
|
+
}), n = L(() => b ? r.current === "admins" ? [
|
|
2265
2265
|
{
|
|
2266
2266
|
key: "new",
|
|
2267
2267
|
label: h("admins.new-short"),
|
|
2268
2268
|
icon: "plus",
|
|
2269
2269
|
primary: !0,
|
|
2270
2270
|
run: () => {
|
|
2271
|
-
|
|
2271
|
+
P(null);
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
2274
|
] : r.current === "keys" ? [
|
|
@@ -2278,52 +2278,52 @@ const Ft = {
|
|
|
2278
2278
|
icon: "plus",
|
|
2279
2279
|
primary: !0,
|
|
2280
2280
|
run: () => {
|
|
2281
|
-
|
|
2281
|
+
x();
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
2284
2284
|
] : [] : []);
|
|
2285
|
-
async function
|
|
2286
|
-
await g() &&
|
|
2285
|
+
async function x() {
|
|
2286
|
+
await g() && k.value?.reload();
|
|
2287
2287
|
}
|
|
2288
|
-
async function
|
|
2289
|
-
|
|
2288
|
+
async function P(O) {
|
|
2289
|
+
V.value = O, await p({ admin: O, avatarField: v }) && d.value?.reload();
|
|
2290
2290
|
}
|
|
2291
|
-
async function
|
|
2291
|
+
async function J(O) {
|
|
2292
2292
|
if (await ze({
|
|
2293
|
-
title: h("admins.delete-title", { name:
|
|
2293
|
+
title: h("admins.delete-title", { name: O.name }),
|
|
2294
2294
|
message: h("admins.delete-text"),
|
|
2295
2295
|
confirmText: h("admins.delete"),
|
|
2296
2296
|
cancelText: h("admins.cancel"),
|
|
2297
2297
|
tone: "danger"
|
|
2298
2298
|
}))
|
|
2299
2299
|
try {
|
|
2300
|
-
await u.remove(
|
|
2300
|
+
await u.remove(O.id), K.success(h("admins.deleted")), d.value?.reload();
|
|
2301
2301
|
} catch (f) {
|
|
2302
|
-
K.danger(
|
|
2302
|
+
K.danger(U(f));
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
|
-
return (
|
|
2306
|
-
view:
|
|
2307
|
-
"onUpdate:view": z[0] || (z[0] = (f) =>
|
|
2308
|
-
title:
|
|
2305
|
+
return (O, z) => (m(), _(e(Ke), {
|
|
2306
|
+
view: D.value,
|
|
2307
|
+
"onUpdate:view": z[0] || (z[0] = (f) => D.value = f),
|
|
2308
|
+
title: F.value,
|
|
2309
2309
|
views: C.value,
|
|
2310
2310
|
actions: n.value
|
|
2311
2311
|
}, {
|
|
2312
2312
|
default: t(() => [
|
|
2313
|
-
s.current === "calls" ? (m(),
|
|
2313
|
+
s.current === "calls" ? (m(), _(Lt, { key: 0 })) : s.current === "connections" ? (m(), _(Ze, {
|
|
2314
2314
|
key: 1,
|
|
2315
2315
|
scope: "all"
|
|
2316
|
-
})) : s.current === "keys" ? (m(),
|
|
2316
|
+
})) : s.current === "keys" ? (m(), _(It, {
|
|
2317
2317
|
key: 2,
|
|
2318
2318
|
ref: "keys"
|
|
2319
|
-
}, null, 512)) : (m(),
|
|
2319
|
+
}, null, 512)) : (m(), _(Xe, {
|
|
2320
2320
|
key: 3,
|
|
2321
2321
|
ref_key: "list",
|
|
2322
2322
|
ref: d,
|
|
2323
|
-
removable: e(
|
|
2323
|
+
removable: e(b),
|
|
2324
2324
|
"resolve-avatar": e(y),
|
|
2325
|
-
onOpen:
|
|
2326
|
-
onRemove:
|
|
2325
|
+
onOpen: P,
|
|
2326
|
+
onRemove: J
|
|
2327
2327
|
}, null, 8, ["removable", "resolve-avatar"]))
|
|
2328
2328
|
]),
|
|
2329
2329
|
_: 1
|
|
@@ -2336,15 +2336,15 @@ const Ft = {
|
|
|
2336
2336
|
__name: "ContentRulesCard",
|
|
2337
2337
|
setup(s) {
|
|
2338
2338
|
const r = X();
|
|
2339
|
-
|
|
2340
|
-
const l = G("webx-auth"), u = G("webx-admin"), v = re(), y =
|
|
2341
|
-
const
|
|
2342
|
-
return typeof
|
|
2343
|
-
}),
|
|
2339
|
+
te();
|
|
2340
|
+
const l = G("webx-auth"), u = G("webx-admin"), v = re(), y = L(() => {
|
|
2341
|
+
const b = r.state.manifest?.modules.find((w) => w.id === "settings")?.meta?.content_screen;
|
|
2342
|
+
return typeof b == "string" ? b : null;
|
|
2343
|
+
}), A = r.can("settings.view") || r.can("settings.manage"), o = r.can("settings.manage"), h = W({}), U = W({}), d = W(!0), k = W(!1), V = `${r.apiPath}/settings/content`;
|
|
2344
2344
|
Ie(async () => {
|
|
2345
|
-
if (!(!y.value || !
|
|
2345
|
+
if (!(!y.value || !A))
|
|
2346
2346
|
try {
|
|
2347
|
-
const g = await r.http.get(
|
|
2347
|
+
const g = await r.http.get(V);
|
|
2348
2348
|
h.value = g.data.values;
|
|
2349
2349
|
} catch (g) {
|
|
2350
2350
|
K.danger(v(g));
|
|
@@ -2353,20 +2353,20 @@ const Ft = {
|
|
|
2353
2353
|
}
|
|
2354
2354
|
});
|
|
2355
2355
|
async function p() {
|
|
2356
|
-
|
|
2356
|
+
k.value = !0, U.value = {};
|
|
2357
2357
|
try {
|
|
2358
|
-
const g = await r.http.put(
|
|
2358
|
+
const g = await r.http.put(V, {
|
|
2359
2359
|
values: h.value
|
|
2360
2360
|
});
|
|
2361
2361
|
h.value = g.data.values, K.success(u("editor.saved"));
|
|
2362
2362
|
} catch (g) {
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2363
|
+
const b = g.body;
|
|
2364
|
+
b?.errors && (U.value = b.errors), K.danger(v(g));
|
|
2365
2365
|
} finally {
|
|
2366
|
-
|
|
2366
|
+
k.value = !1;
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
|
-
return (g,
|
|
2369
|
+
return (g, b) => y.value && e(A) ? (m(), H("section", Nt, [
|
|
2370
2370
|
a(e(me), {
|
|
2371
2371
|
level: 2,
|
|
2372
2372
|
size: "sm"
|
|
@@ -2378,15 +2378,15 @@ const Ft = {
|
|
|
2378
2378
|
}),
|
|
2379
2379
|
a(e($e), null, Ae({
|
|
2380
2380
|
default: t(() => [
|
|
2381
|
-
d.value ? (m(),
|
|
2381
|
+
d.value ? (m(), _(e(vt), {
|
|
2382
2382
|
key: 0,
|
|
2383
2383
|
rows: 4
|
|
2384
|
-
})) : (m(),
|
|
2384
|
+
})) : (m(), _(e(it), {
|
|
2385
2385
|
key: 1,
|
|
2386
2386
|
modelValue: h.value,
|
|
2387
|
-
"onUpdate:modelValue":
|
|
2387
|
+
"onUpdate:modelValue": b[0] || (b[0] = (w) => h.value = w),
|
|
2388
2388
|
name: y.value,
|
|
2389
|
-
errors:
|
|
2389
|
+
errors: U.value,
|
|
2390
2390
|
disabled: !e(o)
|
|
2391
2391
|
}, null, 8, ["modelValue", "name", "errors", "disabled"]))
|
|
2392
2392
|
]),
|
|
@@ -2396,7 +2396,7 @@ const Ft = {
|
|
|
2396
2396
|
name: "footer",
|
|
2397
2397
|
fn: t(() => [
|
|
2398
2398
|
S("div", Mt, [
|
|
2399
|
-
a(e(
|
|
2399
|
+
a(e(B), {
|
|
2400
2400
|
size: "sm",
|
|
2401
2401
|
tone: "muted"
|
|
2402
2402
|
}, {
|
|
@@ -2405,68 +2405,68 @@ const Ft = {
|
|
|
2405
2405
|
]),
|
|
2406
2406
|
_: 1
|
|
2407
2407
|
}),
|
|
2408
|
-
e(o) ? (m(),
|
|
2408
|
+
e(o) ? (m(), _(e(N), {
|
|
2409
2409
|
key: 0,
|
|
2410
2410
|
type: "primary",
|
|
2411
|
-
loading:
|
|
2411
|
+
loading: k.value,
|
|
2412
2412
|
onClick: p
|
|
2413
2413
|
}, {
|
|
2414
2414
|
default: t(() => [
|
|
2415
2415
|
c(i(e(u)("editor.save")), 1)
|
|
2416
2416
|
]),
|
|
2417
2417
|
_: 1
|
|
2418
|
-
}, 8, ["loading"])) :
|
|
2418
|
+
}, 8, ["loading"])) : E("", !0)
|
|
2419
2419
|
])
|
|
2420
2420
|
]),
|
|
2421
2421
|
key: "0"
|
|
2422
2422
|
}
|
|
2423
2423
|
]), 1024)
|
|
2424
|
-
])) :
|
|
2424
|
+
])) : E("", !0);
|
|
2425
2425
|
}
|
|
2426
2426
|
}), qt = /* @__PURE__ */ ve(Kt, [["__scopeId", "data-v-55be157e"]]), Ht = { class: "wx-connect" }, jt = { class: "wx-connect__section" }, Gt = { class: "wx-connect__row" }, Yt = { class: "wx-connect__url" }, Jt = { class: "wx-connect__section" }, Qt = { class: "wx-connect__steps" }, Xt = { class: "wx-connect__steps" }, Zt = { class: "wx-connect__snippet" }, ea = { class: "wx-connect__snippet" }, ta = { class: "wx-connect__section" }, aa = { class: "wx-connect__links" }, la = { class: "wx-connect__steps" }, na = { class: "wx-connect__section" }, sa = /* @__PURE__ */ Q({
|
|
2427
2427
|
__name: "ConnectPage",
|
|
2428
2428
|
setup(s) {
|
|
2429
2429
|
const r = X();
|
|
2430
|
-
|
|
2431
|
-
const l = G("webx-auth"), u =
|
|
2430
|
+
te();
|
|
2431
|
+
const l = G("webx-auth"), u = W(!1);
|
|
2432
2432
|
let v;
|
|
2433
|
-
const y =
|
|
2433
|
+
const y = L(() => {
|
|
2434
2434
|
const p = r.state.manifest?.modules.find((g) => g.id === "connect")?.meta;
|
|
2435
2435
|
return typeof p?.url == "string" ? p.url : "";
|
|
2436
|
-
}),
|
|
2436
|
+
}), A = L(() => {
|
|
2437
2437
|
try {
|
|
2438
2438
|
return new URL(y.value).hostname.split(".")[0] || "webx";
|
|
2439
2439
|
} catch {
|
|
2440
2440
|
return "webx";
|
|
2441
2441
|
}
|
|
2442
|
-
}), o =
|
|
2443
|
-
url = "${y.value}"`),
|
|
2444
|
-
const p =
|
|
2445
|
-
return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(
|
|
2446
|
-
}), d =
|
|
2447
|
-
const p = JSON.stringify({ name:
|
|
2442
|
+
}), o = L(() => `claude mcp add --transport http ${A.value} ${y.value}`), h = L(() => `[mcp_servers.${A.value}]
|
|
2443
|
+
url = "${y.value}"`), U = L(() => {
|
|
2444
|
+
const p = k(JSON.stringify({ url: y.value }));
|
|
2445
|
+
return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(A.value)}&config=${p}`;
|
|
2446
|
+
}), d = L(() => {
|
|
2447
|
+
const p = JSON.stringify({ name: A.value, type: "http", url: y.value });
|
|
2448
2448
|
return `vscode:mcp/install?${encodeURIComponent(p)}`;
|
|
2449
2449
|
});
|
|
2450
|
-
function
|
|
2450
|
+
function k(p) {
|
|
2451
2451
|
const g = new TextEncoder().encode(p);
|
|
2452
|
-
let
|
|
2453
|
-
for (const
|
|
2454
|
-
return encodeURIComponent(btoa(
|
|
2452
|
+
let b = "";
|
|
2453
|
+
for (const w of g) b += String.fromCharCode(w);
|
|
2454
|
+
return encodeURIComponent(btoa(b));
|
|
2455
2455
|
}
|
|
2456
|
-
async function
|
|
2456
|
+
async function V(p) {
|
|
2457
2457
|
if (!await et(p)) {
|
|
2458
2458
|
K.danger(l("connect.copy-failed"));
|
|
2459
2459
|
return;
|
|
2460
2460
|
}
|
|
2461
2461
|
u.value = !0, clearTimeout(v), v = setTimeout(() => u.value = !1, 2e3);
|
|
2462
2462
|
}
|
|
2463
|
-
return (p, g) => (m(),
|
|
2463
|
+
return (p, g) => (m(), _(e(Ke), {
|
|
2464
2464
|
title: e(l)("connect.title"),
|
|
2465
2465
|
card: !1
|
|
2466
2466
|
}, {
|
|
2467
2467
|
default: t(() => [
|
|
2468
2468
|
S("div", Ht, [
|
|
2469
|
-
a(e(
|
|
2469
|
+
a(e(B), { class: "wx-connect__lead" }, {
|
|
2470
2470
|
default: t(() => [
|
|
2471
2471
|
c(i(e(l)("connect.lead")), 1)
|
|
2472
2472
|
]),
|
|
@@ -2489,10 +2489,10 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2489
2489
|
a(e(N), {
|
|
2490
2490
|
type: "primary",
|
|
2491
2491
|
disabled: y.value === "",
|
|
2492
|
-
onClick: g[0] || (g[0] = (
|
|
2492
|
+
onClick: g[0] || (g[0] = (b) => V(y.value))
|
|
2493
2493
|
}, {
|
|
2494
2494
|
icon: t(() => [
|
|
2495
|
-
a(e(
|
|
2495
|
+
a(e(ee), {
|
|
2496
2496
|
name: u.value ? "check" : "copy"
|
|
2497
2497
|
}, null, 8, ["name"])
|
|
2498
2498
|
]),
|
|
@@ -2552,7 +2552,7 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2552
2552
|
label: e(l)("connect.claude-code-title")
|
|
2553
2553
|
}, {
|
|
2554
2554
|
default: t(() => [
|
|
2555
|
-
a(e(
|
|
2555
|
+
a(e(B), { size: "sm" }, {
|
|
2556
2556
|
default: t(() => [
|
|
2557
2557
|
c(i(e(l)("connect.claude-code-hint")), 1)
|
|
2558
2558
|
]),
|
|
@@ -2563,10 +2563,10 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2563
2563
|
a(e(N), {
|
|
2564
2564
|
variant: "text",
|
|
2565
2565
|
size: "sm",
|
|
2566
|
-
onClick: g[1] || (g[1] = (
|
|
2566
|
+
onClick: g[1] || (g[1] = (b) => V(o.value))
|
|
2567
2567
|
}, {
|
|
2568
2568
|
icon: t(() => [
|
|
2569
|
-
a(e(
|
|
2569
|
+
a(e(ee), { name: "copy" })
|
|
2570
2570
|
]),
|
|
2571
2571
|
default: t(() => [
|
|
2572
2572
|
c(" " + i(e(l)("connect.copy-line")), 1)
|
|
@@ -2582,7 +2582,7 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2582
2582
|
label: e(l)("connect.codex-title")
|
|
2583
2583
|
}, {
|
|
2584
2584
|
default: t(() => [
|
|
2585
|
-
a(e(
|
|
2585
|
+
a(e(B), { size: "sm" }, {
|
|
2586
2586
|
default: t(() => [
|
|
2587
2587
|
c(i(e(l)("connect.codex-hint")), 1)
|
|
2588
2588
|
]),
|
|
@@ -2593,10 +2593,10 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2593
2593
|
a(e(N), {
|
|
2594
2594
|
variant: "text",
|
|
2595
2595
|
size: "sm",
|
|
2596
|
-
onClick: g[2] || (g[2] = (
|
|
2596
|
+
onClick: g[2] || (g[2] = (b) => V(h.value))
|
|
2597
2597
|
}, {
|
|
2598
2598
|
icon: t(() => [
|
|
2599
|
-
a(e(
|
|
2599
|
+
a(e(ee), { name: "copy" })
|
|
2600
2600
|
]),
|
|
2601
2601
|
default: t(() => [
|
|
2602
2602
|
c(" " + i(e(l)("connect.copy-line")), 1)
|
|
@@ -2621,7 +2621,7 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2621
2621
|
]),
|
|
2622
2622
|
_: 1
|
|
2623
2623
|
}),
|
|
2624
|
-
a(e(
|
|
2624
|
+
a(e(B), {
|
|
2625
2625
|
size: "sm",
|
|
2626
2626
|
tone: "muted"
|
|
2627
2627
|
}, {
|
|
@@ -2632,13 +2632,13 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2632
2632
|
}),
|
|
2633
2633
|
S("div", aa, [
|
|
2634
2634
|
a(e(N), {
|
|
2635
|
-
href:
|
|
2635
|
+
href: U.value,
|
|
2636
2636
|
variant: "outline",
|
|
2637
2637
|
disabled: y.value === "",
|
|
2638
2638
|
class: "wx-connect__link"
|
|
2639
2639
|
}, {
|
|
2640
2640
|
icon: t(() => [
|
|
2641
|
-
a(e(
|
|
2641
|
+
a(e(ee), { name: "external-link" })
|
|
2642
2642
|
]),
|
|
2643
2643
|
default: t(() => [
|
|
2644
2644
|
c(" " + i(e(l)("connect.install-in", { client: e(l)("connect.cursor-title") })), 1)
|
|
@@ -2652,7 +2652,7 @@ url = "${y.value}"`), F = T(() => {
|
|
|
2652
2652
|
class: "wx-connect__link"
|
|
2653
2653
|
}, {
|
|
2654
2654
|
icon: t(() => [
|
|
2655
|
-
a(e(
|
|
2655
|
+
a(e(ee), { name: "external-link" })
|
|
2656
2656
|
]),
|
|
2657
2657
|
default: t(() => [
|
|
2658
2658
|
c(" " + i(e(l)("connect.install-in", { client: e(l)("connect.vscode-title") })), 1)
|
|
@@ -2744,29 +2744,29 @@ const ia = /* @__PURE__ */ Q({
|
|
|
2744
2744
|
},
|
|
2745
2745
|
setup(s) {
|
|
2746
2746
|
const r = s, { open: l, resolve: u, dismiss: v } = _e();
|
|
2747
|
-
|
|
2748
|
-
const y = G("webx-auth"),
|
|
2747
|
+
te();
|
|
2748
|
+
const y = G("webx-auth"), A = oe("list"), o = W(0);
|
|
2749
2749
|
function h(d) {
|
|
2750
2750
|
u(d);
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function U(d) {
|
|
2753
2753
|
o.value = d.length;
|
|
2754
2754
|
}
|
|
2755
|
-
return (d,
|
|
2755
|
+
return (d, k) => (m(), _(e(be), {
|
|
2756
2756
|
open: e(l),
|
|
2757
|
-
"onUpdate:open":
|
|
2757
|
+
"onUpdate:open": k[2] || (k[2] = (V) => Ve(l) ? l.value = V : null),
|
|
2758
2758
|
title: s.title ?? e(y)(s.multiple ? "admins.select-many" : "admins.select-one"),
|
|
2759
2759
|
width: 880
|
|
2760
2760
|
}, Ae({
|
|
2761
2761
|
default: t(() => [
|
|
2762
2762
|
a(Xe, {
|
|
2763
2763
|
ref_key: "list",
|
|
2764
|
-
ref:
|
|
2764
|
+
ref: A,
|
|
2765
2765
|
picking: "",
|
|
2766
2766
|
multiple: s.multiple,
|
|
2767
2767
|
"resolve-avatar": r.resolveAvatar,
|
|
2768
2768
|
onChosen: h,
|
|
2769
|
-
onSelection:
|
|
2769
|
+
onSelection: U
|
|
2770
2770
|
}, null, 8, ["multiple", "resolve-avatar"])
|
|
2771
2771
|
]),
|
|
2772
2772
|
_: 2
|
|
@@ -2779,7 +2779,7 @@ const ia = /* @__PURE__ */ Q({
|
|
|
2779
2779
|
align: "center"
|
|
2780
2780
|
}, {
|
|
2781
2781
|
default: t(() => [
|
|
2782
|
-
a(e(
|
|
2782
|
+
a(e(B), {
|
|
2783
2783
|
size: "sm",
|
|
2784
2784
|
tone: "muted"
|
|
2785
2785
|
}, {
|
|
@@ -2790,7 +2790,7 @@ const ia = /* @__PURE__ */ Q({
|
|
|
2790
2790
|
}),
|
|
2791
2791
|
a(e(N), {
|
|
2792
2792
|
variant: "outline",
|
|
2793
|
-
onClick:
|
|
2793
|
+
onClick: k[0] || (k[0] = (V) => e(v)())
|
|
2794
2794
|
}, {
|
|
2795
2795
|
default: t(() => [
|
|
2796
2796
|
c(i(e(y)("admins.cancel")), 1)
|
|
@@ -2800,7 +2800,7 @@ const ia = /* @__PURE__ */ Q({
|
|
|
2800
2800
|
a(e(N), {
|
|
2801
2801
|
type: "primary",
|
|
2802
2802
|
disabled: o.value === 0,
|
|
2803
|
-
onClick:
|
|
2803
|
+
onClick: k[1] || (k[1] = (V) => e(u)(A.value?.chosen() ?? []))
|
|
2804
2804
|
}, {
|
|
2805
2805
|
default: t(() => [
|
|
2806
2806
|
c(i(e(y)("admins.save")), 1)
|
|
@@ -2831,43 +2831,43 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2831
2831
|
avatarField: { default: void 0 }
|
|
2832
2832
|
},
|
|
2833
2833
|
setup(s) {
|
|
2834
|
-
const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(),
|
|
2835
|
-
|
|
2836
|
-
const o = G("webx-auth"), h = re(),
|
|
2834
|
+
const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), A = We();
|
|
2835
|
+
te();
|
|
2836
|
+
const o = G("webx-auth"), h = re(), U = W(!1), d = W({}), k = W({
|
|
2837
2837
|
name: y.state.user?.name ?? "",
|
|
2838
2838
|
avatar: y.state.user?.avatar ?? null,
|
|
2839
2839
|
password: "",
|
|
2840
2840
|
current_password: ""
|
|
2841
|
-
}),
|
|
2842
|
-
function p(
|
|
2843
|
-
return d.value[
|
|
2841
|
+
}), V = W(k.value.avatar ? { path: k.value.avatar } : null);
|
|
2842
|
+
function p(b) {
|
|
2843
|
+
return d.value[b]?.[0];
|
|
2844
2844
|
}
|
|
2845
2845
|
async function g() {
|
|
2846
|
-
|
|
2846
|
+
U.value = !0, d.value = {};
|
|
2847
2847
|
try {
|
|
2848
|
-
await
|
|
2849
|
-
name:
|
|
2850
|
-
avatar:
|
|
2848
|
+
await A.updateProfile({
|
|
2849
|
+
name: k.value.name,
|
|
2850
|
+
avatar: V.value?.path ?? null,
|
|
2851
2851
|
// Blank is left out entirely rather than sent as an empty string: the server reads a
|
|
2852
2852
|
// filled password as "change it", and an empty one would be a change to nothing.
|
|
2853
|
-
...
|
|
2853
|
+
...k.value.password ? { password: k.value.password, current_password: k.value.current_password } : {}
|
|
2854
2854
|
}), K.success(o("profile.saved")), l(!0);
|
|
2855
|
-
} catch (
|
|
2856
|
-
const
|
|
2857
|
-
|
|
2855
|
+
} catch (b) {
|
|
2856
|
+
const w = b.body;
|
|
2857
|
+
w?.errors ? d.value = w.errors : K.danger(h(b));
|
|
2858
2858
|
} finally {
|
|
2859
|
-
|
|
2859
|
+
U.value = !1;
|
|
2860
2860
|
}
|
|
2861
2861
|
}
|
|
2862
|
-
return (
|
|
2862
|
+
return (b, w) => (m(), _(e(be), {
|
|
2863
2863
|
open: e(v),
|
|
2864
|
-
"onUpdate:open":
|
|
2864
|
+
"onUpdate:open": w[5] || (w[5] = (F) => Ve(v) ? v.value = F : null),
|
|
2865
2865
|
title: e(o)("profile.title"),
|
|
2866
2866
|
width: 560
|
|
2867
2867
|
}, {
|
|
2868
2868
|
footer: t(() => [
|
|
2869
2869
|
a(e(N), {
|
|
2870
|
-
onClick:
|
|
2870
|
+
onClick: w[4] || (w[4] = (F) => e(u)())
|
|
2871
2871
|
}, {
|
|
2872
2872
|
default: t(() => [
|
|
2873
2873
|
c(i(e(o)("profile.cancel")), 1)
|
|
@@ -2876,7 +2876,7 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2876
2876
|
}),
|
|
2877
2877
|
a(e(N), {
|
|
2878
2878
|
type: "primary",
|
|
2879
|
-
loading:
|
|
2879
|
+
loading: U.value,
|
|
2880
2880
|
onClick: g
|
|
2881
2881
|
}, {
|
|
2882
2882
|
default: t(() => [
|
|
@@ -2889,14 +2889,14 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2889
2889
|
S("div", ua, [
|
|
2890
2890
|
S("div", ra, [
|
|
2891
2891
|
r.avatarField ? (m(), H("div", ca, [
|
|
2892
|
-
(m(),
|
|
2893
|
-
modelValue:
|
|
2894
|
-
"onUpdate:modelValue":
|
|
2892
|
+
(m(), _(Ee(r.avatarField), {
|
|
2893
|
+
modelValue: V.value,
|
|
2894
|
+
"onUpdate:modelValue": w[0] || (w[0] = (F) => V.value = F),
|
|
2895
2895
|
label: e(o)("profile.avatar"),
|
|
2896
2896
|
aspect: "1/1",
|
|
2897
2897
|
captions: !1
|
|
2898
2898
|
}, null, 8, ["modelValue", "label"]))
|
|
2899
|
-
])) :
|
|
2899
|
+
])) : E("", !0),
|
|
2900
2900
|
S("div", da, [
|
|
2901
2901
|
a(e(M), {
|
|
2902
2902
|
label: e(o)("profile.name"),
|
|
@@ -2904,8 +2904,8 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2904
2904
|
}, {
|
|
2905
2905
|
default: t(() => [
|
|
2906
2906
|
a(e(le), {
|
|
2907
|
-
modelValue:
|
|
2908
|
-
"onUpdate:modelValue":
|
|
2907
|
+
modelValue: k.value.name,
|
|
2908
|
+
"onUpdate:modelValue": w[1] || (w[1] = (F) => k.value.name = F),
|
|
2909
2909
|
name: "name"
|
|
2910
2910
|
}, null, 8, ["modelValue"])
|
|
2911
2911
|
]),
|
|
@@ -2929,15 +2929,15 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2929
2929
|
}, {
|
|
2930
2930
|
default: t(() => [
|
|
2931
2931
|
a(e(le), {
|
|
2932
|
-
modelValue:
|
|
2933
|
-
"onUpdate:modelValue":
|
|
2932
|
+
modelValue: k.value.password,
|
|
2933
|
+
"onUpdate:modelValue": w[2] || (w[2] = (F) => k.value.password = F),
|
|
2934
2934
|
type: "password",
|
|
2935
2935
|
autocomplete: "new-password"
|
|
2936
2936
|
}, null, 8, ["modelValue"])
|
|
2937
2937
|
]),
|
|
2938
2938
|
_: 1
|
|
2939
2939
|
}, 8, ["label", "help", "error"]),
|
|
2940
|
-
|
|
2940
|
+
k.value.password ? (m(), _(e(M), {
|
|
2941
2941
|
key: 0,
|
|
2942
2942
|
label: e(o)("profile.current-password"),
|
|
2943
2943
|
help: e(o)("profile.current-password-hint"),
|
|
@@ -2945,14 +2945,14 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2945
2945
|
}, {
|
|
2946
2946
|
default: t(() => [
|
|
2947
2947
|
a(e(le), {
|
|
2948
|
-
modelValue:
|
|
2949
|
-
"onUpdate:modelValue":
|
|
2948
|
+
modelValue: k.value.current_password,
|
|
2949
|
+
"onUpdate:modelValue": w[3] || (w[3] = (F) => k.value.current_password = F),
|
|
2950
2950
|
type: "password",
|
|
2951
2951
|
autocomplete: "current-password"
|
|
2952
2952
|
}, null, 8, ["modelValue"])
|
|
2953
2953
|
]),
|
|
2954
2954
|
_: 1
|
|
2955
|
-
}, 8, ["label", "help", "error"])) :
|
|
2955
|
+
}, 8, ["label", "help", "error"])) : E("", !0)
|
|
2956
2956
|
])
|
|
2957
2957
|
])
|
|
2958
2958
|
])
|
|
@@ -2969,57 +2969,57 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
2969
2969
|
expanded: { type: Boolean, default: !1 }
|
|
2970
2970
|
},
|
|
2971
2971
|
setup(s) {
|
|
2972
|
-
const r = s, l = X(), u = We(), v = Ne(), y = ut(),
|
|
2972
|
+
const r = s, l = X(), u = We(), v = Ne(), y = ut(), A = G("webx-auth"), o = v.scope("webx-admin"), h = L(() => l.state.user), U = l.siteUrl, d = L(
|
|
2973
2973
|
() => v.state.panelLocales.length > 1 ? v.state.panelLocales : []
|
|
2974
|
-
),
|
|
2974
|
+
), k = xe(je, null), V = xe(Ge, null), p = W(void 0);
|
|
2975
2975
|
de(
|
|
2976
2976
|
() => typeof h.value?.avatar == "string" ? h.value.avatar : null,
|
|
2977
|
-
async (
|
|
2978
|
-
const
|
|
2979
|
-
if (
|
|
2980
|
-
|
|
2977
|
+
async (n) => {
|
|
2978
|
+
const x = r.resolveAvatar ?? k;
|
|
2979
|
+
if (n === null || n === "" || x === null) {
|
|
2980
|
+
p.value = void 0;
|
|
2981
2981
|
return;
|
|
2982
2982
|
}
|
|
2983
|
-
const
|
|
2984
|
-
h.value?.avatar ===
|
|
2983
|
+
const P = await x(n);
|
|
2984
|
+
h.value?.avatar === n && (p.value = P ?? void 0);
|
|
2985
2985
|
},
|
|
2986
2986
|
{ immediate: !0 }
|
|
2987
2987
|
);
|
|
2988
|
-
const
|
|
2989
|
-
function
|
|
2988
|
+
const g = he(va);
|
|
2989
|
+
function b() {
|
|
2990
2990
|
setTimeout(
|
|
2991
2991
|
() => {
|
|
2992
|
-
|
|
2992
|
+
g({ avatarField: r.avatarField ?? V ?? void 0 });
|
|
2993
2993
|
},
|
|
2994
2994
|
0
|
|
2995
2995
|
);
|
|
2996
2996
|
}
|
|
2997
|
-
const
|
|
2997
|
+
const w = L({
|
|
2998
2998
|
get: () => y.state.preference,
|
|
2999
|
-
set: (
|
|
3000
|
-
y.set(
|
|
2999
|
+
set: (n) => {
|
|
3000
|
+
y.set(n), u.setTheme(n);
|
|
3001
3001
|
}
|
|
3002
|
-
}),
|
|
3002
|
+
}), F = L(
|
|
3003
3003
|
() => typeof h.value?.siteBar == "boolean" ? h.value.siteBar : null
|
|
3004
3004
|
);
|
|
3005
|
-
function
|
|
3006
|
-
|
|
3005
|
+
function C() {
|
|
3006
|
+
F.value !== null && u.setSiteBar(!F.value);
|
|
3007
3007
|
}
|
|
3008
|
-
async function
|
|
3009
|
-
|
|
3008
|
+
async function D(n) {
|
|
3009
|
+
n !== v.state.locale && await u.setLocale(n);
|
|
3010
3010
|
}
|
|
3011
|
-
return (
|
|
3012
|
-
const
|
|
3013
|
-
return h.value !== null ? (m(),
|
|
3011
|
+
return (n, x) => {
|
|
3012
|
+
const P = Y("wx-avatar"), J = Y("wx-icon"), O = Y("wx-text"), z = Y("wx-dropdown-item"), f = Y("wx-divider"), R = Y("wx-dropdown");
|
|
3013
|
+
return h.value !== null ? (m(), _(R, { key: 0 }, {
|
|
3014
3014
|
trigger: t(() => [
|
|
3015
3015
|
S("button", {
|
|
3016
3016
|
type: "button",
|
|
3017
3017
|
class: Be(["wx-user-menu__trigger", { "wx-user-menu__trigger--named": s.expanded }]),
|
|
3018
3018
|
title: h.value.name
|
|
3019
3019
|
}, [
|
|
3020
|
-
a(
|
|
3020
|
+
a(P, {
|
|
3021
3021
|
name: h.value.name,
|
|
3022
|
-
src:
|
|
3022
|
+
src: p.value,
|
|
3023
3023
|
size: "lg"
|
|
3024
3024
|
}, null, 8, ["name", "src"]),
|
|
3025
3025
|
s.expanded ? (m(), H(ue, { key: 0 }, [
|
|
@@ -3027,18 +3027,18 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
3027
3027
|
S("span", ya, i(h.value.name), 1),
|
|
3028
3028
|
S("span", ha, i(h.value.email), 1)
|
|
3029
3029
|
]),
|
|
3030
|
-
a(
|
|
3030
|
+
a(J, {
|
|
3031
3031
|
name: "chevron-up",
|
|
3032
3032
|
size: "sm",
|
|
3033
3033
|
class: "wx-user-menu__chevron"
|
|
3034
3034
|
})
|
|
3035
|
-
], 64)) :
|
|
3035
|
+
], 64)) : E("", !0)
|
|
3036
3036
|
], 10, pa)
|
|
3037
3037
|
]),
|
|
3038
3038
|
default: t(() => [
|
|
3039
|
-
a(
|
|
3039
|
+
a(z, { disabled: "" }, {
|
|
3040
3040
|
default: t(() => [
|
|
3041
|
-
a(
|
|
3041
|
+
a(O, { size: "sm" }, {
|
|
3042
3042
|
default: t(() => [
|
|
3043
3043
|
c(i(h.value.email), 1)
|
|
3044
3044
|
]),
|
|
@@ -3047,20 +3047,32 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
3047
3047
|
]),
|
|
3048
3048
|
_: 1
|
|
3049
3049
|
}),
|
|
3050
|
-
a(
|
|
3051
|
-
a(
|
|
3050
|
+
a(f, { spacing: "sm" }),
|
|
3051
|
+
a(z, {
|
|
3052
3052
|
icon: "user",
|
|
3053
|
-
onClick:
|
|
3053
|
+
onClick: b
|
|
3054
3054
|
}, {
|
|
3055
3055
|
default: t(() => [
|
|
3056
|
-
c(i(e(
|
|
3056
|
+
c(i(e(A)("profile.menu")), 1)
|
|
3057
3057
|
]),
|
|
3058
3058
|
_: 1
|
|
3059
3059
|
}),
|
|
3060
|
-
|
|
3061
|
-
|
|
3060
|
+
e(U) ? (m(), _(z, {
|
|
3061
|
+
key: 0,
|
|
3062
|
+
icon: "external-link",
|
|
3063
|
+
href: e(U),
|
|
3064
|
+
target: "_blank",
|
|
3065
|
+
rel: "noopener"
|
|
3066
|
+
}, {
|
|
3067
|
+
default: t(() => [
|
|
3068
|
+
c(i(e(o)("nav.open-site")), 1)
|
|
3069
|
+
]),
|
|
3070
|
+
_: 1
|
|
3071
|
+
}, 8, ["href"])) : E("", !0),
|
|
3072
|
+
a(f, { spacing: "sm" }),
|
|
3073
|
+
a(z, { disabled: "" }, {
|
|
3062
3074
|
default: t(() => [
|
|
3063
|
-
a(
|
|
3075
|
+
a(O, {
|
|
3064
3076
|
size: "sm",
|
|
3065
3077
|
tone: "muted"
|
|
3066
3078
|
}, {
|
|
@@ -3074,12 +3086,12 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
3074
3086
|
}),
|
|
3075
3087
|
S("div", {
|
|
3076
3088
|
class: "wx-user-menu__theme",
|
|
3077
|
-
onClick:
|
|
3089
|
+
onClick: x[1] || (x[1] = Oe(() => {
|
|
3078
3090
|
}, ["stop"]))
|
|
3079
3091
|
}, [
|
|
3080
3092
|
a(e(ft), {
|
|
3081
|
-
modelValue:
|
|
3082
|
-
"onUpdate:modelValue":
|
|
3093
|
+
modelValue: w.value,
|
|
3094
|
+
"onUpdate:modelValue": x[0] || (x[0] = ($) => w.value = $),
|
|
3083
3095
|
size: "sm",
|
|
3084
3096
|
block: "",
|
|
3085
3097
|
"aria-label": e(o)("theme.label"),
|
|
@@ -3088,61 +3100,61 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
|
|
|
3088
3100
|
"system-label": e(o)("theme.system")
|
|
3089
3101
|
}, null, 8, ["modelValue", "aria-label", "light-label", "dark-label", "system-label"])
|
|
3090
3102
|
]),
|
|
3091
|
-
|
|
3092
|
-
a(
|
|
3093
|
-
a(
|
|
3094
|
-
icon:
|
|
3095
|
-
onClick:
|
|
3103
|
+
F.value !== null ? (m(), H(ue, { key: 1 }, [
|
|
3104
|
+
a(f, { spacing: "sm" }),
|
|
3105
|
+
a(z, {
|
|
3106
|
+
icon: F.value ? "check" : void 0,
|
|
3107
|
+
onClick: C
|
|
3096
3108
|
}, {
|
|
3097
3109
|
default: t(() => [
|
|
3098
|
-
c(i(e(
|
|
3110
|
+
c(i(e(A)("menu.site-bar")), 1)
|
|
3099
3111
|
]),
|
|
3100
3112
|
_: 1
|
|
3101
3113
|
}, 8, ["icon"])
|
|
3102
|
-
], 64)) :
|
|
3103
|
-
|
|
3104
|
-
a(
|
|
3105
|
-
a(
|
|
3114
|
+
], 64)) : E("", !0),
|
|
3115
|
+
d.value.length > 0 ? (m(), H(ue, { key: 2 }, [
|
|
3116
|
+
a(f, { spacing: "sm" }),
|
|
3117
|
+
a(z, { disabled: "" }, {
|
|
3106
3118
|
default: t(() => [
|
|
3107
|
-
a(
|
|
3119
|
+
a(O, {
|
|
3108
3120
|
size: "sm",
|
|
3109
3121
|
tone: "muted"
|
|
3110
3122
|
}, {
|
|
3111
3123
|
default: t(() => [
|
|
3112
|
-
c(i(e(
|
|
3124
|
+
c(i(e(A)("menu.language")), 1)
|
|
3113
3125
|
]),
|
|
3114
3126
|
_: 1
|
|
3115
3127
|
})
|
|
3116
3128
|
]),
|
|
3117
3129
|
_: 1
|
|
3118
3130
|
}),
|
|
3119
|
-
(m(!0), H(ue, null, Ce(
|
|
3120
|
-
key:
|
|
3121
|
-
icon:
|
|
3122
|
-
onClick: (
|
|
3131
|
+
(m(!0), H(ue, null, Ce(d.value, ($) => (m(), _(z, {
|
|
3132
|
+
key: $.code,
|
|
3133
|
+
icon: $.code === e(v).state.locale ? "check" : void 0,
|
|
3134
|
+
onClick: (Z) => D($.code)
|
|
3123
3135
|
}, {
|
|
3124
3136
|
default: t(() => [
|
|
3125
|
-
c(i(
|
|
3137
|
+
c(i($.nativeName), 1)
|
|
3126
3138
|
]),
|
|
3127
3139
|
_: 2
|
|
3128
3140
|
}, 1032, ["icon", "onClick"]))), 128)),
|
|
3129
|
-
a(
|
|
3130
|
-
], 64)) :
|
|
3131
|
-
a(
|
|
3141
|
+
a(f, { spacing: "sm" })
|
|
3142
|
+
], 64)) : E("", !0),
|
|
3143
|
+
a(z, {
|
|
3132
3144
|
icon: "logout",
|
|
3133
|
-
onClick:
|
|
3145
|
+
onClick: x[2] || (x[2] = ($) => e(u).logout())
|
|
3134
3146
|
}, {
|
|
3135
3147
|
default: t(() => [
|
|
3136
|
-
c(i(s.signOutLabel ?? e(
|
|
3148
|
+
c(i(s.signOutLabel ?? e(A)("menu.sign-out")), 1)
|
|
3137
3149
|
]),
|
|
3138
3150
|
_: 1
|
|
3139
3151
|
})
|
|
3140
3152
|
]),
|
|
3141
3153
|
_: 1
|
|
3142
|
-
})) :
|
|
3154
|
+
})) : E("", !0);
|
|
3143
3155
|
};
|
|
3144
3156
|
}
|
|
3145
|
-
}), za = /* @__PURE__ */ ve(_a, [["__scopeId", "data-v-
|
|
3157
|
+
}), za = /* @__PURE__ */ ve(_a, [["__scopeId", "data-v-31b12be6"]]);
|
|
3146
3158
|
function Wa(s = {}) {
|
|
3147
3159
|
const r = s.path ?? "/login";
|
|
3148
3160
|
return {
|
|
@@ -3167,12 +3179,12 @@ function Wa(s = {}) {
|
|
|
3167
3179
|
return;
|
|
3168
3180
|
}
|
|
3169
3181
|
if (v === "ready" && y.path === r) {
|
|
3170
|
-
const
|
|
3171
|
-
if (typeof
|
|
3172
|
-
location.assign(
|
|
3182
|
+
const A = y.query.next;
|
|
3183
|
+
if (typeof A == "string" && ba(A)) {
|
|
3184
|
+
location.assign(A);
|
|
3173
3185
|
return;
|
|
3174
3186
|
}
|
|
3175
|
-
l.router.replace(typeof
|
|
3187
|
+
l.router.replace(typeof A == "string" ? A : "/");
|
|
3176
3188
|
}
|
|
3177
3189
|
}
|
|
3178
3190
|
);
|