smart-admin-web 10.20.0 → 10.21.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.
Files changed (146) hide show
  1. package/dist/api/index.d.ts +19 -1
  2. package/dist/api/index.js +85 -66
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/schema.d.ts +448 -1
  5. package/dist/assets/icons/ph-subset.json.js +1 -1
  6. package/dist/components/FormContainer/index.vue.js +87 -75
  7. package/dist/components/FormContainer/index.vue.js.map +1 -1
  8. package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
  9. package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
  10. package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
  11. package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
  12. package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
  13. package/dist/components/UserPicker/index.vue.js +1 -1
  14. package/dist/components/UserPicker/index2.vue.js +328 -186
  15. package/dist/components/UserPicker/index2.vue.js.map +1 -1
  16. package/dist/index.js +248 -246
  17. package/dist/layouts/NoticeBell.vue.js +2 -2
  18. package/dist/layouts/NoticeBell2.vue.js +18 -17
  19. package/dist/layouts/NoticeBell2.vue.js.map +1 -1
  20. package/dist/lib/runtime.js +1 -1
  21. package/dist/lib/watermark.d.ts +1 -1
  22. package/dist/locales/en-US.d.ts +62 -3
  23. package/dist/locales/en-US.js +66 -7
  24. package/dist/locales/en-US.js.map +1 -1
  25. package/dist/locales/kernelMenuTitles.js +2 -1
  26. package/dist/locales/kernelMenuTitles.js.map +1 -1
  27. package/dist/locales/zh-CN.d.ts +62 -3
  28. package/dist/locales/zh-CN.js +66 -7
  29. package/dist/locales/zh-CN.js.map +1 -1
  30. package/dist/router/viewRegistry.js +6 -6
  31. package/dist/router/viewRegistry.js.map +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/theme/naive-theme.js +72 -67
  34. package/dist/theme/naive-theme.js.map +1 -1
  35. package/dist/types/api.d.ts +91 -0
  36. package/dist/types/api.js +17 -15
  37. package/dist/types/api.js.map +1 -1
  38. package/dist/utils/shake.d.ts +1 -0
  39. package/dist/utils/shake.js +30 -0
  40. package/dist/utils/shake.js.map +1 -0
  41. package/dist/views/login/LoginForm.vue.js +2 -2
  42. package/dist/views/login/LoginForm2.vue.js +135 -135
  43. package/dist/views/login/LoginForm2.vue.js.map +1 -1
  44. package/dist/views/login/components/LoginDesk.vue.js +1 -1
  45. package/dist/views/login/components/LoginDesk2.vue.js +59 -47
  46. package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
  47. package/dist/views/personal/notice2.vue.js +1 -1
  48. package/dist/views/personal/notice2.vue.js.map +1 -1
  49. package/dist/views/personal/sessions.vue.js +2 -2
  50. package/dist/views/personal/sessions2.vue.js +41 -40
  51. package/dist/views/personal/sessions2.vue.js.map +1 -1
  52. package/dist/views/system/ai-usage/index.vue.js +3 -3
  53. package/dist/views/system/ai-usage/index2.vue.js +13 -12
  54. package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
  55. package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
  56. package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
  57. package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
  58. package/dist/views/system/dict/index.vue.js +2 -2
  59. package/dist/views/system/dict/index2.vue.js +12 -1
  60. package/dist/views/system/dict/index2.vue.js.map +1 -1
  61. package/dist/views/system/file/index2.vue.js +1 -0
  62. package/dist/views/system/file/index2.vue.js.map +1 -1
  63. package/dist/views/system/job/index.vue.js +3 -3
  64. package/dist/views/system/job/index2.vue.js +182 -181
  65. package/dist/views/system/job/index2.vue.js.map +1 -1
  66. package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
  67. package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
  68. package/dist/views/system/job-log/index.vue.js +1 -1
  69. package/dist/views/system/job-log/index2.vue.js +5 -5
  70. package/dist/views/system/job-log/index2.vue.js.map +1 -1
  71. package/dist/views/system/log/exception/index.vue.js +2 -2
  72. package/dist/views/system/log/exception/index2.vue.js +8 -5
  73. package/dist/views/system/log/exception/index2.vue.js.map +1 -1
  74. package/dist/views/system/log/login/index2.vue.js +21 -12
  75. package/dist/views/system/log/login/index2.vue.js.map +1 -1
  76. package/dist/views/system/log/op/index.vue.js +2 -2
  77. package/dist/views/system/log/op/index2.vue.js +50 -40
  78. package/dist/views/system/log/op/index2.vue.js.map +1 -1
  79. package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
  80. package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
  81. package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
  82. package/dist/views/system/menu/index.vue.js +2 -2
  83. package/dist/views/system/menu/index2.vue.js +11 -11
  84. package/dist/views/system/menu/index2.vue.js.map +1 -1
  85. package/dist/views/system/module/index.vue.js +1 -1
  86. package/dist/views/system/module/index2.vue.js +171 -117
  87. package/dist/views/system/module/index2.vue.js.map +1 -1
  88. package/dist/views/system/notice/index.vue.js +3 -3
  89. package/dist/views/system/notice/index2.vue.js +1 -0
  90. package/dist/views/system/notice/index2.vue.js.map +1 -1
  91. package/dist/views/system/org/index.vue.js +2 -2
  92. package/dist/views/system/org/index2.vue.js +70 -67
  93. package/dist/views/system/org/index2.vue.js.map +1 -1
  94. package/dist/views/system/position/index.vue.js +2 -2
  95. package/dist/views/system/position/index2.vue.js +57 -48
  96. package/dist/views/system/position/index2.vue.js.map +1 -1
  97. package/dist/views/system/recycle/index.vue.js +1 -1
  98. package/dist/views/system/recycle/index2.vue.js +3 -1
  99. package/dist/views/system/recycle/index2.vue.js.map +1 -1
  100. package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
  101. package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
  102. package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
  103. package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
  104. package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
  105. package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
  106. package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
  107. package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
  108. package/dist/views/system/role/components/grantMenuGroups.js +116 -76
  109. package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
  110. package/dist/views/system/role/index.vue.js +2 -2
  111. package/dist/views/system/role/index2.vue.js +152 -145
  112. package/dist/views/system/role/index2.vue.js.map +1 -1
  113. package/dist/views/system/session/index2.vue.js +39 -35
  114. package/dist/views/system/session/index2.vue.js.map +1 -1
  115. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
  116. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
  117. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
  118. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
  119. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
  120. package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
  121. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
  122. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
  123. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
  124. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
  125. package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
  126. package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
  127. package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
  128. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
  129. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
  130. package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
  131. package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
  132. package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
  133. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
  134. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
  135. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
  136. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
  137. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
  138. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
  139. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
  140. package/dist/views/system/user/components/userGrantState.d.ts +64 -0
  141. package/dist/views/system/user/components/userGrantState.js +117 -0
  142. package/dist/views/system/user/components/userGrantState.js.map +1 -0
  143. package/dist/views/system/user/index.vue.js +2 -2
  144. package/dist/views/system/user/index2.vue.js +250 -207
  145. package/dist/views/system/user/index2.vue.js.map +1 -1
  146. package/package.json +3 -3
@@ -1,18 +1,19 @@
1
- import { defineComponent as Ve, computed as _, ref as h, reactive as Y, onBeforeUnmount as Ge, onMounted as $e, h as ie, openBlock as s, createElementBlock as u, withModifiers as ye, normalizeClass as we, 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 je, Fragment as q, withKeys as J, renderList as We, nextTick as Ye } from "vue";
2
- import { useRouter as Je, useRoute as Qe } from "vue-router";
3
- import { useMessage as Xe, NAlert as Ze, NForm as se, NFormItem as M, NInput as B, NButton as S, NCheckbox as et, NDropdown as tt, NModal as ke } from "naive-ui";
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 ot } from "vue-i18n";
6
- import { externalAuthApi as re, authApi as U, ApiError as ce } from "../../api/index.js";
7
- import { useUserStore as at } from "../../stores/user.js";
8
- import { useAuthStore as nt } from "../../stores/auth.js";
9
- import { useSite as lt } from "../../composables/useSite.js";
10
- import { resetRouter as it } from "../../router/index.js";
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 be } from "../../lib/runtime.js";
15
- import Ce from "../../components/oauth/BrandIcon.vue.js";
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
- }, qt = "(prefers-reduced-motion: reduce)", Wt = /* @__PURE__ */ Ve({
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: _e }) {
47
- const ue = _e, F = Je(), L = Qe(), c = Xe(), { t: o } = ot(), de = at(), Se = nt(), { site: C, appVersion: pe, loadSite: xe } = lt(), Ie = (/* @__PURE__ */ new Date()).getFullYear(), Q = _(
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
- ), Le = _(
50
+ ), xe = _(
50
51
  () => typeof L.query.provider == "string" ? L.query.provider : ""
51
- ), he = _(
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
- be.dev && !Q.value ? { account: "superAdmin", password: "Aa123456", remember: !0 } : {
55
- account: be.dev ? "superAdmin" : "",
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), X = h(""), y = h(0);
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 Z(t) {
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
- Ge(() => window.clearInterval(O));
67
- const P = h(!1), ee = h(""), te = h(""), N = h(""), fe = h("char"), Pe = _(
68
- () => fe.value === "math" ? o("login.captchaMathPlaceholder") : o("login.captchaPlaceholder")
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 oe() {
71
+ async function te() {
71
72
  try {
72
73
  const t = await U.captcha();
73
- ee.value = t.captchaId, te.value = t.svg, fe.value = t.type || "char";
74
+ Z.value = t.captchaId, ee.value = t.svg, he.value = t.type || "char";
74
75
  } catch {
75
76
  }
76
77
  }
77
- async function ge() {
78
- P.value && (N.value = "", await oe());
78
+ async function fe() {
79
+ P.value && (N.value = "", await te());
79
80
  }
80
- $e(async () => {
81
- await xe(), C.captchaEnabled && (P.value = !0, await oe()), Te();
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 = Le.value;
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
- }), ve = _(
91
+ }), ge = _(
91
92
  () => K.value
92
- ), ae = _(
93
- () => st(ve.value)
94
- ), Ne = _(
95
- () => ae.value.overflow.map((t) => ({
93
+ ), oe = _(
94
+ () => st(ge.value)
95
+ ), Le = _(
96
+ () => oe.value.overflow.map((t) => ({
96
97
  key: t.code,
97
- label: () => ie(
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
- [ie(Ce, { code: t.code, icon: t.icon, size: 20 }), ie("span", null, t.displayName)]
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 Te() {
108
+ async function Pe() {
108
109
  try {
109
- K.value = await re.providers();
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 = ne("wecom"));
119
+ }) && (window.location.href = ae("wecom"));
119
120
  }
120
- function ne(t) {
121
- return re.authorizeUrl(t);
121
+ function ae(t) {
122
+ return se.authorizeUrl(t);
122
123
  }
123
- function Ae(t) {
124
- window.location.href = ne(String(t));
124
+ function Ne(t) {
125
+ window.location.href = ae(String(t));
125
126
  }
126
- async function le() {
127
+ async function ne() {
127
128
  await F.replace("/");
128
129
  }
129
- const G = h(!1);
130
- async function $() {
131
- G.value = !1, await Ye(), requestAnimationFrame(() => {
132
- G.value = !0;
133
- });
130
+ const ve = h();
131
+ function G() {
132
+ it(ve.value);
134
133
  }
135
- async function qe() {
134
+ async function Te() {
136
135
  var t;
137
- ue("leave", !0), (t = window.matchMedia) != null && t.call(window, qt).matches || await new Promise((a) => setTimeout(a, 320)), await le(), ue("leave", !1);
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
- it(), Se.reset(), de.setSession(t);
141
- const a = Q.value;
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 qe();
145
+ c.success(o("login.success")), await Te();
147
146
  }
148
- const Me = _(
149
- () => he.value ? o("oauth.pendingLinkIdentity", { display: he.value }) : ""
147
+ const Ae = _(
148
+ () => pe.value ? o("oauth.pendingLinkIdentity", { display: pe.value }) : ""
150
149
  );
151
- async function Be() {
150
+ async function Me() {
152
151
  if (!D.value) {
153
152
  D.value = !0;
154
153
  try {
155
- await re.claimPendingLink(H.value), c.success(o("oauth.pendingLinkSuccess", { name: V.value }));
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 le();
160
+ await ne();
162
161
  }
163
162
  }
164
- async function Ue() {
165
- R.value = !1, H.value = "", c.success(o("login.success")), await le();
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 Fe();
169
- if (d.value === "totp") return De();
170
- if (d.value === "sms") return Ke();
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: ee.value, captchaCode: N.value } : {}
183
+ ...P.value ? { captchaId: Z.value, captchaCode: N.value } : {}
185
184
  });
186
185
  await j(t);
187
186
  } catch (t) {
188
- t instanceof ce && t.code === 40018 && t.args ? (b.challengeId = String(t.args.challengeId ?? ""), b.code = "", d.value = "totp") : t instanceof ce && t.code === 40020 ? (X.value = f.account.trim(), E.value = !0) : t instanceof ce && t.code === 40009 && t.args ? (m.challengeId = String(t.args.challengeId ?? ""), m.phoneMask = String(t.args.phoneMask ?? ""), m.code = "", d.value = "mfa", Z(Number(t.args.resendSeconds ?? 60))) : (c.error(z(t)), $()), await ge();
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 ze() {
192
+ function Be() {
194
193
  E.value = !1;
195
194
  }
196
- function Re() {
197
- const t = X.value || f.account.trim();
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 Ee() {
201
- const t = f.account.trim() || X.value;
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 Fe() {
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 De() {
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 He() {
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")), Z(t.resendSeconds);
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 Oe() {
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: ee.value, captchaCode: N.value } : {}
263
+ ...P.value ? { captchaId: Z.value, captchaCode: N.value } : {}
265
264
  });
266
- c.success(o("login.smsSent")), Z(t.resendSeconds);
265
+ c.success(o("login.smsSent")), X(t.resendSeconds);
267
266
  } catch (t) {
268
267
  c.error(z(t));
269
268
  }
270
- await ge();
269
+ await fe();
271
270
  }
272
271
  }
273
- async function Ke() {
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
- class: we(["login-form", { shake: G.value }]),
291
- onAnimationend: a[12] || (a[12] = ye((i) => G.value = !1, ["self"]))
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
- Q.value ? (s(), A(e(Ze), {
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(je, {
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(q, { key: 0 }, [
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(se), {
321
+ n(e(ie), {
322
322
  "show-feedback": !1,
323
- onKeyup: J(T, ["enter"])
323
+ onKeyup: $(T, ["enter"])
324
324
  }, {
325
325
  default: l(() => [
326
- n(e(M), {
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: He
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(q, { key: 1 }, [
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(se), {
389
+ n(e(ie), {
390
390
  "show-feedback": !1,
391
- onKeyup: J(T, ["enter"])
391
+ onKeyup: $(T, ["enter"])
392
392
  }, {
393
393
  default: l(() => [
394
- n(e(M), {
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: Ee
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(q, { key: 2 }, [
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(se), {
458
+ n(e(ie), {
459
459
  model: d.value === "account" ? f : k,
460
460
  "show-feedback": !1,
461
- onKeyup: J(T, ["enter"])
461
+ onKeyup: $(T, ["enter"])
462
462
  }, {
463
463
  default: l(() => [
464
- d.value === "account" ? (s(), u(q, { key: 0 }, [
465
- n(e(M), {
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(M), {
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(M), {
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(M), {
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: Pe.value,
536
+ placeholder: Ie.value,
537
537
  size: "large",
538
- onKeyup: J(T, ["enter"])
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: we(["lf-captcha-img", { empty: !te.value }]),
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: oe,
551
- innerHTML: te.value
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(M), {
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: Oe
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(et), {
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
- ve.value.length ? (s(), u(q, { key: 2 }, [
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(q, null, We(ae.value.visible, (i) => (s(), u("a", {
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: ne(i.code),
641
+ href: ae(i.code),
642
642
  title: i.displayName,
643
643
  "aria-label": i.displayName
644
644
  }, [
645
- n(Ce, {
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
- ae.value.overflow.length ? (s(), A(e(tt), {
651
+ oe.value.overflow.length ? (s(), A(e(et), {
652
652
  key: 0,
653
653
  trigger: "click",
654
- options: Ne.value,
655
- onSelect: Ae
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] = ye(() => {
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(Ie)) + " ", 1),
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(q, { key: 1 }, [
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(pe) ? (s(), u("span", At, "v" + r(e(pe)), 1)) : w("", !0)
694
+ e(de) ? (s(), u("span", At, "v" + r(e(de)), 1)) : w("", !0)
695
695
  ])) : w("", !0),
696
- n(e(ke), {
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: Re,
706
- onNegativeClick: ze
705
+ onPositiveClick: Ue,
706
+ onNegativeClick: Be
707
707
  }, null, 8, ["show", "title", "content", "positive-text", "negative-text"]),
708
- n(e(ke), {
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: Me.value,
717
- account: ((W = e(de).userInfo) == null ? void 0 : W.account) ?? ""
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: Be,
725
- onNegativeClick: Ue
724
+ onPositiveClick: Me,
725
+ onNegativeClick: qe
726
726
  }, null, 8, ["show", "title", "content", "positive-text", "negative-text", "loading"])
727
- ], 34);
727
+ ], 512);
728
728
  };
729
729
  }
730
730
  });
731
731
  export {
732
- Wt as default
732
+ $t as default
733
733
  };
734
734
  //# sourceMappingURL=LoginForm2.vue.js.map