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