@huyooo/ui 2.0.12 → 2.1.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/{AuthkitAppSetting-Dgxd5GMR.js → AuthkitAppSetting-1FsF45E3.js} +529 -536
- package/dist/{LegalDocViewer-BWTrNIUE.js → LegalDocViewer-DvsnAv6f.js} +738 -750
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-CwB8zI6u.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Di-VAlur.js} +1 -1
- package/dist/{WidthContainer-TAMNaEHp.js → WidthContainer-BzU8aEwN.js} +1 -1
- package/dist/authkit.js +2 -2
- package/dist/common.js +1 -1
- package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +1 -1
- package/dist/components/Authkit/Auth/AuthkitSignIn.vue.d.ts +13 -6
- package/dist/composables/Authkit/useAuthkitPasskey.d.ts +1 -4
- package/dist/main.js +4 -4
- package/dist/style.css +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as V, computed as $, openBlock as o, createElementBlock as S, normalizeStyle as G, normalizeClass as ye, renderSlot as Z, createBlock as z, unref as e, createCommentVNode as I, createElementVNode as _, ref as A, createVNode as i, withCtx as c, createTextVNode as q, watchEffect as re, Fragment as D, renderList as ue, useModel as Ue, watch as be, toDisplayString as M, mergeModels as $e, useSlots as Re, onMounted as H, onUnmounted as de, Teleport as Te } from "vue";
|
|
2
|
+
import { useRouter as we, useRoute as qe } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "./userMenuModal-D-nDaYqM.js";
|
|
6
|
-
import { Form as
|
|
7
|
-
import { a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { u as
|
|
10
|
-
import { o as ge, j as
|
|
6
|
+
import { Message as ae, Form as E, FormItem as P, Input as C, Button as L, Link as Y, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as xe, List as Le, ListItem as oe, ListItemMeta as le, Avatar as te, Alert as ve, Spin as Be, Empty as Me } from "@arco-design/web-vue";
|
|
7
|
+
import { a as F, u as N } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
8
|
+
import { g as B, u as _e } from "./apiClients-Ctcq8NZs.js";
|
|
9
|
+
import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
10
|
+
import { o as ge, j as Fe, k as he, l as ke, u as De, m as He, n as X, p as Ee, i as Se, S as W, q as K, r as ze, s as Ie, t as ne, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-1FsF45E3.js";
|
|
11
11
|
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import "./index-Cn6LcfZO.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { u as
|
|
15
|
+
import { u as Ae, L as We, i as Ke } from "./useLegalDocs-C4qk5CTb.js";
|
|
16
16
|
import { u as me } from "./runtime-Dp7MgwhI.js";
|
|
17
|
-
import { u as
|
|
17
|
+
import { u as Pe } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "./CustomTable-HDwqEcmB.js";
|
|
@@ -24,7 +24,7 @@ import { f as Xe } from "./fetchAuthPageAboutUs-DV7ArpNZ.js";
|
|
|
24
24
|
const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "OAuthItem__spinner"
|
|
27
|
-
}, et = /* @__PURE__ */
|
|
27
|
+
}, et = /* @__PURE__ */ V({
|
|
28
28
|
__name: "AuthkitOauthItem",
|
|
29
29
|
props: {
|
|
30
30
|
size: {
|
|
@@ -48,36 +48,36 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
48
48
|
default: !1
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
51
|
+
setup(b) {
|
|
52
|
+
const u = b, n = $(() => ({
|
|
53
53
|
width: `${he}px`,
|
|
54
54
|
height: `${he}px`,
|
|
55
|
-
padding: `${
|
|
55
|
+
padding: `${Fe}px`,
|
|
56
56
|
"--oauth-icon-size": `${ge}px`
|
|
57
57
|
}));
|
|
58
|
-
return (
|
|
58
|
+
return (r, h) => (o(), S("button", {
|
|
59
59
|
class: ye(["OAuthItem", {
|
|
60
|
-
"OAuthItem--loading":
|
|
60
|
+
"OAuthItem--loading": u.loading
|
|
61
61
|
}]),
|
|
62
62
|
type: "button",
|
|
63
|
-
title:
|
|
64
|
-
"aria-label":
|
|
65
|
-
disabled:
|
|
66
|
-
style:
|
|
67
|
-
}, [
|
|
63
|
+
title: u.label,
|
|
64
|
+
"aria-label": u.label,
|
|
65
|
+
disabled: u.disabled || u.loading,
|
|
66
|
+
style: G(n.value)
|
|
67
|
+
}, [u.loading ? (o(), S("span", Ze)) : Z(r.$slots, "icon", {
|
|
68
68
|
key: 1
|
|
69
|
-
}, () => [
|
|
69
|
+
}, () => [u.icon ? (o(), z(ke, {
|
|
70
70
|
key: 0,
|
|
71
|
-
icon:
|
|
71
|
+
icon: u.icon,
|
|
72
72
|
size: e(ge)
|
|
73
|
-
}, null, 8, ["icon", "size"])) :
|
|
73
|
+
}, null, 8, ["icon", "size"])) : I("", !0)], !0)], 14, Ye));
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
75
|
+
}), Q = /* @__PURE__ */ U(et, [["__scopeId", "data-v-e00c1d80"]]), tt = {
|
|
76
76
|
class: "OAuthList"
|
|
77
77
|
}, st = {
|
|
78
78
|
key: 0,
|
|
79
79
|
class: "OAuthDivider"
|
|
80
|
-
}, it = /* @__PURE__ */
|
|
80
|
+
}, it = /* @__PURE__ */ V({
|
|
81
81
|
__name: "AuthkitOauthList",
|
|
82
82
|
props: {
|
|
83
83
|
size: {
|
|
@@ -86,95 +86,90 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
emits: ["passkeySubmit"],
|
|
89
|
-
setup(
|
|
90
|
-
emit:
|
|
89
|
+
setup(b, {
|
|
90
|
+
emit: u
|
|
91
91
|
}) {
|
|
92
|
-
const
|
|
93
|
-
appsData:
|
|
94
|
-
} =
|
|
95
|
-
|
|
92
|
+
const {
|
|
93
|
+
appsData: n
|
|
94
|
+
} = j(), {
|
|
95
|
+
githubAuth: r,
|
|
96
|
+
googleAuth: h,
|
|
97
|
+
microsoftAuth: g,
|
|
98
|
+
wechatAuth: a
|
|
99
|
+
} = Se(), {
|
|
100
|
+
loading: s,
|
|
101
|
+
supported: d,
|
|
102
|
+
loginWithPasskey: v,
|
|
103
|
+
formatError: t,
|
|
104
|
+
getPasskeyEnvironmentIssue: p
|
|
96
105
|
} = De(), {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ensureTermsAcceptedForSignIn: t
|
|
104
|
-
} = L();
|
|
105
|
-
function c(y) {
|
|
106
|
-
t() && y({
|
|
107
|
-
acceptedTerms: f.value ? !0 : void 0
|
|
106
|
+
acceptedTerms: l,
|
|
107
|
+
ensureTermsAcceptedForSignIn: w
|
|
108
|
+
} = F(), m = u;
|
|
109
|
+
function f(R) {
|
|
110
|
+
w() && R({
|
|
111
|
+
acceptedTerms: l.value ? !0 : void 0
|
|
108
112
|
});
|
|
109
113
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
console.info(`[Passkey] ${y}`);
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
try {
|
|
121
|
-
const v = await h(void 0, {
|
|
122
|
-
useBrowserAutofill: !0,
|
|
123
|
-
beforeVerify: t
|
|
124
|
-
});
|
|
125
|
-
if (!v)
|
|
126
|
-
return;
|
|
127
|
-
u("passkeySubmit", v);
|
|
128
|
-
} catch (v) {
|
|
129
|
-
if (v instanceof Error && (v.name === "AbortError" || v.name === "NotAllowedError")) {
|
|
130
|
-
console.info(`[Passkey] ${v.message}`);
|
|
131
|
-
return;
|
|
114
|
+
async function y() {
|
|
115
|
+
if (w())
|
|
116
|
+
try {
|
|
117
|
+
const R = await v();
|
|
118
|
+
R && m("passkeySubmit", R);
|
|
119
|
+
} catch (R) {
|
|
120
|
+
ae.error(t(R));
|
|
132
121
|
}
|
|
133
|
-
console.warn("[Passkey] 条件式登录初始化失败", v);
|
|
134
|
-
}
|
|
135
122
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
const k = b, T = $(() => {
|
|
124
|
+
const R = n.value.oauth;
|
|
125
|
+
return R.google.enabled || R.microsoft.enabled || R.github.enabled || R.wechat.enabled || n.value.authMethods.login.passkey;
|
|
126
|
+
}), x = $(() => d ? "Passkey" : p() || "Passkey 不可用");
|
|
127
|
+
return (R, O) => (o(), S("div", tt, [T.value ? (o(), S("div", st, [...O[4] || (O[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
|
|
141
128
|
class: "OAuthIcons",
|
|
142
|
-
style:
|
|
143
|
-
gap: `${e(
|
|
129
|
+
style: G({
|
|
130
|
+
gap: `${e(He)}px`
|
|
144
131
|
})
|
|
145
|
-
}, [e(
|
|
132
|
+
}, [e(n).oauth.google.enabled ? (o(), z(Q, {
|
|
146
133
|
key: 0,
|
|
147
|
-
icon: e(
|
|
134
|
+
icon: e(X).google,
|
|
148
135
|
label: "Google",
|
|
149
|
-
size:
|
|
150
|
-
onClick:
|
|
151
|
-
}, null, 8, ["icon", "size"])) :
|
|
136
|
+
size: k.size,
|
|
137
|
+
onClick: O[0] || (O[0] = (J) => f(e(h)))
|
|
138
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.github.enabled ? (o(), z(Q, {
|
|
152
139
|
key: 1,
|
|
153
|
-
icon: e(
|
|
140
|
+
icon: e(X).github,
|
|
154
141
|
label: "Github",
|
|
155
|
-
size:
|
|
156
|
-
onClick:
|
|
157
|
-
}, null, 8, ["icon", "size"])) :
|
|
142
|
+
size: k.size,
|
|
143
|
+
onClick: O[1] || (O[1] = (J) => f(e(r)))
|
|
144
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.microsoft.enabled ? (o(), z(Q, {
|
|
158
145
|
key: 2,
|
|
159
|
-
icon: e(
|
|
146
|
+
icon: e(X).microsoft,
|
|
160
147
|
label: "Microsoft",
|
|
161
|
-
size:
|
|
162
|
-
onClick:
|
|
163
|
-
}, null, 8, ["icon", "size"])) :
|
|
148
|
+
size: k.size,
|
|
149
|
+
onClick: O[2] || (O[2] = (J) => f(e(g)))
|
|
150
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.wechat.enabled ? (o(), z(Q, {
|
|
164
151
|
key: 3,
|
|
165
|
-
icon: e(
|
|
152
|
+
icon: e(X).wechat,
|
|
166
153
|
label: "微信",
|
|
167
|
-
size:
|
|
168
|
-
onClick:
|
|
169
|
-
}, null, 8, ["icon", "size"])) :
|
|
154
|
+
size: k.size,
|
|
155
|
+
onClick: O[3] || (O[3] = (J) => f(e(a)))
|
|
156
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(n).authMethods.login.passkey ? (o(), z(Q, {
|
|
157
|
+
key: 4,
|
|
158
|
+
icon: e(Ee),
|
|
159
|
+
label: x.value,
|
|
160
|
+
size: k.size,
|
|
161
|
+
loading: e(s),
|
|
162
|
+
disabled: !e(d),
|
|
163
|
+
onClick: y
|
|
164
|
+
}, null, 8, ["icon", "label", "size", "loading", "disabled"])) : I("", !0)], 4)]));
|
|
170
165
|
}
|
|
171
|
-
}), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-
|
|
166
|
+
}), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-0473306e"]]), ot = {
|
|
172
167
|
class: "content"
|
|
173
168
|
}, lt = {
|
|
174
169
|
class: "sendVerifyCodeItem"
|
|
175
170
|
}, nt = {
|
|
176
171
|
class: "handle"
|
|
177
|
-
}, rt = /* @__PURE__ */
|
|
172
|
+
}, rt = /* @__PURE__ */ V({
|
|
178
173
|
__name: "AuthkitPasswordUpdateAndVerify",
|
|
179
174
|
props: {
|
|
180
175
|
size: {
|
|
@@ -188,10 +183,10 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
188
183
|
}
|
|
189
184
|
},
|
|
190
185
|
emits: ["signIn", "submit"],
|
|
191
|
-
setup(
|
|
192
|
-
emit:
|
|
186
|
+
setup(b, {
|
|
187
|
+
emit: u
|
|
193
188
|
}) {
|
|
194
|
-
const
|
|
189
|
+
const n = u, r = b, h = A(), g = A(!1), a = A(), s = A({
|
|
195
190
|
email: void 0,
|
|
196
191
|
userToken: void 0,
|
|
197
192
|
emailVerifyId: void 0,
|
|
@@ -201,26 +196,26 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
201
196
|
async function d() {
|
|
202
197
|
if (!await a.value.validateField(["email"])) {
|
|
203
198
|
g.value = !0;
|
|
204
|
-
const
|
|
199
|
+
const p = await B().auth.verify.email.retry.post({
|
|
205
200
|
email: s.value.email,
|
|
206
201
|
purpose: "resetPassword"
|
|
207
202
|
});
|
|
208
|
-
g.value = !1,
|
|
203
|
+
g.value = !1, p.data && (s.value.emailVerifyId = p.data.emailVerifyId), K(h.value, p);
|
|
209
204
|
}
|
|
210
205
|
}
|
|
211
|
-
async function
|
|
206
|
+
async function v() {
|
|
212
207
|
a.value.validate().then((t) => {
|
|
213
|
-
t ||
|
|
208
|
+
t || n("submit", s.value);
|
|
214
209
|
});
|
|
215
210
|
}
|
|
216
|
-
return (t,
|
|
211
|
+
return (t, p) => (o(), S("div", ot, [i(e(E), {
|
|
217
212
|
ref_key: "formRef",
|
|
218
213
|
ref: a,
|
|
219
214
|
model: s.value,
|
|
220
|
-
size:
|
|
215
|
+
size: r.size,
|
|
221
216
|
"auto-label-width": ""
|
|
222
217
|
}, {
|
|
223
|
-
default:
|
|
218
|
+
default: c(() => [i(e(P), {
|
|
224
219
|
field: "email",
|
|
225
220
|
label: "邮箱",
|
|
226
221
|
"hide-label": "",
|
|
@@ -232,9 +227,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
232
227
|
message: "请输入有效的邮箱"
|
|
233
228
|
}]
|
|
234
229
|
}, {
|
|
235
|
-
default:
|
|
230
|
+
default: c(() => [i(e(C), {
|
|
236
231
|
modelValue: s.value.email,
|
|
237
|
-
"onUpdate:modelValue":
|
|
232
|
+
"onUpdate:modelValue": p[0] || (p[0] = (l) => s.value.email = l),
|
|
238
233
|
placeholder: "请输入邮箱"
|
|
239
234
|
}, null, 8, ["modelValue"])]),
|
|
240
235
|
_: 1
|
|
@@ -247,14 +242,14 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
247
242
|
message: "请输入验证码"
|
|
248
243
|
}]
|
|
249
244
|
}, {
|
|
250
|
-
default:
|
|
245
|
+
default: c(() => [_("div", lt, [i(e(C), {
|
|
251
246
|
modelValue: s.value.userToken,
|
|
252
|
-
"onUpdate:modelValue":
|
|
247
|
+
"onUpdate:modelValue": p[1] || (p[1] = (l) => s.value.userToken = l),
|
|
253
248
|
placeholder: "请输入验证码"
|
|
254
|
-
}, null, 8, ["modelValue"]), i(
|
|
249
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
255
250
|
ref_key: "SendVerifyCodeRef",
|
|
256
251
|
ref: h,
|
|
257
|
-
size:
|
|
252
|
+
size: r.size,
|
|
258
253
|
loading: g.value,
|
|
259
254
|
style: {
|
|
260
255
|
"margin-left": "10px"
|
|
@@ -274,9 +269,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
274
269
|
message: "密码不能少于10字符"
|
|
275
270
|
}]
|
|
276
271
|
}, {
|
|
277
|
-
default:
|
|
272
|
+
default: c(() => [i(e(C), {
|
|
278
273
|
modelValue: s.value.password,
|
|
279
|
-
"onUpdate:modelValue":
|
|
274
|
+
"onUpdate:modelValue": p[2] || (p[2] = (l) => s.value.password = l),
|
|
280
275
|
placeholder: "请输入密码",
|
|
281
276
|
type: "password",
|
|
282
277
|
autocomplete: ""
|
|
@@ -293,27 +288,27 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
293
288
|
minLength: 10,
|
|
294
289
|
message: "确认密码不能少于10字符"
|
|
295
290
|
}, {
|
|
296
|
-
validator: (l,
|
|
297
|
-
l !== s.value.password ?
|
|
291
|
+
validator: (l, w) => {
|
|
292
|
+
l !== s.value.password ? w("两次密码输入不一致,请重新输入") : w();
|
|
298
293
|
}
|
|
299
294
|
}]
|
|
300
295
|
}, {
|
|
301
|
-
default:
|
|
296
|
+
default: c(() => [i(e(C), {
|
|
302
297
|
modelValue: s.value.confirmPassword,
|
|
303
|
-
"onUpdate:modelValue":
|
|
298
|
+
"onUpdate:modelValue": p[3] || (p[3] = (l) => s.value.confirmPassword = l),
|
|
304
299
|
placeholder: "请输入确认密码密码",
|
|
305
300
|
type: "password",
|
|
306
301
|
autocomplete: ""
|
|
307
302
|
}, null, 8, ["modelValue"])]),
|
|
308
303
|
_: 1
|
|
309
|
-
}, 8, ["rules"]),
|
|
304
|
+
}, 8, ["rules"]), _("div", nt, [i(e(L), {
|
|
310
305
|
type: "primary",
|
|
311
|
-
loading:
|
|
306
|
+
loading: r.loading,
|
|
312
307
|
long: "",
|
|
313
|
-
size:
|
|
314
|
-
onClick:
|
|
308
|
+
size: r.size,
|
|
309
|
+
onClick: v
|
|
315
310
|
}, {
|
|
316
|
-
default:
|
|
311
|
+
default: c(() => [...p[4] || (p[4] = [q(" 提交 ", -1)])]),
|
|
317
312
|
_: 1
|
|
318
313
|
}, 8, ["loading", "size"])])]),
|
|
319
314
|
_: 1
|
|
@@ -323,7 +318,7 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
323
318
|
class: "content"
|
|
324
319
|
}, ct = {
|
|
325
320
|
class: "sendVerifyCodeItem"
|
|
326
|
-
}, pt = /* @__PURE__ */
|
|
321
|
+
}, pt = /* @__PURE__ */ V({
|
|
327
322
|
__name: "AuthkitPhonePasswordUpdateAndVerify",
|
|
328
323
|
props: {
|
|
329
324
|
size: {
|
|
@@ -337,10 +332,10 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
337
332
|
}
|
|
338
333
|
},
|
|
339
334
|
emits: ["submit"],
|
|
340
|
-
setup(
|
|
341
|
-
emit:
|
|
335
|
+
setup(b, {
|
|
336
|
+
emit: u
|
|
342
337
|
}) {
|
|
343
|
-
const
|
|
338
|
+
const n = u, r = b, h = A(), g = A(!1), a = A(), s = A({
|
|
344
339
|
phone: void 0,
|
|
345
340
|
code: void 0,
|
|
346
341
|
password: void 0,
|
|
@@ -352,27 +347,27 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
352
347
|
minLength: 10,
|
|
353
348
|
message: "确认密码不能少于10字符"
|
|
354
349
|
}, {
|
|
355
|
-
validator: (
|
|
356
|
-
if (
|
|
350
|
+
validator: (p, l) => {
|
|
351
|
+
if (p !== s.value.password) {
|
|
357
352
|
l("两次密码输入不一致,请重新输入");
|
|
358
353
|
return;
|
|
359
354
|
}
|
|
360
355
|
l();
|
|
361
356
|
}
|
|
362
357
|
}];
|
|
363
|
-
async function
|
|
358
|
+
async function v() {
|
|
364
359
|
if (!await a.value.validateField(["phone"])) {
|
|
365
360
|
g.value = !0;
|
|
366
|
-
const l = await
|
|
361
|
+
const l = await B().auth.verify.sms.send.post({
|
|
367
362
|
phone: s.value.phone,
|
|
368
363
|
purpose: "resetPassword"
|
|
369
364
|
});
|
|
370
|
-
g.value = !1,
|
|
365
|
+
g.value = !1, K(h.value, l);
|
|
371
366
|
}
|
|
372
367
|
}
|
|
373
368
|
async function t() {
|
|
374
|
-
a.value.validate().then((
|
|
375
|
-
|
|
369
|
+
a.value.validate().then((p) => {
|
|
370
|
+
p || n("submit", {
|
|
376
371
|
method: "phone",
|
|
377
372
|
phone: s.value.phone,
|
|
378
373
|
code: s.value.code,
|
|
@@ -380,14 +375,14 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
380
375
|
});
|
|
381
376
|
});
|
|
382
377
|
}
|
|
383
|
-
return (
|
|
378
|
+
return (p, l) => (o(), S("div", dt, [i(e(E), {
|
|
384
379
|
ref_key: "formRef",
|
|
385
380
|
ref: a,
|
|
386
381
|
model: s.value,
|
|
387
|
-
size:
|
|
382
|
+
size: r.size,
|
|
388
383
|
"auto-label-width": ""
|
|
389
384
|
}, {
|
|
390
|
-
default:
|
|
385
|
+
default: c(() => [i(e(P), {
|
|
391
386
|
field: "phone",
|
|
392
387
|
label: "手机号",
|
|
393
388
|
"hide-label": "",
|
|
@@ -399,9 +394,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
399
394
|
message: "请输入有效的手机号"
|
|
400
395
|
}]
|
|
401
396
|
}, {
|
|
402
|
-
default:
|
|
397
|
+
default: c(() => [i(e(C), {
|
|
403
398
|
modelValue: s.value.phone,
|
|
404
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
399
|
+
"onUpdate:modelValue": l[0] || (l[0] = (w) => s.value.phone = w),
|
|
405
400
|
placeholder: "请输入手机号",
|
|
406
401
|
autocomplete: "tel",
|
|
407
402
|
type: "tel"
|
|
@@ -416,20 +411,20 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
416
411
|
message: "请输入验证码"
|
|
417
412
|
}]
|
|
418
413
|
}, {
|
|
419
|
-
default:
|
|
414
|
+
default: c(() => [_("div", ct, [i(e(C), {
|
|
420
415
|
modelValue: s.value.code,
|
|
421
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
416
|
+
"onUpdate:modelValue": l[1] || (l[1] = (w) => s.value.code = w),
|
|
422
417
|
placeholder: "请输入验证码",
|
|
423
418
|
autocomplete: "one-time-code"
|
|
424
|
-
}, null, 8, ["modelValue"]), i(
|
|
419
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
425
420
|
ref_key: "SendVerifyCodeRef",
|
|
426
421
|
ref: h,
|
|
427
|
-
size:
|
|
422
|
+
size: r.size,
|
|
428
423
|
loading: g.value,
|
|
429
424
|
style: {
|
|
430
425
|
"margin-left": "10px"
|
|
431
426
|
},
|
|
432
|
-
onSend:
|
|
427
|
+
onSend: v
|
|
433
428
|
}, null, 8, ["size", "loading"])])]),
|
|
434
429
|
_: 1
|
|
435
430
|
}), i(e(P), {
|
|
@@ -444,9 +439,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
444
439
|
message: "密码不能少于10字符"
|
|
445
440
|
}]
|
|
446
441
|
}, {
|
|
447
|
-
default:
|
|
442
|
+
default: c(() => [i(e(C), {
|
|
448
443
|
modelValue: s.value.password,
|
|
449
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
444
|
+
"onUpdate:modelValue": l[2] || (l[2] = (w) => s.value.password = w),
|
|
450
445
|
placeholder: "请输入密码",
|
|
451
446
|
type: "password",
|
|
452
447
|
autocomplete: "new-password"
|
|
@@ -458,22 +453,22 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
458
453
|
"hide-label": "",
|
|
459
454
|
rules: d
|
|
460
455
|
}, {
|
|
461
|
-
default:
|
|
456
|
+
default: c(() => [i(e(C), {
|
|
462
457
|
modelValue: s.value.confirmPassword,
|
|
463
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
458
|
+
"onUpdate:modelValue": l[3] || (l[3] = (w) => s.value.confirmPassword = w),
|
|
464
459
|
placeholder: "请输入确认密码",
|
|
465
460
|
type: "password",
|
|
466
461
|
autocomplete: "new-password"
|
|
467
462
|
}, null, 8, ["modelValue"])]),
|
|
468
463
|
_: 1
|
|
469
|
-
}), i(e(
|
|
464
|
+
}), i(e(L), {
|
|
470
465
|
type: "primary",
|
|
471
|
-
loading:
|
|
466
|
+
loading: r.loading,
|
|
472
467
|
long: "",
|
|
473
|
-
size:
|
|
468
|
+
size: r.size,
|
|
474
469
|
onClick: t
|
|
475
470
|
}, {
|
|
476
|
-
default:
|
|
471
|
+
default: c(() => [...l[4] || (l[4] = [q(" 提交 ", -1)])]),
|
|
477
472
|
_: 1
|
|
478
473
|
}, 8, ["loading", "size"])]),
|
|
479
474
|
_: 1
|
|
@@ -481,23 +476,23 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
481
476
|
}
|
|
482
477
|
}), mt = /* @__PURE__ */ U(pt, [["__scopeId", "data-v-a01a994e"]]), ft = {
|
|
483
478
|
class: "SwitchSignIn"
|
|
484
|
-
}, vt = /* @__PURE__ */
|
|
479
|
+
}, vt = /* @__PURE__ */ V({
|
|
485
480
|
__name: "AuthkitSwitchSignIn",
|
|
486
481
|
emits: ["switchSignIn"],
|
|
487
|
-
setup(
|
|
488
|
-
emit:
|
|
482
|
+
setup(b, {
|
|
483
|
+
emit: u
|
|
489
484
|
}) {
|
|
490
|
-
const
|
|
491
|
-
function
|
|
492
|
-
|
|
485
|
+
const n = u;
|
|
486
|
+
function r() {
|
|
487
|
+
n("switchSignIn");
|
|
493
488
|
}
|
|
494
|
-
return (h, g) => (
|
|
489
|
+
return (h, g) => (o(), S("div", ft, [_("span", null, [g[1] || (g[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
|
|
495
490
|
style: {
|
|
496
491
|
padding: "0px"
|
|
497
492
|
},
|
|
498
|
-
onClick:
|
|
493
|
+
onClick: r
|
|
499
494
|
}, {
|
|
500
|
-
default:
|
|
495
|
+
default: c(() => [...g[0] || (g[0] = [q("去登录", -1)])]),
|
|
501
496
|
_: 1
|
|
502
497
|
})])]));
|
|
503
498
|
}
|
|
@@ -509,7 +504,7 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
509
504
|
}, yt = {
|
|
510
505
|
key: 3,
|
|
511
506
|
class: "empty"
|
|
512
|
-
}, bt = /* @__PURE__ */
|
|
507
|
+
}, bt = /* @__PURE__ */ V({
|
|
513
508
|
__name: "AuthkitResetPassword",
|
|
514
509
|
props: {
|
|
515
510
|
size: {
|
|
@@ -524,12 +519,12 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
524
519
|
}
|
|
525
520
|
},
|
|
526
521
|
emits: ["switchSignIn", "submit"],
|
|
527
|
-
setup(
|
|
528
|
-
emit:
|
|
522
|
+
setup(b, {
|
|
523
|
+
emit: u
|
|
529
524
|
}) {
|
|
530
|
-
const
|
|
525
|
+
const n = u, r = b, {
|
|
531
526
|
appsData: h
|
|
532
|
-
} =
|
|
527
|
+
} = j(), g = $(() => h.value.authMethods), a = $(() => {
|
|
533
528
|
const t = [];
|
|
534
529
|
return g.value.login.emailPassword && t.push({
|
|
535
530
|
key: "email",
|
|
@@ -538,57 +533,57 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
|
538
533
|
key: "phone",
|
|
539
534
|
title: "手机号找回"
|
|
540
535
|
}), t;
|
|
541
|
-
}), s =
|
|
536
|
+
}), s = A("email");
|
|
542
537
|
re(() => {
|
|
543
538
|
var t;
|
|
544
|
-
a.value.some((
|
|
539
|
+
a.value.some((p) => p.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
|
|
545
540
|
});
|
|
546
541
|
function d() {
|
|
547
|
-
|
|
542
|
+
n("switchSignIn");
|
|
548
543
|
}
|
|
549
|
-
async function
|
|
550
|
-
|
|
544
|
+
async function v(t) {
|
|
545
|
+
n("submit", {
|
|
551
546
|
method: s.value,
|
|
552
547
|
...t
|
|
553
548
|
});
|
|
554
549
|
}
|
|
555
|
-
return (t,
|
|
550
|
+
return (t, p) => (o(), S("div", gt, [a.value.length > 1 ? (o(), S("div", ht, [i(e(ce), {
|
|
556
551
|
"active-key": s.value,
|
|
557
|
-
"onUpdate:activeKey":
|
|
552
|
+
"onUpdate:activeKey": p[0] || (p[0] = (l) => s.value = l)
|
|
558
553
|
}, {
|
|
559
|
-
default:
|
|
554
|
+
default: c(() => [(o(!0), S(D, null, ue(a.value, (l) => (o(), z(e(pe), {
|
|
560
555
|
key: l.key,
|
|
561
556
|
title: l.title
|
|
562
557
|
}, null, 8, ["title"]))), 128))]),
|
|
563
558
|
_: 1
|
|
564
|
-
}, 8, ["active-key"])])) :
|
|
559
|
+
}, 8, ["active-key"])])) : I("", !0), s.value === "email" && g.value.login.emailPassword ? (o(), z(ut, {
|
|
565
560
|
key: 1,
|
|
566
|
-
loading:
|
|
567
|
-
size:
|
|
568
|
-
onSubmit:
|
|
569
|
-
}, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (
|
|
561
|
+
loading: b.loading,
|
|
562
|
+
size: r.size,
|
|
563
|
+
onSubmit: v
|
|
564
|
+
}, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (o(), z(mt, {
|
|
570
565
|
key: 2,
|
|
571
|
-
loading:
|
|
572
|
-
size:
|
|
573
|
-
onSubmit:
|
|
574
|
-
}, null, 8, ["loading", "size"])) : (
|
|
566
|
+
loading: b.loading,
|
|
567
|
+
size: r.size,
|
|
568
|
+
onSubmit: v
|
|
569
|
+
}, null, 8, ["loading", "size"])) : (o(), S("div", yt, "当前应用未开放找回密码")), i(fe, {
|
|
575
570
|
onSwitchSignIn: d
|
|
576
571
|
})]));
|
|
577
572
|
}
|
|
578
573
|
}), wt = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-90d789bb"]]);
|
|
579
|
-
let
|
|
580
|
-
function _t(
|
|
581
|
-
|
|
574
|
+
let se = null, ie = null;
|
|
575
|
+
function _t(b) {
|
|
576
|
+
se = b.onPrivacyPolicy ?? null, ie = b.onUserServiceAgreement ?? null;
|
|
582
577
|
}
|
|
583
578
|
function kt() {
|
|
584
|
-
|
|
579
|
+
se == null || se();
|
|
585
580
|
}
|
|
586
581
|
function St() {
|
|
587
|
-
|
|
582
|
+
ie == null || ie();
|
|
588
583
|
}
|
|
589
584
|
const zt = {
|
|
590
585
|
key: 2
|
|
591
|
-
}, It = /* @__PURE__ */
|
|
586
|
+
}, It = /* @__PURE__ */ V({
|
|
592
587
|
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
593
588
|
props: /* @__PURE__ */ $e({
|
|
594
589
|
currentView: {}
|
|
@@ -600,78 +595,78 @@ const zt = {
|
|
|
600
595
|
acceptedTermsModifiers: {}
|
|
601
596
|
}),
|
|
602
597
|
emits: ["update:acceptedTerms"],
|
|
603
|
-
setup(
|
|
598
|
+
setup(b) {
|
|
604
599
|
const {
|
|
605
|
-
config:
|
|
606
|
-
} = me(),
|
|
600
|
+
config: u
|
|
601
|
+
} = me(), n = b, r = Ue(b, "acceptedTerms"), {
|
|
607
602
|
getLink: h,
|
|
608
603
|
openLegalDoc: g
|
|
609
|
-
} =
|
|
604
|
+
} = Ae(), {
|
|
610
605
|
termsShaking: a,
|
|
611
606
|
requiresAcceptanceForSignUp: s,
|
|
612
607
|
requiresAcceptanceForOAuth: d,
|
|
613
|
-
syncAcceptedTerms:
|
|
614
|
-
} =
|
|
615
|
-
|
|
616
|
-
|
|
608
|
+
syncAcceptedTerms: v
|
|
609
|
+
} = F();
|
|
610
|
+
be(r, (k) => {
|
|
611
|
+
v(k);
|
|
617
612
|
});
|
|
618
|
-
const t =
|
|
619
|
-
const
|
|
620
|
-
return
|
|
621
|
-
}),
|
|
622
|
-
const
|
|
623
|
-
return
|
|
624
|
-
}), l =
|
|
625
|
-
function
|
|
626
|
-
if (
|
|
613
|
+
const t = $(() => {
|
|
614
|
+
const k = h("userServiceAgreement");
|
|
615
|
+
return k != null && k.configured ? k : void 0;
|
|
616
|
+
}), p = $(() => {
|
|
617
|
+
const k = h("privacyPolicy");
|
|
618
|
+
return k != null && k.configured ? k : void 0;
|
|
619
|
+
}), l = $(() => !!(t.value || p.value)), w = $(() => n.currentView === "signUp" ? s() : n.currentView === "signIn" ? d() : !1), m = $(() => l.value && w.value);
|
|
620
|
+
function f() {
|
|
621
|
+
if (u.legalDocsMode === "builtin") {
|
|
627
622
|
g("userServiceAgreement");
|
|
628
623
|
return;
|
|
629
624
|
}
|
|
630
625
|
St();
|
|
631
626
|
}
|
|
632
627
|
function y() {
|
|
633
|
-
if (
|
|
628
|
+
if (u.legalDocsMode === "builtin") {
|
|
634
629
|
g("privacyPolicy");
|
|
635
630
|
return;
|
|
636
631
|
}
|
|
637
632
|
kt();
|
|
638
633
|
}
|
|
639
|
-
return (
|
|
634
|
+
return (k, T) => m.value ? (o(), S("div", {
|
|
640
635
|
key: 0,
|
|
641
636
|
class: ye(["ServiceAgreementAndPrivacyProtection", {
|
|
642
637
|
"terms-shake": e(a)
|
|
643
638
|
}])
|
|
644
|
-
}, [l.value ? (
|
|
639
|
+
}, [l.value ? (o(), S(D, {
|
|
645
640
|
key: 0
|
|
646
|
-
}, [
|
|
641
|
+
}, [w.value ? (o(), z(e(Oe), {
|
|
647
642
|
key: 0,
|
|
648
|
-
modelValue:
|
|
649
|
-
"onUpdate:modelValue":
|
|
643
|
+
modelValue: r.value,
|
|
644
|
+
"onUpdate:modelValue": T[0] || (T[0] = (x) => r.value = x),
|
|
650
645
|
class: "terms-checkbox"
|
|
651
646
|
}, {
|
|
652
|
-
default:
|
|
647
|
+
default: c(() => [...T[1] || (T[1] = [_("span", {
|
|
653
648
|
class: "terms-text"
|
|
654
649
|
}, "我已阅读并同意", -1)])]),
|
|
655
650
|
_: 1
|
|
656
|
-
}, 8, ["modelValue"])) :
|
|
651
|
+
}, 8, ["modelValue"])) : I("", !0), t.value ? (o(), z(e(Y), {
|
|
657
652
|
key: 1,
|
|
658
|
-
onClick:
|
|
653
|
+
onClick: f
|
|
659
654
|
}, {
|
|
660
|
-
default:
|
|
655
|
+
default: c(() => [q(M(t.value.label), 1)]),
|
|
661
656
|
_: 1
|
|
662
|
-
})) :
|
|
657
|
+
})) : I("", !0), t.value && p.value ? (o(), S("span", zt, "和")) : I("", !0), p.value ? (o(), z(e(Y), {
|
|
663
658
|
key: 3,
|
|
664
659
|
onClick: y
|
|
665
660
|
}, {
|
|
666
|
-
default:
|
|
661
|
+
default: c(() => [q(M(p.value.label), 1)]),
|
|
667
662
|
_: 1
|
|
668
|
-
})) :
|
|
663
|
+
})) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
|
|
669
664
|
}
|
|
670
|
-
}),
|
|
665
|
+
}), ee = /* @__PURE__ */ U(It, [["__scopeId", "data-v-a0c2f361"]]), At = {
|
|
671
666
|
class: "content"
|
|
672
667
|
}, Pt = {
|
|
673
668
|
class: "handle"
|
|
674
|
-
}, Vt = /* @__PURE__ */
|
|
669
|
+
}, Vt = /* @__PURE__ */ V({
|
|
675
670
|
__name: "AuthkitPasswordAuth",
|
|
676
671
|
props: {
|
|
677
672
|
size: {
|
|
@@ -689,32 +684,32 @@ const zt = {
|
|
|
689
684
|
}
|
|
690
685
|
},
|
|
691
686
|
emits: ["submit"],
|
|
692
|
-
setup(
|
|
693
|
-
emit:
|
|
687
|
+
setup(b, {
|
|
688
|
+
emit: u
|
|
694
689
|
}) {
|
|
695
|
-
const
|
|
696
|
-
useTermsFormField:
|
|
697
|
-
} =
|
|
690
|
+
const n = u, {
|
|
691
|
+
useTermsFormField: r
|
|
692
|
+
} = F(), {
|
|
698
693
|
showTermsField: h,
|
|
699
694
|
termsRules: g
|
|
700
|
-
} =
|
|
695
|
+
} = r("signIn"), a = b, s = A(), d = A({
|
|
701
696
|
identifier: void 0,
|
|
702
697
|
password: void 0,
|
|
703
698
|
acceptedTerms: !1
|
|
704
699
|
});
|
|
705
|
-
async function
|
|
700
|
+
async function v() {
|
|
706
701
|
s.value.validate().then((t) => {
|
|
707
|
-
t ||
|
|
702
|
+
t || n("submit", d.value);
|
|
708
703
|
});
|
|
709
704
|
}
|
|
710
|
-
return (t,
|
|
705
|
+
return (t, p) => (o(), S("div", At, [i(e(E), {
|
|
711
706
|
ref_key: "formRef",
|
|
712
707
|
ref: s,
|
|
713
708
|
model: d.value,
|
|
714
709
|
size: a.size,
|
|
715
710
|
"auto-label-width": ""
|
|
716
711
|
}, {
|
|
717
|
-
default:
|
|
712
|
+
default: c(() => [i(e(P), {
|
|
718
713
|
field: "identifier",
|
|
719
714
|
label: "邮箱或手机号",
|
|
720
715
|
"hide-label": "",
|
|
@@ -723,11 +718,11 @@ const zt = {
|
|
|
723
718
|
message: "请输入邮箱或手机号"
|
|
724
719
|
}]
|
|
725
720
|
}, {
|
|
726
|
-
default:
|
|
721
|
+
default: c(() => [i(e(C), {
|
|
727
722
|
modelValue: d.value.identifier,
|
|
728
|
-
"onUpdate:modelValue":
|
|
723
|
+
"onUpdate:modelValue": p[0] || (p[0] = (l) => d.value.identifier = l),
|
|
729
724
|
placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
|
|
730
|
-
autocomplete: "username
|
|
725
|
+
autocomplete: "username"
|
|
731
726
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
732
727
|
_: 1
|
|
733
728
|
}), i(e(P), {
|
|
@@ -739,40 +734,40 @@ const zt = {
|
|
|
739
734
|
message: "请输入密码"
|
|
740
735
|
}]
|
|
741
736
|
}, {
|
|
742
|
-
default:
|
|
737
|
+
default: c(() => [i(e(C), {
|
|
743
738
|
modelValue: d.value.password,
|
|
744
|
-
"onUpdate:modelValue":
|
|
739
|
+
"onUpdate:modelValue": p[1] || (p[1] = (l) => d.value.password = l),
|
|
745
740
|
placeholder: "请输入密码",
|
|
746
741
|
type: "password",
|
|
747
742
|
autocomplete: "current-password"
|
|
748
743
|
}, null, 8, ["modelValue"])]),
|
|
749
744
|
_: 1
|
|
750
|
-
}),
|
|
745
|
+
}), _("div", Pt, [i(e(L), {
|
|
751
746
|
type: "primary",
|
|
752
747
|
loading: a.loading,
|
|
753
748
|
long: "",
|
|
754
749
|
size: a.size,
|
|
755
|
-
onClick:
|
|
750
|
+
onClick: v
|
|
756
751
|
}, {
|
|
757
|
-
default:
|
|
752
|
+
default: c(() => [...p[3] || (p[3] = [q(" 登录 ", -1)])]),
|
|
758
753
|
_: 1
|
|
759
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
754
|
+
}, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
|
|
760
755
|
key: 0,
|
|
761
756
|
field: "acceptedTerms",
|
|
762
757
|
"hide-label": "",
|
|
763
758
|
rules: e(g)
|
|
764
759
|
}, {
|
|
765
|
-
default:
|
|
760
|
+
default: c(() => [i(ee, {
|
|
766
761
|
"accepted-terms": d.value.acceptedTerms,
|
|
767
|
-
"onUpdate:acceptedTerms":
|
|
762
|
+
"onUpdate:acceptedTerms": p[2] || (p[2] = (l) => d.value.acceptedTerms = l),
|
|
768
763
|
"current-view": "signIn"
|
|
769
764
|
}, null, 8, ["accepted-terms"])]),
|
|
770
765
|
_: 1
|
|
771
|
-
}, 8, ["rules"])) :
|
|
766
|
+
}, 8, ["rules"])) : I("", !0)])]),
|
|
772
767
|
_: 1
|
|
773
768
|
}, 8, ["model", "size"])]));
|
|
774
769
|
}
|
|
775
|
-
}), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-
|
|
770
|
+
}), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-bed304e1"]]), Ut = {
|
|
776
771
|
class: "SignInPhone"
|
|
777
772
|
}, $t = {
|
|
778
773
|
class: "content"
|
|
@@ -780,7 +775,7 @@ const zt = {
|
|
|
780
775
|
class: "sendVerifyCodeItem"
|
|
781
776
|
}, Tt = {
|
|
782
777
|
class: "handle"
|
|
783
|
-
}, qt = /* @__PURE__ */
|
|
778
|
+
}, qt = /* @__PURE__ */ V({
|
|
784
779
|
__name: "AuthkitSignInPhone",
|
|
785
780
|
props: {
|
|
786
781
|
size: {
|
|
@@ -794,46 +789,46 @@ const zt = {
|
|
|
794
789
|
}
|
|
795
790
|
},
|
|
796
791
|
emits: ["submit"],
|
|
797
|
-
setup(
|
|
798
|
-
emit:
|
|
792
|
+
setup(b, {
|
|
793
|
+
emit: u
|
|
799
794
|
}) {
|
|
800
|
-
const
|
|
801
|
-
useTermsFormField:
|
|
802
|
-
} =
|
|
795
|
+
const n = u, {
|
|
796
|
+
useTermsFormField: r
|
|
797
|
+
} = F(), {
|
|
803
798
|
showTermsField: h,
|
|
804
799
|
termsRules: g
|
|
805
|
-
} =
|
|
800
|
+
} = r("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
|
|
806
801
|
phone: void 0,
|
|
807
802
|
code: void 0,
|
|
808
803
|
acceptedTerms: !1
|
|
809
804
|
});
|
|
810
|
-
async function
|
|
811
|
-
if (!await
|
|
805
|
+
async function p() {
|
|
806
|
+
if (!await v.value.validateField(["phone"])) {
|
|
812
807
|
d.value = !0;
|
|
813
|
-
const m = await
|
|
808
|
+
const m = await B().auth.verify.sms.send.post({
|
|
814
809
|
phone: t.value.phone,
|
|
815
810
|
purpose: "signIn"
|
|
816
811
|
});
|
|
817
|
-
d.value = !1,
|
|
812
|
+
d.value = !1, K(s.value, m);
|
|
818
813
|
}
|
|
819
814
|
}
|
|
820
815
|
async function l() {
|
|
821
|
-
|
|
822
|
-
|
|
816
|
+
v.value.validate().then((w) => {
|
|
817
|
+
w || n("submit", {
|
|
823
818
|
identifier: t.value.phone,
|
|
824
819
|
code: t.value.code,
|
|
825
820
|
method: "code"
|
|
826
821
|
});
|
|
827
822
|
});
|
|
828
823
|
}
|
|
829
|
-
return (
|
|
824
|
+
return (w, m) => (o(), S("div", Ut, [_("div", $t, [i(e(E), {
|
|
830
825
|
ref_key: "formRef",
|
|
831
|
-
ref:
|
|
826
|
+
ref: v,
|
|
832
827
|
model: t.value,
|
|
833
828
|
size: a.size,
|
|
834
829
|
"auto-label-width": ""
|
|
835
830
|
}, {
|
|
836
|
-
default:
|
|
831
|
+
default: c(() => [i(e(P), {
|
|
837
832
|
field: "phone",
|
|
838
833
|
label: "手机号",
|
|
839
834
|
"hide-label": "",
|
|
@@ -845,11 +840,11 @@ const zt = {
|
|
|
845
840
|
message: "请输入有效的手机号"
|
|
846
841
|
}]
|
|
847
842
|
}, {
|
|
848
|
-
default:
|
|
843
|
+
default: c(() => [i(e(C), {
|
|
849
844
|
modelValue: t.value.phone,
|
|
850
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
845
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.phone = f),
|
|
851
846
|
placeholder: "请输入手机号",
|
|
852
|
-
autocomplete: "username
|
|
847
|
+
autocomplete: "username",
|
|
853
848
|
type: "tel"
|
|
854
849
|
}, null, 8, ["modelValue"])]),
|
|
855
850
|
_: 1
|
|
@@ -862,12 +857,12 @@ const zt = {
|
|
|
862
857
|
message: "请输入验证码"
|
|
863
858
|
}]
|
|
864
859
|
}, {
|
|
865
|
-
default:
|
|
860
|
+
default: c(() => [_("div", Rt, [i(e(C), {
|
|
866
861
|
modelValue: t.value.code,
|
|
867
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
862
|
+
"onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.code = f),
|
|
868
863
|
placeholder: "请输入验证码",
|
|
869
864
|
autocomplete: "one-time-code"
|
|
870
|
-
}, null, 8, ["modelValue"]), i(
|
|
865
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
871
866
|
ref_key: "SendVerifyCodeRef",
|
|
872
867
|
ref: s,
|
|
873
868
|
size: a.size,
|
|
@@ -875,41 +870,41 @@ const zt = {
|
|
|
875
870
|
style: {
|
|
876
871
|
"margin-left": "10px"
|
|
877
872
|
},
|
|
878
|
-
onSend:
|
|
873
|
+
onSend: p
|
|
879
874
|
}, null, 8, ["size", "loading"])])]),
|
|
880
875
|
_: 1
|
|
881
|
-
}),
|
|
876
|
+
}), _("div", Tt, [i(e(L), {
|
|
882
877
|
type: "primary",
|
|
883
878
|
loading: a.loading,
|
|
884
879
|
long: "",
|
|
885
880
|
size: a.size,
|
|
886
881
|
onClick: l
|
|
887
882
|
}, {
|
|
888
|
-
default:
|
|
883
|
+
default: c(() => [...m[3] || (m[3] = [q(" 登录 ", -1)])]),
|
|
889
884
|
_: 1
|
|
890
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
885
|
+
}, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
|
|
891
886
|
key: 0,
|
|
892
887
|
field: "acceptedTerms",
|
|
893
888
|
"hide-label": "",
|
|
894
889
|
rules: e(g)
|
|
895
890
|
}, {
|
|
896
|
-
default:
|
|
891
|
+
default: c(() => [i(ee, {
|
|
897
892
|
"accepted-terms": t.value.acceptedTerms,
|
|
898
|
-
"onUpdate:acceptedTerms": m[2] || (m[2] = (
|
|
893
|
+
"onUpdate:acceptedTerms": m[2] || (m[2] = (f) => t.value.acceptedTerms = f),
|
|
899
894
|
"current-view": "signIn"
|
|
900
895
|
}, null, 8, ["accepted-terms"])]),
|
|
901
896
|
_: 1
|
|
902
|
-
}, 8, ["rules"])) :
|
|
897
|
+
}, 8, ["rules"])) : I("", !0)])]),
|
|
903
898
|
_: 1
|
|
904
899
|
}, 8, ["model", "size"])])]));
|
|
905
900
|
}
|
|
906
|
-
}), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-
|
|
901
|
+
}), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-e2a3fef3"]]), xt = {
|
|
907
902
|
class: "SignInEmailCode"
|
|
908
|
-
}, Bt = {
|
|
909
|
-
class: "sendVerifyCodeItem"
|
|
910
903
|
}, Lt = {
|
|
904
|
+
class: "sendVerifyCodeItem"
|
|
905
|
+
}, Bt = {
|
|
911
906
|
class: "handle"
|
|
912
|
-
},
|
|
907
|
+
}, Mt = /* @__PURE__ */ V({
|
|
913
908
|
__name: "AuthkitSignInEmailCode",
|
|
914
909
|
props: {
|
|
915
910
|
size: {
|
|
@@ -923,34 +918,34 @@ const zt = {
|
|
|
923
918
|
}
|
|
924
919
|
},
|
|
925
920
|
emits: ["submit"],
|
|
926
|
-
setup(
|
|
927
|
-
emit:
|
|
921
|
+
setup(b, {
|
|
922
|
+
emit: u
|
|
928
923
|
}) {
|
|
929
|
-
const
|
|
930
|
-
useTermsFormField:
|
|
931
|
-
} =
|
|
924
|
+
const n = u, {
|
|
925
|
+
useTermsFormField: r
|
|
926
|
+
} = F(), {
|
|
932
927
|
showTermsField: h,
|
|
933
928
|
termsRules: g
|
|
934
|
-
} =
|
|
929
|
+
} = r("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
|
|
935
930
|
email: void 0,
|
|
936
931
|
code: void 0,
|
|
937
932
|
emailVerifyId: "",
|
|
938
933
|
acceptedTerms: !1
|
|
939
934
|
});
|
|
940
|
-
async function
|
|
935
|
+
async function p() {
|
|
941
936
|
var m;
|
|
942
|
-
if (!await
|
|
937
|
+
if (!await v.value.validateField(["email"])) {
|
|
943
938
|
d.value = !0;
|
|
944
|
-
const
|
|
939
|
+
const f = await B().auth.verify.email.retry.post({
|
|
945
940
|
email: t.value.email,
|
|
946
941
|
purpose: "signIn"
|
|
947
942
|
});
|
|
948
|
-
d.value = !1, (m =
|
|
943
|
+
d.value = !1, (m = f.data) != null && m.emailVerifyId && (t.value.emailVerifyId = f.data.emailVerifyId), K(s.value, f);
|
|
949
944
|
}
|
|
950
945
|
}
|
|
951
946
|
async function l() {
|
|
952
|
-
|
|
953
|
-
|
|
947
|
+
v.value.validate().then((w) => {
|
|
948
|
+
w || n("submit", {
|
|
954
949
|
identifier: t.value.email,
|
|
955
950
|
code: t.value.code,
|
|
956
951
|
emailVerifyId: t.value.emailVerifyId,
|
|
@@ -958,14 +953,14 @@ const zt = {
|
|
|
958
953
|
});
|
|
959
954
|
});
|
|
960
955
|
}
|
|
961
|
-
return (
|
|
956
|
+
return (w, m) => (o(), S("div", xt, [i(e(E), {
|
|
962
957
|
ref_key: "formRef",
|
|
963
|
-
ref:
|
|
958
|
+
ref: v,
|
|
964
959
|
model: t.value,
|
|
965
960
|
size: a.size,
|
|
966
961
|
"auto-label-width": ""
|
|
967
962
|
}, {
|
|
968
|
-
default:
|
|
963
|
+
default: c(() => [i(e(P), {
|
|
969
964
|
field: "email",
|
|
970
965
|
"hide-label": "",
|
|
971
966
|
rules: [{
|
|
@@ -976,11 +971,11 @@ const zt = {
|
|
|
976
971
|
message: "请输入有效的邮箱"
|
|
977
972
|
}]
|
|
978
973
|
}, {
|
|
979
|
-
default:
|
|
974
|
+
default: c(() => [i(e(C), {
|
|
980
975
|
modelValue: t.value.email,
|
|
981
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
976
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.email = f),
|
|
982
977
|
placeholder: "请输入邮箱",
|
|
983
|
-
autocomplete: "username
|
|
978
|
+
autocomplete: "username"
|
|
984
979
|
}, null, 8, ["modelValue"])]),
|
|
985
980
|
_: 1
|
|
986
981
|
}), i(e(P), {
|
|
@@ -991,12 +986,12 @@ const zt = {
|
|
|
991
986
|
message: "请输入验证码"
|
|
992
987
|
}]
|
|
993
988
|
}, {
|
|
994
|
-
default:
|
|
989
|
+
default: c(() => [_("div", Lt, [i(e(C), {
|
|
995
990
|
modelValue: t.value.code,
|
|
996
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
991
|
+
"onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.code = f),
|
|
997
992
|
placeholder: "请输入验证码",
|
|
998
993
|
autocomplete: "one-time-code"
|
|
999
|
-
}, null, 8, ["modelValue"]), i(
|
|
994
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
1000
995
|
ref_key: "SendVerifyCodeRef",
|
|
1001
996
|
ref: s,
|
|
1002
997
|
size: a.size,
|
|
@@ -1004,39 +999,39 @@ const zt = {
|
|
|
1004
999
|
style: {
|
|
1005
1000
|
"margin-left": "10px"
|
|
1006
1001
|
},
|
|
1007
|
-
onSend:
|
|
1002
|
+
onSend: p
|
|
1008
1003
|
}, null, 8, ["size", "loading"])])]),
|
|
1009
1004
|
_: 1
|
|
1010
|
-
}),
|
|
1005
|
+
}), _("div", Bt, [i(e(L), {
|
|
1011
1006
|
type: "primary",
|
|
1012
1007
|
loading: a.loading,
|
|
1013
1008
|
long: "",
|
|
1014
1009
|
size: a.size,
|
|
1015
1010
|
onClick: l
|
|
1016
1011
|
}, {
|
|
1017
|
-
default:
|
|
1012
|
+
default: c(() => [...m[3] || (m[3] = [q(" 登录 ", -1)])]),
|
|
1018
1013
|
_: 1
|
|
1019
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1014
|
+
}, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
|
|
1020
1015
|
key: 0,
|
|
1021
1016
|
field: "acceptedTerms",
|
|
1022
1017
|
"hide-label": "",
|
|
1023
1018
|
rules: e(g)
|
|
1024
1019
|
}, {
|
|
1025
|
-
default:
|
|
1020
|
+
default: c(() => [i(ee, {
|
|
1026
1021
|
"accepted-terms": t.value.acceptedTerms,
|
|
1027
|
-
"onUpdate:acceptedTerms": m[2] || (m[2] = (
|
|
1022
|
+
"onUpdate:acceptedTerms": m[2] || (m[2] = (f) => t.value.acceptedTerms = f),
|
|
1028
1023
|
"current-view": "signIn"
|
|
1029
1024
|
}, null, 8, ["accepted-terms"])]),
|
|
1030
1025
|
_: 1
|
|
1031
|
-
}, 8, ["rules"])) :
|
|
1026
|
+
}, 8, ["rules"])) : I("", !0)])]),
|
|
1032
1027
|
_: 1
|
|
1033
1028
|
}, 8, ["model", "size"])]));
|
|
1034
1029
|
}
|
|
1035
|
-
}),
|
|
1030
|
+
}), Ft = /* @__PURE__ */ U(Mt, [["__scopeId", "data-v-00a65922"]]), Dt = {
|
|
1036
1031
|
class: "SwitchSignUpOrResetPassword"
|
|
1037
|
-
},
|
|
1032
|
+
}, Ht = {
|
|
1038
1033
|
key: 0
|
|
1039
|
-
},
|
|
1034
|
+
}, Et = /* @__PURE__ */ V({
|
|
1040
1035
|
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
1041
1036
|
props: {
|
|
1042
1037
|
showSignUp: {
|
|
@@ -1049,41 +1044,41 @@ const zt = {
|
|
|
1049
1044
|
}
|
|
1050
1045
|
},
|
|
1051
1046
|
emits: ["switchSignUp", "switchResetPassword"],
|
|
1052
|
-
setup(
|
|
1053
|
-
emit:
|
|
1047
|
+
setup(b, {
|
|
1048
|
+
emit: u
|
|
1054
1049
|
}) {
|
|
1055
|
-
const
|
|
1050
|
+
const n = b, r = u;
|
|
1056
1051
|
function h() {
|
|
1057
|
-
|
|
1052
|
+
r("switchSignUp");
|
|
1058
1053
|
}
|
|
1059
1054
|
function g() {
|
|
1060
|
-
|
|
1055
|
+
r("switchResetPassword");
|
|
1061
1056
|
}
|
|
1062
|
-
return (a, s) => (
|
|
1057
|
+
return (a, s) => (o(), S("div", Dt, [n.showSignUp ? (o(), S("span", Ht, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
|
|
1063
1058
|
style: {
|
|
1064
1059
|
padding: "0px"
|
|
1065
1060
|
},
|
|
1066
1061
|
onClick: h
|
|
1067
1062
|
}, {
|
|
1068
|
-
default:
|
|
1063
|
+
default: c(() => [...s[0] || (s[0] = [q("去注册?", -1)])]),
|
|
1069
1064
|
_: 1
|
|
1070
|
-
})])) :
|
|
1065
|
+
})])) : I("", !0), n.showResetPassword ? (o(), z(e(Y), {
|
|
1071
1066
|
key: 1,
|
|
1072
1067
|
style: {
|
|
1073
1068
|
padding: "0px"
|
|
1074
1069
|
},
|
|
1075
1070
|
onClick: g
|
|
1076
1071
|
}, {
|
|
1077
|
-
default:
|
|
1072
|
+
default: c(() => [...s[2] || (s[2] = [q(" 忘记密码? ", -1)])]),
|
|
1078
1073
|
_: 1
|
|
1079
|
-
})) :
|
|
1074
|
+
})) : I("", !0)]));
|
|
1080
1075
|
}
|
|
1081
|
-
}), Gt = /* @__PURE__ */ U(
|
|
1076
|
+
}), Gt = /* @__PURE__ */ U(Et, [["__scopeId", "data-v-6ca7b1f2"]]), Nt = {
|
|
1082
1077
|
class: "SignIn"
|
|
1083
1078
|
}, jt = {
|
|
1084
1079
|
key: 0,
|
|
1085
1080
|
class: "tabsContainer"
|
|
1086
|
-
}, Wt = /* @__PURE__ */
|
|
1081
|
+
}, Wt = /* @__PURE__ */ V({
|
|
1087
1082
|
__name: "AuthkitSignIn",
|
|
1088
1083
|
props: {
|
|
1089
1084
|
size: {
|
|
@@ -1097,90 +1092,83 @@ const zt = {
|
|
|
1097
1092
|
}
|
|
1098
1093
|
},
|
|
1099
1094
|
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
1100
|
-
setup(
|
|
1101
|
-
emit:
|
|
1095
|
+
setup(b, {
|
|
1096
|
+
emit: u
|
|
1102
1097
|
}) {
|
|
1103
|
-
const
|
|
1098
|
+
const n = u, r = b, h = Re(), g = $(() => !!h.OAuth), {
|
|
1104
1099
|
appsData: a
|
|
1105
|
-
} =
|
|
1100
|
+
} = j(), {
|
|
1106
1101
|
signUpAuthEnabled: s
|
|
1107
|
-
} =
|
|
1108
|
-
const
|
|
1109
|
-
return (d.value.login.emailPassword || d.value.login.phonePassword) &&
|
|
1102
|
+
} = F(), d = $(() => a.value.authMethods), v = $(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = $(() => d.value.login.emailPassword || d.value.login.phonePassword), p = $(() => {
|
|
1103
|
+
const y = [];
|
|
1104
|
+
return (d.value.login.emailPassword || d.value.login.phonePassword) && y.push({
|
|
1110
1105
|
key: "password",
|
|
1111
1106
|
title: "密码登录"
|
|
1112
|
-
}), d.value.login.phoneCode &&
|
|
1107
|
+
}), d.value.login.phoneCode && y.push({
|
|
1113
1108
|
key: "phoneCode",
|
|
1114
1109
|
title: "手机验证码登录"
|
|
1115
|
-
}), d.value.login.emailCode &&
|
|
1110
|
+
}), d.value.login.emailCode && y.push({
|
|
1116
1111
|
key: "emailCode",
|
|
1117
1112
|
title: "邮箱验证码登录"
|
|
1118
|
-
}),
|
|
1119
|
-
}), l =
|
|
1113
|
+
}), y;
|
|
1114
|
+
}), l = A("password");
|
|
1120
1115
|
re(() => {
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1116
|
+
var y;
|
|
1117
|
+
p.value.some((k) => k.key === l.value) || (l.value = ((y = p.value[0]) == null ? void 0 : y.key) || "password");
|
|
1123
1118
|
});
|
|
1124
|
-
function
|
|
1125
|
-
|
|
1119
|
+
function w() {
|
|
1120
|
+
n("switchSignUp");
|
|
1126
1121
|
}
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1122
|
+
function m() {
|
|
1123
|
+
n("switchResetPassword");
|
|
1129
1124
|
}
|
|
1130
|
-
async function y
|
|
1131
|
-
|
|
1125
|
+
async function f(y) {
|
|
1126
|
+
n("submit", {
|
|
1132
1127
|
method: l.value === "password" ? "password" : "code",
|
|
1133
|
-
...
|
|
1128
|
+
...y
|
|
1134
1129
|
});
|
|
1135
1130
|
}
|
|
1136
|
-
return (
|
|
1131
|
+
return (y, k) => (o(), S("div", Nt, [p.value.length > 1 ? (o(), S("div", jt, [i(e(ce), {
|
|
1137
1132
|
"active-key": l.value,
|
|
1138
|
-
"onUpdate:activeKey":
|
|
1133
|
+
"onUpdate:activeKey": k[0] || (k[0] = (T) => l.value = T)
|
|
1139
1134
|
}, {
|
|
1140
|
-
default:
|
|
1141
|
-
key:
|
|
1142
|
-
title:
|
|
1135
|
+
default: c(() => [(o(!0), S(D, null, ue(p.value, (T) => (o(), z(e(pe), {
|
|
1136
|
+
key: T.key,
|
|
1137
|
+
title: T.title
|
|
1143
1138
|
}, null, 8, ["title"]))), 128))]),
|
|
1144
1139
|
_: 1
|
|
1145
|
-
}, 8, ["active-key"])])) :
|
|
1140
|
+
}, 8, ["active-key"])])) : I("", !0), l.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (o(), z(Ct, {
|
|
1146
1141
|
key: 1,
|
|
1147
|
-
loading:
|
|
1148
|
-
size:
|
|
1142
|
+
loading: r.loading,
|
|
1143
|
+
size: r.size,
|
|
1149
1144
|
"allow-phone": d.value.login.phonePassword,
|
|
1150
|
-
onSubmit:
|
|
1151
|
-
}, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (
|
|
1145
|
+
onSubmit: f
|
|
1146
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (o(), z(Ot, {
|
|
1152
1147
|
key: 2,
|
|
1153
|
-
loading:
|
|
1154
|
-
size:
|
|
1155
|
-
onSubmit:
|
|
1156
|
-
}, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (
|
|
1148
|
+
loading: r.loading,
|
|
1149
|
+
size: r.size,
|
|
1150
|
+
onSubmit: f
|
|
1151
|
+
}, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (o(), z(Ft, {
|
|
1157
1152
|
key: 3,
|
|
1158
|
-
loading:
|
|
1159
|
-
size:
|
|
1160
|
-
onSubmit:
|
|
1161
|
-
}, null, 8, ["loading", "size"])) :
|
|
1162
|
-
key: 4
|
|
1163
|
-
|
|
1164
|
-
"
|
|
1165
|
-
size: o.size,
|
|
1166
|
-
autocomplete: "username webauthn",
|
|
1167
|
-
placeholder: "请选择已绑定的通行密钥"
|
|
1168
|
-
}, null, 8, ["modelValue", "size"])) : A("", !0), g.value ? Q(v.$slots, "OAuth", {
|
|
1169
|
-
key: 5
|
|
1170
|
-
}, void 0, !0) : A("", !0), i(Gt, {
|
|
1171
|
-
"show-sign-up": f.value,
|
|
1153
|
+
loading: r.loading,
|
|
1154
|
+
size: r.size,
|
|
1155
|
+
onSubmit: f
|
|
1156
|
+
}, null, 8, ["loading", "size"])) : I("", !0), g.value ? Z(y.$slots, "OAuth", {
|
|
1157
|
+
key: 4
|
|
1158
|
+
}, void 0, !0) : I("", !0), i(Gt, {
|
|
1159
|
+
"show-sign-up": v.value,
|
|
1172
1160
|
"show-reset-password": t.value,
|
|
1173
|
-
onSwitchSignUp:
|
|
1174
|
-
onSwitchResetPassword:
|
|
1161
|
+
onSwitchSignUp: w,
|
|
1162
|
+
onSwitchResetPassword: m
|
|
1175
1163
|
}, null, 8, ["show-sign-up", "show-reset-password"])]));
|
|
1176
1164
|
}
|
|
1177
|
-
}), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-
|
|
1165
|
+
}), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-fc20af9d"]]), Jt = {
|
|
1178
1166
|
class: "content"
|
|
1179
1167
|
}, Qt = {
|
|
1180
1168
|
class: "sendVerifyCodeItem"
|
|
1181
1169
|
}, Xt = {
|
|
1182
1170
|
class: "handle"
|
|
1183
|
-
}, Yt = /* @__PURE__ */
|
|
1171
|
+
}, Yt = /* @__PURE__ */ V({
|
|
1184
1172
|
__name: "AuthkitEmailUpdate",
|
|
1185
1173
|
props: {
|
|
1186
1174
|
size: {
|
|
@@ -1198,15 +1186,15 @@ const zt = {
|
|
|
1198
1186
|
}
|
|
1199
1187
|
},
|
|
1200
1188
|
emits: ["submit"],
|
|
1201
|
-
setup(
|
|
1202
|
-
emit:
|
|
1189
|
+
setup(b, {
|
|
1190
|
+
emit: u
|
|
1203
1191
|
}) {
|
|
1204
|
-
const
|
|
1205
|
-
useTermsFormField:
|
|
1206
|
-
} =
|
|
1192
|
+
const n = u, {
|
|
1193
|
+
useTermsFormField: r
|
|
1194
|
+
} = F(), {
|
|
1207
1195
|
showTermsField: h,
|
|
1208
1196
|
termsRules: g
|
|
1209
|
-
} =
|
|
1197
|
+
} = r("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
|
|
1210
1198
|
email: void 0,
|
|
1211
1199
|
userToken: void 0,
|
|
1212
1200
|
emailVerifyId: void 0,
|
|
@@ -1215,33 +1203,33 @@ const zt = {
|
|
|
1215
1203
|
inviteCode: void 0,
|
|
1216
1204
|
acceptedTerms: !1
|
|
1217
1205
|
});
|
|
1218
|
-
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1206
|
+
H(() => {
|
|
1207
|
+
const w = ze();
|
|
1208
|
+
w && (t.value.inviteCode = w);
|
|
1221
1209
|
});
|
|
1222
|
-
async function
|
|
1223
|
-
if (!await
|
|
1210
|
+
async function p() {
|
|
1211
|
+
if (!await v.value.validateField(["email"])) {
|
|
1224
1212
|
d.value = !0;
|
|
1225
|
-
const m = await
|
|
1213
|
+
const m = await B().auth.verify.email.retry.post({
|
|
1226
1214
|
email: t.value.email,
|
|
1227
1215
|
purpose: a.purpose
|
|
1228
1216
|
});
|
|
1229
|
-
d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId),
|
|
1217
|
+
d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId), K(s.value, m);
|
|
1230
1218
|
}
|
|
1231
1219
|
}
|
|
1232
1220
|
async function l() {
|
|
1233
|
-
|
|
1234
|
-
|
|
1221
|
+
v.value.validate().then((w) => {
|
|
1222
|
+
w || n("submit", t.value);
|
|
1235
1223
|
});
|
|
1236
1224
|
}
|
|
1237
|
-
return (
|
|
1225
|
+
return (w, m) => (o(), S("div", Jt, [i(e(E), {
|
|
1238
1226
|
ref_key: "formRef",
|
|
1239
|
-
ref:
|
|
1227
|
+
ref: v,
|
|
1240
1228
|
model: t.value,
|
|
1241
1229
|
size: a.size,
|
|
1242
1230
|
"auto-label-width": ""
|
|
1243
1231
|
}, {
|
|
1244
|
-
default:
|
|
1232
|
+
default: c(() => [i(e(P), {
|
|
1245
1233
|
field: "email",
|
|
1246
1234
|
label: "邮箱",
|
|
1247
1235
|
"hide-label": "",
|
|
@@ -1253,9 +1241,9 @@ const zt = {
|
|
|
1253
1241
|
message: "请输入有效的邮箱"
|
|
1254
1242
|
}]
|
|
1255
1243
|
}, {
|
|
1256
|
-
default:
|
|
1244
|
+
default: c(() => [i(e(C), {
|
|
1257
1245
|
modelValue: t.value.email,
|
|
1258
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1246
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.email = f),
|
|
1259
1247
|
placeholder: "请输入邮箱",
|
|
1260
1248
|
autocomplete: "email username",
|
|
1261
1249
|
type: "email"
|
|
@@ -1270,12 +1258,12 @@ const zt = {
|
|
|
1270
1258
|
message: "请输入验证码"
|
|
1271
1259
|
}]
|
|
1272
1260
|
}, {
|
|
1273
|
-
default:
|
|
1261
|
+
default: c(() => [_("div", Qt, [i(e(C), {
|
|
1274
1262
|
modelValue: t.value.userToken,
|
|
1275
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1263
|
+
"onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.userToken = f),
|
|
1276
1264
|
placeholder: "请输入验证码",
|
|
1277
1265
|
autocomplete: "one-time-code"
|
|
1278
|
-
}, null, 8, ["modelValue"]), i(
|
|
1266
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
1279
1267
|
ref_key: "SendVerifyCodeRef",
|
|
1280
1268
|
ref: s,
|
|
1281
1269
|
size: a.size,
|
|
@@ -1283,7 +1271,7 @@ const zt = {
|
|
|
1283
1271
|
style: {
|
|
1284
1272
|
"margin-left": "10px"
|
|
1285
1273
|
},
|
|
1286
|
-
onSend:
|
|
1274
|
+
onSend: p
|
|
1287
1275
|
}, null, 8, ["size", "loading"])])]),
|
|
1288
1276
|
_: 1
|
|
1289
1277
|
}), i(e(P), {
|
|
@@ -1298,9 +1286,9 @@ const zt = {
|
|
|
1298
1286
|
message: "密码不能少于10字符"
|
|
1299
1287
|
}]
|
|
1300
1288
|
}, {
|
|
1301
|
-
default:
|
|
1289
|
+
default: c(() => [i(e(C), {
|
|
1302
1290
|
modelValue: t.value.password,
|
|
1303
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
1291
|
+
"onUpdate:modelValue": m[2] || (m[2] = (f) => t.value.password = f),
|
|
1304
1292
|
placeholder: "请输入密码",
|
|
1305
1293
|
type: "password",
|
|
1306
1294
|
autocomplete: "new-password"
|
|
@@ -1317,14 +1305,14 @@ const zt = {
|
|
|
1317
1305
|
minLength: 10,
|
|
1318
1306
|
message: "确认密码不能少于10字符"
|
|
1319
1307
|
}, {
|
|
1320
|
-
validator: (
|
|
1321
|
-
|
|
1308
|
+
validator: (f, y) => {
|
|
1309
|
+
f !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
|
|
1322
1310
|
}
|
|
1323
1311
|
}]
|
|
1324
1312
|
}, {
|
|
1325
|
-
default:
|
|
1313
|
+
default: c(() => [i(e(C), {
|
|
1326
1314
|
modelValue: t.value.confirmPassword,
|
|
1327
|
-
"onUpdate:modelValue": m[3] || (m[3] = (
|
|
1315
|
+
"onUpdate:modelValue": m[3] || (m[3] = (f) => t.value.confirmPassword = f),
|
|
1328
1316
|
placeholder: "请输入确认密码密码",
|
|
1329
1317
|
type: "password",
|
|
1330
1318
|
autocomplete: "new-password"
|
|
@@ -1338,35 +1326,35 @@ const zt = {
|
|
|
1338
1326
|
required: !1
|
|
1339
1327
|
}]
|
|
1340
1328
|
}, {
|
|
1341
|
-
default:
|
|
1329
|
+
default: c(() => [i(e(C), {
|
|
1342
1330
|
modelValue: t.value.inviteCode,
|
|
1343
|
-
"onUpdate:modelValue": m[4] || (m[4] = (
|
|
1331
|
+
"onUpdate:modelValue": m[4] || (m[4] = (f) => t.value.inviteCode = f),
|
|
1344
1332
|
placeholder: "邀请码(可选)",
|
|
1345
1333
|
autocomplete: "off"
|
|
1346
1334
|
}, null, 8, ["modelValue"])]),
|
|
1347
1335
|
_: 1
|
|
1348
|
-
}),
|
|
1336
|
+
}), _("div", Xt, [i(e(L), {
|
|
1349
1337
|
type: "primary",
|
|
1350
1338
|
loading: a.loading,
|
|
1351
1339
|
long: "",
|
|
1352
1340
|
size: a.size,
|
|
1353
1341
|
onClick: l
|
|
1354
1342
|
}, {
|
|
1355
|
-
default:
|
|
1343
|
+
default: c(() => [...m[6] || (m[6] = [q(" 提交 ", -1)])]),
|
|
1356
1344
|
_: 1
|
|
1357
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1345
|
+
}, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
|
|
1358
1346
|
key: 0,
|
|
1359
1347
|
field: "acceptedTerms",
|
|
1360
1348
|
"hide-label": "",
|
|
1361
1349
|
rules: e(g)
|
|
1362
1350
|
}, {
|
|
1363
|
-
default:
|
|
1351
|
+
default: c(() => [i(ee, {
|
|
1364
1352
|
"accepted-terms": t.value.acceptedTerms,
|
|
1365
|
-
"onUpdate:acceptedTerms": m[5] || (m[5] = (
|
|
1353
|
+
"onUpdate:acceptedTerms": m[5] || (m[5] = (f) => t.value.acceptedTerms = f),
|
|
1366
1354
|
"current-view": "signUp"
|
|
1367
1355
|
}, null, 8, ["accepted-terms"])]),
|
|
1368
1356
|
_: 1
|
|
1369
|
-
}, 8, ["rules"])) :
|
|
1357
|
+
}, 8, ["rules"])) : I("", !0)])]),
|
|
1370
1358
|
_: 1
|
|
1371
1359
|
}, 8, ["model", "size"])]));
|
|
1372
1360
|
}
|
|
@@ -1378,7 +1366,7 @@ const zt = {
|
|
|
1378
1366
|
class: "sendVerifyCodeItem"
|
|
1379
1367
|
}, is = {
|
|
1380
1368
|
class: "handle"
|
|
1381
|
-
}, as = /* @__PURE__ */
|
|
1369
|
+
}, as = /* @__PURE__ */ V({
|
|
1382
1370
|
__name: "AuthkitSignUpPhone",
|
|
1383
1371
|
props: {
|
|
1384
1372
|
size: {
|
|
@@ -1397,15 +1385,15 @@ const zt = {
|
|
|
1397
1385
|
}
|
|
1398
1386
|
},
|
|
1399
1387
|
emits: ["switchSignIn", "submit"],
|
|
1400
|
-
setup(
|
|
1401
|
-
emit:
|
|
1388
|
+
setup(b, {
|
|
1389
|
+
emit: u
|
|
1402
1390
|
}) {
|
|
1403
|
-
const
|
|
1404
|
-
useTermsFormField:
|
|
1405
|
-
} =
|
|
1391
|
+
const n = u, {
|
|
1392
|
+
useTermsFormField: r
|
|
1393
|
+
} = F(), {
|
|
1406
1394
|
showTermsField: h,
|
|
1407
1395
|
termsRules: g
|
|
1408
|
-
} =
|
|
1396
|
+
} = r("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
|
|
1409
1397
|
phone: void 0,
|
|
1410
1398
|
code: void 0,
|
|
1411
1399
|
password: void 0,
|
|
@@ -1413,34 +1401,34 @@ const zt = {
|
|
|
1413
1401
|
inviteCode: void 0,
|
|
1414
1402
|
acceptedTerms: !1
|
|
1415
1403
|
});
|
|
1416
|
-
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1404
|
+
H(() => {
|
|
1405
|
+
const f = ze();
|
|
1406
|
+
f && (t.value.inviteCode = f);
|
|
1419
1407
|
});
|
|
1420
|
-
const
|
|
1408
|
+
const p = [{
|
|
1421
1409
|
required: !0,
|
|
1422
1410
|
message: "请输入确认密码"
|
|
1423
1411
|
}, {
|
|
1424
|
-
validator: (
|
|
1425
|
-
t.value.password &&
|
|
1412
|
+
validator: (f, y) => {
|
|
1413
|
+
t.value.password && f !== t.value.password ? y("两次密码输入不一致") : y();
|
|
1426
1414
|
}
|
|
1427
1415
|
}];
|
|
1428
1416
|
function l() {
|
|
1429
|
-
|
|
1417
|
+
n("switchSignIn");
|
|
1430
1418
|
}
|
|
1431
|
-
async function
|
|
1432
|
-
if (!await
|
|
1419
|
+
async function w() {
|
|
1420
|
+
if (!await v.value.validateField(["phone"])) {
|
|
1433
1421
|
d.value = !0;
|
|
1434
|
-
const y = await
|
|
1422
|
+
const y = await B().auth.verify.sms.send.post({
|
|
1435
1423
|
phone: t.value.phone,
|
|
1436
1424
|
purpose: "signUp"
|
|
1437
1425
|
});
|
|
1438
|
-
d.value = !1,
|
|
1426
|
+
d.value = !1, K(s.value, y);
|
|
1439
1427
|
}
|
|
1440
1428
|
}
|
|
1441
1429
|
async function m() {
|
|
1442
|
-
|
|
1443
|
-
|
|
1430
|
+
v.value.validate().then((f) => {
|
|
1431
|
+
f || n("submit", {
|
|
1444
1432
|
type: "phone",
|
|
1445
1433
|
phone: t.value.phone,
|
|
1446
1434
|
code: t.value.code,
|
|
@@ -1449,14 +1437,14 @@ const zt = {
|
|
|
1449
1437
|
});
|
|
1450
1438
|
});
|
|
1451
1439
|
}
|
|
1452
|
-
return (
|
|
1440
|
+
return (f, y) => (o(), S("div", es, [_("div", ts, [i(e(E), {
|
|
1453
1441
|
ref_key: "formRef",
|
|
1454
|
-
ref:
|
|
1442
|
+
ref: v,
|
|
1455
1443
|
model: t.value,
|
|
1456
1444
|
size: a.size,
|
|
1457
1445
|
"auto-label-width": ""
|
|
1458
1446
|
}, {
|
|
1459
|
-
default:
|
|
1447
|
+
default: c(() => [i(e(P), {
|
|
1460
1448
|
field: "phone",
|
|
1461
1449
|
label: "手机号",
|
|
1462
1450
|
"hide-label": "",
|
|
@@ -1468,9 +1456,9 @@ const zt = {
|
|
|
1468
1456
|
message: "请输入有效的手机号"
|
|
1469
1457
|
}]
|
|
1470
1458
|
}, {
|
|
1471
|
-
default:
|
|
1459
|
+
default: c(() => [i(e(C), {
|
|
1472
1460
|
modelValue: t.value.phone,
|
|
1473
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
1461
|
+
"onUpdate:modelValue": y[0] || (y[0] = (k) => t.value.phone = k),
|
|
1474
1462
|
placeholder: "请输入手机号",
|
|
1475
1463
|
autocomplete: "tel",
|
|
1476
1464
|
type: "tel"
|
|
@@ -1485,12 +1473,12 @@ const zt = {
|
|
|
1485
1473
|
message: "请输入验证码"
|
|
1486
1474
|
}]
|
|
1487
1475
|
}, {
|
|
1488
|
-
default:
|
|
1476
|
+
default: c(() => [_("div", ss, [i(e(C), {
|
|
1489
1477
|
modelValue: t.value.code,
|
|
1490
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
1478
|
+
"onUpdate:modelValue": y[1] || (y[1] = (k) => t.value.code = k),
|
|
1491
1479
|
placeholder: "请输入验证码",
|
|
1492
1480
|
autocomplete: "one-time-code"
|
|
1493
|
-
}, null, 8, ["modelValue"]), i(
|
|
1481
|
+
}, null, 8, ["modelValue"]), i(W, {
|
|
1494
1482
|
ref_key: "SendVerifyCodeRef",
|
|
1495
1483
|
ref: s,
|
|
1496
1484
|
size: a.size,
|
|
@@ -1498,10 +1486,10 @@ const zt = {
|
|
|
1498
1486
|
style: {
|
|
1499
1487
|
"margin-left": "10px"
|
|
1500
1488
|
},
|
|
1501
|
-
onSend:
|
|
1489
|
+
onSend: w
|
|
1502
1490
|
}, null, 8, ["size", "loading"])])]),
|
|
1503
1491
|
_: 1
|
|
1504
|
-
}), a.requirePassword ? (
|
|
1492
|
+
}), a.requirePassword ? (o(), z(e(P), {
|
|
1505
1493
|
key: 0,
|
|
1506
1494
|
field: "password",
|
|
1507
1495
|
label: "密码",
|
|
@@ -1514,30 +1502,30 @@ const zt = {
|
|
|
1514
1502
|
message: "密码不能少于10字符"
|
|
1515
1503
|
}]
|
|
1516
1504
|
}, {
|
|
1517
|
-
default:
|
|
1505
|
+
default: c(() => [i(e(C), {
|
|
1518
1506
|
modelValue: t.value.password,
|
|
1519
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
1507
|
+
"onUpdate:modelValue": y[2] || (y[2] = (k) => t.value.password = k),
|
|
1520
1508
|
placeholder: "请输入密码(可选)",
|
|
1521
1509
|
type: "password",
|
|
1522
1510
|
autocomplete: "new-password"
|
|
1523
1511
|
}, null, 8, ["modelValue"])]),
|
|
1524
1512
|
_: 1
|
|
1525
|
-
}, 8, ["rules"])) :
|
|
1513
|
+
}, 8, ["rules"])) : I("", !0), a.requirePassword && t.value.password ? (o(), z(e(P), {
|
|
1526
1514
|
key: 1,
|
|
1527
1515
|
field: "confirmPassword",
|
|
1528
1516
|
label: "确认密码",
|
|
1529
1517
|
"hide-label": "",
|
|
1530
|
-
rules:
|
|
1518
|
+
rules: p
|
|
1531
1519
|
}, {
|
|
1532
|
-
default:
|
|
1520
|
+
default: c(() => [i(e(C), {
|
|
1533
1521
|
modelValue: t.value.confirmPassword,
|
|
1534
|
-
"onUpdate:modelValue": y[3] || (y[3] = (
|
|
1522
|
+
"onUpdate:modelValue": y[3] || (y[3] = (k) => t.value.confirmPassword = k),
|
|
1535
1523
|
placeholder: "请输入确认密码",
|
|
1536
1524
|
type: "password",
|
|
1537
1525
|
autocomplete: "new-password"
|
|
1538
1526
|
}, null, 8, ["modelValue"])]),
|
|
1539
1527
|
_: 1
|
|
1540
|
-
})) :
|
|
1528
|
+
})) : I("", !0), i(e(P), {
|
|
1541
1529
|
field: "inviteCode",
|
|
1542
1530
|
label: "邀请码",
|
|
1543
1531
|
"hide-label": "",
|
|
@@ -1545,35 +1533,35 @@ const zt = {
|
|
|
1545
1533
|
required: !1
|
|
1546
1534
|
}]
|
|
1547
1535
|
}, {
|
|
1548
|
-
default:
|
|
1536
|
+
default: c(() => [i(e(C), {
|
|
1549
1537
|
modelValue: t.value.inviteCode,
|
|
1550
|
-
"onUpdate:modelValue": y[4] || (y[4] = (
|
|
1538
|
+
"onUpdate:modelValue": y[4] || (y[4] = (k) => t.value.inviteCode = k),
|
|
1551
1539
|
placeholder: "邀请码(可选)",
|
|
1552
1540
|
autocomplete: "off"
|
|
1553
1541
|
}, null, 8, ["modelValue"])]),
|
|
1554
1542
|
_: 1
|
|
1555
|
-
}),
|
|
1543
|
+
}), _("div", is, [i(e(L), {
|
|
1556
1544
|
type: "primary",
|
|
1557
1545
|
loading: a.loading,
|
|
1558
1546
|
long: "",
|
|
1559
1547
|
size: a.size,
|
|
1560
1548
|
onClick: m
|
|
1561
1549
|
}, {
|
|
1562
|
-
default:
|
|
1550
|
+
default: c(() => [...y[6] || (y[6] = [q(" 注册 ", -1)])]),
|
|
1563
1551
|
_: 1
|
|
1564
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1552
|
+
}, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
|
|
1565
1553
|
key: 0,
|
|
1566
1554
|
field: "acceptedTerms",
|
|
1567
1555
|
"hide-label": "",
|
|
1568
1556
|
rules: e(g)
|
|
1569
1557
|
}, {
|
|
1570
|
-
default:
|
|
1558
|
+
default: c(() => [i(ee, {
|
|
1571
1559
|
"accepted-terms": t.value.acceptedTerms,
|
|
1572
|
-
"onUpdate:acceptedTerms": y[5] || (y[5] = (
|
|
1560
|
+
"onUpdate:acceptedTerms": y[5] || (y[5] = (k) => t.value.acceptedTerms = k),
|
|
1573
1561
|
"current-view": "signUp"
|
|
1574
1562
|
}, null, 8, ["accepted-terms"])]),
|
|
1575
1563
|
_: 1
|
|
1576
|
-
}, 8, ["rules"])) :
|
|
1564
|
+
}, 8, ["rules"])) : I("", !0)])]),
|
|
1577
1565
|
_: 1
|
|
1578
1566
|
}, 8, ["model", "size"])]), i(fe, {
|
|
1579
1567
|
onSwitchSignIn: l
|
|
@@ -1593,7 +1581,7 @@ const zt = {
|
|
|
1593
1581
|
}, ds = {
|
|
1594
1582
|
key: 2,
|
|
1595
1583
|
class: "empty"
|
|
1596
|
-
}, cs = /* @__PURE__ */
|
|
1584
|
+
}, cs = /* @__PURE__ */ V({
|
|
1597
1585
|
__name: "AuthkitSignUp",
|
|
1598
1586
|
props: {
|
|
1599
1587
|
size: {
|
|
@@ -1607,15 +1595,15 @@ const zt = {
|
|
|
1607
1595
|
}
|
|
1608
1596
|
},
|
|
1609
1597
|
emits: ["switchSignIn", "submit"],
|
|
1610
|
-
setup(
|
|
1611
|
-
emit:
|
|
1598
|
+
setup(b, {
|
|
1599
|
+
emit: u
|
|
1612
1600
|
}) {
|
|
1613
|
-
const
|
|
1601
|
+
const n = u, r = b, {
|
|
1614
1602
|
appsData: h
|
|
1615
|
-
} =
|
|
1603
|
+
} = j(), {
|
|
1616
1604
|
registrationBlocked: g,
|
|
1617
1605
|
signUpAuthEnabled: a
|
|
1618
|
-
} =
|
|
1606
|
+
} = F(), s = $(() => h.value.authMethods), d = $(() => {
|
|
1619
1607
|
const l = [];
|
|
1620
1608
|
return s.value.signUp.email && l.push({
|
|
1621
1609
|
key: "email",
|
|
@@ -1624,48 +1612,48 @@ const zt = {
|
|
|
1624
1612
|
key: "phone",
|
|
1625
1613
|
title: "手机号注册"
|
|
1626
1614
|
}), l;
|
|
1627
|
-
}),
|
|
1615
|
+
}), v = A("email");
|
|
1628
1616
|
re(() => {
|
|
1629
1617
|
var l;
|
|
1630
|
-
d.value.some((
|
|
1618
|
+
d.value.some((w) => w.key === v.value) || (v.value = ((l = d.value[0]) == null ? void 0 : l.key) || "email");
|
|
1631
1619
|
});
|
|
1632
1620
|
function t() {
|
|
1633
|
-
|
|
1621
|
+
n("switchSignIn");
|
|
1634
1622
|
}
|
|
1635
|
-
async function
|
|
1636
|
-
|
|
1637
|
-
type:
|
|
1623
|
+
async function p(l) {
|
|
1624
|
+
n("submit", {
|
|
1625
|
+
type: v.value,
|
|
1638
1626
|
...l
|
|
1639
1627
|
});
|
|
1640
1628
|
}
|
|
1641
|
-
return (l,
|
|
1642
|
-
"active-key":
|
|
1643
|
-
"onUpdate:activeKey":
|
|
1629
|
+
return (l, w) => (o(), S("div", ls, [d.value.length > 1 ? (o(), S("div", ns, [i(e(ce), {
|
|
1630
|
+
"active-key": v.value,
|
|
1631
|
+
"onUpdate:activeKey": w[0] || (w[0] = (m) => v.value = m)
|
|
1644
1632
|
}, {
|
|
1645
|
-
default:
|
|
1633
|
+
default: c(() => [(o(!0), S(D, null, ue(d.value, (m) => (o(), z(e(pe), {
|
|
1646
1634
|
key: m.key,
|
|
1647
1635
|
title: m.title
|
|
1648
1636
|
}, null, 8, ["title"]))), 128))]),
|
|
1649
1637
|
_: 1
|
|
1650
|
-
}, 8, ["active-key"])])) :
|
|
1638
|
+
}, 8, ["active-key"])])) : I("", !0), e(a) ? e(g) ? (o(), S("div", us, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (o(), S(D, {
|
|
1651
1639
|
key: 3
|
|
1652
|
-
}, [
|
|
1640
|
+
}, [v.value === "email" && s.value.signUp.email ? (o(), z(Zt, {
|
|
1653
1641
|
key: 0,
|
|
1654
|
-
size:
|
|
1655
|
-
loading:
|
|
1656
|
-
onSubmit:
|
|
1657
|
-
}, null, 8, ["size", "loading"])) :
|
|
1642
|
+
size: r.size,
|
|
1643
|
+
loading: b.loading,
|
|
1644
|
+
onSubmit: p
|
|
1645
|
+
}, null, 8, ["size", "loading"])) : v.value === "phone" && s.value.signUp.phone ? (o(), z(os, {
|
|
1658
1646
|
key: 1,
|
|
1659
|
-
size:
|
|
1660
|
-
loading:
|
|
1661
|
-
onSubmit:
|
|
1647
|
+
size: r.size,
|
|
1648
|
+
loading: b.loading,
|
|
1649
|
+
onSubmit: p,
|
|
1662
1650
|
onSwitchSignIn: t
|
|
1663
|
-
}, null, 8, ["size", "loading"])) : (
|
|
1651
|
+
}, null, 8, ["size", "loading"])) : (o(), S("div", ds, " 当前应用未开放用户注册 ")), v.value === "email" ? (o(), z(fe, {
|
|
1664
1652
|
key: 3,
|
|
1665
1653
|
onSwitchSignIn: t
|
|
1666
|
-
})) :
|
|
1654
|
+
})) : I("", !0)], 64)) : (o(), S("div", rs, " 系统已停止用户注册 "))]));
|
|
1667
1655
|
}
|
|
1668
|
-
}), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */
|
|
1656
|
+
}), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */ V({
|
|
1669
1657
|
__name: "AuthkitAuthTitle",
|
|
1670
1658
|
props: {
|
|
1671
1659
|
size: {
|
|
@@ -1684,32 +1672,32 @@ const zt = {
|
|
|
1684
1672
|
default: 60
|
|
1685
1673
|
}
|
|
1686
1674
|
},
|
|
1687
|
-
setup(
|
|
1688
|
-
const
|
|
1675
|
+
setup(b) {
|
|
1676
|
+
const u = b, n = `${u.size}px`, r = `${u.fontSize}px`, h = `${u.lineHeight}px`, {
|
|
1689
1677
|
currentView: g
|
|
1690
|
-
} =
|
|
1678
|
+
} = N(), {
|
|
1691
1679
|
appsData: a
|
|
1692
|
-
} =
|
|
1693
|
-
return (d,
|
|
1680
|
+
} = j(), s = $(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
|
|
1681
|
+
return (d, v) => (o(), S("div", {
|
|
1694
1682
|
class: "Title",
|
|
1695
|
-
style:
|
|
1696
|
-
fontSize:
|
|
1683
|
+
style: G({
|
|
1684
|
+
fontSize: r,
|
|
1697
1685
|
lineHeight: h
|
|
1698
1686
|
})
|
|
1699
|
-
}, [e(a).applicationLogoUrl ? (
|
|
1687
|
+
}, [e(a).applicationLogoUrl ? (o(), S("img", {
|
|
1700
1688
|
key: 0,
|
|
1701
1689
|
src: e(a).applicationLogoUrl,
|
|
1702
1690
|
srcset: "",
|
|
1703
|
-
style:
|
|
1704
|
-
width:
|
|
1691
|
+
style: G({
|
|
1692
|
+
width: n
|
|
1705
1693
|
})
|
|
1706
|
-
}, null, 12, ms)) :
|
|
1694
|
+
}, null, 12, ms)) : I("", !0), _("span", null, M(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
|
|
1707
1695
|
}
|
|
1708
|
-
}),
|
|
1696
|
+
}), Ve = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-8ebe7939"]]), vs = {
|
|
1709
1697
|
class: "Auth"
|
|
1710
1698
|
}, gs = {
|
|
1711
1699
|
class: "body"
|
|
1712
|
-
}, hs = /* @__PURE__ */
|
|
1700
|
+
}, hs = /* @__PURE__ */ V({
|
|
1713
1701
|
__name: "AuthkitAuth",
|
|
1714
1702
|
props: {
|
|
1715
1703
|
size: {
|
|
@@ -1721,52 +1709,52 @@ const zt = {
|
|
|
1721
1709
|
default: () => !0
|
|
1722
1710
|
}
|
|
1723
1711
|
},
|
|
1724
|
-
setup(
|
|
1725
|
-
const
|
|
1726
|
-
signInSubmit:
|
|
1727
|
-
passkeySignInSubmit:
|
|
1712
|
+
setup(b) {
|
|
1713
|
+
const u = b, {
|
|
1714
|
+
signInSubmit: n,
|
|
1715
|
+
passkeySignInSubmit: r,
|
|
1728
1716
|
signUpSubmit: h,
|
|
1729
1717
|
resetPasswordSubmit: g,
|
|
1730
1718
|
currentView: a,
|
|
1731
1719
|
authSignInLoading: s,
|
|
1732
1720
|
authSignUpLoading: d,
|
|
1733
|
-
resetPasswordLoading:
|
|
1721
|
+
resetPasswordLoading: v,
|
|
1734
1722
|
switchSignUp: t,
|
|
1735
|
-
switchResetPassword:
|
|
1723
|
+
switchResetPassword: p,
|
|
1736
1724
|
switchSignIn: l
|
|
1737
|
-
} =
|
|
1738
|
-
return (
|
|
1725
|
+
} = N();
|
|
1726
|
+
return (w, m) => (o(), S("div", vs, [b.showTitle ? (o(), z(Ve, {
|
|
1739
1727
|
key: 0,
|
|
1740
1728
|
size: 32,
|
|
1741
1729
|
"font-size": 20
|
|
1742
|
-
})) :
|
|
1730
|
+
})) : I("", !0), _("div", gs, [e(a) === "signIn" ? (o(), z(Kt, {
|
|
1743
1731
|
key: 0,
|
|
1744
|
-
size:
|
|
1732
|
+
size: u.size,
|
|
1745
1733
|
loading: e(s),
|
|
1746
1734
|
onSwitchSignUp: e(t),
|
|
1747
|
-
onSwitchResetPassword: e(
|
|
1748
|
-
onSubmit: m[0] || (m[0] = (
|
|
1735
|
+
onSwitchResetPassword: e(p),
|
|
1736
|
+
onSubmit: m[0] || (m[0] = (f) => e(n)(f))
|
|
1749
1737
|
}, {
|
|
1750
|
-
OAuth:
|
|
1751
|
-
size:
|
|
1752
|
-
onPasskeySubmit: e(
|
|
1738
|
+
OAuth: c(() => [i(at, {
|
|
1739
|
+
size: u.size,
|
|
1740
|
+
onPasskeySubmit: e(r)
|
|
1753
1741
|
}, null, 8, ["size", "onPasskeySubmit"])]),
|
|
1754
1742
|
_: 1
|
|
1755
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (
|
|
1743
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (o(), z(ps, {
|
|
1756
1744
|
key: 1,
|
|
1757
|
-
size:
|
|
1745
|
+
size: u.size,
|
|
1758
1746
|
loading: e(d),
|
|
1759
1747
|
onSwitchSignIn: e(l),
|
|
1760
|
-
onSubmit: m[1] || (m[1] = (
|
|
1761
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (
|
|
1748
|
+
onSubmit: m[1] || (m[1] = (f) => e(h)(f))
|
|
1749
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (o(), z(wt, {
|
|
1762
1750
|
key: 2,
|
|
1763
|
-
size:
|
|
1764
|
-
loading: e(
|
|
1751
|
+
size: u.size,
|
|
1752
|
+
loading: e(v),
|
|
1765
1753
|
onSwitchSignIn: e(l),
|
|
1766
|
-
onSubmit: m[2] || (m[2] = (
|
|
1767
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) :
|
|
1754
|
+
onSubmit: m[2] || (m[2] = (f) => e(g)(f))
|
|
1755
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
|
|
1768
1756
|
}
|
|
1769
|
-
}), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-
|
|
1757
|
+
}), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-41b6adcc"]]), bs = /* @__PURE__ */ V({
|
|
1770
1758
|
__name: "AuthkitAuthModal",
|
|
1771
1759
|
props: {
|
|
1772
1760
|
size: {
|
|
@@ -1774,28 +1762,28 @@ const zt = {
|
|
|
1774
1762
|
}
|
|
1775
1763
|
},
|
|
1776
1764
|
emits: ["close"],
|
|
1777
|
-
setup(
|
|
1778
|
-
emit:
|
|
1765
|
+
setup(b, {
|
|
1766
|
+
emit: u
|
|
1779
1767
|
}) {
|
|
1780
|
-
const
|
|
1781
|
-
onSignIn:
|
|
1768
|
+
const n = u, {
|
|
1769
|
+
onSignIn: r,
|
|
1782
1770
|
switchSignIn: h
|
|
1783
|
-
} =
|
|
1771
|
+
} = N(), {
|
|
1784
1772
|
close: g
|
|
1785
|
-
} =
|
|
1773
|
+
} = _e();
|
|
1786
1774
|
let a = null;
|
|
1787
|
-
|
|
1788
|
-
a =
|
|
1775
|
+
H(() => {
|
|
1776
|
+
a = r(() => g());
|
|
1789
1777
|
}), de(() => {
|
|
1790
1778
|
a == null || a(), a = null;
|
|
1791
1779
|
});
|
|
1792
|
-
function s(
|
|
1793
|
-
|
|
1780
|
+
function s(v) {
|
|
1781
|
+
v || d();
|
|
1794
1782
|
}
|
|
1795
1783
|
function d() {
|
|
1796
|
-
h(), g(),
|
|
1784
|
+
h(), g(), n("close");
|
|
1797
1785
|
}
|
|
1798
|
-
return (
|
|
1786
|
+
return (v, t) => (o(), z(e(xe), {
|
|
1799
1787
|
visible: !0,
|
|
1800
1788
|
footer: !1,
|
|
1801
1789
|
"mask-closable": !1,
|
|
@@ -1805,52 +1793,52 @@ const zt = {
|
|
|
1805
1793
|
"onUpdate:visible": s,
|
|
1806
1794
|
onClose: d
|
|
1807
1795
|
}, {
|
|
1808
|
-
title:
|
|
1809
|
-
default:
|
|
1796
|
+
title: c(() => [i(Ve)]),
|
|
1797
|
+
default: c(() => [i(ys, {
|
|
1810
1798
|
"show-title": !1,
|
|
1811
|
-
size:
|
|
1799
|
+
size: b.size
|
|
1812
1800
|
}, null, 8, ["size"])]),
|
|
1813
1801
|
_: 1
|
|
1814
1802
|
}));
|
|
1815
1803
|
}
|
|
1816
1804
|
}), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-19a4d5d0"]]);
|
|
1817
|
-
function
|
|
1805
|
+
function Ce(b, u = {}) {
|
|
1818
1806
|
const {
|
|
1819
|
-
bindIdentityRedirect:
|
|
1820
|
-
closePopupOnBindSuccess:
|
|
1807
|
+
bindIdentityRedirect: n = "",
|
|
1808
|
+
closePopupOnBindSuccess: r = !0,
|
|
1821
1809
|
restoreRedirectAfterSignIn: h = !0,
|
|
1822
1810
|
defaultRedirect: g = ""
|
|
1823
|
-
} =
|
|
1811
|
+
} = u, a = A(!1), {
|
|
1824
1812
|
completeSignIn: s
|
|
1825
|
-
} =
|
|
1813
|
+
} = N();
|
|
1826
1814
|
async function d() {
|
|
1827
1815
|
if (typeof window > "u")
|
|
1828
1816
|
return !1;
|
|
1829
|
-
const
|
|
1830
|
-
if (!
|
|
1817
|
+
const v = new URL(window.location.href);
|
|
1818
|
+
if (!Ie(v))
|
|
1831
1819
|
return !1;
|
|
1832
|
-
const t =
|
|
1820
|
+
const t = v.searchParams.get("error");
|
|
1833
1821
|
if (t)
|
|
1834
|
-
return window.history.replaceState({}, "",
|
|
1835
|
-
if (
|
|
1836
|
-
const l =
|
|
1837
|
-
return window.history.replaceState({}, "",
|
|
1822
|
+
return window.history.replaceState({}, "", ne(v)), ae.error(t), !0;
|
|
1823
|
+
if (v.searchParams.get("bindSuccess") === "true") {
|
|
1824
|
+
const l = v.searchParams.get("provider");
|
|
1825
|
+
return window.history.replaceState({}, "", ne(v)), ae.success(l ? `${l} 绑定成功` : "绑定成功"), r && window.opener && setTimeout(() => window.close(), 800), !0;
|
|
1838
1826
|
}
|
|
1839
|
-
const
|
|
1840
|
-
if (!
|
|
1827
|
+
const p = v.searchParams.get("token");
|
|
1828
|
+
if (!p)
|
|
1841
1829
|
return !1;
|
|
1842
1830
|
a.value = !0;
|
|
1843
1831
|
try {
|
|
1844
|
-
const l =
|
|
1845
|
-
if (window.history.replaceState({}, "",
|
|
1846
|
-
jwtToken:
|
|
1832
|
+
const l = v.searchParams.get("userId"), w = v.searchParams.get("appId"), m = v.searchParams.get("needBindIdentity") === "true";
|
|
1833
|
+
if (window.history.replaceState({}, "", ne(v)), s({
|
|
1834
|
+
jwtToken: p,
|
|
1847
1835
|
userId: l,
|
|
1848
|
-
appId:
|
|
1836
|
+
appId: w,
|
|
1849
1837
|
needBindIdentity: m
|
|
1850
|
-
}), m &&
|
|
1851
|
-
return await
|
|
1838
|
+
}), m && n)
|
|
1839
|
+
return await b.replace(n), !0;
|
|
1852
1840
|
const y = Ge(h) || g;
|
|
1853
|
-
return y && await
|
|
1841
|
+
return y && await b.replace(y), !0;
|
|
1854
1842
|
} finally {
|
|
1855
1843
|
a.value = !1;
|
|
1856
1844
|
}
|
|
@@ -1865,7 +1853,7 @@ const _s = {
|
|
|
1865
1853
|
class: "AuthkitOAuthCallbackOverlay",
|
|
1866
1854
|
"aria-live": "polite",
|
|
1867
1855
|
"aria-busy": "true"
|
|
1868
|
-
}, ks = /* @__PURE__ */
|
|
1856
|
+
}, ks = /* @__PURE__ */ V({
|
|
1869
1857
|
__name: "AuthkitOAuthCallbackProvider",
|
|
1870
1858
|
props: {
|
|
1871
1859
|
bindIdentityRedirect: {
|
|
@@ -1880,28 +1868,28 @@ const _s = {
|
|
|
1880
1868
|
default: !0
|
|
1881
1869
|
}
|
|
1882
1870
|
},
|
|
1883
|
-
setup(
|
|
1884
|
-
const
|
|
1885
|
-
processing:
|
|
1871
|
+
setup(b) {
|
|
1872
|
+
const u = b, n = we(), {
|
|
1873
|
+
processing: r,
|
|
1886
1874
|
handleOAuthCallback: h
|
|
1887
|
-
} =
|
|
1888
|
-
bindIdentityRedirect:
|
|
1889
|
-
closePopupOnBindSuccess:
|
|
1890
|
-
restoreRedirectAfterSignIn:
|
|
1875
|
+
} = Ce(n, {
|
|
1876
|
+
bindIdentityRedirect: u.bindIdentityRedirect,
|
|
1877
|
+
closePopupOnBindSuccess: u.closePopupOnBindSuccess,
|
|
1878
|
+
restoreRedirectAfterSignIn: u.restoreRedirectAfterSignIn
|
|
1891
1879
|
});
|
|
1892
|
-
return
|
|
1880
|
+
return H(() => {
|
|
1893
1881
|
h();
|
|
1894
|
-
}), (g, a) => (
|
|
1882
|
+
}), (g, a) => (o(), z(Te, {
|
|
1895
1883
|
to: "body"
|
|
1896
|
-
}, [e(
|
|
1884
|
+
}, [e(r) ? (o(), S("div", _s, [...a[0] || (a[0] = [_("div", {
|
|
1897
1885
|
class: "AuthkitOAuthCallbackOverlay__panel"
|
|
1898
|
-
}, [
|
|
1886
|
+
}, [_("div", {
|
|
1899
1887
|
class: "AuthkitOAuthCallbackOverlay__spinner"
|
|
1900
|
-
}),
|
|
1888
|
+
}), _("p", {
|
|
1901
1889
|
class: "AuthkitOAuthCallbackOverlay__text"
|
|
1902
|
-
}, "正在登录...")], -1)])])) :
|
|
1890
|
+
}, "正在登录...")], -1)])])) : I("", !0)]));
|
|
1903
1891
|
}
|
|
1904
|
-
}), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */
|
|
1892
|
+
}), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */ V({
|
|
1905
1893
|
__name: "AuthkitProvider",
|
|
1906
1894
|
props: {
|
|
1907
1895
|
handleOAuthCallback: {
|
|
@@ -1936,83 +1924,83 @@ const _s = {
|
|
|
1936
1924
|
}
|
|
1937
1925
|
},
|
|
1938
1926
|
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
1939
|
-
setup(
|
|
1940
|
-
emit:
|
|
1927
|
+
setup(b, {
|
|
1928
|
+
emit: u
|
|
1941
1929
|
}) {
|
|
1942
1930
|
const {
|
|
1943
|
-
config:
|
|
1944
|
-
} = me(),
|
|
1931
|
+
config: n
|
|
1932
|
+
} = me(), r = b, h = u, g = qe(), {
|
|
1945
1933
|
openLegalDoc: a
|
|
1946
|
-
} =
|
|
1934
|
+
} = Ae({
|
|
1947
1935
|
route: g
|
|
1948
1936
|
}), {
|
|
1949
1937
|
isOpen: s
|
|
1950
|
-
} =
|
|
1938
|
+
} = _e(), {
|
|
1951
1939
|
restoreSession: d,
|
|
1952
|
-
onSignIn:
|
|
1940
|
+
onSignIn: v,
|
|
1953
1941
|
onSignOut: t
|
|
1954
|
-
} =
|
|
1955
|
-
fetchUserProfile:
|
|
1942
|
+
} = N(), {
|
|
1943
|
+
fetchUserProfile: p,
|
|
1956
1944
|
clearUserProfile: l,
|
|
1957
|
-
markAuthSessionBootstrapped:
|
|
1958
|
-
} =
|
|
1945
|
+
markAuthSessionBootstrapped: w
|
|
1946
|
+
} = Pe(), {
|
|
1959
1947
|
appsAuthPageInfoApi: m
|
|
1960
|
-
} =
|
|
1961
|
-
|
|
1948
|
+
} = j(), f = v(() => {
|
|
1949
|
+
p();
|
|
1962
1950
|
}), y = t(() => {
|
|
1963
1951
|
l();
|
|
1964
1952
|
});
|
|
1965
|
-
function
|
|
1966
|
-
if (
|
|
1953
|
+
function k() {
|
|
1954
|
+
if (n.legalDocsMode === "builtin") {
|
|
1967
1955
|
a("privacyPolicy");
|
|
1968
1956
|
return;
|
|
1969
1957
|
}
|
|
1970
1958
|
h("toPrivacyPolicy");
|
|
1971
1959
|
}
|
|
1972
|
-
function
|
|
1973
|
-
if (
|
|
1960
|
+
function T() {
|
|
1961
|
+
if (n.legalDocsMode === "builtin") {
|
|
1974
1962
|
a("userServiceAgreement");
|
|
1975
1963
|
return;
|
|
1976
1964
|
}
|
|
1977
1965
|
h("toUserServiceAgreement");
|
|
1978
1966
|
}
|
|
1979
|
-
let
|
|
1980
|
-
async function
|
|
1967
|
+
let x = null;
|
|
1968
|
+
async function R() {
|
|
1981
1969
|
try {
|
|
1982
|
-
if (
|
|
1983
|
-
await
|
|
1970
|
+
if (r.fetchAppInfo && m(), r.restoreSession && d()) {
|
|
1971
|
+
await p();
|
|
1984
1972
|
return;
|
|
1985
1973
|
}
|
|
1986
1974
|
l();
|
|
1987
1975
|
} finally {
|
|
1988
|
-
|
|
1976
|
+
w();
|
|
1989
1977
|
}
|
|
1990
1978
|
}
|
|
1991
|
-
function
|
|
1992
|
-
return
|
|
1979
|
+
function O() {
|
|
1980
|
+
return x || (x = R()), x;
|
|
1993
1981
|
}
|
|
1994
|
-
return typeof window < "u" &&
|
|
1982
|
+
return typeof window < "u" && O(), H(() => {
|
|
1995
1983
|
_t({
|
|
1996
|
-
onPrivacyPolicy:
|
|
1997
|
-
onUserServiceAgreement:
|
|
1984
|
+
onPrivacyPolicy: k,
|
|
1985
|
+
onUserServiceAgreement: T
|
|
1998
1986
|
});
|
|
1999
1987
|
}), de(() => {
|
|
2000
|
-
|
|
2001
|
-
}), (
|
|
1988
|
+
f(), y();
|
|
1989
|
+
}), (J, Ns) => (o(), S(D, null, [Z(J.$slots, "default"), r.handleOAuthCallback ? (o(), z(Ss, {
|
|
2002
1990
|
key: 0,
|
|
2003
|
-
"bind-identity-redirect":
|
|
2004
|
-
"close-popup-on-bind-success":
|
|
2005
|
-
"restore-redirect-after-sign-in":
|
|
2006
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) :
|
|
1991
|
+
"bind-identity-redirect": r.bindIdentityRedirect,
|
|
1992
|
+
"close-popup-on-bind-success": r.closePopupOnBindSuccess,
|
|
1993
|
+
"restore-redirect-after-sign-in": r.restoreRedirectAfterSignIn
|
|
1994
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), r.showAuthModal && e(s) ? (o(), z(ws, {
|
|
2007
1995
|
key: 1,
|
|
2008
|
-
size:
|
|
2009
|
-
}, null, 8, ["size"])) :
|
|
1996
|
+
size: r.authModalSize
|
|
1997
|
+
}, null, 8, ["size"])) : I("", !0)], 64));
|
|
2010
1998
|
}
|
|
2011
1999
|
}), zs = {
|
|
2012
2000
|
class: "header"
|
|
2013
2001
|
}, Is = ["href"], As = {
|
|
2014
2002
|
class: "container"
|
|
2015
|
-
}, Ps = /* @__PURE__ */
|
|
2003
|
+
}, Ps = /* @__PURE__ */ V({
|
|
2016
2004
|
__name: "AuthkitAuthContainer",
|
|
2017
2005
|
props: {
|
|
2018
2006
|
applicationLogoUrl: {
|
|
@@ -2054,24 +2042,24 @@ const _s = {
|
|
|
2054
2042
|
default: "color"
|
|
2055
2043
|
}
|
|
2056
2044
|
},
|
|
2057
|
-
setup(
|
|
2058
|
-
const
|
|
2059
|
-
backgroundColor:
|
|
2045
|
+
setup(b) {
|
|
2046
|
+
const u = b, n = $(() => u.backgroundType === "color" ? {
|
|
2047
|
+
backgroundColor: u.backgroundColor
|
|
2060
2048
|
} : {
|
|
2061
|
-
backgroundImage: `url(${
|
|
2049
|
+
backgroundImage: `url(${u.backgroundImage})`
|
|
2062
2050
|
});
|
|
2063
|
-
return (
|
|
2051
|
+
return (r, h) => (o(), S("div", {
|
|
2064
2052
|
class: "auth",
|
|
2065
|
-
style:
|
|
2066
|
-
}, [
|
|
2053
|
+
style: G(n.value)
|
|
2054
|
+
}, [_("div", zs, [u.name ? (o(), S("a", {
|
|
2067
2055
|
key: 0,
|
|
2068
|
-
href:
|
|
2056
|
+
href: u.appHomePage,
|
|
2069
2057
|
target: "_self",
|
|
2070
2058
|
class: "link",
|
|
2071
|
-
style:
|
|
2072
|
-
color:
|
|
2059
|
+
style: G({
|
|
2060
|
+
color: u.linkColor
|
|
2073
2061
|
})
|
|
2074
|
-
}, " 返回主页 ", 12, Is)) :
|
|
2062
|
+
}, " 返回主页 ", 12, Is)) : I("", !0)]), _("div", As, [Z(r.$slots, "default", {}, void 0, !0)])], 4));
|
|
2075
2063
|
}
|
|
2076
2064
|
}), gi = /* @__PURE__ */ U(Ps, [["__scopeId", "data-v-0e13d3ff"]]), Vs = {
|
|
2077
2065
|
class: "box"
|
|
@@ -2086,7 +2074,7 @@ const _s = {
|
|
|
2086
2074
|
"font-weight": "bold",
|
|
2087
2075
|
"font-size": "12px"
|
|
2088
2076
|
}
|
|
2089
|
-
}, Ts = /* @__PURE__ */
|
|
2077
|
+
}, Ts = /* @__PURE__ */ V({
|
|
2090
2078
|
__name: "AuthkitAuthorize",
|
|
2091
2079
|
props: {
|
|
2092
2080
|
size: {
|
|
@@ -2134,8 +2122,8 @@ const _s = {
|
|
|
2134
2122
|
default: () => ""
|
|
2135
2123
|
}
|
|
2136
2124
|
},
|
|
2137
|
-
setup(
|
|
2138
|
-
const
|
|
2125
|
+
setup(b) {
|
|
2126
|
+
const u = A(!1), n = b, r = A({
|
|
2139
2127
|
name: "",
|
|
2140
2128
|
homePageUrl: "",
|
|
2141
2129
|
createAt: "",
|
|
@@ -2145,8 +2133,8 @@ const _s = {
|
|
|
2145
2133
|
const {
|
|
2146
2134
|
data: a,
|
|
2147
2135
|
error: s
|
|
2148
|
-
} = await
|
|
2149
|
-
s || !a || (
|
|
2136
|
+
} = await B().auth.apps.authPageInfo.post({});
|
|
2137
|
+
s || !a || (r.value = {
|
|
2150
2138
|
name: a.name,
|
|
2151
2139
|
homePageUrl: a.homePageUrl || "",
|
|
2152
2140
|
createAt: "",
|
|
@@ -2155,50 +2143,50 @@ const _s = {
|
|
|
2155
2143
|
}
|
|
2156
2144
|
h();
|
|
2157
2145
|
async function g() {
|
|
2158
|
-
|
|
2146
|
+
u.value = !0;
|
|
2159
2147
|
const {
|
|
2160
2148
|
data: a,
|
|
2161
2149
|
error: s
|
|
2162
|
-
} = await
|
|
2163
|
-
client_id:
|
|
2164
|
-
response_type:
|
|
2165
|
-
scope:
|
|
2166
|
-
state:
|
|
2167
|
-
redirect_uri:
|
|
2150
|
+
} = await B().auth.oauth2.authorize.post({
|
|
2151
|
+
client_id: n.clientId,
|
|
2152
|
+
response_type: n.responseType,
|
|
2153
|
+
scope: n.scope,
|
|
2154
|
+
state: n.state,
|
|
2155
|
+
redirect_uri: n.redirectUri
|
|
2168
2156
|
});
|
|
2169
|
-
if (
|
|
2157
|
+
if (u.value = !1, s || !a)
|
|
2170
2158
|
return;
|
|
2171
2159
|
const d = a;
|
|
2172
2160
|
window.location.href = d.authorizeUrl;
|
|
2173
2161
|
}
|
|
2174
|
-
return (a, s) => (
|
|
2175
|
-
default:
|
|
2176
|
-
default:
|
|
2162
|
+
return (a, s) => (o(), S("div", Vs, [_("div", Cs, M(`授权 ${r.value.name}`), 1), _("div", Us, [i(e(Le), null, {
|
|
2163
|
+
default: c(() => [i(e(oe), null, {
|
|
2164
|
+
default: c(() => {
|
|
2177
2165
|
var d;
|
|
2178
|
-
return [i(e(
|
|
2179
|
-
title:
|
|
2180
|
-
description: `想要使用您的${(d =
|
|
2166
|
+
return [i(e(le), {
|
|
2167
|
+
title: r.value.name,
|
|
2168
|
+
description: `想要使用您的${(d = n.userInfo) == null ? void 0 : d.nickname}账户`
|
|
2181
2169
|
}, {
|
|
2182
|
-
avatar:
|
|
2183
|
-
var
|
|
2184
|
-
return [i(e(
|
|
2170
|
+
avatar: c(() => {
|
|
2171
|
+
var v;
|
|
2172
|
+
return [i(e(te), {
|
|
2185
2173
|
shape: "square",
|
|
2186
|
-
"image-url": (
|
|
2174
|
+
"image-url": (v = n.userInfo) == null ? void 0 : v.avatar
|
|
2187
2175
|
}, null, 8, ["image-url"])];
|
|
2188
2176
|
}),
|
|
2189
2177
|
_: 1
|
|
2190
2178
|
}, 8, ["title", "description"])];
|
|
2191
2179
|
}),
|
|
2192
2180
|
_: 1
|
|
2193
|
-
}), i(e(
|
|
2194
|
-
default:
|
|
2181
|
+
}), i(e(oe), null, {
|
|
2182
|
+
default: c(() => [i(e(le), {
|
|
2195
2183
|
title: "公开信息",
|
|
2196
2184
|
description: "头像、昵称"
|
|
2197
2185
|
}, {
|
|
2198
|
-
avatar:
|
|
2186
|
+
avatar: c(() => [i(e(te), {
|
|
2199
2187
|
shape: "square"
|
|
2200
2188
|
}, {
|
|
2201
|
-
default:
|
|
2189
|
+
default: c(() => [...s[0] || (s[0] = [_("img", {
|
|
2202
2190
|
alt: "avatar",
|
|
2203
2191
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2204
2192
|
}, null, -1)])]),
|
|
@@ -2207,15 +2195,15 @@ const _s = {
|
|
|
2207
2195
|
_: 1
|
|
2208
2196
|
})]),
|
|
2209
2197
|
_: 1
|
|
2210
|
-
}), i(e(
|
|
2211
|
-
default:
|
|
2198
|
+
}), i(e(oe), null, {
|
|
2199
|
+
default: c(() => [i(e(le), {
|
|
2212
2200
|
title: "个人用户数据",
|
|
2213
2201
|
description: "电子邮件地址"
|
|
2214
2202
|
}, {
|
|
2215
|
-
avatar:
|
|
2203
|
+
avatar: c(() => [i(e(te), {
|
|
2216
2204
|
shape: "square"
|
|
2217
2205
|
}, {
|
|
2218
|
-
default:
|
|
2206
|
+
default: c(() => [...s[1] || (s[1] = [_("img", {
|
|
2219
2207
|
alt: "avatar",
|
|
2220
2208
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2221
2209
|
}, null, -1)])]),
|
|
@@ -2226,17 +2214,17 @@ const _s = {
|
|
|
2226
2214
|
_: 1
|
|
2227
2215
|
})]),
|
|
2228
2216
|
_: 1
|
|
2229
|
-
}), i(e(
|
|
2217
|
+
}), i(e(L), {
|
|
2230
2218
|
type: "primary",
|
|
2231
|
-
size:
|
|
2232
|
-
loading:
|
|
2219
|
+
size: n.size,
|
|
2220
|
+
loading: u.value,
|
|
2233
2221
|
onClick: g
|
|
2234
2222
|
}, {
|
|
2235
|
-
default:
|
|
2223
|
+
default: c(() => [...s[2] || (s[2] = [q(" 授权 ", -1)])]),
|
|
2236
2224
|
_: 1
|
|
2237
|
-
}, 8, ["size", "loading"]),
|
|
2225
|
+
}, 8, ["size", "loading"]), _("div", $s, [s[3] || (s[3] = _("div", {
|
|
2238
2226
|
class: "redirect-hint"
|
|
2239
|
-
}, "授权后将跳转至", -1)),
|
|
2227
|
+
}, "授权后将跳转至", -1)), _("div", Rs, M(r.value.authorizationCallback), 1)])])]));
|
|
2240
2228
|
}
|
|
2241
2229
|
}), hi = /* @__PURE__ */ U(Ts, [["__scopeId", "data-v-6c1792d3"]]), qs = {
|
|
2242
2230
|
class: "oauth-callback"
|
|
@@ -2246,10 +2234,10 @@ const _s = {
|
|
|
2246
2234
|
}, xs = {
|
|
2247
2235
|
key: 1,
|
|
2248
2236
|
class: "callback-error"
|
|
2249
|
-
},
|
|
2237
|
+
}, Ls = {
|
|
2250
2238
|
key: 2,
|
|
2251
2239
|
class: "callback-success"
|
|
2252
|
-
},
|
|
2240
|
+
}, Bs = /* @__PURE__ */ V({
|
|
2253
2241
|
__name: "AuthkitOauthCallback",
|
|
2254
2242
|
props: {
|
|
2255
2243
|
defaultRedirect: {},
|
|
@@ -2257,62 +2245,62 @@ const _s = {
|
|
|
2257
2245
|
bindIdentityRedirect: {}
|
|
2258
2246
|
},
|
|
2259
2247
|
emits: ["success", "error", "needBindIdentity"],
|
|
2260
|
-
setup(
|
|
2261
|
-
emit:
|
|
2248
|
+
setup(b, {
|
|
2249
|
+
emit: u
|
|
2262
2250
|
}) {
|
|
2263
|
-
const
|
|
2251
|
+
const n = b, r = u, h = A("登录成功,正在跳转..."), g = A(""), {
|
|
2264
2252
|
restoreSession: a
|
|
2265
|
-
} =
|
|
2253
|
+
} = N(), s = we(), {
|
|
2266
2254
|
processing: d,
|
|
2267
|
-
handleOAuthCallback:
|
|
2268
|
-
} =
|
|
2269
|
-
bindIdentityRedirect:
|
|
2270
|
-
defaultRedirect:
|
|
2255
|
+
handleOAuthCallback: v
|
|
2256
|
+
} = Ce(s, {
|
|
2257
|
+
bindIdentityRedirect: n.bindIdentityRedirect,
|
|
2258
|
+
defaultRedirect: n.defaultRedirect
|
|
2271
2259
|
});
|
|
2272
2260
|
async function t() {
|
|
2273
2261
|
const l = new URL(window.location.href);
|
|
2274
|
-
if (!
|
|
2262
|
+
if (!Ie(l)) {
|
|
2275
2263
|
if (a()) {
|
|
2276
|
-
await s.replace(
|
|
2264
|
+
await s.replace(n.defaultRedirect || "/");
|
|
2277
2265
|
return;
|
|
2278
2266
|
}
|
|
2279
2267
|
g.value = "无效的访问";
|
|
2280
2268
|
return;
|
|
2281
2269
|
}
|
|
2282
|
-
const
|
|
2283
|
-
if (
|
|
2284
|
-
g.value =
|
|
2270
|
+
const w = l.searchParams.get("error");
|
|
2271
|
+
if (w) {
|
|
2272
|
+
g.value = w, r("error", w), await v();
|
|
2285
2273
|
return;
|
|
2286
2274
|
}
|
|
2287
|
-
await
|
|
2275
|
+
await v() || (g.value = "登录失败:未收到认证令牌", r("error", g.value));
|
|
2288
2276
|
}
|
|
2289
|
-
function
|
|
2290
|
-
s.replace(
|
|
2277
|
+
function p() {
|
|
2278
|
+
s.replace(n.defaultRedirect || "/");
|
|
2291
2279
|
}
|
|
2292
|
-
return
|
|
2280
|
+
return H(() => {
|
|
2293
2281
|
t();
|
|
2294
|
-
}), (l,
|
|
2282
|
+
}), (l, w) => (o(), S("div", qs, [e(d) ? (o(), S("div", Os, [w[0] || (w[0] = _("div", {
|
|
2295
2283
|
class: "spinner"
|
|
2296
|
-
}, null, -1)),
|
|
2284
|
+
}, null, -1)), _("p", null, M(n.loadingText ?? "正在登录..."), 1)])) : g.value ? (o(), S("div", xs, [w[1] || (w[1] = _("div", {
|
|
2297
2285
|
class: "error-icon"
|
|
2298
|
-
}, "✕", -1)),
|
|
2286
|
+
}, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, M(g.value), 1), _("button", {
|
|
2299
2287
|
class: "retry-btn",
|
|
2300
2288
|
type: "button",
|
|
2301
|
-
onClick:
|
|
2302
|
-
}, "返回重试")])) : (
|
|
2289
|
+
onClick: p
|
|
2290
|
+
}, "返回重试")])) : (o(), S("div", Ls, [w[3] || (w[3] = _("div", {
|
|
2303
2291
|
class: "success-icon"
|
|
2304
|
-
}, "✓", -1)),
|
|
2292
|
+
}, "✓", -1)), _("p", null, M(h.value), 1)]))]));
|
|
2305
2293
|
}
|
|
2306
|
-
}), yi = /* @__PURE__ */ U(
|
|
2294
|
+
}), yi = /* @__PURE__ */ U(Bs, [["__scopeId", "data-v-98babf68"]]), Ms = {
|
|
2307
2295
|
class: "oauth-binding-account"
|
|
2308
|
-
},
|
|
2296
|
+
}, Fs = {
|
|
2309
2297
|
key: 1,
|
|
2310
2298
|
class: "oauth-binding-account__icon"
|
|
2311
2299
|
}, Ds = {
|
|
2312
2300
|
class: "oauth-binding-account__info"
|
|
2313
|
-
},
|
|
2301
|
+
}, Hs = {
|
|
2314
2302
|
class: "oauth-binding-account__name"
|
|
2315
|
-
},
|
|
2303
|
+
}, Es = /* @__PURE__ */ V({
|
|
2316
2304
|
__name: "AuthkitGithubBinding",
|
|
2317
2305
|
props: {
|
|
2318
2306
|
size: {
|
|
@@ -2320,153 +2308,153 @@ const _s = {
|
|
|
2320
2308
|
required: !0
|
|
2321
2309
|
}
|
|
2322
2310
|
},
|
|
2323
|
-
setup(
|
|
2311
|
+
setup(b) {
|
|
2324
2312
|
const {
|
|
2325
|
-
config:
|
|
2313
|
+
config: u
|
|
2326
2314
|
} = me(), {
|
|
2327
|
-
userProfile:
|
|
2328
|
-
fetchUserProfile:
|
|
2329
|
-
} =
|
|
2315
|
+
userProfile: n,
|
|
2316
|
+
fetchUserProfile: r
|
|
2317
|
+
} = Pe(), h = A("hidden"), g = A(!1);
|
|
2330
2318
|
let a;
|
|
2331
|
-
const s =
|
|
2332
|
-
var
|
|
2333
|
-
return ((y = (
|
|
2319
|
+
const s = b, d = $(() => {
|
|
2320
|
+
var f, y, k;
|
|
2321
|
+
return ((y = (f = n.value) == null ? void 0 : f.github) == null ? void 0 : y.avatar_url) || ((k = n.value) == null ? void 0 : k.avatar) || "";
|
|
2334
2322
|
}), {
|
|
2335
|
-
buildBindOauthRedirectUri:
|
|
2336
|
-
} =
|
|
2337
|
-
function t(
|
|
2338
|
-
h.value =
|
|
2339
|
-
}
|
|
2340
|
-
async function
|
|
2341
|
-
const
|
|
2342
|
-
if (!
|
|
2323
|
+
buildBindOauthRedirectUri: v
|
|
2324
|
+
} = Se();
|
|
2325
|
+
function t(f) {
|
|
2326
|
+
h.value = f;
|
|
2327
|
+
}
|
|
2328
|
+
async function p() {
|
|
2329
|
+
const f = u.appId;
|
|
2330
|
+
if (!f) {
|
|
2343
2331
|
console.error("GitHub OAuth 失败: appId 未配置");
|
|
2344
2332
|
return;
|
|
2345
2333
|
}
|
|
2346
2334
|
const {
|
|
2347
2335
|
data: y,
|
|
2348
|
-
error:
|
|
2349
|
-
} = await
|
|
2350
|
-
appId:
|
|
2336
|
+
error: k
|
|
2337
|
+
} = await B().auth.oauth.github.login.get({
|
|
2338
|
+
appId: f,
|
|
2351
2339
|
mode: "bind",
|
|
2352
|
-
redirectUri:
|
|
2340
|
+
redirectUri: v()
|
|
2353
2341
|
});
|
|
2354
|
-
|
|
2342
|
+
k || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
|
|
2355
2343
|
}
|
|
2356
2344
|
async function l() {
|
|
2357
2345
|
const {
|
|
2358
|
-
error:
|
|
2359
|
-
} = await
|
|
2346
|
+
error: f
|
|
2347
|
+
} = await B().auth.users.unbind.oauth.post({
|
|
2360
2348
|
provider: "github"
|
|
2361
2349
|
});
|
|
2362
|
-
|
|
2350
|
+
f || (ae.success("解绑成功"), h.value = "hidden", r());
|
|
2363
2351
|
}
|
|
2364
|
-
function
|
|
2365
|
-
h.value === "bind" && (h.value = "hidden",
|
|
2352
|
+
function w() {
|
|
2353
|
+
h.value === "bind" && (h.value = "hidden", p()), h.value === "unbind" && l();
|
|
2366
2354
|
}
|
|
2367
2355
|
function m() {
|
|
2368
|
-
g.value &&
|
|
2356
|
+
g.value && r();
|
|
2369
2357
|
}
|
|
2370
|
-
return
|
|
2371
|
-
|
|
2358
|
+
return H(() => {
|
|
2359
|
+
n.value || r(), a = setInterval(m, 1e3);
|
|
2372
2360
|
}), de(() => {
|
|
2373
2361
|
a && clearInterval(a);
|
|
2374
|
-
}), (
|
|
2375
|
-
var
|
|
2376
|
-
return
|
|
2362
|
+
}), (f, y) => {
|
|
2363
|
+
var k, T, x;
|
|
2364
|
+
return o(), S(D, null, [!((k = e(n)) != null && k.github) && h.value === "hidden" ? (o(), z(e(ve), {
|
|
2377
2365
|
key: 0,
|
|
2378
2366
|
title: "绑定GitHub"
|
|
2379
2367
|
}, {
|
|
2380
|
-
action:
|
|
2368
|
+
action: c(() => [i(e(L), {
|
|
2381
2369
|
size: s.size,
|
|
2382
2370
|
type: "primary",
|
|
2383
|
-
onClick: y[0] || (y[0] = (
|
|
2371
|
+
onClick: y[0] || (y[0] = (R) => t("bind"))
|
|
2384
2372
|
}, {
|
|
2385
|
-
default:
|
|
2373
|
+
default: c(() => [...y[2] || (y[2] = [q(" 绑定GitHub ", -1)])]),
|
|
2386
2374
|
_: 1
|
|
2387
2375
|
}, 8, ["size"])]),
|
|
2388
|
-
default:
|
|
2376
|
+
default: c(() => [y[3] || (y[3] = q(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2389
2377
|
_: 1
|
|
2390
|
-
})) :
|
|
2378
|
+
})) : I("", !0), (T = e(n)) != null && T.github && h.value === "hidden" ? (o(), z(e(ve), {
|
|
2391
2379
|
key: 1,
|
|
2392
2380
|
title: "解绑GitHub"
|
|
2393
2381
|
}, {
|
|
2394
|
-
action:
|
|
2382
|
+
action: c(() => [i(e(L), {
|
|
2395
2383
|
size: s.size,
|
|
2396
2384
|
type: "primary",
|
|
2397
|
-
onClick: y[1] || (y[1] = (
|
|
2385
|
+
onClick: y[1] || (y[1] = (R) => t("unbind"))
|
|
2398
2386
|
}, {
|
|
2399
|
-
default:
|
|
2387
|
+
default: c(() => [...y[5] || (y[5] = [q(" 解绑GitHub ", -1)])]),
|
|
2400
2388
|
_: 1
|
|
2401
2389
|
}, 8, ["size"])]),
|
|
2402
|
-
default:
|
|
2403
|
-
var
|
|
2404
|
-
return [
|
|
2390
|
+
default: c(() => {
|
|
2391
|
+
var R, O;
|
|
2392
|
+
return [_("div", Ms, [d.value ? (o(), z(e(te), {
|
|
2405
2393
|
key: 0,
|
|
2406
2394
|
class: "oauth-binding-account__avatar",
|
|
2407
2395
|
"image-url": d.value,
|
|
2408
2396
|
size: 42
|
|
2409
|
-
}, null, 8, ["image-url"])) : (
|
|
2410
|
-
icon: e(
|
|
2397
|
+
}, null, 8, ["image-url"])) : (o(), S("div", Fs, [i(ke, {
|
|
2398
|
+
icon: e(X).github,
|
|
2411
2399
|
size: e(Ne),
|
|
2412
2400
|
alt: "GitHub"
|
|
2413
|
-
}, null, 8, ["icon", "size"])])),
|
|
2401
|
+
}, null, 8, ["icon", "size"])])), _("div", Ds, [y[4] || (y[4] = _("div", {
|
|
2414
2402
|
class: "oauth-binding-account__provider"
|
|
2415
|
-
}, "GitHub", -1)),
|
|
2403
|
+
}, "GitHub", -1)), _("div", Hs, M(((O = (R = e(n)) == null ? void 0 : R.github) == null ? void 0 : O.login) || "GitHub"), 1)])])];
|
|
2416
2404
|
}),
|
|
2417
2405
|
_: 1
|
|
2418
|
-
})) :
|
|
2406
|
+
})) : I("", !0), h.value === "bind" || h.value === "unbind" ? (o(), z(je, {
|
|
2419
2407
|
key: 2,
|
|
2420
2408
|
size: s.size,
|
|
2421
|
-
email: (
|
|
2422
|
-
onNext:
|
|
2423
|
-
}, null, 8, ["size", "email"])) :
|
|
2409
|
+
email: (x = e(n)) == null ? void 0 : x.email,
|
|
2410
|
+
onNext: w
|
|
2411
|
+
}, null, 8, ["size", "email"])) : I("", !0)], 64);
|
|
2424
2412
|
};
|
|
2425
2413
|
}
|
|
2426
|
-
}), bi = /* @__PURE__ */ U(
|
|
2414
|
+
}), bi = /* @__PURE__ */ U(Es, [["__scopeId", "data-v-1cfa8892"]]), Gs = /* @__PURE__ */ V({
|
|
2427
2415
|
__name: "LegalDocViewer",
|
|
2428
2416
|
props: {
|
|
2429
2417
|
type: {},
|
|
2430
2418
|
appId: {}
|
|
2431
2419
|
},
|
|
2432
|
-
setup(
|
|
2433
|
-
const
|
|
2420
|
+
setup(b) {
|
|
2421
|
+
const u = b, n = $(() => We[u.type] ?? ""), r = A(!1), h = A(null);
|
|
2434
2422
|
async function g() {
|
|
2435
|
-
if (!
|
|
2423
|
+
if (!u.type || !u.appId) {
|
|
2436
2424
|
h.value = null;
|
|
2437
2425
|
return;
|
|
2438
2426
|
}
|
|
2439
|
-
|
|
2440
|
-
const a = await Xe(
|
|
2441
|
-
if (
|
|
2427
|
+
r.value = !0;
|
|
2428
|
+
const a = await Xe(u.appId);
|
|
2429
|
+
if (r.value = !1, !a) {
|
|
2442
2430
|
h.value = null;
|
|
2443
2431
|
return;
|
|
2444
2432
|
}
|
|
2445
|
-
const s = a[
|
|
2433
|
+
const s = a[u.type];
|
|
2446
2434
|
h.value = Ke(s) ? s : null;
|
|
2447
2435
|
}
|
|
2448
|
-
return
|
|
2436
|
+
return be(() => [u.type, u.appId], () => {
|
|
2449
2437
|
g();
|
|
2450
2438
|
}, {
|
|
2451
2439
|
immediate: !0
|
|
2452
|
-
}), (a, s) =>
|
|
2440
|
+
}), (a, s) => r.value ? (o(), z(e(Be), {
|
|
2453
2441
|
key: 0,
|
|
2454
|
-
loading:
|
|
2442
|
+
loading: r.value,
|
|
2455
2443
|
class: "legal-doc-viewer-loading"
|
|
2456
|
-
}, null, 8, ["loading"])) : h.value ? (
|
|
2444
|
+
}, null, 8, ["loading"])) : h.value ? (o(), z(e(Je), {
|
|
2457
2445
|
key: 2,
|
|
2458
2446
|
modelValue: h.value,
|
|
2459
2447
|
"onUpdate:modelValue": s[1] || (s[1] = (d) => h.value = d),
|
|
2460
2448
|
editable: !1
|
|
2461
2449
|
}, {
|
|
2462
|
-
title:
|
|
2463
|
-
modelValue:
|
|
2464
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) =>
|
|
2450
|
+
title: c(() => [i(e(Qe), {
|
|
2451
|
+
modelValue: n.value,
|
|
2452
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => n.value = d),
|
|
2465
2453
|
editable: !1,
|
|
2466
2454
|
class: "legal-doc-viewer-title"
|
|
2467
2455
|
}, null, 8, ["modelValue"])]),
|
|
2468
2456
|
_: 1
|
|
2469
|
-
}, 8, ["modelValue"])) : (
|
|
2457
|
+
}, 8, ["modelValue"])) : (o(), z(e(Me), {
|
|
2470
2458
|
key: 1,
|
|
2471
2459
|
description: "暂无内容"
|
|
2472
2460
|
}));
|
|
@@ -2476,14 +2464,14 @@ export {
|
|
|
2476
2464
|
ys as A,
|
|
2477
2465
|
Zt as E,
|
|
2478
2466
|
wi as L,
|
|
2479
|
-
|
|
2467
|
+
Q as O,
|
|
2480
2468
|
Ct as P,
|
|
2481
2469
|
wt as R,
|
|
2482
|
-
|
|
2470
|
+
ee as S,
|
|
2483
2471
|
vi as _,
|
|
2484
2472
|
gi as a,
|
|
2485
2473
|
ws as b,
|
|
2486
|
-
|
|
2474
|
+
Ve as c,
|
|
2487
2475
|
hi as d,
|
|
2488
2476
|
bi as e,
|
|
2489
2477
|
Ss as f,
|