@huyooo/ui 2.0.4 → 2.0.6
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/{LegalDocViewer-CytxFZKJ.js → LegalDocViewer-DeDXQX3X.js} +547 -555
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-CawueoIY.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js} +2 -2
- package/dist/{WidthContainer-DOD3wnYO.js → WidthContainer-BIRNIRX5.js} +5 -5
- package/dist/authkit.js +1 -1
- package/dist/common.js +1 -1
- package/dist/main.js +3 -3
- package/dist/style.css +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as A, computed as R, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as
|
|
2
|
-
import { useRoute as
|
|
1
|
+
import { defineComponent as A, computed as R, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as ge, renderSlot as Z, createBlock as I, unref as e, createCommentVNode as z, createElementVNode as S, toDisplayString as L, ref as P, createVNode as a, withCtx as f, createTextVNode as x, watchEffect as ne, Fragment as D, renderList as le, useModel as Pe, watch as he, mergeModels as Ve, useSlots as Ae, onMounted as E, onUnmounted as re } from "vue";
|
|
2
|
+
import { useRouter as ye, useRoute as Ue } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "./userMenuModal-D-nDaYqM.js";
|
|
6
|
-
import { Message as X, Form as H, FormItem as V, Input as U, Button as B, Link as Y, Tabs as
|
|
6
|
+
import { Message as X, Form as H, FormItem as V, Input as U, Button as B, Link as Y, Tabs as ue, TabPane as de, Checkbox as Ce, Modal as $e, List as Te, ListItem as oe, ListItemMeta as ie, Avatar as te, Alert as me, Spin as Re, Empty as qe } from "@arco-design/web-vue";
|
|
7
7
|
import { a as M, u as N } from "./useAuthkitAuth-BPTZUSkM.js";
|
|
8
8
|
import { g as O, u as we } from "./apiClients-Ctcq8NZs.js";
|
|
9
9
|
import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
10
|
-
import { o as
|
|
10
|
+
import { o as fe, i as xe, j as ve, k as be, u as Le, l as Be, m as Oe, n as J, p as Me, h as _e, S as K, q as W, r as ke, s as Fe, b as De } from "./AuthkitAppSetting-D_94iUEG.js";
|
|
11
11
|
import { _ as C } 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 Se, L as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
15
|
+
import { u as Se, L as Ee, i as He } from "./useLegalDocs-BZlntAI7.js";
|
|
16
|
+
import { u as ce } from "./runtime-qs4IasEB.js";
|
|
17
|
+
import { u as Ie } from "./useAuthkitUsersProfile-CW_exa7E.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "./CustomTable-HDwqEcmB.js";
|
|
21
21
|
/* empty css */
|
|
22
|
-
import { TiptapEditor as
|
|
23
|
-
import { f as
|
|
24
|
-
const
|
|
22
|
+
import { TiptapEditor as Ge, TiptapTitle as Ne } from "@huyooo/vue-tiptap";
|
|
23
|
+
import { f as je } from "./fetchAuthPageAboutUs-CP5a7jIo.js";
|
|
24
|
+
const Ke = ["title", "aria-label", "disabled"], We = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "OAuthItem__spinner"
|
|
27
|
-
},
|
|
27
|
+
}, Qe = /* @__PURE__ */ A({
|
|
28
28
|
__name: "AuthkitOauthItem",
|
|
29
29
|
props: {
|
|
30
30
|
size: {
|
|
@@ -49,38 +49,38 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
setup(b) {
|
|
52
|
-
const
|
|
53
|
-
width: `${
|
|
54
|
-
height: `${
|
|
55
|
-
padding: `${
|
|
56
|
-
"--oauth-icon-size": `${
|
|
52
|
+
const u = b, d = R(() => ({
|
|
53
|
+
width: `${ve}px`,
|
|
54
|
+
height: `${ve}px`,
|
|
55
|
+
padding: `${xe}px`,
|
|
56
|
+
"--oauth-icon-size": `${fe}px`
|
|
57
57
|
}));
|
|
58
|
-
return (n,
|
|
59
|
-
class:
|
|
60
|
-
"OAuthItem--loading":
|
|
58
|
+
return (n, g) => (l(), k("button", {
|
|
59
|
+
class: ge(["OAuthItem", {
|
|
60
|
+
"OAuthItem--loading": u.loading
|
|
61
61
|
}]),
|
|
62
62
|
type: "button",
|
|
63
|
-
title:
|
|
64
|
-
"aria-label":
|
|
65
|
-
disabled:
|
|
66
|
-
style: G(
|
|
67
|
-
}, [
|
|
63
|
+
title: u.label,
|
|
64
|
+
"aria-label": u.label,
|
|
65
|
+
disabled: u.disabled || u.loading,
|
|
66
|
+
style: G(d.value)
|
|
67
|
+
}, [u.loading ? (l(), k("span", We)) : Z(n.$slots, "icon", {
|
|
68
68
|
key: 1
|
|
69
|
-
}, () => [
|
|
69
|
+
}, () => [u.icon ? (l(), I(be, {
|
|
70
70
|
key: 0,
|
|
71
|
-
icon:
|
|
72
|
-
size: e(
|
|
73
|
-
}, null, 8, ["icon", "size"])) : z("", !0)], !0)], 14,
|
|
71
|
+
icon: u.icon,
|
|
72
|
+
size: e(fe)
|
|
73
|
+
}, null, 8, ["icon", "size"])) : z("", !0)], !0)], 14, Ke));
|
|
74
74
|
}
|
|
75
|
-
}), Q = /* @__PURE__ */ C(
|
|
75
|
+
}), Q = /* @__PURE__ */ C(Qe, [["__scopeId", "data-v-e00c1d80"]]), Je = {
|
|
76
76
|
class: "OAuthList"
|
|
77
|
-
},
|
|
77
|
+
}, Xe = {
|
|
78
78
|
key: 0,
|
|
79
79
|
class: "OAuthDivider"
|
|
80
|
-
},
|
|
80
|
+
}, Ye = {
|
|
81
81
|
key: 1,
|
|
82
82
|
class: "OAuthHint"
|
|
83
|
-
},
|
|
83
|
+
}, Ze = /* @__PURE__ */ A({
|
|
84
84
|
__name: "AuthkitOauthList",
|
|
85
85
|
props: {
|
|
86
86
|
size: {
|
|
@@ -90,20 +90,20 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
90
90
|
},
|
|
91
91
|
emits: ["passkeySubmit"],
|
|
92
92
|
setup(b, {
|
|
93
|
-
emit:
|
|
93
|
+
emit: u
|
|
94
94
|
}) {
|
|
95
|
-
const
|
|
95
|
+
const d = u, {
|
|
96
96
|
appsData: n
|
|
97
97
|
} = j(), {
|
|
98
|
-
loading:
|
|
98
|
+
loading: g,
|
|
99
99
|
supported: h,
|
|
100
100
|
loginWithPasskey: o,
|
|
101
101
|
formatError: s
|
|
102
|
-
} =
|
|
103
|
-
githubAuth:
|
|
104
|
-
googleAuth:
|
|
102
|
+
} = Le(), {
|
|
103
|
+
githubAuth: c,
|
|
104
|
+
googleAuth: r,
|
|
105
105
|
microsoftAuth: t,
|
|
106
|
-
wechatAuth:
|
|
106
|
+
wechatAuth: v
|
|
107
107
|
} = _e(), {
|
|
108
108
|
acceptedTerms: i,
|
|
109
109
|
ensureTermsAcceptedForSignIn: w
|
|
@@ -113,7 +113,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
113
113
|
acceptedTerms: i.value ? !0 : void 0
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
const m = b, y = R(() => n.value.authMethods.login.passkey &&
|
|
116
|
+
const m = b, y = R(() => n.value.authMethods.login.passkey && Be() || ""), _ = R(() => {
|
|
117
117
|
const $ = n.value.oauth, T = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, F = n.value.authMethods.login.passkey;
|
|
118
118
|
return T || F;
|
|
119
119
|
});
|
|
@@ -123,7 +123,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
123
123
|
const $ = await o();
|
|
124
124
|
if (!$)
|
|
125
125
|
return;
|
|
126
|
-
|
|
126
|
+
d("passkeySubmit", $);
|
|
127
127
|
} catch ($) {
|
|
128
128
|
const T = s($);
|
|
129
129
|
if ($ instanceof Error && $.name === "NotAllowedError") {
|
|
@@ -133,23 +133,23 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
133
133
|
X.error(T);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
return ($, T) => (l(), k("div",
|
|
136
|
+
return ($, T) => (l(), k("div", Je, [_.value ? (l(), k("div", Xe, [...T[4] || (T[4] = [S("span", null, "其他登录方式", -1)])])) : z("", !0), S("div", {
|
|
137
137
|
class: "OAuthIcons",
|
|
138
138
|
style: G({
|
|
139
|
-
gap: `${e(
|
|
139
|
+
gap: `${e(Oe)}px`
|
|
140
140
|
})
|
|
141
141
|
}, [e(n).oauth.google.enabled ? (l(), I(Q, {
|
|
142
142
|
key: 0,
|
|
143
143
|
icon: e(J).google,
|
|
144
144
|
label: "Google",
|
|
145
145
|
size: m.size,
|
|
146
|
-
onClick: T[0] || (T[0] = (F) => p(e(
|
|
146
|
+
onClick: T[0] || (T[0] = (F) => p(e(r)))
|
|
147
147
|
}, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.github.enabled ? (l(), I(Q, {
|
|
148
148
|
key: 1,
|
|
149
149
|
icon: e(J).github,
|
|
150
150
|
label: "Github",
|
|
151
151
|
size: m.size,
|
|
152
|
-
onClick: T[1] || (T[1] = (F) => p(e(
|
|
152
|
+
onClick: T[1] || (T[1] = (F) => p(e(c)))
|
|
153
153
|
}, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.microsoft.enabled ? (l(), I(Q, {
|
|
154
154
|
key: 2,
|
|
155
155
|
icon: e(J).microsoft,
|
|
@@ -161,24 +161,24 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
161
161
|
icon: e(J).wechat,
|
|
162
162
|
label: "微信",
|
|
163
163
|
size: m.size,
|
|
164
|
-
onClick: T[3] || (T[3] = (F) => p(e(
|
|
164
|
+
onClick: T[3] || (T[3] = (F) => p(e(v)))
|
|
165
165
|
}, null, 8, ["icon", "size"])) : z("", !0), e(n).authMethods.login.passkey ? (l(), I(Q, {
|
|
166
166
|
key: 4,
|
|
167
|
-
icon: e(
|
|
167
|
+
icon: e(Me),
|
|
168
168
|
label: "Passkey",
|
|
169
169
|
size: m.size,
|
|
170
|
-
loading: e(
|
|
170
|
+
loading: e(g),
|
|
171
171
|
disabled: !e(h),
|
|
172
172
|
onClick: q
|
|
173
|
-
}, null, 8, ["icon", "size", "loading", "disabled"])) : z("", !0)], 4), y.value ? (l(), k("p",
|
|
173
|
+
}, null, 8, ["icon", "size", "loading", "disabled"])) : z("", !0)], 4), y.value ? (l(), k("p", Ye, L(y.value), 1)) : z("", !0)]));
|
|
174
174
|
}
|
|
175
|
-
}),
|
|
175
|
+
}), et = /* @__PURE__ */ C(Ze, [["__scopeId", "data-v-aa6a61de"]]), tt = {
|
|
176
176
|
class: "content"
|
|
177
|
-
}, tt = {
|
|
178
|
-
class: "sendVerifyCodeItem"
|
|
179
177
|
}, st = {
|
|
178
|
+
class: "sendVerifyCodeItem"
|
|
179
|
+
}, at = {
|
|
180
180
|
class: "handle"
|
|
181
|
-
},
|
|
181
|
+
}, ot = /* @__PURE__ */ A({
|
|
182
182
|
__name: "AuthkitPasswordUpdateAndVerify",
|
|
183
183
|
props: {
|
|
184
184
|
size: {
|
|
@@ -193,31 +193,31 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
193
193
|
},
|
|
194
194
|
emits: ["signIn", "submit"],
|
|
195
195
|
setup(b, {
|
|
196
|
-
emit:
|
|
196
|
+
emit: u
|
|
197
197
|
}) {
|
|
198
|
-
const
|
|
198
|
+
const d = u, n = b, g = P(), h = P(!1), o = P(), s = P({
|
|
199
199
|
email: void 0,
|
|
200
200
|
userToken: void 0,
|
|
201
201
|
emailVerifyId: void 0,
|
|
202
202
|
password: void 0,
|
|
203
203
|
confirmPassword: void 0
|
|
204
204
|
});
|
|
205
|
-
async function
|
|
205
|
+
async function c() {
|
|
206
206
|
if (!await o.value.validateField(["email"])) {
|
|
207
207
|
h.value = !0;
|
|
208
|
-
const
|
|
208
|
+
const v = await O().auth.verify.email.retry.post({
|
|
209
209
|
email: s.value.email,
|
|
210
210
|
purpose: "resetPassword"
|
|
211
211
|
});
|
|
212
|
-
h.value = !1,
|
|
212
|
+
h.value = !1, v.data && (s.value.emailVerifyId = v.data.emailVerifyId), W(g.value, v);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
async function
|
|
215
|
+
async function r() {
|
|
216
216
|
o.value.validate().then((t) => {
|
|
217
|
-
t ||
|
|
217
|
+
t || d("submit", s.value);
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
return (t,
|
|
220
|
+
return (t, v) => (l(), k("div", tt, [a(e(H), {
|
|
221
221
|
ref_key: "formRef",
|
|
222
222
|
ref: o,
|
|
223
223
|
model: s.value,
|
|
@@ -238,7 +238,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
238
238
|
}, {
|
|
239
239
|
default: f(() => [a(e(U), {
|
|
240
240
|
modelValue: s.value.email,
|
|
241
|
-
"onUpdate:modelValue":
|
|
241
|
+
"onUpdate:modelValue": v[0] || (v[0] = (i) => s.value.email = i),
|
|
242
242
|
placeholder: "请输入邮箱"
|
|
243
243
|
}, null, 8, ["modelValue"])]),
|
|
244
244
|
_: 1
|
|
@@ -251,19 +251,19 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
251
251
|
message: "请输入验证码"
|
|
252
252
|
}]
|
|
253
253
|
}, {
|
|
254
|
-
default: f(() => [S("div",
|
|
254
|
+
default: f(() => [S("div", st, [a(e(U), {
|
|
255
255
|
modelValue: s.value.userToken,
|
|
256
|
-
"onUpdate:modelValue":
|
|
256
|
+
"onUpdate:modelValue": v[1] || (v[1] = (i) => s.value.userToken = i),
|
|
257
257
|
placeholder: "请输入验证码"
|
|
258
258
|
}, null, 8, ["modelValue"]), a(K, {
|
|
259
259
|
ref_key: "SendVerifyCodeRef",
|
|
260
|
-
ref:
|
|
260
|
+
ref: g,
|
|
261
261
|
size: n.size,
|
|
262
262
|
loading: h.value,
|
|
263
263
|
style: {
|
|
264
264
|
"margin-left": "10px"
|
|
265
265
|
},
|
|
266
|
-
onSend:
|
|
266
|
+
onSend: c
|
|
267
267
|
}, null, 8, ["size", "loading"])])]),
|
|
268
268
|
_: 1
|
|
269
269
|
}), a(e(V), {
|
|
@@ -280,7 +280,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
280
280
|
}, {
|
|
281
281
|
default: f(() => [a(e(U), {
|
|
282
282
|
modelValue: s.value.password,
|
|
283
|
-
"onUpdate:modelValue":
|
|
283
|
+
"onUpdate:modelValue": v[2] || (v[2] = (i) => s.value.password = i),
|
|
284
284
|
placeholder: "请输入密码",
|
|
285
285
|
type: "password",
|
|
286
286
|
autocomplete: ""
|
|
@@ -304,30 +304,30 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
304
304
|
}, {
|
|
305
305
|
default: f(() => [a(e(U), {
|
|
306
306
|
modelValue: s.value.confirmPassword,
|
|
307
|
-
"onUpdate:modelValue":
|
|
307
|
+
"onUpdate:modelValue": v[3] || (v[3] = (i) => s.value.confirmPassword = i),
|
|
308
308
|
placeholder: "请输入确认密码密码",
|
|
309
309
|
type: "password",
|
|
310
310
|
autocomplete: ""
|
|
311
311
|
}, null, 8, ["modelValue"])]),
|
|
312
312
|
_: 1
|
|
313
|
-
}, 8, ["rules"]), S("div",
|
|
313
|
+
}, 8, ["rules"]), S("div", at, [a(e(B), {
|
|
314
314
|
type: "primary",
|
|
315
315
|
loading: n.loading,
|
|
316
316
|
long: "",
|
|
317
317
|
size: n.size,
|
|
318
|
-
onClick:
|
|
318
|
+
onClick: r
|
|
319
319
|
}, {
|
|
320
|
-
default: f(() => [...
|
|
320
|
+
default: f(() => [...v[4] || (v[4] = [x(" 提交 ", -1)])]),
|
|
321
321
|
_: 1
|
|
322
322
|
}, 8, ["loading", "size"])])]),
|
|
323
323
|
_: 1
|
|
324
324
|
}, 8, ["model", "size"])]));
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), it = /* @__PURE__ */ C(ot, [["__scopeId", "data-v-4091e418"]]), nt = {
|
|
327
327
|
class: "content"
|
|
328
|
-
},
|
|
328
|
+
}, lt = {
|
|
329
329
|
class: "sendVerifyCodeItem"
|
|
330
|
-
},
|
|
330
|
+
}, rt = /* @__PURE__ */ A({
|
|
331
331
|
__name: "AuthkitPhonePasswordUpdateAndVerify",
|
|
332
332
|
props: {
|
|
333
333
|
size: {
|
|
@@ -342,41 +342,41 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
342
342
|
},
|
|
343
343
|
emits: ["submit"],
|
|
344
344
|
setup(b, {
|
|
345
|
-
emit:
|
|
345
|
+
emit: u
|
|
346
346
|
}) {
|
|
347
|
-
const
|
|
347
|
+
const d = u, n = b, g = P(), h = P(!1), o = P(), s = P({
|
|
348
348
|
phone: void 0,
|
|
349
349
|
code: void 0,
|
|
350
350
|
password: void 0,
|
|
351
351
|
confirmPassword: void 0
|
|
352
|
-
}),
|
|
352
|
+
}), c = [{
|
|
353
353
|
required: !0,
|
|
354
354
|
message: "请输入确认密码"
|
|
355
355
|
}, {
|
|
356
356
|
minLength: 10,
|
|
357
357
|
message: "确认密码不能少于10字符"
|
|
358
358
|
}, {
|
|
359
|
-
validator: (
|
|
360
|
-
if (
|
|
359
|
+
validator: (v, i) => {
|
|
360
|
+
if (v !== s.value.password) {
|
|
361
361
|
i("两次密码输入不一致,请重新输入");
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
364
|
i();
|
|
365
365
|
}
|
|
366
366
|
}];
|
|
367
|
-
async function
|
|
367
|
+
async function r() {
|
|
368
368
|
if (!await o.value.validateField(["phone"])) {
|
|
369
369
|
h.value = !0;
|
|
370
370
|
const i = await O().auth.verify.sms.send.post({
|
|
371
371
|
phone: s.value.phone,
|
|
372
372
|
purpose: "resetPassword"
|
|
373
373
|
});
|
|
374
|
-
h.value = !1, W(
|
|
374
|
+
h.value = !1, W(g.value, i);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
async function t() {
|
|
378
|
-
o.value.validate().then((
|
|
379
|
-
|
|
378
|
+
o.value.validate().then((v) => {
|
|
379
|
+
v || d("submit", {
|
|
380
380
|
method: "phone",
|
|
381
381
|
phone: s.value.phone,
|
|
382
382
|
code: s.value.code,
|
|
@@ -384,7 +384,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
384
384
|
});
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
return (
|
|
387
|
+
return (v, i) => (l(), k("div", nt, [a(e(H), {
|
|
388
388
|
ref_key: "formRef",
|
|
389
389
|
ref: o,
|
|
390
390
|
model: s.value,
|
|
@@ -420,20 +420,20 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
420
420
|
message: "请输入验证码"
|
|
421
421
|
}]
|
|
422
422
|
}, {
|
|
423
|
-
default: f(() => [S("div",
|
|
423
|
+
default: f(() => [S("div", lt, [a(e(U), {
|
|
424
424
|
modelValue: s.value.code,
|
|
425
425
|
"onUpdate:modelValue": i[1] || (i[1] = (w) => s.value.code = w),
|
|
426
426
|
placeholder: "请输入验证码",
|
|
427
427
|
autocomplete: "one-time-code"
|
|
428
428
|
}, null, 8, ["modelValue"]), a(K, {
|
|
429
429
|
ref_key: "SendVerifyCodeRef",
|
|
430
|
-
ref:
|
|
430
|
+
ref: g,
|
|
431
431
|
size: n.size,
|
|
432
432
|
loading: h.value,
|
|
433
433
|
style: {
|
|
434
434
|
"margin-left": "10px"
|
|
435
435
|
},
|
|
436
|
-
onSend:
|
|
436
|
+
onSend: r
|
|
437
437
|
}, null, 8, ["size", "loading"])])]),
|
|
438
438
|
_: 1
|
|
439
439
|
}), a(e(V), {
|
|
@@ -460,7 +460,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
460
460
|
field: "confirmPassword",
|
|
461
461
|
label: "确认密码",
|
|
462
462
|
"hide-label": "",
|
|
463
|
-
rules:
|
|
463
|
+
rules: c
|
|
464
464
|
}, {
|
|
465
465
|
default: f(() => [a(e(U), {
|
|
466
466
|
modelValue: s.value.confirmPassword,
|
|
@@ -483,37 +483,37 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
483
483
|
_: 1
|
|
484
484
|
}, 8, ["model", "size"])]));
|
|
485
485
|
}
|
|
486
|
-
}),
|
|
486
|
+
}), ut = /* @__PURE__ */ C(rt, [["__scopeId", "data-v-a01a994e"]]), dt = {
|
|
487
487
|
class: "SwitchSignIn"
|
|
488
|
-
},
|
|
488
|
+
}, ct = /* @__PURE__ */ A({
|
|
489
489
|
__name: "AuthkitSwitchSignIn",
|
|
490
490
|
emits: ["switchSignIn"],
|
|
491
491
|
setup(b, {
|
|
492
|
-
emit:
|
|
492
|
+
emit: u
|
|
493
493
|
}) {
|
|
494
|
-
const
|
|
494
|
+
const d = u;
|
|
495
495
|
function n() {
|
|
496
|
-
|
|
496
|
+
d("switchSignIn");
|
|
497
497
|
}
|
|
498
|
-
return (
|
|
498
|
+
return (g, h) => (l(), k("div", dt, [S("span", null, [h[1] || (h[1] = S("span", null, "已经有账号?", -1)), a(e(Y), {
|
|
499
499
|
style: {
|
|
500
500
|
padding: "0px"
|
|
501
501
|
},
|
|
502
502
|
onClick: n
|
|
503
503
|
}, {
|
|
504
|
-
default: f(() => [...h[0] || (h[0] = [x("
|
|
504
|
+
default: f(() => [...h[0] || (h[0] = [x("去登录", -1)])]),
|
|
505
505
|
_: 1
|
|
506
506
|
})])]));
|
|
507
507
|
}
|
|
508
|
-
}),
|
|
508
|
+
}), pe = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-c09d6c18"]]), pt = {
|
|
509
509
|
class: "ResetPassword"
|
|
510
|
-
},
|
|
510
|
+
}, mt = {
|
|
511
511
|
key: 0,
|
|
512
512
|
class: "tabsContainer"
|
|
513
|
-
},
|
|
513
|
+
}, ft = {
|
|
514
514
|
key: 3,
|
|
515
515
|
class: "empty"
|
|
516
|
-
},
|
|
516
|
+
}, vt = /* @__PURE__ */ A({
|
|
517
517
|
__name: "AuthkitResetPassword",
|
|
518
518
|
props: {
|
|
519
519
|
size: {
|
|
@@ -529,11 +529,11 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
529
529
|
},
|
|
530
530
|
emits: ["switchSignIn", "submit"],
|
|
531
531
|
setup(b, {
|
|
532
|
-
emit:
|
|
532
|
+
emit: u
|
|
533
533
|
}) {
|
|
534
|
-
const
|
|
535
|
-
appsData:
|
|
536
|
-
} = j(), h = R(() =>
|
|
534
|
+
const d = u, n = b, {
|
|
535
|
+
appsData: g
|
|
536
|
+
} = j(), h = R(() => g.value.authMethods), o = R(() => {
|
|
537
537
|
const t = [];
|
|
538
538
|
return h.value.login.emailPassword && t.push({
|
|
539
539
|
key: "email",
|
|
@@ -543,58 +543,58 @@ const je = ["title", "aria-label", "disabled"], Ke = {
|
|
|
543
543
|
title: "手机号找回"
|
|
544
544
|
}), t;
|
|
545
545
|
}), s = P("email");
|
|
546
|
-
|
|
546
|
+
ne(() => {
|
|
547
547
|
var t;
|
|
548
|
-
o.value.some((
|
|
548
|
+
o.value.some((v) => v.key === s.value) || (s.value = ((t = o.value[0]) == null ? void 0 : t.key) || "email");
|
|
549
549
|
});
|
|
550
|
-
function
|
|
551
|
-
|
|
550
|
+
function c() {
|
|
551
|
+
d("switchSignIn");
|
|
552
552
|
}
|
|
553
|
-
async function
|
|
554
|
-
|
|
553
|
+
async function r(t) {
|
|
554
|
+
d("submit", {
|
|
555
555
|
method: s.value,
|
|
556
556
|
...t
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
return (t,
|
|
559
|
+
return (t, v) => (l(), k("div", pt, [o.value.length > 1 ? (l(), k("div", mt, [a(e(ue), {
|
|
560
560
|
"active-key": s.value,
|
|
561
|
-
"onUpdate:activeKey":
|
|
561
|
+
"onUpdate:activeKey": v[0] || (v[0] = (i) => s.value = i)
|
|
562
562
|
}, {
|
|
563
|
-
default: f(() => [(l(!0), k(D, null,
|
|
563
|
+
default: f(() => [(l(!0), k(D, null, le(o.value, (i) => (l(), I(e(de), {
|
|
564
564
|
key: i.key,
|
|
565
565
|
title: i.title
|
|
566
566
|
}, null, 8, ["title"]))), 128))]),
|
|
567
567
|
_: 1
|
|
568
|
-
}, 8, ["active-key"])])) : z("", !0), s.value === "email" && h.value.login.emailPassword ? (l(), I(
|
|
568
|
+
}, 8, ["active-key"])])) : z("", !0), s.value === "email" && h.value.login.emailPassword ? (l(), I(it, {
|
|
569
569
|
key: 1,
|
|
570
570
|
loading: b.loading,
|
|
571
571
|
size: n.size,
|
|
572
|
-
onSubmit:
|
|
573
|
-
}, null, 8, ["loading", "size"])) : s.value === "phone" && h.value.login.phonePassword ? (l(), I(
|
|
572
|
+
onSubmit: r
|
|
573
|
+
}, null, 8, ["loading", "size"])) : s.value === "phone" && h.value.login.phonePassword ? (l(), I(ut, {
|
|
574
574
|
key: 2,
|
|
575
575
|
loading: b.loading,
|
|
576
576
|
size: n.size,
|
|
577
|
-
onSubmit:
|
|
578
|
-
}, null, 8, ["loading", "size"])) : (l(), k("div",
|
|
579
|
-
onSwitchSignIn:
|
|
577
|
+
onSubmit: r
|
|
578
|
+
}, null, 8, ["loading", "size"])) : (l(), k("div", ft, "当前应用未开放找回密码")), a(pe, {
|
|
579
|
+
onSwitchSignIn: c
|
|
580
580
|
})]));
|
|
581
581
|
}
|
|
582
|
-
}),
|
|
582
|
+
}), gt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-90d789bb"]]);
|
|
583
583
|
let se = null, ae = null;
|
|
584
|
-
function
|
|
584
|
+
function ht(b) {
|
|
585
585
|
se = b.onPrivacyPolicy ?? null, ae = b.onUserServiceAgreement ?? null;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function yt() {
|
|
588
588
|
se == null || se();
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function wt() {
|
|
591
591
|
ae == null || ae();
|
|
592
592
|
}
|
|
593
|
-
const
|
|
593
|
+
const bt = {
|
|
594
594
|
key: 2
|
|
595
|
-
},
|
|
595
|
+
}, _t = /* @__PURE__ */ A({
|
|
596
596
|
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
597
|
-
props: /* @__PURE__ */
|
|
597
|
+
props: /* @__PURE__ */ Ve({
|
|
598
598
|
currentView: {}
|
|
599
599
|
}, {
|
|
600
600
|
acceptedTerms: {
|
|
@@ -606,48 +606,48 @@ const wt = {
|
|
|
606
606
|
emits: ["update:acceptedTerms"],
|
|
607
607
|
setup(b) {
|
|
608
608
|
const {
|
|
609
|
-
config:
|
|
610
|
-
} =
|
|
611
|
-
getLink:
|
|
609
|
+
config: u
|
|
610
|
+
} = ce(), d = b, n = Pe(b, "acceptedTerms"), {
|
|
611
|
+
getLink: g,
|
|
612
612
|
openLegalDoc: h
|
|
613
613
|
} = Se(), {
|
|
614
614
|
termsShaking: o,
|
|
615
615
|
requiresAcceptanceForSignUp: s,
|
|
616
|
-
requiresAcceptanceForOAuth:
|
|
617
|
-
syncAcceptedTerms:
|
|
616
|
+
requiresAcceptanceForOAuth: c,
|
|
617
|
+
syncAcceptedTerms: r
|
|
618
618
|
} = M();
|
|
619
|
-
|
|
620
|
-
|
|
619
|
+
he(n, (_) => {
|
|
620
|
+
r(_);
|
|
621
621
|
});
|
|
622
622
|
const t = R(() => {
|
|
623
|
-
const _ =
|
|
623
|
+
const _ = g("userServiceAgreement");
|
|
624
624
|
return _ != null && _.configured ? _ : void 0;
|
|
625
|
-
}),
|
|
626
|
-
const _ =
|
|
625
|
+
}), v = R(() => {
|
|
626
|
+
const _ = g("privacyPolicy");
|
|
627
627
|
return _ != null && _.configured ? _ : void 0;
|
|
628
|
-
}), i = R(() => !!(t.value ||
|
|
628
|
+
}), i = R(() => !!(t.value || v.value)), w = R(() => d.currentView === "signUp" ? s() : d.currentView === "signIn" ? c() : !1), p = R(() => i.value && w.value);
|
|
629
629
|
function m() {
|
|
630
|
-
if (
|
|
630
|
+
if (u.legalDocsMode === "builtin") {
|
|
631
631
|
h("userServiceAgreement");
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
|
|
634
|
+
wt();
|
|
635
635
|
}
|
|
636
636
|
function y() {
|
|
637
|
-
if (
|
|
637
|
+
if (u.legalDocsMode === "builtin") {
|
|
638
638
|
h("privacyPolicy");
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
|
|
641
|
+
yt();
|
|
642
642
|
}
|
|
643
643
|
return (_, q) => p.value ? (l(), k("div", {
|
|
644
644
|
key: 0,
|
|
645
|
-
class:
|
|
645
|
+
class: ge(["ServiceAgreementAndPrivacyProtection", {
|
|
646
646
|
"terms-shake": e(o)
|
|
647
647
|
}])
|
|
648
648
|
}, [i.value ? (l(), k(D, {
|
|
649
649
|
key: 0
|
|
650
|
-
}, [w.value ? (l(), I(e(
|
|
650
|
+
}, [w.value ? (l(), I(e(Ce), {
|
|
651
651
|
key: 0,
|
|
652
652
|
modelValue: n.value,
|
|
653
653
|
"onUpdate:modelValue": q[0] || (q[0] = ($) => n.value = $),
|
|
@@ -663,19 +663,19 @@ const wt = {
|
|
|
663
663
|
}, {
|
|
664
664
|
default: f(() => [x(L(t.value.label), 1)]),
|
|
665
665
|
_: 1
|
|
666
|
-
})) : z("", !0), t.value &&
|
|
666
|
+
})) : z("", !0), t.value && v.value ? (l(), k("span", bt, "和")) : z("", !0), v.value ? (l(), I(e(Y), {
|
|
667
667
|
key: 3,
|
|
668
668
|
onClick: y
|
|
669
669
|
}, {
|
|
670
|
-
default: f(() => [x(L(
|
|
670
|
+
default: f(() => [x(L(v.value.label), 1)]),
|
|
671
671
|
_: 1
|
|
672
672
|
})) : z("", !0)], 64)) : z("", !0)], 2)) : z("", !0);
|
|
673
673
|
}
|
|
674
|
-
}), ee = /* @__PURE__ */ C(
|
|
674
|
+
}), ee = /* @__PURE__ */ C(_t, [["__scopeId", "data-v-a0c2f361"]]), kt = {
|
|
675
675
|
class: "content"
|
|
676
|
-
},
|
|
676
|
+
}, St = {
|
|
677
677
|
class: "handle"
|
|
678
|
-
},
|
|
678
|
+
}, It = /* @__PURE__ */ A({
|
|
679
679
|
__name: "AuthkitPasswordAuth",
|
|
680
680
|
props: {
|
|
681
681
|
size: {
|
|
@@ -694,27 +694,27 @@ const wt = {
|
|
|
694
694
|
},
|
|
695
695
|
emits: ["submit"],
|
|
696
696
|
setup(b, {
|
|
697
|
-
emit:
|
|
697
|
+
emit: u
|
|
698
698
|
}) {
|
|
699
|
-
const
|
|
699
|
+
const d = u, {
|
|
700
700
|
useTermsFormField: n
|
|
701
701
|
} = M(), {
|
|
702
|
-
showTermsField:
|
|
702
|
+
showTermsField: g,
|
|
703
703
|
termsRules: h
|
|
704
|
-
} = n("signIn"), o = b, s = P(),
|
|
704
|
+
} = n("signIn"), o = b, s = P(), c = P({
|
|
705
705
|
identifier: void 0,
|
|
706
706
|
password: void 0,
|
|
707
707
|
acceptedTerms: !1
|
|
708
708
|
});
|
|
709
|
-
async function
|
|
709
|
+
async function r() {
|
|
710
710
|
s.value.validate().then((t) => {
|
|
711
|
-
t ||
|
|
711
|
+
t || d("submit", c.value);
|
|
712
712
|
});
|
|
713
713
|
}
|
|
714
|
-
return (t,
|
|
714
|
+
return (t, v) => (l(), k("div", kt, [a(e(H), {
|
|
715
715
|
ref_key: "formRef",
|
|
716
716
|
ref: s,
|
|
717
|
-
model:
|
|
717
|
+
model: c.value,
|
|
718
718
|
size: o.size,
|
|
719
719
|
"auto-label-width": ""
|
|
720
720
|
}, {
|
|
@@ -728,8 +728,8 @@ const wt = {
|
|
|
728
728
|
}]
|
|
729
729
|
}, {
|
|
730
730
|
default: f(() => [a(e(U), {
|
|
731
|
-
modelValue:
|
|
732
|
-
"onUpdate:modelValue":
|
|
731
|
+
modelValue: c.value.identifier,
|
|
732
|
+
"onUpdate:modelValue": v[0] || (v[0] = (i) => c.value.identifier = i),
|
|
733
733
|
placeholder: o.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
|
|
734
734
|
autocomplete: "email username"
|
|
735
735
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
@@ -744,31 +744,31 @@ const wt = {
|
|
|
744
744
|
}]
|
|
745
745
|
}, {
|
|
746
746
|
default: f(() => [a(e(U), {
|
|
747
|
-
modelValue:
|
|
748
|
-
"onUpdate:modelValue":
|
|
747
|
+
modelValue: c.value.password,
|
|
748
|
+
"onUpdate:modelValue": v[1] || (v[1] = (i) => c.value.password = i),
|
|
749
749
|
placeholder: "请输入密码",
|
|
750
750
|
type: "password",
|
|
751
751
|
autocomplete: "current-password"
|
|
752
752
|
}, null, 8, ["modelValue"])]),
|
|
753
753
|
_: 1
|
|
754
|
-
}), S("div",
|
|
754
|
+
}), S("div", St, [a(e(B), {
|
|
755
755
|
type: "primary",
|
|
756
756
|
loading: o.loading,
|
|
757
757
|
long: "",
|
|
758
758
|
size: o.size,
|
|
759
|
-
onClick:
|
|
759
|
+
onClick: r
|
|
760
760
|
}, {
|
|
761
|
-
default: f(() => [...
|
|
761
|
+
default: f(() => [...v[3] || (v[3] = [x(" 登录 ", -1)])]),
|
|
762
762
|
_: 1
|
|
763
|
-
}, 8, ["loading", "size"]), e(
|
|
763
|
+
}, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
|
|
764
764
|
key: 0,
|
|
765
765
|
field: "acceptedTerms",
|
|
766
766
|
"hide-label": "",
|
|
767
767
|
rules: e(h)
|
|
768
768
|
}, {
|
|
769
769
|
default: f(() => [a(ee, {
|
|
770
|
-
"accepted-terms":
|
|
771
|
-
"onUpdate:acceptedTerms":
|
|
770
|
+
"accepted-terms": c.value.acceptedTerms,
|
|
771
|
+
"onUpdate:acceptedTerms": v[2] || (v[2] = (i) => c.value.acceptedTerms = i),
|
|
772
772
|
"current-view": "signIn"
|
|
773
773
|
}, null, 8, ["accepted-terms"])]),
|
|
774
774
|
_: 1
|
|
@@ -776,15 +776,15 @@ const wt = {
|
|
|
776
776
|
_: 1
|
|
777
777
|
}, 8, ["model", "size"])]));
|
|
778
778
|
}
|
|
779
|
-
}),
|
|
779
|
+
}), zt = /* @__PURE__ */ C(It, [["__scopeId", "data-v-cca59a39"]]), Pt = {
|
|
780
780
|
class: "SignInPhone"
|
|
781
|
-
}, Pt = {
|
|
782
|
-
class: "content"
|
|
783
781
|
}, Vt = {
|
|
784
|
-
class: "
|
|
782
|
+
class: "content"
|
|
785
783
|
}, At = {
|
|
784
|
+
class: "sendVerifyCodeItem"
|
|
785
|
+
}, Ut = {
|
|
786
786
|
class: "handle"
|
|
787
|
-
},
|
|
787
|
+
}, Ct = /* @__PURE__ */ A({
|
|
788
788
|
__name: "AuthkitSignInPhone",
|
|
789
789
|
props: {
|
|
790
790
|
size: {
|
|
@@ -799,40 +799,40 @@ const wt = {
|
|
|
799
799
|
},
|
|
800
800
|
emits: ["submit"],
|
|
801
801
|
setup(b, {
|
|
802
|
-
emit:
|
|
802
|
+
emit: u
|
|
803
803
|
}) {
|
|
804
|
-
const
|
|
804
|
+
const d = u, {
|
|
805
805
|
useTermsFormField: n
|
|
806
806
|
} = M(), {
|
|
807
|
-
showTermsField:
|
|
807
|
+
showTermsField: g,
|
|
808
808
|
termsRules: h
|
|
809
|
-
} = n("signIn"), o = b, s = P(),
|
|
809
|
+
} = n("signIn"), o = b, s = P(), c = P(!1), r = P(), t = P({
|
|
810
810
|
phone: void 0,
|
|
811
811
|
code: void 0,
|
|
812
812
|
acceptedTerms: !1
|
|
813
813
|
});
|
|
814
|
-
async function
|
|
815
|
-
if (!await
|
|
816
|
-
|
|
814
|
+
async function v() {
|
|
815
|
+
if (!await r.value.validateField(["phone"])) {
|
|
816
|
+
c.value = !0;
|
|
817
817
|
const p = await O().auth.verify.sms.send.post({
|
|
818
818
|
phone: t.value.phone,
|
|
819
819
|
purpose: "signIn"
|
|
820
820
|
});
|
|
821
|
-
|
|
821
|
+
c.value = !1, W(s.value, p);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
async function i() {
|
|
825
|
-
|
|
826
|
-
w ||
|
|
825
|
+
r.value.validate().then((w) => {
|
|
826
|
+
w || d("submit", {
|
|
827
827
|
identifier: t.value.phone,
|
|
828
828
|
code: t.value.code,
|
|
829
829
|
method: "code"
|
|
830
830
|
});
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
|
-
return (w, p) => (l(), k("div",
|
|
833
|
+
return (w, p) => (l(), k("div", Pt, [S("div", Vt, [a(e(H), {
|
|
834
834
|
ref_key: "formRef",
|
|
835
|
-
ref:
|
|
835
|
+
ref: r,
|
|
836
836
|
model: t.value,
|
|
837
837
|
size: o.size,
|
|
838
838
|
"auto-label-width": ""
|
|
@@ -866,7 +866,7 @@ const wt = {
|
|
|
866
866
|
message: "请输入验证码"
|
|
867
867
|
}]
|
|
868
868
|
}, {
|
|
869
|
-
default: f(() => [S("div",
|
|
869
|
+
default: f(() => [S("div", At, [a(e(U), {
|
|
870
870
|
modelValue: t.value.code,
|
|
871
871
|
"onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
|
|
872
872
|
placeholder: "请输入验证码",
|
|
@@ -875,14 +875,14 @@ const wt = {
|
|
|
875
875
|
ref_key: "SendVerifyCodeRef",
|
|
876
876
|
ref: s,
|
|
877
877
|
size: o.size,
|
|
878
|
-
loading:
|
|
878
|
+
loading: c.value,
|
|
879
879
|
style: {
|
|
880
880
|
"margin-left": "10px"
|
|
881
881
|
},
|
|
882
|
-
onSend:
|
|
882
|
+
onSend: v
|
|
883
883
|
}, null, 8, ["size", "loading"])])]),
|
|
884
884
|
_: 1
|
|
885
|
-
}), S("div",
|
|
885
|
+
}), S("div", Ut, [a(e(B), {
|
|
886
886
|
type: "primary",
|
|
887
887
|
loading: o.loading,
|
|
888
888
|
long: "",
|
|
@@ -891,7 +891,7 @@ const wt = {
|
|
|
891
891
|
}, {
|
|
892
892
|
default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
|
|
893
893
|
_: 1
|
|
894
|
-
}, 8, ["loading", "size"]), e(
|
|
894
|
+
}, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
|
|
895
895
|
key: 0,
|
|
896
896
|
field: "acceptedTerms",
|
|
897
897
|
"hide-label": "",
|
|
@@ -907,13 +907,13 @@ const wt = {
|
|
|
907
907
|
_: 1
|
|
908
908
|
}, 8, ["model", "size"])])]));
|
|
909
909
|
}
|
|
910
|
-
}),
|
|
910
|
+
}), $t = /* @__PURE__ */ C(Ct, [["__scopeId", "data-v-ef67e91c"]]), Tt = {
|
|
911
911
|
class: "SignInEmailCode"
|
|
912
|
-
}, Tt = {
|
|
913
|
-
class: "sendVerifyCodeItem"
|
|
914
912
|
}, Rt = {
|
|
913
|
+
class: "sendVerifyCodeItem"
|
|
914
|
+
}, qt = {
|
|
915
915
|
class: "handle"
|
|
916
|
-
},
|
|
916
|
+
}, xt = /* @__PURE__ */ A({
|
|
917
917
|
__name: "AuthkitSignInEmailCode",
|
|
918
918
|
props: {
|
|
919
919
|
size: {
|
|
@@ -928,33 +928,33 @@ const wt = {
|
|
|
928
928
|
},
|
|
929
929
|
emits: ["submit"],
|
|
930
930
|
setup(b, {
|
|
931
|
-
emit:
|
|
931
|
+
emit: u
|
|
932
932
|
}) {
|
|
933
|
-
const
|
|
933
|
+
const d = u, {
|
|
934
934
|
useTermsFormField: n
|
|
935
935
|
} = M(), {
|
|
936
|
-
showTermsField:
|
|
936
|
+
showTermsField: g,
|
|
937
937
|
termsRules: h
|
|
938
|
-
} = n("signIn"), o = b, s = P(),
|
|
938
|
+
} = n("signIn"), o = b, s = P(), c = P(!1), r = P(), t = P({
|
|
939
939
|
email: void 0,
|
|
940
940
|
code: void 0,
|
|
941
941
|
emailVerifyId: "",
|
|
942
942
|
acceptedTerms: !1
|
|
943
943
|
});
|
|
944
|
-
async function
|
|
944
|
+
async function v() {
|
|
945
945
|
var p;
|
|
946
|
-
if (!await
|
|
947
|
-
|
|
946
|
+
if (!await r.value.validateField(["email"])) {
|
|
947
|
+
c.value = !0;
|
|
948
948
|
const m = await O().auth.verify.email.retry.post({
|
|
949
949
|
email: t.value.email,
|
|
950
950
|
purpose: "signIn"
|
|
951
951
|
});
|
|
952
|
-
|
|
952
|
+
c.value = !1, (p = m.data) != null && p.emailVerifyId && (t.value.emailVerifyId = m.data.emailVerifyId), W(s.value, m);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
async function i() {
|
|
956
|
-
|
|
957
|
-
w ||
|
|
956
|
+
r.value.validate().then((w) => {
|
|
957
|
+
w || d("submit", {
|
|
958
958
|
identifier: t.value.email,
|
|
959
959
|
code: t.value.code,
|
|
960
960
|
emailVerifyId: t.value.emailVerifyId,
|
|
@@ -962,9 +962,9 @@ const wt = {
|
|
|
962
962
|
});
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
return (w, p) => (l(), k("div",
|
|
965
|
+
return (w, p) => (l(), k("div", Tt, [a(e(H), {
|
|
966
966
|
ref_key: "formRef",
|
|
967
|
-
ref:
|
|
967
|
+
ref: r,
|
|
968
968
|
model: t.value,
|
|
969
969
|
size: o.size,
|
|
970
970
|
"auto-label-width": ""
|
|
@@ -995,7 +995,7 @@ const wt = {
|
|
|
995
995
|
message: "请输入验证码"
|
|
996
996
|
}]
|
|
997
997
|
}, {
|
|
998
|
-
default: f(() => [S("div",
|
|
998
|
+
default: f(() => [S("div", Rt, [a(e(U), {
|
|
999
999
|
modelValue: t.value.code,
|
|
1000
1000
|
"onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
|
|
1001
1001
|
placeholder: "请输入验证码",
|
|
@@ -1004,14 +1004,14 @@ const wt = {
|
|
|
1004
1004
|
ref_key: "SendVerifyCodeRef",
|
|
1005
1005
|
ref: s,
|
|
1006
1006
|
size: o.size,
|
|
1007
|
-
loading:
|
|
1007
|
+
loading: c.value,
|
|
1008
1008
|
style: {
|
|
1009
1009
|
"margin-left": "10px"
|
|
1010
1010
|
},
|
|
1011
|
-
onSend:
|
|
1011
|
+
onSend: v
|
|
1012
1012
|
}, null, 8, ["size", "loading"])])]),
|
|
1013
1013
|
_: 1
|
|
1014
|
-
}), S("div",
|
|
1014
|
+
}), S("div", qt, [a(e(B), {
|
|
1015
1015
|
type: "primary",
|
|
1016
1016
|
loading: o.loading,
|
|
1017
1017
|
long: "",
|
|
@@ -1020,7 +1020,7 @@ const wt = {
|
|
|
1020
1020
|
}, {
|
|
1021
1021
|
default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
|
|
1022
1022
|
_: 1
|
|
1023
|
-
}, 8, ["loading", "size"]), e(
|
|
1023
|
+
}, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
|
|
1024
1024
|
key: 0,
|
|
1025
1025
|
field: "acceptedTerms",
|
|
1026
1026
|
"hide-label": "",
|
|
@@ -1036,11 +1036,11 @@ const wt = {
|
|
|
1036
1036
|
_: 1
|
|
1037
1037
|
}, 8, ["model", "size"])]));
|
|
1038
1038
|
}
|
|
1039
|
-
}),
|
|
1039
|
+
}), Lt = /* @__PURE__ */ C(xt, [["__scopeId", "data-v-fee4702f"]]), Bt = {
|
|
1040
1040
|
class: "SwitchSignUpOrResetPassword"
|
|
1041
|
-
},
|
|
1041
|
+
}, Ot = {
|
|
1042
1042
|
key: 0
|
|
1043
|
-
},
|
|
1043
|
+
}, Mt = /* @__PURE__ */ A({
|
|
1044
1044
|
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
1045
1045
|
props: {
|
|
1046
1046
|
showSignUp: {
|
|
@@ -1054,24 +1054,24 @@ const wt = {
|
|
|
1054
1054
|
},
|
|
1055
1055
|
emits: ["switchSignUp", "switchResetPassword"],
|
|
1056
1056
|
setup(b, {
|
|
1057
|
-
emit:
|
|
1057
|
+
emit: u
|
|
1058
1058
|
}) {
|
|
1059
|
-
const
|
|
1060
|
-
function
|
|
1059
|
+
const d = b, n = u;
|
|
1060
|
+
function g() {
|
|
1061
1061
|
n("switchSignUp");
|
|
1062
1062
|
}
|
|
1063
1063
|
function h() {
|
|
1064
1064
|
n("switchResetPassword");
|
|
1065
1065
|
}
|
|
1066
|
-
return (o, s) => (l(), k("div",
|
|
1066
|
+
return (o, s) => (l(), k("div", Bt, [d.showSignUp ? (l(), k("span", Ot, [s[1] || (s[1] = S("span", null, " 还没有账户?", -1)), a(e(Y), {
|
|
1067
1067
|
style: {
|
|
1068
1068
|
padding: "0px"
|
|
1069
1069
|
},
|
|
1070
|
-
onClick:
|
|
1070
|
+
onClick: g
|
|
1071
1071
|
}, {
|
|
1072
1072
|
default: f(() => [...s[0] || (s[0] = [x("去注册?", -1)])]),
|
|
1073
1073
|
_: 1
|
|
1074
|
-
})])) : z("", !0),
|
|
1074
|
+
})])) : z("", !0), d.showResetPassword ? (l(), I(e(Y), {
|
|
1075
1075
|
key: 1,
|
|
1076
1076
|
style: {
|
|
1077
1077
|
padding: "0px"
|
|
@@ -1082,12 +1082,12 @@ const wt = {
|
|
|
1082
1082
|
_: 1
|
|
1083
1083
|
})) : z("", !0)]));
|
|
1084
1084
|
}
|
|
1085
|
-
}),
|
|
1085
|
+
}), Ft = /* @__PURE__ */ C(Mt, [["__scopeId", "data-v-6ca7b1f2"]]), Dt = {
|
|
1086
1086
|
class: "SignIn"
|
|
1087
|
-
},
|
|
1087
|
+
}, Et = {
|
|
1088
1088
|
key: 0,
|
|
1089
1089
|
class: "tabsContainer"
|
|
1090
|
-
},
|
|
1090
|
+
}, Ht = /* @__PURE__ */ A({
|
|
1091
1091
|
__name: "AuthkitSignIn",
|
|
1092
1092
|
props: {
|
|
1093
1093
|
size: {
|
|
@@ -1102,82 +1102,82 @@ const wt = {
|
|
|
1102
1102
|
},
|
|
1103
1103
|
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
1104
1104
|
setup(b, {
|
|
1105
|
-
emit:
|
|
1105
|
+
emit: u
|
|
1106
1106
|
}) {
|
|
1107
|
-
const
|
|
1107
|
+
const d = u, n = b, g = Ae(), h = R(() => !!g.OAuth), {
|
|
1108
1108
|
appsData: o
|
|
1109
1109
|
} = j(), {
|
|
1110
1110
|
signUpAuthEnabled: s
|
|
1111
|
-
} = M(),
|
|
1111
|
+
} = M(), c = R(() => o.value.authMethods), r = R(() => s.value && (c.value.signUp.email || c.value.signUp.phone)), t = R(() => c.value.login.emailPassword || c.value.login.phonePassword), v = R(() => {
|
|
1112
1112
|
const y = [];
|
|
1113
|
-
return (
|
|
1113
|
+
return (c.value.login.emailPassword || c.value.login.phonePassword) && y.push({
|
|
1114
1114
|
key: "password",
|
|
1115
|
-
title:
|
|
1116
|
-
}),
|
|
1115
|
+
title: "密码登录"
|
|
1116
|
+
}), c.value.login.phoneCode && y.push({
|
|
1117
1117
|
key: "phoneCode",
|
|
1118
1118
|
title: "手机验证码登录"
|
|
1119
|
-
}),
|
|
1119
|
+
}), c.value.login.emailCode && y.push({
|
|
1120
1120
|
key: "emailCode",
|
|
1121
1121
|
title: "邮箱验证码登录"
|
|
1122
1122
|
}), y;
|
|
1123
1123
|
}), i = P("password");
|
|
1124
|
-
|
|
1124
|
+
ne(() => {
|
|
1125
1125
|
var y;
|
|
1126
|
-
|
|
1126
|
+
v.value.some((_) => _.key === i.value) || (i.value = ((y = v.value[0]) == null ? void 0 : y.key) || "password");
|
|
1127
1127
|
});
|
|
1128
1128
|
function w() {
|
|
1129
|
-
|
|
1129
|
+
d("switchSignUp");
|
|
1130
1130
|
}
|
|
1131
1131
|
function p() {
|
|
1132
|
-
|
|
1132
|
+
d("switchResetPassword");
|
|
1133
1133
|
}
|
|
1134
1134
|
async function m(y) {
|
|
1135
|
-
|
|
1135
|
+
d("submit", {
|
|
1136
1136
|
method: i.value === "password" ? "password" : "code",
|
|
1137
1137
|
...y
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
|
-
return (y, _) => (l(), k("div",
|
|
1140
|
+
return (y, _) => (l(), k("div", Dt, [v.value.length > 1 ? (l(), k("div", Et, [a(e(ue), {
|
|
1141
1141
|
"active-key": i.value,
|
|
1142
1142
|
"onUpdate:activeKey": _[0] || (_[0] = (q) => i.value = q)
|
|
1143
1143
|
}, {
|
|
1144
|
-
default: f(() => [(l(!0), k(D, null,
|
|
1144
|
+
default: f(() => [(l(!0), k(D, null, le(v.value, (q) => (l(), I(e(de), {
|
|
1145
1145
|
key: q.key,
|
|
1146
1146
|
title: q.title
|
|
1147
1147
|
}, null, 8, ["title"]))), 128))]),
|
|
1148
1148
|
_: 1
|
|
1149
|
-
}, 8, ["active-key"])])) : z("", !0), i.value === "password" && (
|
|
1149
|
+
}, 8, ["active-key"])])) : z("", !0), i.value === "password" && (c.value.login.emailPassword || c.value.login.phonePassword) ? (l(), I(zt, {
|
|
1150
1150
|
key: 1,
|
|
1151
1151
|
loading: n.loading,
|
|
1152
1152
|
size: n.size,
|
|
1153
|
-
"allow-phone":
|
|
1153
|
+
"allow-phone": c.value.login.phonePassword,
|
|
1154
1154
|
onSubmit: m
|
|
1155
|
-
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), I(
|
|
1155
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), I($t, {
|
|
1156
1156
|
key: 2,
|
|
1157
1157
|
loading: n.loading,
|
|
1158
1158
|
size: n.size,
|
|
1159
1159
|
onSubmit: m
|
|
1160
|
-
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), I(
|
|
1160
|
+
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), I(Lt, {
|
|
1161
1161
|
key: 3,
|
|
1162
1162
|
loading: n.loading,
|
|
1163
1163
|
size: n.size,
|
|
1164
1164
|
onSubmit: m
|
|
1165
1165
|
}, null, 8, ["loading", "size"])) : z("", !0), h.value ? Z(y.$slots, "OAuth", {
|
|
1166
1166
|
key: 4
|
|
1167
|
-
}, void 0, !0) : z("", !0), a(
|
|
1168
|
-
"show-sign-up":
|
|
1167
|
+
}, void 0, !0) : z("", !0), a(Ft, {
|
|
1168
|
+
"show-sign-up": r.value,
|
|
1169
1169
|
"show-reset-password": t.value,
|
|
1170
1170
|
onSwitchSignUp: w,
|
|
1171
1171
|
onSwitchResetPassword: p
|
|
1172
1172
|
}, null, 8, ["show-sign-up", "show-reset-password"])]));
|
|
1173
1173
|
}
|
|
1174
|
-
}),
|
|
1174
|
+
}), Gt = /* @__PURE__ */ C(Ht, [["__scopeId", "data-v-a7aef80e"]]), Nt = {
|
|
1175
1175
|
class: "content"
|
|
1176
|
-
}, Nt = {
|
|
1177
|
-
class: "sendVerifyCodeItem"
|
|
1178
1176
|
}, jt = {
|
|
1177
|
+
class: "sendVerifyCodeItem"
|
|
1178
|
+
}, Kt = {
|
|
1179
1179
|
class: "handle"
|
|
1180
|
-
},
|
|
1180
|
+
}, Wt = /* @__PURE__ */ A({
|
|
1181
1181
|
__name: "AuthkitEmailUpdate",
|
|
1182
1182
|
props: {
|
|
1183
1183
|
size: {
|
|
@@ -1196,14 +1196,14 @@ const wt = {
|
|
|
1196
1196
|
},
|
|
1197
1197
|
emits: ["submit"],
|
|
1198
1198
|
setup(b, {
|
|
1199
|
-
emit:
|
|
1199
|
+
emit: u
|
|
1200
1200
|
}) {
|
|
1201
|
-
const
|
|
1201
|
+
const d = u, {
|
|
1202
1202
|
useTermsFormField: n
|
|
1203
1203
|
} = M(), {
|
|
1204
|
-
showTermsField:
|
|
1204
|
+
showTermsField: g,
|
|
1205
1205
|
termsRules: h
|
|
1206
|
-
} = n("signUp"), o = b, s = P(),
|
|
1206
|
+
} = n("signUp"), o = b, s = P(), c = P(!1), r = P(), t = P({
|
|
1207
1207
|
email: void 0,
|
|
1208
1208
|
userToken: void 0,
|
|
1209
1209
|
emailVerifyId: void 0,
|
|
@@ -1216,24 +1216,24 @@ const wt = {
|
|
|
1216
1216
|
const w = ke();
|
|
1217
1217
|
w && (t.value.inviteCode = w);
|
|
1218
1218
|
});
|
|
1219
|
-
async function
|
|
1220
|
-
if (!await
|
|
1221
|
-
|
|
1219
|
+
async function v() {
|
|
1220
|
+
if (!await r.value.validateField(["email"])) {
|
|
1221
|
+
c.value = !0;
|
|
1222
1222
|
const p = await O().auth.verify.email.retry.post({
|
|
1223
1223
|
email: t.value.email,
|
|
1224
1224
|
purpose: o.purpose
|
|
1225
1225
|
});
|
|
1226
|
-
|
|
1226
|
+
c.value = !1, p.data && (t.value.emailVerifyId = p.data.emailVerifyId), W(s.value, p);
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
async function i() {
|
|
1230
|
-
|
|
1231
|
-
w ||
|
|
1230
|
+
r.value.validate().then((w) => {
|
|
1231
|
+
w || d("submit", t.value);
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
|
-
return (w, p) => (l(), k("div",
|
|
1234
|
+
return (w, p) => (l(), k("div", Nt, [a(e(H), {
|
|
1235
1235
|
ref_key: "formRef",
|
|
1236
|
-
ref:
|
|
1236
|
+
ref: r,
|
|
1237
1237
|
model: t.value,
|
|
1238
1238
|
size: o.size,
|
|
1239
1239
|
"auto-label-width": ""
|
|
@@ -1267,7 +1267,7 @@ const wt = {
|
|
|
1267
1267
|
message: "请输入验证码"
|
|
1268
1268
|
}]
|
|
1269
1269
|
}, {
|
|
1270
|
-
default: f(() => [S("div",
|
|
1270
|
+
default: f(() => [S("div", jt, [a(e(U), {
|
|
1271
1271
|
modelValue: t.value.userToken,
|
|
1272
1272
|
"onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.userToken = m),
|
|
1273
1273
|
placeholder: "请输入验证码",
|
|
@@ -1276,11 +1276,11 @@ const wt = {
|
|
|
1276
1276
|
ref_key: "SendVerifyCodeRef",
|
|
1277
1277
|
ref: s,
|
|
1278
1278
|
size: o.size,
|
|
1279
|
-
loading:
|
|
1279
|
+
loading: c.value,
|
|
1280
1280
|
style: {
|
|
1281
1281
|
"margin-left": "10px"
|
|
1282
1282
|
},
|
|
1283
|
-
onSend:
|
|
1283
|
+
onSend: v
|
|
1284
1284
|
}, null, 8, ["size", "loading"])])]),
|
|
1285
1285
|
_: 1
|
|
1286
1286
|
}), a(e(V), {
|
|
@@ -1342,7 +1342,7 @@ const wt = {
|
|
|
1342
1342
|
autocomplete: "off"
|
|
1343
1343
|
}, null, 8, ["modelValue"])]),
|
|
1344
1344
|
_: 1
|
|
1345
|
-
}), S("div",
|
|
1345
|
+
}), S("div", Kt, [a(e(B), {
|
|
1346
1346
|
type: "primary",
|
|
1347
1347
|
loading: o.loading,
|
|
1348
1348
|
long: "",
|
|
@@ -1351,7 +1351,7 @@ const wt = {
|
|
|
1351
1351
|
}, {
|
|
1352
1352
|
default: f(() => [...p[6] || (p[6] = [x(" 提交 ", -1)])]),
|
|
1353
1353
|
_: 1
|
|
1354
|
-
}, 8, ["loading", "size"]), e(
|
|
1354
|
+
}, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
|
|
1355
1355
|
key: 0,
|
|
1356
1356
|
field: "acceptedTerms",
|
|
1357
1357
|
"hide-label": "",
|
|
@@ -1367,15 +1367,15 @@ const wt = {
|
|
|
1367
1367
|
_: 1
|
|
1368
1368
|
}, 8, ["model", "size"])]));
|
|
1369
1369
|
}
|
|
1370
|
-
}),
|
|
1370
|
+
}), Qt = /* @__PURE__ */ C(Wt, [["__scopeId", "data-v-07ef9d49"]]), Jt = {
|
|
1371
1371
|
class: "SignUpPhone"
|
|
1372
|
-
}, Jt = {
|
|
1373
|
-
class: "content"
|
|
1374
1372
|
}, Xt = {
|
|
1375
|
-
class: "
|
|
1373
|
+
class: "content"
|
|
1376
1374
|
}, Yt = {
|
|
1375
|
+
class: "sendVerifyCodeItem"
|
|
1376
|
+
}, Zt = {
|
|
1377
1377
|
class: "handle"
|
|
1378
|
-
},
|
|
1378
|
+
}, es = /* @__PURE__ */ A({
|
|
1379
1379
|
__name: "AuthkitSignUpPhone",
|
|
1380
1380
|
props: {
|
|
1381
1381
|
size: {
|
|
@@ -1395,14 +1395,14 @@ const wt = {
|
|
|
1395
1395
|
},
|
|
1396
1396
|
emits: ["switchSignIn", "submit"],
|
|
1397
1397
|
setup(b, {
|
|
1398
|
-
emit:
|
|
1398
|
+
emit: u
|
|
1399
1399
|
}) {
|
|
1400
|
-
const
|
|
1400
|
+
const d = u, {
|
|
1401
1401
|
useTermsFormField: n
|
|
1402
1402
|
} = M(), {
|
|
1403
|
-
showTermsField:
|
|
1403
|
+
showTermsField: g,
|
|
1404
1404
|
termsRules: h
|
|
1405
|
-
} = n("signUp"), o = b, s = P(),
|
|
1405
|
+
} = n("signUp"), o = b, s = P(), c = P(!1), r = P(), t = P({
|
|
1406
1406
|
phone: void 0,
|
|
1407
1407
|
code: void 0,
|
|
1408
1408
|
password: void 0,
|
|
@@ -1414,7 +1414,7 @@ const wt = {
|
|
|
1414
1414
|
const m = ke();
|
|
1415
1415
|
m && (t.value.inviteCode = m);
|
|
1416
1416
|
});
|
|
1417
|
-
const
|
|
1417
|
+
const v = [{
|
|
1418
1418
|
required: !0,
|
|
1419
1419
|
message: "请输入确认密码"
|
|
1420
1420
|
}, {
|
|
@@ -1423,21 +1423,21 @@ const wt = {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
}];
|
|
1425
1425
|
function i() {
|
|
1426
|
-
|
|
1426
|
+
d("switchSignIn");
|
|
1427
1427
|
}
|
|
1428
1428
|
async function w() {
|
|
1429
|
-
if (!await
|
|
1430
|
-
|
|
1429
|
+
if (!await r.value.validateField(["phone"])) {
|
|
1430
|
+
c.value = !0;
|
|
1431
1431
|
const y = await O().auth.verify.sms.send.post({
|
|
1432
1432
|
phone: t.value.phone,
|
|
1433
1433
|
purpose: "signUp"
|
|
1434
1434
|
});
|
|
1435
|
-
|
|
1435
|
+
c.value = !1, W(s.value, y);
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
async function p() {
|
|
1439
|
-
|
|
1440
|
-
m ||
|
|
1439
|
+
r.value.validate().then((m) => {
|
|
1440
|
+
m || d("submit", {
|
|
1441
1441
|
type: "phone",
|
|
1442
1442
|
phone: t.value.phone,
|
|
1443
1443
|
code: t.value.code,
|
|
@@ -1446,9 +1446,9 @@ const wt = {
|
|
|
1446
1446
|
});
|
|
1447
1447
|
});
|
|
1448
1448
|
}
|
|
1449
|
-
return (m, y) => (l(), k("div",
|
|
1449
|
+
return (m, y) => (l(), k("div", Jt, [S("div", Xt, [a(e(H), {
|
|
1450
1450
|
ref_key: "formRef",
|
|
1451
|
-
ref:
|
|
1451
|
+
ref: r,
|
|
1452
1452
|
model: t.value,
|
|
1453
1453
|
size: o.size,
|
|
1454
1454
|
"auto-label-width": ""
|
|
@@ -1482,7 +1482,7 @@ const wt = {
|
|
|
1482
1482
|
message: "请输入验证码"
|
|
1483
1483
|
}]
|
|
1484
1484
|
}, {
|
|
1485
|
-
default: f(() => [S("div",
|
|
1485
|
+
default: f(() => [S("div", Yt, [a(e(U), {
|
|
1486
1486
|
modelValue: t.value.code,
|
|
1487
1487
|
"onUpdate:modelValue": y[1] || (y[1] = (_) => t.value.code = _),
|
|
1488
1488
|
placeholder: "请输入验证码",
|
|
@@ -1491,7 +1491,7 @@ const wt = {
|
|
|
1491
1491
|
ref_key: "SendVerifyCodeRef",
|
|
1492
1492
|
ref: s,
|
|
1493
1493
|
size: o.size,
|
|
1494
|
-
loading:
|
|
1494
|
+
loading: c.value,
|
|
1495
1495
|
style: {
|
|
1496
1496
|
"margin-left": "10px"
|
|
1497
1497
|
},
|
|
@@ -1524,7 +1524,7 @@ const wt = {
|
|
|
1524
1524
|
field: "confirmPassword",
|
|
1525
1525
|
label: "确认密码",
|
|
1526
1526
|
"hide-label": "",
|
|
1527
|
-
rules:
|
|
1527
|
+
rules: v
|
|
1528
1528
|
}, {
|
|
1529
1529
|
default: f(() => [a(e(U), {
|
|
1530
1530
|
modelValue: t.value.confirmPassword,
|
|
@@ -1549,7 +1549,7 @@ const wt = {
|
|
|
1549
1549
|
autocomplete: "off"
|
|
1550
1550
|
}, null, 8, ["modelValue"])]),
|
|
1551
1551
|
_: 1
|
|
1552
|
-
}), S("div",
|
|
1552
|
+
}), S("div", Zt, [a(e(B), {
|
|
1553
1553
|
type: "primary",
|
|
1554
1554
|
loading: o.loading,
|
|
1555
1555
|
long: "",
|
|
@@ -1558,7 +1558,7 @@ const wt = {
|
|
|
1558
1558
|
}, {
|
|
1559
1559
|
default: f(() => [...y[6] || (y[6] = [x(" 注册 ", -1)])]),
|
|
1560
1560
|
_: 1
|
|
1561
|
-
}, 8, ["loading", "size"]), e(
|
|
1561
|
+
}, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
|
|
1562
1562
|
key: 0,
|
|
1563
1563
|
field: "acceptedTerms",
|
|
1564
1564
|
"hide-label": "",
|
|
@@ -1572,25 +1572,25 @@ const wt = {
|
|
|
1572
1572
|
_: 1
|
|
1573
1573
|
}, 8, ["rules"])) : z("", !0)])]),
|
|
1574
1574
|
_: 1
|
|
1575
|
-
}, 8, ["model", "size"])]), a(
|
|
1575
|
+
}, 8, ["model", "size"])]), a(pe, {
|
|
1576
1576
|
onSwitchSignIn: i
|
|
1577
1577
|
})]));
|
|
1578
1578
|
}
|
|
1579
|
-
}),
|
|
1579
|
+
}), ts = /* @__PURE__ */ C(es, [["__scopeId", "data-v-d0af58fd"]]), ss = {
|
|
1580
1580
|
class: "SignUp"
|
|
1581
|
-
},
|
|
1581
|
+
}, as = {
|
|
1582
1582
|
key: 0,
|
|
1583
1583
|
class: "tabsContainer"
|
|
1584
|
-
},
|
|
1584
|
+
}, os = {
|
|
1585
1585
|
key: 1,
|
|
1586
1586
|
class: "empty"
|
|
1587
|
-
},
|
|
1587
|
+
}, is = {
|
|
1588
1588
|
key: 2,
|
|
1589
1589
|
class: "empty"
|
|
1590
|
-
},
|
|
1590
|
+
}, ns = {
|
|
1591
1591
|
key: 2,
|
|
1592
1592
|
class: "empty"
|
|
1593
|
-
},
|
|
1593
|
+
}, ls = /* @__PURE__ */ A({
|
|
1594
1594
|
__name: "AuthkitSignUp",
|
|
1595
1595
|
props: {
|
|
1596
1596
|
size: {
|
|
@@ -1605,14 +1605,14 @@ const wt = {
|
|
|
1605
1605
|
},
|
|
1606
1606
|
emits: ["switchSignIn", "submit"],
|
|
1607
1607
|
setup(b, {
|
|
1608
|
-
emit:
|
|
1608
|
+
emit: u
|
|
1609
1609
|
}) {
|
|
1610
|
-
const
|
|
1611
|
-
appsData:
|
|
1610
|
+
const d = u, n = b, {
|
|
1611
|
+
appsData: g
|
|
1612
1612
|
} = j(), {
|
|
1613
1613
|
registrationBlocked: h,
|
|
1614
1614
|
signUpAuthEnabled: o
|
|
1615
|
-
} = M(), s = R(() =>
|
|
1615
|
+
} = M(), s = R(() => g.value.authMethods), c = R(() => {
|
|
1616
1616
|
const i = [];
|
|
1617
1617
|
return s.value.signUp.email && i.push({
|
|
1618
1618
|
key: "email",
|
|
@@ -1621,48 +1621,48 @@ const wt = {
|
|
|
1621
1621
|
key: "phone",
|
|
1622
1622
|
title: "手机号注册"
|
|
1623
1623
|
}), i;
|
|
1624
|
-
}),
|
|
1625
|
-
|
|
1624
|
+
}), r = P("email");
|
|
1625
|
+
ne(() => {
|
|
1626
1626
|
var i;
|
|
1627
|
-
|
|
1627
|
+
c.value.some((w) => w.key === r.value) || (r.value = ((i = c.value[0]) == null ? void 0 : i.key) || "email");
|
|
1628
1628
|
});
|
|
1629
1629
|
function t() {
|
|
1630
|
-
|
|
1630
|
+
d("switchSignIn");
|
|
1631
1631
|
}
|
|
1632
|
-
async function
|
|
1633
|
-
|
|
1634
|
-
type:
|
|
1632
|
+
async function v(i) {
|
|
1633
|
+
d("submit", {
|
|
1634
|
+
type: r.value,
|
|
1635
1635
|
...i
|
|
1636
1636
|
});
|
|
1637
1637
|
}
|
|
1638
|
-
return (i, w) => (l(), k("div",
|
|
1639
|
-
"active-key":
|
|
1640
|
-
"onUpdate:activeKey": w[0] || (w[0] = (p) =>
|
|
1638
|
+
return (i, w) => (l(), k("div", ss, [c.value.length > 1 ? (l(), k("div", as, [a(e(ue), {
|
|
1639
|
+
"active-key": r.value,
|
|
1640
|
+
"onUpdate:activeKey": w[0] || (w[0] = (p) => r.value = p)
|
|
1641
1641
|
}, {
|
|
1642
|
-
default: f(() => [(l(!0), k(D, null,
|
|
1642
|
+
default: f(() => [(l(!0), k(D, null, le(c.value, (p) => (l(), I(e(de), {
|
|
1643
1643
|
key: p.key,
|
|
1644
1644
|
title: p.title
|
|
1645
1645
|
}, null, 8, ["title"]))), 128))]),
|
|
1646
1646
|
_: 1
|
|
1647
|
-
}, 8, ["active-key"])])) : z("", !0), e(o) ? e(h) ? (l(), k("div",
|
|
1647
|
+
}, 8, ["active-key"])])) : z("", !0), e(o) ? e(h) ? (l(), k("div", is, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
|
|
1648
1648
|
key: 3
|
|
1649
|
-
}, [
|
|
1649
|
+
}, [r.value === "email" && s.value.signUp.email ? (l(), I(Qt, {
|
|
1650
1650
|
key: 0,
|
|
1651
1651
|
size: n.size,
|
|
1652
1652
|
loading: b.loading,
|
|
1653
|
-
onSubmit:
|
|
1654
|
-
}, null, 8, ["size", "loading"])) :
|
|
1653
|
+
onSubmit: v
|
|
1654
|
+
}, null, 8, ["size", "loading"])) : r.value === "phone" && s.value.signUp.phone ? (l(), I(ts, {
|
|
1655
1655
|
key: 1,
|
|
1656
1656
|
size: n.size,
|
|
1657
1657
|
loading: b.loading,
|
|
1658
|
-
onSubmit:
|
|
1658
|
+
onSubmit: v,
|
|
1659
1659
|
onSwitchSignIn: t
|
|
1660
|
-
}, null, 8, ["size", "loading"])) : (l(), k("div",
|
|
1660
|
+
}, null, 8, ["size", "loading"])) : (l(), k("div", ns, " 当前应用未开放用户注册 ")), r.value === "email" ? (l(), I(pe, {
|
|
1661
1661
|
key: 3,
|
|
1662
1662
|
onSwitchSignIn: t
|
|
1663
|
-
})) : z("", !0)], 64)) : (l(), k("div",
|
|
1663
|
+
})) : z("", !0)], 64)) : (l(), k("div", os, " 系统已停止用户注册 "))]));
|
|
1664
1664
|
}
|
|
1665
|
-
}),
|
|
1665
|
+
}), rs = /* @__PURE__ */ C(ls, [["__scopeId", "data-v-b211d5ef"]]), us = ["src"], ds = /* @__PURE__ */ A({
|
|
1666
1666
|
__name: "AuthkitAuthTitle",
|
|
1667
1667
|
props: {
|
|
1668
1668
|
size: {
|
|
@@ -1682,31 +1682,31 @@ const wt = {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
},
|
|
1684
1684
|
setup(b) {
|
|
1685
|
-
const
|
|
1685
|
+
const u = b, d = `${u.size}px`, n = `${u.fontSize}px`, g = `${u.lineHeight}px`, {
|
|
1686
1686
|
currentView: h
|
|
1687
1687
|
} = N(), {
|
|
1688
1688
|
appsData: o
|
|
1689
1689
|
} = j(), s = R(() => h.value === "signIn" ? `${o.value.name}登录` : h.value === "signUp" ? `${o.value.name}账号注册` : h.value === "resetPassword" ? `${o.value.name}密码重置` : "");
|
|
1690
|
-
return (
|
|
1690
|
+
return (c, r) => (l(), k("div", {
|
|
1691
1691
|
class: "Title",
|
|
1692
1692
|
style: G({
|
|
1693
1693
|
fontSize: n,
|
|
1694
|
-
lineHeight:
|
|
1694
|
+
lineHeight: g
|
|
1695
1695
|
})
|
|
1696
1696
|
}, [e(o).applicationLogoUrl ? (l(), k("img", {
|
|
1697
1697
|
key: 0,
|
|
1698
1698
|
src: e(o).applicationLogoUrl,
|
|
1699
1699
|
srcset: "",
|
|
1700
1700
|
style: G({
|
|
1701
|
-
width:
|
|
1701
|
+
width: d
|
|
1702
1702
|
})
|
|
1703
|
-
}, null, 12,
|
|
1703
|
+
}, null, 12, us)) : z("", !0), S("span", null, L(s.value), 1), Z(c.$slots, "default", {}, void 0, !0)], 4));
|
|
1704
1704
|
}
|
|
1705
|
-
}),
|
|
1705
|
+
}), ze = /* @__PURE__ */ C(ds, [["__scopeId", "data-v-8ebe7939"]]), cs = {
|
|
1706
1706
|
class: "Auth"
|
|
1707
|
-
},
|
|
1707
|
+
}, ps = {
|
|
1708
1708
|
class: "body"
|
|
1709
|
-
},
|
|
1709
|
+
}, ms = /* @__PURE__ */ A({
|
|
1710
1710
|
__name: "AuthkitAuth",
|
|
1711
1711
|
props: {
|
|
1712
1712
|
size: {
|
|
@@ -1719,51 +1719,51 @@ const wt = {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
},
|
|
1721
1721
|
setup(b) {
|
|
1722
|
-
const
|
|
1723
|
-
signInSubmit:
|
|
1722
|
+
const u = b, {
|
|
1723
|
+
signInSubmit: d,
|
|
1724
1724
|
passkeySignInSubmit: n,
|
|
1725
|
-
signUpSubmit:
|
|
1725
|
+
signUpSubmit: g,
|
|
1726
1726
|
resetPasswordSubmit: h,
|
|
1727
1727
|
currentView: o,
|
|
1728
1728
|
authSignInLoading: s,
|
|
1729
|
-
authSignUpLoading:
|
|
1730
|
-
resetPasswordLoading:
|
|
1729
|
+
authSignUpLoading: c,
|
|
1730
|
+
resetPasswordLoading: r,
|
|
1731
1731
|
switchSignUp: t,
|
|
1732
|
-
switchResetPassword:
|
|
1732
|
+
switchResetPassword: v,
|
|
1733
1733
|
switchSignIn: i
|
|
1734
1734
|
} = N();
|
|
1735
|
-
return (w, p) => (l(), k("div",
|
|
1735
|
+
return (w, p) => (l(), k("div", cs, [b.showTitle ? (l(), I(ze, {
|
|
1736
1736
|
key: 0,
|
|
1737
1737
|
size: 32,
|
|
1738
1738
|
"font-size": 20
|
|
1739
|
-
})) : z("", !0), S("div",
|
|
1739
|
+
})) : z("", !0), S("div", ps, [e(o) === "signIn" ? (l(), I(Gt, {
|
|
1740
1740
|
key: 0,
|
|
1741
|
-
size:
|
|
1741
|
+
size: u.size,
|
|
1742
1742
|
loading: e(s),
|
|
1743
1743
|
onSwitchSignUp: e(t),
|
|
1744
|
-
onSwitchResetPassword: e(
|
|
1745
|
-
onSubmit: p[0] || (p[0] = (m) => e(
|
|
1744
|
+
onSwitchResetPassword: e(v),
|
|
1745
|
+
onSubmit: p[0] || (p[0] = (m) => e(d)(m))
|
|
1746
1746
|
}, {
|
|
1747
|
-
OAuth: f(() => [a(
|
|
1748
|
-
size:
|
|
1747
|
+
OAuth: f(() => [a(et, {
|
|
1748
|
+
size: u.size,
|
|
1749
1749
|
onPasskeySubmit: e(n)
|
|
1750
1750
|
}, null, 8, ["size", "onPasskeySubmit"])]),
|
|
1751
1751
|
_: 1
|
|
1752
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), I(
|
|
1752
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), I(rs, {
|
|
1753
1753
|
key: 1,
|
|
1754
|
-
size:
|
|
1755
|
-
loading: e(
|
|
1754
|
+
size: u.size,
|
|
1755
|
+
loading: e(c),
|
|
1756
1756
|
onSwitchSignIn: e(i),
|
|
1757
|
-
onSubmit: p[1] || (p[1] = (m) => e(
|
|
1758
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), I(
|
|
1757
|
+
onSubmit: p[1] || (p[1] = (m) => e(g)(m))
|
|
1758
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), I(gt, {
|
|
1759
1759
|
key: 2,
|
|
1760
|
-
size:
|
|
1761
|
-
loading: e(
|
|
1760
|
+
size: u.size,
|
|
1761
|
+
loading: e(r),
|
|
1762
1762
|
onSwitchSignIn: e(i),
|
|
1763
1763
|
onSubmit: p[2] || (p[2] = (m) => e(h)(m))
|
|
1764
1764
|
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : z("", !0)])]));
|
|
1765
1765
|
}
|
|
1766
|
-
}),
|
|
1766
|
+
}), fs = /* @__PURE__ */ C(ms, [["__scopeId", "data-v-60874d88"]]), vs = /* @__PURE__ */ A({
|
|
1767
1767
|
__name: "AuthkitAuthModal",
|
|
1768
1768
|
props: {
|
|
1769
1769
|
size: {
|
|
@@ -1772,27 +1772,27 @@ const wt = {
|
|
|
1772
1772
|
},
|
|
1773
1773
|
emits: ["close"],
|
|
1774
1774
|
setup(b, {
|
|
1775
|
-
emit:
|
|
1775
|
+
emit: u
|
|
1776
1776
|
}) {
|
|
1777
|
-
const
|
|
1777
|
+
const d = u, {
|
|
1778
1778
|
onSignIn: n,
|
|
1779
|
-
switchSignIn:
|
|
1779
|
+
switchSignIn: g
|
|
1780
1780
|
} = N(), {
|
|
1781
1781
|
close: h
|
|
1782
1782
|
} = we();
|
|
1783
1783
|
let o = null;
|
|
1784
1784
|
E(() => {
|
|
1785
1785
|
o = n(() => h());
|
|
1786
|
-
}),
|
|
1786
|
+
}), re(() => {
|
|
1787
1787
|
o == null || o(), o = null;
|
|
1788
1788
|
});
|
|
1789
|
-
function s(
|
|
1790
|
-
|
|
1789
|
+
function s(r) {
|
|
1790
|
+
r || c();
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1793
|
-
|
|
1792
|
+
function c() {
|
|
1793
|
+
g(), h(), d("close");
|
|
1794
1794
|
}
|
|
1795
|
-
return (
|
|
1795
|
+
return (r, t) => (l(), I(e($e), {
|
|
1796
1796
|
visible: !0,
|
|
1797
1797
|
footer: !1,
|
|
1798
1798
|
"mask-closable": !1,
|
|
@@ -1800,17 +1800,17 @@ const wt = {
|
|
|
1800
1800
|
width: "auto",
|
|
1801
1801
|
"modal-class": "SignInModalClass",
|
|
1802
1802
|
"onUpdate:visible": s,
|
|
1803
|
-
onClose:
|
|
1803
|
+
onClose: c
|
|
1804
1804
|
}, {
|
|
1805
|
-
title: f(() => [a(
|
|
1806
|
-
default: f(() => [a(
|
|
1805
|
+
title: f(() => [a(ze)]),
|
|
1806
|
+
default: f(() => [a(fs, {
|
|
1807
1807
|
"show-title": !1,
|
|
1808
1808
|
size: b.size
|
|
1809
1809
|
}, null, 8, ["size"])]),
|
|
1810
1810
|
_: 1
|
|
1811
1811
|
}));
|
|
1812
1812
|
}
|
|
1813
|
-
}),
|
|
1813
|
+
}), gs = /* @__PURE__ */ C(vs, [["__scopeId", "data-v-19a4d5d0"]]), hs = /* @__PURE__ */ A({
|
|
1814
1814
|
__name: "AuthkitOAuthCallbackProvider",
|
|
1815
1815
|
props: {
|
|
1816
1816
|
bindIdentityRedirect: {
|
|
@@ -1826,60 +1826,58 @@ const wt = {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
},
|
|
1828
1828
|
setup(b) {
|
|
1829
|
-
const
|
|
1829
|
+
const u = b, d = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
|
|
1830
1830
|
completeSignIn: n
|
|
1831
|
-
} = N(),
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
c.forEach((g) => u.searchParams.delete(g));
|
|
1839
|
-
const t = `${u.pathname}${u.search}${u.hash}`;
|
|
1831
|
+
} = N(), g = ye();
|
|
1832
|
+
function h(r) {
|
|
1833
|
+
return d.some((t) => r.searchParams.has(t));
|
|
1834
|
+
}
|
|
1835
|
+
function o(r) {
|
|
1836
|
+
d.forEach((v) => r.searchParams.delete(v));
|
|
1837
|
+
const t = `${r.pathname}${r.search}${r.hash}`;
|
|
1840
1838
|
window.history.replaceState({}, "", t);
|
|
1841
1839
|
}
|
|
1842
1840
|
function s() {
|
|
1843
|
-
if (!
|
|
1844
|
-
const
|
|
1845
|
-
if (sessionStorage.removeItem("auth_redirect"), !
|
|
1841
|
+
if (!u.restoreRedirectAfterSignIn) return null;
|
|
1842
|
+
const r = sessionStorage.getItem("auth_redirect");
|
|
1843
|
+
if (sessionStorage.removeItem("auth_redirect"), !r) return null;
|
|
1846
1844
|
const t = window.location.pathname + window.location.search + window.location.hash;
|
|
1847
|
-
return
|
|
1845
|
+
return r === t ? null : r;
|
|
1848
1846
|
}
|
|
1849
|
-
async function
|
|
1847
|
+
async function c() {
|
|
1850
1848
|
if (typeof window > "u") return;
|
|
1851
|
-
const
|
|
1852
|
-
if (!h(
|
|
1853
|
-
const t =
|
|
1849
|
+
const r = new URL(window.location.href);
|
|
1850
|
+
if (!h(r)) return;
|
|
1851
|
+
const t = r.searchParams.get("error");
|
|
1854
1852
|
if (t) {
|
|
1855
|
-
o(
|
|
1853
|
+
o(r), X.error(t);
|
|
1856
1854
|
return;
|
|
1857
1855
|
}
|
|
1858
|
-
if (
|
|
1859
|
-
const y =
|
|
1860
|
-
o(
|
|
1856
|
+
if (r.searchParams.get("bindSuccess") === "true") {
|
|
1857
|
+
const y = r.searchParams.get("provider");
|
|
1858
|
+
o(r), X.success(y ? `${y} 绑定成功` : "绑定成功"), u.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
|
|
1861
1859
|
return;
|
|
1862
1860
|
}
|
|
1863
|
-
const
|
|
1864
|
-
if (!
|
|
1865
|
-
const i =
|
|
1866
|
-
if (o(
|
|
1867
|
-
jwtToken:
|
|
1861
|
+
const v = r.searchParams.get("token");
|
|
1862
|
+
if (!v) return;
|
|
1863
|
+
const i = r.searchParams.get("userId"), w = r.searchParams.get("appId"), p = r.searchParams.get("needBindIdentity") === "true";
|
|
1864
|
+
if (o(r), n({
|
|
1865
|
+
jwtToken: v,
|
|
1868
1866
|
userId: i,
|
|
1869
1867
|
appId: w,
|
|
1870
1868
|
needBindIdentity: p
|
|
1871
|
-
}),
|
|
1872
|
-
|
|
1869
|
+
}), p && u.bindIdentityRedirect) {
|
|
1870
|
+
await g.replace(u.bindIdentityRedirect);
|
|
1873
1871
|
return;
|
|
1874
1872
|
}
|
|
1875
1873
|
const m = s();
|
|
1876
|
-
m && (
|
|
1874
|
+
m && await g.replace(m);
|
|
1877
1875
|
}
|
|
1878
1876
|
return E(() => {
|
|
1879
|
-
|
|
1880
|
-
}), (
|
|
1877
|
+
c();
|
|
1878
|
+
}), (r, t) => null;
|
|
1881
1879
|
}
|
|
1882
|
-
}),
|
|
1880
|
+
}), ra = /* @__PURE__ */ A({
|
|
1883
1881
|
__name: "AuthkitProvider",
|
|
1884
1882
|
props: {
|
|
1885
1883
|
handleOAuthCallback: {
|
|
@@ -1915,66 +1913,66 @@ const wt = {
|
|
|
1915
1913
|
},
|
|
1916
1914
|
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
1917
1915
|
setup(b, {
|
|
1918
|
-
emit:
|
|
1916
|
+
emit: u
|
|
1919
1917
|
}) {
|
|
1920
1918
|
const {
|
|
1921
|
-
config:
|
|
1922
|
-
} =
|
|
1919
|
+
config: d
|
|
1920
|
+
} = ce(), n = b, g = u, h = Ue(), {
|
|
1923
1921
|
openLegalDoc: o
|
|
1924
1922
|
} = Se({
|
|
1925
1923
|
route: h
|
|
1926
1924
|
}), {
|
|
1927
1925
|
isOpen: s
|
|
1928
1926
|
} = we(), {
|
|
1929
|
-
restoreSession:
|
|
1930
|
-
onSignIn:
|
|
1927
|
+
restoreSession: c,
|
|
1928
|
+
onSignIn: r,
|
|
1931
1929
|
onSignOut: t
|
|
1932
1930
|
} = N(), {
|
|
1933
|
-
fetchUserProfile:
|
|
1931
|
+
fetchUserProfile: v,
|
|
1934
1932
|
clearUserProfile: i
|
|
1935
|
-
} =
|
|
1933
|
+
} = Ie(), {
|
|
1936
1934
|
appsAuthPageInfoApi: w
|
|
1937
|
-
} = j(), p =
|
|
1938
|
-
|
|
1935
|
+
} = j(), p = r(() => {
|
|
1936
|
+
v();
|
|
1939
1937
|
}), m = t(() => {
|
|
1940
1938
|
i();
|
|
1941
1939
|
});
|
|
1942
1940
|
function y() {
|
|
1943
|
-
if (
|
|
1941
|
+
if (d.legalDocsMode === "builtin") {
|
|
1944
1942
|
o("privacyPolicy");
|
|
1945
1943
|
return;
|
|
1946
1944
|
}
|
|
1947
|
-
|
|
1945
|
+
g("toPrivacyPolicy");
|
|
1948
1946
|
}
|
|
1949
1947
|
function _() {
|
|
1950
|
-
if (
|
|
1948
|
+
if (d.legalDocsMode === "builtin") {
|
|
1951
1949
|
o("userServiceAgreement");
|
|
1952
1950
|
return;
|
|
1953
1951
|
}
|
|
1954
|
-
|
|
1952
|
+
g("toUserServiceAgreement");
|
|
1955
1953
|
}
|
|
1956
1954
|
return E(async () => {
|
|
1957
|
-
|
|
1955
|
+
ht({
|
|
1958
1956
|
onPrivacyPolicy: y,
|
|
1959
1957
|
onUserServiceAgreement: _
|
|
1960
|
-
}), n.fetchAppInfo && await w(), n.restoreSession &&
|
|
1961
|
-
}),
|
|
1958
|
+
}), n.fetchAppInfo && await w(), n.restoreSession && c() ? v() : i();
|
|
1959
|
+
}), re(() => {
|
|
1962
1960
|
p(), m();
|
|
1963
|
-
}), (q, $) => (l(), k(D, null, [Z(q.$slots, "default"), n.handleOAuthCallback ? (l(), I(
|
|
1961
|
+
}), (q, $) => (l(), k(D, null, [Z(q.$slots, "default"), n.handleOAuthCallback ? (l(), I(hs, {
|
|
1964
1962
|
key: 0,
|
|
1965
1963
|
"bind-identity-redirect": n.bindIdentityRedirect,
|
|
1966
1964
|
"close-popup-on-bind-success": n.closePopupOnBindSuccess,
|
|
1967
1965
|
"restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
|
|
1968
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : z("", !0), n.showAuthModal && e(s) ? (l(), I(
|
|
1966
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : z("", !0), n.showAuthModal && e(s) ? (l(), I(gs, {
|
|
1969
1967
|
key: 1,
|
|
1970
1968
|
size: n.authModalSize
|
|
1971
1969
|
}, null, 8, ["size"])) : z("", !0)], 64));
|
|
1972
1970
|
}
|
|
1973
|
-
}),
|
|
1971
|
+
}), ys = {
|
|
1974
1972
|
class: "header"
|
|
1975
|
-
},
|
|
1973
|
+
}, ws = ["href"], bs = {
|
|
1976
1974
|
class: "container"
|
|
1977
|
-
},
|
|
1975
|
+
}, _s = /* @__PURE__ */ A({
|
|
1978
1976
|
__name: "AuthkitAuthContainer",
|
|
1979
1977
|
props: {
|
|
1980
1978
|
applicationLogoUrl: {
|
|
@@ -2017,38 +2015,38 @@ const wt = {
|
|
|
2017
2015
|
}
|
|
2018
2016
|
},
|
|
2019
2017
|
setup(b) {
|
|
2020
|
-
const
|
|
2021
|
-
backgroundColor:
|
|
2018
|
+
const u = b, d = R(() => u.backgroundType === "color" ? {
|
|
2019
|
+
backgroundColor: u.backgroundColor
|
|
2022
2020
|
} : {
|
|
2023
|
-
backgroundImage: `url(${
|
|
2021
|
+
backgroundImage: `url(${u.backgroundImage})`
|
|
2024
2022
|
});
|
|
2025
|
-
return (n,
|
|
2023
|
+
return (n, g) => (l(), k("div", {
|
|
2026
2024
|
class: "auth",
|
|
2027
|
-
style: G(
|
|
2028
|
-
}, [S("div",
|
|
2025
|
+
style: G(d.value)
|
|
2026
|
+
}, [S("div", ys, [u.name ? (l(), k("a", {
|
|
2029
2027
|
key: 0,
|
|
2030
|
-
href:
|
|
2028
|
+
href: u.appHomePage,
|
|
2031
2029
|
target: "_self",
|
|
2032
2030
|
class: "link",
|
|
2033
2031
|
style: G({
|
|
2034
|
-
color:
|
|
2032
|
+
color: u.linkColor
|
|
2035
2033
|
})
|
|
2036
|
-
}, " 返回主页 ", 12,
|
|
2034
|
+
}, " 返回主页 ", 12, ws)) : z("", !0)]), S("div", bs, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
|
|
2037
2035
|
}
|
|
2038
|
-
}),
|
|
2036
|
+
}), ua = /* @__PURE__ */ C(_s, [["__scopeId", "data-v-0e13d3ff"]]), ks = {
|
|
2039
2037
|
class: "box"
|
|
2040
|
-
}, ks = {
|
|
2041
|
-
class: "title"
|
|
2042
2038
|
}, Ss = {
|
|
2043
|
-
class: "
|
|
2039
|
+
class: "title"
|
|
2044
2040
|
}, Is = {
|
|
2045
|
-
class: "
|
|
2041
|
+
class: "content"
|
|
2046
2042
|
}, zs = {
|
|
2043
|
+
class: "redirect"
|
|
2044
|
+
}, Ps = {
|
|
2047
2045
|
style: {
|
|
2048
2046
|
"font-weight": "bold",
|
|
2049
2047
|
"font-size": "12px"
|
|
2050
2048
|
}
|
|
2051
|
-
},
|
|
2049
|
+
}, Vs = /* @__PURE__ */ A({
|
|
2052
2050
|
__name: "AuthkitAuthorize",
|
|
2053
2051
|
props: {
|
|
2054
2052
|
size: {
|
|
@@ -2097,13 +2095,13 @@ const wt = {
|
|
|
2097
2095
|
}
|
|
2098
2096
|
},
|
|
2099
2097
|
setup(b) {
|
|
2100
|
-
const
|
|
2098
|
+
const u = P(!1), d = b, n = P({
|
|
2101
2099
|
name: "",
|
|
2102
2100
|
homePageUrl: "",
|
|
2103
2101
|
createAt: "",
|
|
2104
2102
|
authorizationCallback: ""
|
|
2105
2103
|
});
|
|
2106
|
-
async function
|
|
2104
|
+
async function g() {
|
|
2107
2105
|
const {
|
|
2108
2106
|
data: o,
|
|
2109
2107
|
error: s
|
|
@@ -2115,45 +2113,45 @@ const wt = {
|
|
|
2115
2113
|
authorizationCallback: o.authorizationCallback || ""
|
|
2116
2114
|
});
|
|
2117
2115
|
}
|
|
2118
|
-
|
|
2116
|
+
g();
|
|
2119
2117
|
async function h() {
|
|
2120
|
-
|
|
2118
|
+
u.value = !0;
|
|
2121
2119
|
const {
|
|
2122
2120
|
data: o,
|
|
2123
2121
|
error: s
|
|
2124
2122
|
} = await O().auth.oauth2.authorize.post({
|
|
2125
|
-
client_id:
|
|
2126
|
-
response_type:
|
|
2127
|
-
scope:
|
|
2128
|
-
state:
|
|
2129
|
-
redirect_uri:
|
|
2123
|
+
client_id: d.clientId,
|
|
2124
|
+
response_type: d.responseType,
|
|
2125
|
+
scope: d.scope,
|
|
2126
|
+
state: d.state,
|
|
2127
|
+
redirect_uri: d.redirectUri
|
|
2130
2128
|
});
|
|
2131
|
-
if (
|
|
2129
|
+
if (u.value = !1, s || !o)
|
|
2132
2130
|
return;
|
|
2133
|
-
const
|
|
2134
|
-
window.location.href =
|
|
2131
|
+
const c = o;
|
|
2132
|
+
window.location.href = c.authorizeUrl;
|
|
2135
2133
|
}
|
|
2136
|
-
return (o, s) => (l(), k("div",
|
|
2137
|
-
default: f(() => [a(e(
|
|
2134
|
+
return (o, s) => (l(), k("div", ks, [S("div", Ss, L(`授权 ${n.value.name}`), 1), S("div", Is, [a(e(Te), null, {
|
|
2135
|
+
default: f(() => [a(e(oe), null, {
|
|
2138
2136
|
default: f(() => {
|
|
2139
|
-
var
|
|
2140
|
-
return [a(e(
|
|
2137
|
+
var c;
|
|
2138
|
+
return [a(e(ie), {
|
|
2141
2139
|
title: n.value.name,
|
|
2142
|
-
description: `想要使用您的${(
|
|
2140
|
+
description: `想要使用您的${(c = d.userInfo) == null ? void 0 : c.nickname}账户`
|
|
2143
2141
|
}, {
|
|
2144
2142
|
avatar: f(() => {
|
|
2145
|
-
var
|
|
2143
|
+
var r;
|
|
2146
2144
|
return [a(e(te), {
|
|
2147
2145
|
shape: "square",
|
|
2148
|
-
"image-url": (
|
|
2146
|
+
"image-url": (r = d.userInfo) == null ? void 0 : r.avatar
|
|
2149
2147
|
}, null, 8, ["image-url"])];
|
|
2150
2148
|
}),
|
|
2151
2149
|
_: 1
|
|
2152
2150
|
}, 8, ["title", "description"])];
|
|
2153
2151
|
}),
|
|
2154
2152
|
_: 1
|
|
2155
|
-
}), a(e(
|
|
2156
|
-
default: f(() => [a(e(
|
|
2153
|
+
}), a(e(oe), null, {
|
|
2154
|
+
default: f(() => [a(e(ie), {
|
|
2157
2155
|
title: "公开信息",
|
|
2158
2156
|
description: "头像、昵称"
|
|
2159
2157
|
}, {
|
|
@@ -2169,8 +2167,8 @@ const wt = {
|
|
|
2169
2167
|
_: 1
|
|
2170
2168
|
})]),
|
|
2171
2169
|
_: 1
|
|
2172
|
-
}), a(e(
|
|
2173
|
-
default: f(() => [a(e(
|
|
2170
|
+
}), a(e(oe), null, {
|
|
2171
|
+
default: f(() => [a(e(ie), {
|
|
2174
2172
|
title: "个人用户数据",
|
|
2175
2173
|
description: "电子邮件地址"
|
|
2176
2174
|
}, {
|
|
@@ -2190,28 +2188,28 @@ const wt = {
|
|
|
2190
2188
|
_: 1
|
|
2191
2189
|
}), a(e(B), {
|
|
2192
2190
|
type: "primary",
|
|
2193
|
-
size:
|
|
2194
|
-
loading:
|
|
2191
|
+
size: d.size,
|
|
2192
|
+
loading: u.value,
|
|
2195
2193
|
onClick: h
|
|
2196
2194
|
}, {
|
|
2197
2195
|
default: f(() => [...s[2] || (s[2] = [x(" 授权 ", -1)])]),
|
|
2198
2196
|
_: 1
|
|
2199
|
-
}, 8, ["size", "loading"]), S("div",
|
|
2197
|
+
}, 8, ["size", "loading"]), S("div", zs, [s[3] || (s[3] = S("div", {
|
|
2200
2198
|
class: "redirect-hint"
|
|
2201
|
-
}, "授权后将跳转至", -1)), S("div",
|
|
2199
|
+
}, "授权后将跳转至", -1)), S("div", Ps, L(n.value.authorizationCallback), 1)])])]));
|
|
2202
2200
|
}
|
|
2203
|
-
}),
|
|
2201
|
+
}), da = /* @__PURE__ */ C(Vs, [["__scopeId", "data-v-6c1792d3"]]), As = {
|
|
2204
2202
|
class: "oauth-callback"
|
|
2205
|
-
},
|
|
2203
|
+
}, Us = {
|
|
2206
2204
|
key: 0,
|
|
2207
2205
|
class: "callback-loading"
|
|
2208
|
-
},
|
|
2206
|
+
}, Cs = {
|
|
2209
2207
|
key: 1,
|
|
2210
2208
|
class: "callback-error"
|
|
2211
|
-
},
|
|
2209
|
+
}, $s = {
|
|
2212
2210
|
key: 2,
|
|
2213
2211
|
class: "callback-success"
|
|
2214
|
-
},
|
|
2212
|
+
}, Ts = /* @__PURE__ */ A({
|
|
2215
2213
|
__name: "AuthkitOauthCallback",
|
|
2216
2214
|
props: {
|
|
2217
2215
|
defaultRedirect: {},
|
|
@@ -2220,29 +2218,27 @@ const wt = {
|
|
|
2220
2218
|
},
|
|
2221
2219
|
emits: ["success", "error", "needBindIdentity"],
|
|
2222
2220
|
setup(b, {
|
|
2223
|
-
emit:
|
|
2221
|
+
emit: u
|
|
2224
2222
|
}) {
|
|
2225
|
-
const
|
|
2223
|
+
const d = b, n = u, g = P(!0), h = P(""), o = P("登录成功,正在跳转..."), {
|
|
2226
2224
|
completeSignIn: s,
|
|
2227
|
-
restoreSession:
|
|
2228
|
-
} = N(),
|
|
2229
|
-
fetchUserProfile: u
|
|
2230
|
-
} = oe();
|
|
2225
|
+
restoreSession: c
|
|
2226
|
+
} = N(), r = ye();
|
|
2231
2227
|
async function t() {
|
|
2232
2228
|
const i = new URLSearchParams(window.location.search), w = i.get("error");
|
|
2233
2229
|
if (w) {
|
|
2234
|
-
h.value = w,
|
|
2230
|
+
h.value = w, g.value = !1, n("error", h.value);
|
|
2235
2231
|
return;
|
|
2236
2232
|
}
|
|
2237
2233
|
if (i.get("bindSuccess") === "true") {
|
|
2238
|
-
o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname),
|
|
2234
|
+
o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), g.value = !1, setTimeout(() => {
|
|
2239
2235
|
window.close();
|
|
2240
2236
|
}, 800);
|
|
2241
2237
|
return;
|
|
2242
2238
|
}
|
|
2243
2239
|
const p = i.get("token"), m = i.get("userId"), y = i.get("appId"), _ = i.get("needBindIdentity") === "true";
|
|
2244
2240
|
if (!p) {
|
|
2245
|
-
h.value = "登录失败:未收到认证令牌",
|
|
2241
|
+
h.value = "登录失败:未收到认证令牌", g.value = !1, n("error", h.value);
|
|
2246
2242
|
return;
|
|
2247
2243
|
}
|
|
2248
2244
|
try {
|
|
@@ -2251,16 +2247,14 @@ const wt = {
|
|
|
2251
2247
|
userId: m,
|
|
2252
2248
|
appId: y,
|
|
2253
2249
|
needBindIdentity: _
|
|
2254
|
-
})
|
|
2250
|
+
});
|
|
2255
2251
|
const q = window.location.pathname;
|
|
2256
2252
|
if (window.history.replaceState({}, "", q), _ && (n("needBindIdentity", {
|
|
2257
2253
|
token: p,
|
|
2258
2254
|
userId: m || "",
|
|
2259
2255
|
appId: y || ""
|
|
2260
|
-
}),
|
|
2261
|
-
|
|
2262
|
-
window.location.href = c.bindIdentityRedirect;
|
|
2263
|
-
}, 300);
|
|
2256
|
+
}), d.bindIdentityRedirect)) {
|
|
2257
|
+
await r.replace(d.bindIdentityRedirect);
|
|
2264
2258
|
return;
|
|
2265
2259
|
}
|
|
2266
2260
|
n("success", {
|
|
@@ -2271,48 +2265,46 @@ const wt = {
|
|
|
2271
2265
|
});
|
|
2272
2266
|
const $ = sessionStorage.getItem("auth_redirect");
|
|
2273
2267
|
sessionStorage.removeItem("auth_redirect");
|
|
2274
|
-
const T = $ ||
|
|
2275
|
-
|
|
2276
|
-
window.location.href = T;
|
|
2277
|
-
}, 500);
|
|
2268
|
+
const T = $ || d.defaultRedirect || "/";
|
|
2269
|
+
await r.replace(T);
|
|
2278
2270
|
} catch (q) {
|
|
2279
|
-
console.error("OAuth 回调处理失败:", q), h.value = "登录处理失败,请重试",
|
|
2271
|
+
console.error("OAuth 回调处理失败:", q), h.value = "登录处理失败,请重试", g.value = !1, n("error", h.value);
|
|
2280
2272
|
}
|
|
2281
2273
|
}
|
|
2282
|
-
function
|
|
2274
|
+
function v() {
|
|
2283
2275
|
const i = sessionStorage.getItem("auth_redirect");
|
|
2284
|
-
sessionStorage.removeItem("auth_redirect"),
|
|
2276
|
+
sessionStorage.removeItem("auth_redirect"), r.replace(i || d.defaultRedirect || "/");
|
|
2285
2277
|
}
|
|
2286
2278
|
return E(() => {
|
|
2287
2279
|
const i = new URLSearchParams(window.location.search);
|
|
2288
2280
|
if (i.has("token") || i.has("error") || i.has("bindSuccess"))
|
|
2289
2281
|
t();
|
|
2290
|
-
else if (
|
|
2282
|
+
else if (c()) {
|
|
2291
2283
|
const w = sessionStorage.getItem("auth_redirect");
|
|
2292
|
-
sessionStorage.removeItem("auth_redirect"),
|
|
2284
|
+
sessionStorage.removeItem("auth_redirect"), r.replace(w || d.defaultRedirect || "/");
|
|
2293
2285
|
} else
|
|
2294
|
-
h.value = "无效的访问",
|
|
2295
|
-
}), (i, w) => (l(), k("div",
|
|
2286
|
+
h.value = "无效的访问", g.value = !1;
|
|
2287
|
+
}), (i, w) => (l(), k("div", As, [g.value ? (l(), k("div", Us, [w[0] || (w[0] = S("div", {
|
|
2296
2288
|
class: "spinner"
|
|
2297
|
-
}, null, -1)), S("p", null, L(b.loadingText), 1)])) : h.value ? (l(), k("div",
|
|
2289
|
+
}, null, -1)), S("p", null, L(b.loadingText), 1)])) : h.value ? (l(), k("div", Cs, [w[1] || (w[1] = S("div", {
|
|
2298
2290
|
class: "error-icon"
|
|
2299
2291
|
}, "✕", -1)), w[2] || (w[2] = S("h2", null, "登录失败", -1)), S("p", null, L(h.value), 1), S("button", {
|
|
2300
2292
|
class: "retry-btn",
|
|
2301
|
-
onClick:
|
|
2302
|
-
}, "返回重试")])) : (l(), k("div",
|
|
2293
|
+
onClick: v
|
|
2294
|
+
}, "返回重试")])) : (l(), k("div", $s, [w[3] || (w[3] = S("div", {
|
|
2303
2295
|
class: "success-icon"
|
|
2304
2296
|
}, "✓", -1)), S("p", null, L(o.value), 1)]))]));
|
|
2305
2297
|
}
|
|
2306
|
-
}),
|
|
2298
|
+
}), ca = /* @__PURE__ */ C(Ts, [["__scopeId", "data-v-aa652ea3"]]), Rs = {
|
|
2307
2299
|
class: "oauth-binding-account"
|
|
2308
|
-
},
|
|
2300
|
+
}, qs = {
|
|
2309
2301
|
key: 1,
|
|
2310
2302
|
class: "oauth-binding-account__icon"
|
|
2311
|
-
}, qs = {
|
|
2312
|
-
class: "oauth-binding-account__info"
|
|
2313
2303
|
}, xs = {
|
|
2304
|
+
class: "oauth-binding-account__info"
|
|
2305
|
+
}, Ls = {
|
|
2314
2306
|
class: "oauth-binding-account__name"
|
|
2315
|
-
},
|
|
2307
|
+
}, Bs = /* @__PURE__ */ A({
|
|
2316
2308
|
__name: "AuthkitGithubBinding",
|
|
2317
2309
|
props: {
|
|
2318
2310
|
size: {
|
|
@@ -2322,23 +2314,23 @@ const wt = {
|
|
|
2322
2314
|
},
|
|
2323
2315
|
setup(b) {
|
|
2324
2316
|
const {
|
|
2325
|
-
config:
|
|
2326
|
-
} =
|
|
2327
|
-
userProfile:
|
|
2317
|
+
config: u
|
|
2318
|
+
} = ce(), {
|
|
2319
|
+
userProfile: d,
|
|
2328
2320
|
fetchUserProfile: n
|
|
2329
|
-
} =
|
|
2321
|
+
} = Ie(), g = P("hidden"), h = P(!1);
|
|
2330
2322
|
let o;
|
|
2331
|
-
const s = b,
|
|
2323
|
+
const s = b, c = R(() => {
|
|
2332
2324
|
var m, y, _;
|
|
2333
|
-
return ((y = (m =
|
|
2325
|
+
return ((y = (m = d.value) == null ? void 0 : m.github) == null ? void 0 : y.avatar_url) || ((_ = d.value) == null ? void 0 : _.avatar) || "";
|
|
2334
2326
|
}), {
|
|
2335
|
-
getOauthCallbackUrl:
|
|
2327
|
+
getOauthCallbackUrl: r
|
|
2336
2328
|
} = _e();
|
|
2337
2329
|
function t(m) {
|
|
2338
|
-
|
|
2330
|
+
g.value = m;
|
|
2339
2331
|
}
|
|
2340
|
-
async function
|
|
2341
|
-
const m =
|
|
2332
|
+
async function v() {
|
|
2333
|
+
const m = u.appId;
|
|
2342
2334
|
if (!m) {
|
|
2343
2335
|
console.error("GitHub OAuth 失败: appId 未配置");
|
|
2344
2336
|
return;
|
|
@@ -2349,7 +2341,7 @@ const wt = {
|
|
|
2349
2341
|
} = await O().auth.oauth.github.login.get({
|
|
2350
2342
|
appId: m,
|
|
2351
2343
|
mode: "bind",
|
|
2352
|
-
redirectUri:
|
|
2344
|
+
redirectUri: r()
|
|
2353
2345
|
});
|
|
2354
2346
|
_ || !y || (h.value = !0, window.open(y.redirectUri, "_blank"));
|
|
2355
2347
|
}
|
|
@@ -2359,21 +2351,21 @@ const wt = {
|
|
|
2359
2351
|
} = await O().auth.users.unbind.oauth.post({
|
|
2360
2352
|
provider: "github"
|
|
2361
2353
|
});
|
|
2362
|
-
m || (X.success("解绑成功"),
|
|
2354
|
+
m || (X.success("解绑成功"), g.value = "hidden", n());
|
|
2363
2355
|
}
|
|
2364
2356
|
function w() {
|
|
2365
|
-
|
|
2357
|
+
g.value === "bind" && (g.value = "hidden", v()), g.value === "unbind" && i();
|
|
2366
2358
|
}
|
|
2367
2359
|
function p() {
|
|
2368
2360
|
h.value && n();
|
|
2369
2361
|
}
|
|
2370
2362
|
return E(() => {
|
|
2371
|
-
|
|
2372
|
-
}),
|
|
2363
|
+
d.value || n(), o = setInterval(p, 1e3);
|
|
2364
|
+
}), re(() => {
|
|
2373
2365
|
o && clearInterval(o);
|
|
2374
2366
|
}), (m, y) => {
|
|
2375
2367
|
var _, q, $;
|
|
2376
|
-
return l(), k(D, null, [!((_ = e(
|
|
2368
|
+
return l(), k(D, null, [!((_ = e(d)) != null && _.github) && g.value === "hidden" ? (l(), I(e(me), {
|
|
2377
2369
|
key: 0,
|
|
2378
2370
|
title: "绑定GitHub"
|
|
2379
2371
|
}, {
|
|
@@ -2387,7 +2379,7 @@ const wt = {
|
|
|
2387
2379
|
}, 8, ["size"])]),
|
|
2388
2380
|
default: f(() => [y[3] || (y[3] = x(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2389
2381
|
_: 1
|
|
2390
|
-
})) : z("", !0), (q = e(
|
|
2382
|
+
})) : z("", !0), (q = e(d)) != null && q.github && g.value === "hidden" ? (l(), I(e(me), {
|
|
2391
2383
|
key: 1,
|
|
2392
2384
|
title: "解绑GitHub"
|
|
2393
2385
|
}, {
|
|
@@ -2401,100 +2393,100 @@ const wt = {
|
|
|
2401
2393
|
}, 8, ["size"])]),
|
|
2402
2394
|
default: f(() => {
|
|
2403
2395
|
var T, F;
|
|
2404
|
-
return [S("div",
|
|
2396
|
+
return [S("div", Rs, [c.value ? (l(), I(e(te), {
|
|
2405
2397
|
key: 0,
|
|
2406
2398
|
class: "oauth-binding-account__avatar",
|
|
2407
|
-
"image-url":
|
|
2399
|
+
"image-url": c.value,
|
|
2408
2400
|
size: 42
|
|
2409
|
-
}, null, 8, ["image-url"])) : (l(), k("div",
|
|
2401
|
+
}, null, 8, ["image-url"])) : (l(), k("div", qs, [a(be, {
|
|
2410
2402
|
icon: e(J).github,
|
|
2411
|
-
size: e(
|
|
2403
|
+
size: e(Fe),
|
|
2412
2404
|
alt: "GitHub"
|
|
2413
|
-
}, null, 8, ["icon", "size"])])), S("div",
|
|
2405
|
+
}, null, 8, ["icon", "size"])])), S("div", xs, [y[4] || (y[4] = S("div", {
|
|
2414
2406
|
class: "oauth-binding-account__provider"
|
|
2415
|
-
}, "GitHub", -1)), S("div",
|
|
2407
|
+
}, "GitHub", -1)), S("div", Ls, L(((F = (T = e(d)) == null ? void 0 : T.github) == null ? void 0 : F.login) || "GitHub"), 1)])])];
|
|
2416
2408
|
}),
|
|
2417
2409
|
_: 1
|
|
2418
|
-
})) : z("", !0),
|
|
2410
|
+
})) : z("", !0), g.value === "bind" || g.value === "unbind" ? (l(), I(De, {
|
|
2419
2411
|
key: 2,
|
|
2420
2412
|
size: s.size,
|
|
2421
|
-
email: ($ = e(
|
|
2413
|
+
email: ($ = e(d)) == null ? void 0 : $.email,
|
|
2422
2414
|
onNext: w
|
|
2423
2415
|
}, null, 8, ["size", "email"])) : z("", !0)], 64);
|
|
2424
2416
|
};
|
|
2425
2417
|
}
|
|
2426
|
-
}),
|
|
2418
|
+
}), pa = /* @__PURE__ */ C(Bs, [["__scopeId", "data-v-4f673706"]]), Os = /* @__PURE__ */ A({
|
|
2427
2419
|
__name: "LegalDocViewer",
|
|
2428
2420
|
props: {
|
|
2429
2421
|
type: {},
|
|
2430
2422
|
appId: {}
|
|
2431
2423
|
},
|
|
2432
2424
|
setup(b) {
|
|
2433
|
-
const
|
|
2425
|
+
const u = b, d = R(() => Ee[u.type] ?? ""), n = P(!1), g = P(null);
|
|
2434
2426
|
async function h() {
|
|
2435
|
-
if (!
|
|
2436
|
-
|
|
2427
|
+
if (!u.type || !u.appId) {
|
|
2428
|
+
g.value = null;
|
|
2437
2429
|
return;
|
|
2438
2430
|
}
|
|
2439
2431
|
n.value = !0;
|
|
2440
|
-
const o = await
|
|
2432
|
+
const o = await je(u.appId);
|
|
2441
2433
|
if (n.value = !1, !o) {
|
|
2442
|
-
|
|
2434
|
+
g.value = null;
|
|
2443
2435
|
return;
|
|
2444
2436
|
}
|
|
2445
|
-
const s = o[
|
|
2446
|
-
|
|
2437
|
+
const s = o[u.type];
|
|
2438
|
+
g.value = He(s) ? s : null;
|
|
2447
2439
|
}
|
|
2448
|
-
return
|
|
2440
|
+
return he(() => [u.type, u.appId], () => {
|
|
2449
2441
|
h();
|
|
2450
2442
|
}, {
|
|
2451
2443
|
immediate: !0
|
|
2452
|
-
}), (o, s) => n.value ? (l(), I(e(
|
|
2444
|
+
}), (o, s) => n.value ? (l(), I(e(Re), {
|
|
2453
2445
|
key: 0,
|
|
2454
2446
|
loading: n.value,
|
|
2455
2447
|
class: "legal-doc-viewer-loading"
|
|
2456
|
-
}, null, 8, ["loading"])) :
|
|
2448
|
+
}, null, 8, ["loading"])) : g.value ? (l(), I(e(Ge), {
|
|
2457
2449
|
key: 2,
|
|
2458
|
-
modelValue:
|
|
2459
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
2450
|
+
modelValue: g.value,
|
|
2451
|
+
"onUpdate:modelValue": s[1] || (s[1] = (c) => g.value = c),
|
|
2460
2452
|
editable: !1
|
|
2461
2453
|
}, {
|
|
2462
|
-
title: f(() => [a(e(
|
|
2463
|
-
modelValue:
|
|
2464
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2454
|
+
title: f(() => [a(e(Ne), {
|
|
2455
|
+
modelValue: d.value,
|
|
2456
|
+
"onUpdate:modelValue": s[0] || (s[0] = (c) => d.value = c),
|
|
2465
2457
|
editable: !1,
|
|
2466
2458
|
class: "legal-doc-viewer-title"
|
|
2467
2459
|
}, null, 8, ["modelValue"])]),
|
|
2468
2460
|
_: 1
|
|
2469
|
-
}, 8, ["modelValue"])) : (l(), I(e(
|
|
2461
|
+
}, 8, ["modelValue"])) : (l(), I(e(qe), {
|
|
2470
2462
|
key: 1,
|
|
2471
2463
|
description: "暂无内容"
|
|
2472
2464
|
}));
|
|
2473
2465
|
}
|
|
2474
|
-
}),
|
|
2466
|
+
}), ma = /* @__PURE__ */ C(Os, [["__scopeId", "data-v-fe9a3621"]]);
|
|
2475
2467
|
export {
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2468
|
+
fs as A,
|
|
2469
|
+
Qt as E,
|
|
2470
|
+
ma as L,
|
|
2479
2471
|
Q as O,
|
|
2480
|
-
|
|
2481
|
-
|
|
2472
|
+
zt as P,
|
|
2473
|
+
gt as R,
|
|
2482
2474
|
ee as S,
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2475
|
+
hs as _,
|
|
2476
|
+
ua as a,
|
|
2477
|
+
gs as b,
|
|
2478
|
+
ze as c,
|
|
2479
|
+
da as d,
|
|
2480
|
+
pa as e,
|
|
2481
|
+
ca as f,
|
|
2482
|
+
et as g,
|
|
2483
|
+
it as h,
|
|
2484
|
+
ut as i,
|
|
2485
|
+
ra as j,
|
|
2486
|
+
Gt as k,
|
|
2487
|
+
$t as l,
|
|
2488
|
+
rs as m,
|
|
2489
|
+
ts as n,
|
|
2490
|
+
pe as o,
|
|
2491
|
+
Ft as p
|
|
2500
2492
|
};
|