smart-admin-web 10.20.1 → 10.22.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/api/index.d.ts +19 -1
- package/dist/api/index.js +85 -66
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +448 -1
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/components/FormContainer/index.vue.js +87 -75
- package/dist/components/FormContainer/index.vue.js.map +1 -1
- package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
- package/dist/components/UserPicker/index.vue.js +1 -1
- package/dist/components/UserPicker/index2.vue.js +328 -186
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/composables/authMenuRoute.d.ts +10 -0
- package/dist/composables/authMenuRoute.js +39 -23
- package/dist/composables/authMenuRoute.js.map +1 -1
- package/dist/composables/useModule.d.ts +3 -1
- package/dist/composables/useModule.js +44 -32
- package/dist/composables/useModule.js.map +1 -1
- package/dist/index.js +246 -242
- package/dist/layouts/components/SideNav.vue.js +2 -2
- package/dist/layouts/components/SideNav2.vue.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/watermark.d.ts +1 -1
- package/dist/locales/en-US.d.ts +68 -3
- package/dist/locales/en-US.js +74 -8
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/kernelMenuTitles.js +1 -0
- package/dist/locales/kernelMenuTitles.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +68 -3
- package/dist/locales/zh-CN.js +74 -8
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/viewRegistry.js +6 -6
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/naive-theme.js +80 -77
- package/dist/theme/naive-theme.js.map +1 -1
- package/dist/types/api.d.ts +91 -0
- package/dist/types/api.js +17 -15
- package/dist/types/api.js.map +1 -1
- package/dist/utils/shake.d.ts +1 -0
- package/dist/utils/shake.js +30 -0
- package/dist/utils/shake.js.map +1 -0
- package/dist/utils/tree.d.ts +15 -0
- package/dist/utils/tree.js +43 -29
- package/dist/utils/tree.js.map +1 -1
- package/dist/utils/treeCard.d.ts +6 -0
- package/dist/utils/treeCard.js +9 -0
- package/dist/utils/treeCard.js.map +1 -0
- package/dist/views/error/404.vue.js +2 -2
- package/dist/views/error/4042.vue.js +81 -24
- package/dist/views/error/4042.vue.js.map +1 -1
- package/dist/views/login/LoginForm.vue.js +2 -2
- package/dist/views/login/LoginForm2.vue.js +135 -135
- package/dist/views/login/LoginForm2.vue.js.map +1 -1
- package/dist/views/login/components/LoginDesk.vue.js +2 -2
- package/dist/views/login/components/LoginDesk2.vue.js +59 -47
- package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
- package/dist/views/login/components/LoginHeroPanel.vue.js +2 -2
- package/dist/views/login/components/LoginHeroPanel2.vue.js.map +1 -1
- package/dist/views/personal/notice2.vue.js +1 -1
- package/dist/views/personal/notice2.vue.js.map +1 -1
- package/dist/views/personal/sessions.vue.js +2 -2
- package/dist/views/personal/sessions2.vue.js +41 -40
- package/dist/views/personal/sessions2.vue.js.map +1 -1
- package/dist/views/system/ai-usage/index.vue.js +3 -3
- package/dist/views/system/ai-usage/index2.vue.js +13 -12
- package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
- package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
- package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
- package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
- package/dist/views/system/dict/index.vue.js +2 -2
- package/dist/views/system/dict/index2.vue.js +12 -1
- package/dist/views/system/dict/index2.vue.js.map +1 -1
- package/dist/views/system/file/index2.vue.js +1 -0
- package/dist/views/system/file/index2.vue.js.map +1 -1
- package/dist/views/system/job/index.vue.js +3 -3
- package/dist/views/system/job/index2.vue.js +182 -181
- package/dist/views/system/job/index2.vue.js.map +1 -1
- package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
- package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
- package/dist/views/system/job-log/index.vue.js +1 -1
- package/dist/views/system/job-log/index2.vue.js +5 -5
- package/dist/views/system/job-log/index2.vue.js.map +1 -1
- package/dist/views/system/job-monitor/index.vue.js +2 -2
- package/dist/views/system/job-monitor/index2.vue.js +46 -46
- package/dist/views/system/job-monitor/index2.vue.js.map +1 -1
- package/dist/views/system/log/exception/index.vue.js +2 -2
- package/dist/views/system/log/exception/index2.vue.js +8 -5
- package/dist/views/system/log/exception/index2.vue.js.map +1 -1
- package/dist/views/system/log/login/index2.vue.js +21 -12
- package/dist/views/system/log/login/index2.vue.js.map +1 -1
- package/dist/views/system/log/op/index.vue.js +2 -2
- package/dist/views/system/log/op/index2.vue.js +50 -40
- package/dist/views/system/log/op/index2.vue.js.map +1 -1
- package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
- package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
- package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
- package/dist/views/system/menu/index.vue.js +1 -1
- package/dist/views/system/menu/index2.vue.js +162 -151
- package/dist/views/system/menu/index2.vue.js.map +1 -1
- package/dist/views/system/module/index.vue.js +1 -1
- package/dist/views/system/module/index2.vue.js +171 -117
- package/dist/views/system/module/index2.vue.js.map +1 -1
- package/dist/views/system/notice/index.vue.js +3 -3
- package/dist/views/system/notice/index2.vue.js +1 -0
- package/dist/views/system/notice/index2.vue.js.map +1 -1
- package/dist/views/system/org/index.vue.js +2 -2
- package/dist/views/system/org/index2.vue.js +204 -195
- package/dist/views/system/org/index2.vue.js.map +1 -1
- package/dist/views/system/position/index.vue.js +2 -2
- package/dist/views/system/position/index2.vue.js +57 -48
- package/dist/views/system/position/index2.vue.js.map +1 -1
- package/dist/views/system/recycle/index.vue.js +1 -1
- package/dist/views/system/recycle/index2.vue.js +3 -1
- package/dist/views/system/recycle/index2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
- package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
- package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
- package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
- package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
- package/dist/views/system/role/components/grantMenuGroups.js +116 -76
- package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
- package/dist/views/system/role/index.vue.js +2 -2
- package/dist/views/system/role/index2.vue.js +152 -145
- package/dist/views/system/role/index2.vue.js.map +1 -1
- package/dist/views/system/session/index2.vue.js +39 -35
- package/dist/views/system/session/index2.vue.js.map +1 -1
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
- package/dist/views/system/user/components/userGrantState.d.ts +64 -0
- package/dist/views/system/user/components/userGrantState.js +117 -0
- package/dist/views/system/user/components/userGrantState.js.map +1 -0
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +369 -295
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as Oe, computed as _, ref as h, reactive as Y, onBeforeUnmount as Ke, onMounted as Ve, h as le, openBlock as s, createElementBlock as u, createVNode as n, createElementVNode as p, toDisplayString as r, unref as e, createCommentVNode as w, createBlock as A, withCtx as l, createTextVNode as v, Transition as Ge, Fragment as M, withKeys as $, normalizeClass as je, renderList as We, withModifiers as Ye } from "vue";
|
|
2
|
+
import { useRouter as $e, useRoute as Je } from "vue-router";
|
|
3
|
+
import { useMessage as Qe, NAlert as Xe, NForm as ie, NFormItem as q, NInput as B, NButton as S, NCheckbox as Ze, NDropdown as et, NModal as ye } from "naive-ui";
|
|
4
4
|
import { Icon as I } from "@iconify/vue";
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { externalAuthApi as
|
|
7
|
-
import { useUserStore as
|
|
8
|
-
import { useAuthStore as
|
|
9
|
-
import { useSite as
|
|
10
|
-
import { resetRouter as
|
|
5
|
+
import { useI18n as tt } from "vue-i18n";
|
|
6
|
+
import { externalAuthApi as se, authApi as U, ApiError as re } from "../../api/index.js";
|
|
7
|
+
import { useUserStore as ot } from "../../stores/user.js";
|
|
8
|
+
import { useAuthStore as at } from "../../stores/auth.js";
|
|
9
|
+
import { useSite as nt } from "../../composables/useSite.js";
|
|
10
|
+
import { resetRouter as lt } from "../../router/index.js";
|
|
11
11
|
import { translateError as z } from "../../utils/error.js";
|
|
12
|
+
import { shake as it } from "../../utils/shake.js";
|
|
12
13
|
import { splitLoginProviders as st, claimWeComAutoLogin as rt } from "../../utils/oauthBrand.js";
|
|
13
14
|
import ct from "../../components/SmartLogo.vue.js";
|
|
14
|
-
import { runtime as
|
|
15
|
-
import
|
|
15
|
+
import { runtime as we } from "../../lib/runtime.js";
|
|
16
|
+
import ke from "../../components/oauth/BrandIcon.vue.js";
|
|
16
17
|
const ut = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "lf-brand"
|
|
@@ -34,7 +35,7 @@ const ut = {
|
|
|
34
35
|
}, Tt = ["href"], At = {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "lf-ver"
|
|
37
|
-
},
|
|
38
|
+
}, Mt = "(prefers-reduced-motion: reduce)", $t = /* @__PURE__ */ Oe({
|
|
38
39
|
__name: "LoginForm",
|
|
39
40
|
props: {
|
|
40
41
|
showLogo: { type: Boolean, default: !0 },
|
|
@@ -43,70 +44,70 @@ const ut = {
|
|
|
43
44
|
showFooter: { type: Boolean, default: !0 }
|
|
44
45
|
},
|
|
45
46
|
emits: ["leave"],
|
|
46
|
-
setup(x, { emit:
|
|
47
|
-
const
|
|
47
|
+
setup(x, { emit: be }) {
|
|
48
|
+
const ce = be, F = $e(), L = Je(), c = Qe(), { t: o } = tt(), ue = ot(), Ce = at(), { site: C, appVersion: de, loadSite: _e } = nt(), Se = (/* @__PURE__ */ new Date()).getFullYear(), J = _(
|
|
48
49
|
() => typeof L.query.pendingLink == "string" ? L.query.pendingLink : ""
|
|
49
|
-
),
|
|
50
|
+
), xe = _(
|
|
50
51
|
() => typeof L.query.provider == "string" ? L.query.provider : ""
|
|
51
|
-
),
|
|
52
|
+
), pe = _(
|
|
52
53
|
() => typeof L.query.displayName == "string" ? L.query.displayName : ""
|
|
53
54
|
), R = h(!1), D = h(!1), H = h(""), f = Y(
|
|
54
|
-
|
|
55
|
-
account:
|
|
55
|
+
we.dev && !J.value ? { account: "superAdmin", password: "Aa123456", remember: !0 } : {
|
|
56
|
+
account: we.dev ? "superAdmin" : "",
|
|
56
57
|
password: "",
|
|
57
58
|
remember: !0
|
|
58
59
|
}
|
|
59
|
-
), g = h(!1), d = h("account"), k = Y({ phone: "", code: "" }), m = Y({ challengeId: "", phoneMask: "", code: "" }), b = Y({ challengeId: "", code: "" }), E = h(!1),
|
|
60
|
+
), g = h(!1), d = h("account"), k = Y({ phone: "", code: "" }), m = Y({ challengeId: "", phoneMask: "", code: "" }), b = Y({ challengeId: "", code: "" }), E = h(!1), Q = h(""), y = h(0);
|
|
60
61
|
let O;
|
|
61
|
-
function
|
|
62
|
+
function X(t) {
|
|
62
63
|
y.value = t, window.clearInterval(O), O = window.setInterval(() => {
|
|
63
64
|
y.value -= 1, y.value <= 0 && window.clearInterval(O);
|
|
64
65
|
}, 1e3);
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
-
const P = h(!1),
|
|
68
|
-
() =>
|
|
67
|
+
Ke(() => window.clearInterval(O));
|
|
68
|
+
const P = h(!1), Z = h(""), ee = h(""), N = h(""), he = h("char"), Ie = _(
|
|
69
|
+
() => he.value === "math" ? o("login.captchaMathPlaceholder") : o("login.captchaPlaceholder")
|
|
69
70
|
);
|
|
70
|
-
async function
|
|
71
|
+
async function te() {
|
|
71
72
|
try {
|
|
72
73
|
const t = await U.captcha();
|
|
73
|
-
|
|
74
|
+
Z.value = t.captchaId, ee.value = t.svg, he.value = t.type || "char";
|
|
74
75
|
} catch {
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
async function
|
|
78
|
-
P.value && (N.value = "", await
|
|
78
|
+
async function fe() {
|
|
79
|
+
P.value && (N.value = "", await te());
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
-
await
|
|
81
|
+
Ve(async () => {
|
|
82
|
+
await _e(), C.captchaEnabled && (P.value = !0, await te()), Pe();
|
|
82
83
|
const t = F.currentRoute.value.query, a = typeof t.totpChallenge == "string" ? t.totpChallenge : "";
|
|
83
84
|
a && (b.challengeId = a, b.code = "", d.value = "totp");
|
|
84
85
|
});
|
|
85
86
|
const K = h([]), V = _(() => {
|
|
86
|
-
const t =
|
|
87
|
+
const t = xe.value;
|
|
87
88
|
if (!t) return o("oauth.thirdParty");
|
|
88
89
|
const a = K.value.find((W) => W.code === t);
|
|
89
90
|
return (a == null ? void 0 : a.displayName) || t;
|
|
90
|
-
}),
|
|
91
|
+
}), ge = _(
|
|
91
92
|
() => K.value
|
|
92
|
-
),
|
|
93
|
-
() => st(
|
|
94
|
-
),
|
|
95
|
-
() =>
|
|
93
|
+
), oe = _(
|
|
94
|
+
() => st(ge.value)
|
|
95
|
+
), Le = _(
|
|
96
|
+
() => oe.value.overflow.map((t) => ({
|
|
96
97
|
key: t.code,
|
|
97
|
-
label: () =>
|
|
98
|
+
label: () => le(
|
|
98
99
|
"span",
|
|
99
100
|
{
|
|
100
101
|
class: "lf-sso-menu-item",
|
|
101
102
|
style: { display: "inline-flex", alignItems: "center", gap: "8px" }
|
|
102
103
|
},
|
|
103
|
-
[
|
|
104
|
+
[le(ke, { code: t.code, icon: t.icon, size: 20 }), le("span", null, t.displayName)]
|
|
104
105
|
)
|
|
105
106
|
}))
|
|
106
107
|
);
|
|
107
|
-
async function
|
|
108
|
+
async function Pe() {
|
|
108
109
|
try {
|
|
109
|
-
K.value = await
|
|
110
|
+
K.value = await se.providers();
|
|
110
111
|
} catch {
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
@@ -115,59 +116,57 @@ const ut = {
|
|
|
115
116
|
userAgent: navigator.userAgent,
|
|
116
117
|
providers: K.value,
|
|
117
118
|
storage: sessionStorage
|
|
118
|
-
}) && (window.location.href =
|
|
119
|
+
}) && (window.location.href = ae("wecom"));
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
121
|
+
function ae(t) {
|
|
122
|
+
return se.authorizeUrl(t);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
window.location.href =
|
|
124
|
+
function Ne(t) {
|
|
125
|
+
window.location.href = ae(String(t));
|
|
125
126
|
}
|
|
126
|
-
async function
|
|
127
|
+
async function ne() {
|
|
127
128
|
await F.replace("/");
|
|
128
129
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
G.value = !0;
|
|
133
|
-
});
|
|
130
|
+
const ve = h();
|
|
131
|
+
function G() {
|
|
132
|
+
it(ve.value);
|
|
134
133
|
}
|
|
135
|
-
async function
|
|
134
|
+
async function Te() {
|
|
136
135
|
var t;
|
|
137
|
-
|
|
136
|
+
ce("leave", !0), (t = window.matchMedia) != null && t.call(window, Mt).matches || await new Promise((a) => setTimeout(a, 320)), await ne(), ce("leave", !1);
|
|
138
137
|
}
|
|
139
138
|
async function j(t) {
|
|
140
|
-
|
|
141
|
-
const a =
|
|
139
|
+
lt(), Ce.reset(), ue.setSession(t);
|
|
140
|
+
const a = J.value;
|
|
142
141
|
if (a) {
|
|
143
142
|
H.value = a, R.value = !0;
|
|
144
143
|
return;
|
|
145
144
|
}
|
|
146
|
-
c.success(o("login.success")), await
|
|
145
|
+
c.success(o("login.success")), await Te();
|
|
147
146
|
}
|
|
148
|
-
const
|
|
149
|
-
() =>
|
|
147
|
+
const Ae = _(
|
|
148
|
+
() => pe.value ? o("oauth.pendingLinkIdentity", { display: pe.value }) : ""
|
|
150
149
|
);
|
|
151
|
-
async function
|
|
150
|
+
async function Me() {
|
|
152
151
|
if (!D.value) {
|
|
153
152
|
D.value = !0;
|
|
154
153
|
try {
|
|
155
|
-
await
|
|
154
|
+
await se.claimPendingLink(H.value), c.success(o("oauth.pendingLinkSuccess", { name: V.value }));
|
|
156
155
|
} catch (t) {
|
|
157
156
|
c.warning(z(t));
|
|
158
157
|
} finally {
|
|
159
158
|
D.value = !1, R.value = !1, H.value = "";
|
|
160
159
|
}
|
|
161
|
-
await
|
|
160
|
+
await ne();
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
|
-
async function
|
|
165
|
-
R.value = !1, H.value = "", c.success(o("login.success")), await
|
|
163
|
+
async function qe() {
|
|
164
|
+
R.value = !1, H.value = "", c.success(o("login.success")), await ne();
|
|
166
165
|
}
|
|
167
166
|
async function T() {
|
|
168
|
-
if (d.value === "mfa") return
|
|
169
|
-
if (d.value === "totp") return
|
|
170
|
-
if (d.value === "sms") return
|
|
167
|
+
if (d.value === "mfa") return Re();
|
|
168
|
+
if (d.value === "totp") return Ee();
|
|
169
|
+
if (d.value === "sms") return He();
|
|
171
170
|
if (!f.account || !f.password) {
|
|
172
171
|
c.warning(o("login.required"));
|
|
173
172
|
return;
|
|
@@ -181,30 +180,30 @@ const ut = {
|
|
|
181
180
|
const t = await U.login({
|
|
182
181
|
account: f.account,
|
|
183
182
|
password: f.password,
|
|
184
|
-
...P.value ? { captchaId:
|
|
183
|
+
...P.value ? { captchaId: Z.value, captchaCode: N.value } : {}
|
|
185
184
|
});
|
|
186
185
|
await j(t);
|
|
187
186
|
} catch (t) {
|
|
188
|
-
t instanceof
|
|
187
|
+
t instanceof re && t.code === 40018 && t.args ? (b.challengeId = String(t.args.challengeId ?? ""), b.code = "", d.value = "totp") : t instanceof re && t.code === 40020 ? (Q.value = f.account.trim(), E.value = !0) : t instanceof re && t.code === 40009 && t.args ? (m.challengeId = String(t.args.challengeId ?? ""), m.phoneMask = String(t.args.phoneMask ?? ""), m.code = "", d.value = "mfa", X(Number(t.args.resendSeconds ?? 60))) : (c.error(z(t)), G()), await fe();
|
|
189
188
|
} finally {
|
|
190
189
|
g.value = !1;
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
|
-
function
|
|
192
|
+
function Be() {
|
|
194
193
|
E.value = !1;
|
|
195
194
|
}
|
|
196
|
-
function
|
|
197
|
-
const t =
|
|
195
|
+
function Ue() {
|
|
196
|
+
const t = Q.value || f.account.trim();
|
|
198
197
|
E.value = !1, F.push({ path: "/mfa/bind", query: t ? { account: t } : {} });
|
|
199
198
|
}
|
|
200
|
-
function
|
|
201
|
-
const t = f.account.trim() ||
|
|
199
|
+
function ze() {
|
|
200
|
+
const t = f.account.trim() || Q.value;
|
|
202
201
|
F.push({
|
|
203
202
|
path: "/mfa/bind",
|
|
204
203
|
query: { ...t ? { account: t } : {}, mode: "recovery" }
|
|
205
204
|
});
|
|
206
205
|
}
|
|
207
|
-
async function
|
|
206
|
+
async function Re() {
|
|
208
207
|
if (!m.code) {
|
|
209
208
|
c.warning(o("login.smsCodePlaceholder"));
|
|
210
209
|
return;
|
|
@@ -215,12 +214,12 @@ const ut = {
|
|
|
215
214
|
await U.smsChallengeLogin({ challengeId: m.challengeId, code: m.code })
|
|
216
215
|
);
|
|
217
216
|
} catch (t) {
|
|
218
|
-
c.error(z(t)),
|
|
217
|
+
c.error(z(t)), G();
|
|
219
218
|
} finally {
|
|
220
219
|
g.value = !1;
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
|
-
async function
|
|
222
|
+
async function Ee() {
|
|
224
223
|
if (!b.code) {
|
|
225
224
|
c.warning(o("login.totpPlaceholder"));
|
|
226
225
|
return;
|
|
@@ -231,16 +230,16 @@ const ut = {
|
|
|
231
230
|
await U.totpChallengeLogin({ challengeId: b.challengeId, code: b.code })
|
|
232
231
|
);
|
|
233
232
|
} catch (t) {
|
|
234
|
-
c.error(z(t)),
|
|
233
|
+
c.error(z(t)), G();
|
|
235
234
|
} finally {
|
|
236
235
|
g.value = !1;
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
|
-
async function
|
|
238
|
+
async function Fe() {
|
|
240
239
|
if (!(y.value > 0))
|
|
241
240
|
try {
|
|
242
241
|
const t = await U.smsChallengeResend({ challengeId: m.challengeId });
|
|
243
|
-
c.success(o("login.smsSent")),
|
|
242
|
+
c.success(o("login.smsSent")), X(t.resendSeconds);
|
|
244
243
|
} catch (t) {
|
|
245
244
|
c.error(z(t));
|
|
246
245
|
}
|
|
@@ -248,7 +247,7 @@ const ut = {
|
|
|
248
247
|
function me() {
|
|
249
248
|
d.value = "account", m.challengeId = "", m.code = "", b.challengeId = "", b.code = "";
|
|
250
249
|
}
|
|
251
|
-
async function
|
|
250
|
+
async function De() {
|
|
252
251
|
if (!(y.value > 0)) {
|
|
253
252
|
if (!k.phone) {
|
|
254
253
|
c.warning(o("login.phonePlaceholder"));
|
|
@@ -261,16 +260,16 @@ const ut = {
|
|
|
261
260
|
try {
|
|
262
261
|
const t = await U.smsLoginSend({
|
|
263
262
|
phone: k.phone,
|
|
264
|
-
...P.value ? { captchaId:
|
|
263
|
+
...P.value ? { captchaId: Z.value, captchaCode: N.value } : {}
|
|
265
264
|
});
|
|
266
|
-
c.success(o("login.smsSent")),
|
|
265
|
+
c.success(o("login.smsSent")), X(t.resendSeconds);
|
|
267
266
|
} catch (t) {
|
|
268
267
|
c.error(z(t));
|
|
269
268
|
}
|
|
270
|
-
await
|
|
269
|
+
await fe();
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
|
-
async function
|
|
272
|
+
async function He() {
|
|
274
273
|
if (!k.phone || !k.code) {
|
|
275
274
|
c.warning(o("login.smsRequired"));
|
|
276
275
|
return;
|
|
@@ -279,7 +278,7 @@ const ut = {
|
|
|
279
278
|
try {
|
|
280
279
|
await j(await U.smsLogin({ phone: k.phone, code: k.code }));
|
|
281
280
|
} catch (t) {
|
|
282
|
-
c.error(z(t)),
|
|
281
|
+
c.error(z(t)), G();
|
|
283
282
|
} finally {
|
|
284
283
|
g.value = !1;
|
|
285
284
|
}
|
|
@@ -287,14 +286,15 @@ const ut = {
|
|
|
287
286
|
return (t, a) => {
|
|
288
287
|
var W;
|
|
289
288
|
return s(), u("div", {
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
ref_key: "formEl",
|
|
290
|
+
ref: ve,
|
|
291
|
+
class: "login-form"
|
|
292
292
|
}, [
|
|
293
293
|
x.showLogo ? (s(), u("div", ut, [
|
|
294
294
|
n(ct, { size: 34 }),
|
|
295
295
|
p("span", dt, r(e(C).title), 1)
|
|
296
296
|
])) : w("", !0),
|
|
297
|
-
|
|
297
|
+
J.value ? (s(), A(e(Xe), {
|
|
298
298
|
key: 1,
|
|
299
299
|
type: "info",
|
|
300
300
|
bordered: !1,
|
|
@@ -306,7 +306,7 @@ const ut = {
|
|
|
306
306
|
]),
|
|
307
307
|
_: 1
|
|
308
308
|
}, 8, ["title"])) : w("", !0),
|
|
309
|
-
n(
|
|
309
|
+
n(Ge, {
|
|
310
310
|
name: "lf-swap",
|
|
311
311
|
mode: "out-in"
|
|
312
312
|
}, {
|
|
@@ -315,15 +315,15 @@ const ut = {
|
|
|
315
315
|
key: d.value,
|
|
316
316
|
class: "lf-body"
|
|
317
317
|
}, [
|
|
318
|
-
d.value === "mfa" ? (s(), u(
|
|
318
|
+
d.value === "mfa" ? (s(), u(M, { key: 0 }, [
|
|
319
319
|
x.showTitle || x.showGreeting ? (s(), u("h2", pt, r(e(o)("login.mfaTitle", { phone: m.phoneMask })), 1)) : w("", !0),
|
|
320
320
|
p("p", ht, r(e(o)("login.mfaSub")), 1),
|
|
321
|
-
n(e(
|
|
321
|
+
n(e(ie), {
|
|
322
322
|
"show-feedback": !1,
|
|
323
|
-
onKeyup:
|
|
323
|
+
onKeyup: $(T, ["enter"])
|
|
324
324
|
}, {
|
|
325
325
|
default: l(() => [
|
|
326
|
-
n(e(
|
|
326
|
+
n(e(q), {
|
|
327
327
|
label: e(o)("login.smsCode"),
|
|
328
328
|
path: "code"
|
|
329
329
|
}, {
|
|
@@ -358,7 +358,7 @@ const ut = {
|
|
|
358
358
|
text: "",
|
|
359
359
|
type: y.value > 0 ? "default" : "primary",
|
|
360
360
|
disabled: y.value > 0,
|
|
361
|
-
onClick:
|
|
361
|
+
onClick: Fe
|
|
362
362
|
}, {
|
|
363
363
|
default: l(() => [
|
|
364
364
|
v(r(y.value > 0 ? e(o)("login.resendAfter", { s: y.value }) : e(o)("login.sendCode")), 1)
|
|
@@ -383,15 +383,15 @@ const ut = {
|
|
|
383
383
|
]),
|
|
384
384
|
_: 1
|
|
385
385
|
})
|
|
386
|
-
], 64)) : d.value === "totp" ? (s(), u(
|
|
386
|
+
], 64)) : d.value === "totp" ? (s(), u(M, { key: 1 }, [
|
|
387
387
|
x.showTitle || x.showGreeting ? (s(), u("h2", gt, r(e(o)("login.totpTitle")), 1)) : w("", !0),
|
|
388
388
|
p("p", vt, r(e(o)("login.totpSub")), 1),
|
|
389
|
-
n(e(
|
|
389
|
+
n(e(ie), {
|
|
390
390
|
"show-feedback": !1,
|
|
391
|
-
onKeyup:
|
|
391
|
+
onKeyup: $(T, ["enter"])
|
|
392
392
|
}, {
|
|
393
393
|
default: l(() => [
|
|
394
|
-
n(e(
|
|
394
|
+
n(e(q), {
|
|
395
395
|
label: e(o)("login.totpCode"),
|
|
396
396
|
path: "code"
|
|
397
397
|
}, {
|
|
@@ -425,7 +425,7 @@ const ut = {
|
|
|
425
425
|
n(e(S), {
|
|
426
426
|
text: "",
|
|
427
427
|
type: "primary",
|
|
428
|
-
onClick:
|
|
428
|
+
onClick: ze
|
|
429
429
|
}, {
|
|
430
430
|
default: l(() => [
|
|
431
431
|
v(r(e(o)("login.useRecovery")), 1)
|
|
@@ -450,19 +450,19 @@ const ut = {
|
|
|
450
450
|
]),
|
|
451
451
|
_: 1
|
|
452
452
|
})
|
|
453
|
-
], 64)) : (s(), u(
|
|
453
|
+
], 64)) : (s(), u(M, { key: 2 }, [
|
|
454
454
|
x.showTitle ? (s(), u("h2", yt, r(e(o)("login.title")), 1)) : x.showGreeting ? (s(), u("div", wt, [
|
|
455
455
|
p("h1", null, r(e(o)("login.welcome")), 1),
|
|
456
456
|
p("p", null, r(e(o)("login.welcomeSub")), 1)
|
|
457
457
|
])) : w("", !0),
|
|
458
|
-
n(e(
|
|
458
|
+
n(e(ie), {
|
|
459
459
|
model: d.value === "account" ? f : k,
|
|
460
460
|
"show-feedback": !1,
|
|
461
|
-
onKeyup:
|
|
461
|
+
onKeyup: $(T, ["enter"])
|
|
462
462
|
}, {
|
|
463
463
|
default: l(() => [
|
|
464
|
-
d.value === "account" ? (s(), u(
|
|
465
|
-
n(e(
|
|
464
|
+
d.value === "account" ? (s(), u(M, { key: 0 }, [
|
|
465
|
+
n(e(q), {
|
|
466
466
|
label: e(o)("login.account"),
|
|
467
467
|
path: "account"
|
|
468
468
|
}, {
|
|
@@ -481,7 +481,7 @@ const ut = {
|
|
|
481
481
|
]),
|
|
482
482
|
_: 1
|
|
483
483
|
}, 8, ["label"]),
|
|
484
|
-
n(e(
|
|
484
|
+
n(e(q), {
|
|
485
485
|
label: e(o)("login.password"),
|
|
486
486
|
path: "password"
|
|
487
487
|
}, {
|
|
@@ -502,7 +502,7 @@ const ut = {
|
|
|
502
502
|
]),
|
|
503
503
|
_: 1
|
|
504
504
|
}, 8, ["label"])
|
|
505
|
-
], 64)) : (s(), A(e(
|
|
505
|
+
], 64)) : (s(), A(e(q), {
|
|
506
506
|
key: 1,
|
|
507
507
|
label: e(o)("login.phone"),
|
|
508
508
|
path: "phone"
|
|
@@ -523,7 +523,7 @@ const ut = {
|
|
|
523
523
|
]),
|
|
524
524
|
_: 1
|
|
525
525
|
}, 8, ["label"])),
|
|
526
|
-
P.value ? (s(), A(e(
|
|
526
|
+
P.value ? (s(), A(e(q), {
|
|
527
527
|
key: 2,
|
|
528
528
|
label: e(o)("login.captcha"),
|
|
529
529
|
path: "captcha"
|
|
@@ -533,9 +533,9 @@ const ut = {
|
|
|
533
533
|
n(e(B), {
|
|
534
534
|
value: N.value,
|
|
535
535
|
"onUpdate:value": a[5] || (a[5] = (i) => N.value = i),
|
|
536
|
-
placeholder:
|
|
536
|
+
placeholder: Ie.value,
|
|
537
537
|
size: "large",
|
|
538
|
-
onKeyup:
|
|
538
|
+
onKeyup: $(T, ["enter"])
|
|
539
539
|
}, {
|
|
540
540
|
prefix: l(() => [
|
|
541
541
|
n(e(I), { icon: "ph:shield-check" })
|
|
@@ -544,17 +544,17 @@ const ut = {
|
|
|
544
544
|
}, 8, ["value", "placeholder"]),
|
|
545
545
|
p("button", {
|
|
546
546
|
type: "button",
|
|
547
|
-
class:
|
|
547
|
+
class: je(["lf-captcha-img", { empty: !ee.value }]),
|
|
548
548
|
title: e(o)("login.captchaPlaceholder"),
|
|
549
549
|
"aria-label": e(o)("login.captchaPlaceholder"),
|
|
550
|
-
onClick:
|
|
551
|
-
innerHTML:
|
|
550
|
+
onClick: te,
|
|
551
|
+
innerHTML: ee.value
|
|
552
552
|
}, null, 10, bt)
|
|
553
553
|
])
|
|
554
554
|
]),
|
|
555
555
|
_: 1
|
|
556
556
|
}, 8, ["label"])) : w("", !0),
|
|
557
|
-
d.value === "sms" ? (s(), A(e(
|
|
557
|
+
d.value === "sms" ? (s(), A(e(q), {
|
|
558
558
|
key: 3,
|
|
559
559
|
label: e(o)("login.smsCode"),
|
|
560
560
|
path: "code"
|
|
@@ -579,7 +579,7 @@ const ut = {
|
|
|
579
579
|
size: "large",
|
|
580
580
|
"attr-type": "button",
|
|
581
581
|
disabled: y.value > 0,
|
|
582
|
-
onClick:
|
|
582
|
+
onClick: De
|
|
583
583
|
}, {
|
|
584
584
|
default: l(() => [
|
|
585
585
|
v(r(y.value > 0 ? e(o)("login.resendAfter", { s: y.value }) : e(o)("login.sendCode")), 1)
|
|
@@ -591,7 +591,7 @@ const ut = {
|
|
|
591
591
|
_: 1
|
|
592
592
|
}, 8, ["label"])) : w("", !0),
|
|
593
593
|
p("div", _t, [
|
|
594
|
-
d.value === "account" ? (s(), A(e(
|
|
594
|
+
d.value === "account" ? (s(), A(e(Ze), {
|
|
595
595
|
key: 0,
|
|
596
596
|
checked: f.remember,
|
|
597
597
|
"onUpdate:checked": a[7] || (a[7] = (i) => f.remember = i)
|
|
@@ -630,29 +630,29 @@ const ut = {
|
|
|
630
630
|
]),
|
|
631
631
|
_: 1
|
|
632
632
|
}, 8, ["model"]),
|
|
633
|
-
|
|
633
|
+
ge.value.length ? (s(), u(M, { key: 2 }, [
|
|
634
634
|
p("div", xt, [
|
|
635
635
|
p("span", null, r(e(o)("login.otherMethods")), 1)
|
|
636
636
|
]),
|
|
637
637
|
p("div", It, [
|
|
638
|
-
(s(!0), u(
|
|
638
|
+
(s(!0), u(M, null, We(oe.value.visible, (i) => (s(), u("a", {
|
|
639
639
|
key: i.code,
|
|
640
640
|
class: "lf-sso-btn",
|
|
641
|
-
href:
|
|
641
|
+
href: ae(i.code),
|
|
642
642
|
title: i.displayName,
|
|
643
643
|
"aria-label": i.displayName
|
|
644
644
|
}, [
|
|
645
|
-
n(
|
|
645
|
+
n(ke, {
|
|
646
646
|
code: i.code,
|
|
647
647
|
icon: i.icon,
|
|
648
648
|
size: 28
|
|
649
649
|
}, null, 8, ["code", "icon"])
|
|
650
650
|
], 8, Lt))), 128)),
|
|
651
|
-
|
|
651
|
+
oe.value.overflow.length ? (s(), A(e(et), {
|
|
652
652
|
key: 0,
|
|
653
653
|
trigger: "click",
|
|
654
|
-
options:
|
|
655
|
-
onSelect:
|
|
654
|
+
options: Le.value,
|
|
655
|
+
onSelect: Ne
|
|
656
656
|
}, {
|
|
657
657
|
default: l(() => [
|
|
658
658
|
p("a", {
|
|
@@ -661,7 +661,7 @@ const ut = {
|
|
|
661
661
|
role: "button",
|
|
662
662
|
title: e(o)("login.moreMethods"),
|
|
663
663
|
"aria-label": e(o)("login.moreMethods"),
|
|
664
|
-
onClick: a[9] || (a[9] =
|
|
664
|
+
onClick: a[9] || (a[9] = Ye(() => {
|
|
665
665
|
}, ["prevent"]))
|
|
666
666
|
}, [
|
|
667
667
|
n(e(I), {
|
|
@@ -681,19 +681,19 @@ const ut = {
|
|
|
681
681
|
}),
|
|
682
682
|
x.showFooter ? (s(), u("footer", Nt, [
|
|
683
683
|
p("span", null, [
|
|
684
|
-
v(" © " + r(e(
|
|
684
|
+
v(" © " + r(e(Se)) + " ", 1),
|
|
685
685
|
e(C).copyrightUrl ? (s(), u("a", {
|
|
686
686
|
key: 0,
|
|
687
687
|
href: e(C).copyrightUrl,
|
|
688
688
|
target: "_blank",
|
|
689
689
|
rel: "noopener"
|
|
690
|
-
}, r(e(C).copyright || e(C).title), 9, Tt)) : (s(), u(
|
|
690
|
+
}, r(e(C).copyright || e(C).title), 9, Tt)) : (s(), u(M, { key: 1 }, [
|
|
691
691
|
v(r(e(C).copyright || e(C).title), 1)
|
|
692
692
|
], 64))
|
|
693
693
|
]),
|
|
694
|
-
e(
|
|
694
|
+
e(de) ? (s(), u("span", At, "v" + r(e(de)), 1)) : w("", !0)
|
|
695
695
|
])) : w("", !0),
|
|
696
|
-
n(e(
|
|
696
|
+
n(e(ye), {
|
|
697
697
|
show: E.value,
|
|
698
698
|
"onUpdate:show": a[10] || (a[10] = (i) => E.value = i),
|
|
699
699
|
preset: "dialog",
|
|
@@ -702,10 +702,10 @@ const ut = {
|
|
|
702
702
|
content: e(o)("login.totpBindSub"),
|
|
703
703
|
"positive-text": e(o)("login.setupAuthenticator"),
|
|
704
704
|
"negative-text": e(o)("common.cancel"),
|
|
705
|
-
onPositiveClick:
|
|
706
|
-
onNegativeClick:
|
|
705
|
+
onPositiveClick: Ue,
|
|
706
|
+
onNegativeClick: Be
|
|
707
707
|
}, null, 8, ["show", "title", "content", "positive-text", "negative-text"]),
|
|
708
|
-
n(e(
|
|
708
|
+
n(e(ye), {
|
|
709
709
|
show: R.value,
|
|
710
710
|
"onUpdate:show": a[11] || (a[11] = (i) => R.value = i),
|
|
711
711
|
preset: "dialog",
|
|
@@ -713,22 +713,22 @@ const ut = {
|
|
|
713
713
|
title: e(o)("oauth.pendingLinkConfirmTitle"),
|
|
714
714
|
content: e(o)("oauth.pendingLinkConfirmContent", {
|
|
715
715
|
name: V.value,
|
|
716
|
-
identity:
|
|
717
|
-
account: ((W = e(
|
|
716
|
+
identity: Ae.value,
|
|
717
|
+
account: ((W = e(ue).userInfo) == null ? void 0 : W.account) ?? ""
|
|
718
718
|
}),
|
|
719
719
|
"positive-text": e(o)("oauth.pendingLinkConfirmOk"),
|
|
720
720
|
"negative-text": e(o)("oauth.pendingLinkConfirmSkip"),
|
|
721
721
|
loading: D.value,
|
|
722
722
|
closable: !1,
|
|
723
723
|
"mask-closable": !1,
|
|
724
|
-
onPositiveClick:
|
|
725
|
-
onNegativeClick:
|
|
724
|
+
onPositiveClick: Me,
|
|
725
|
+
onNegativeClick: qe
|
|
726
726
|
}, null, 8, ["show", "title", "content", "positive-text", "negative-text", "loading"])
|
|
727
|
-
],
|
|
727
|
+
], 512);
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
730
|
});
|
|
731
731
|
export {
|
|
732
|
-
|
|
732
|
+
$t as default
|
|
733
733
|
};
|
|
734
734
|
//# sourceMappingURL=LoginForm2.vue.js.map
|