@huyooo/ui 0.16.0 → 0.17.1
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-v80fEiq0.js → AuthkitAppSetting-jfSU-9BO.js} +655 -646
- package/dist/{AuthkitGithubBinding-CVhCM6AX.js → AuthkitGithubBinding-Co5Z_cD0.js} +260 -255
- package/dist/{Clipboard-R3AURqvU.js → Clipboard-Bo7gdpR6.js} +1 -1
- package/dist/{Contact-B3AMSHoN.js → Contact-B09Z0y_t.js} +2 -2
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-CAGBbiZD.js → FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js} +3 -3
- package/dist/{MessageHandle-BMhGWVHD.js → MessageHandle-BG12aX0i.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-ByB_YaVb.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js} +2 -2
- package/dist/{PaySubscriptions-D3g1OhiA.js → PaySubscriptions-BFq89DCI.js} +4 -4
- package/dist/{PricingPlans-DXea7rl0.js → PricingPlans-TZT6j_Jq.js} +4 -4
- package/dist/{ReferrerReferees-BxmZ1w_L.js → ReferrerReferees-jWOIvXrk.js} +18 -18
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-CXr8D4VG.js → Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-6xQNhFk3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BVtXbwch.js} +57 -57
- package/dist/{WidthContainer-DVZQV6sM.js → WidthContainer-Ct44rKyS.js} +9 -9
- package/dist/{apiClients-DT7o0IpO.js → apiClients-DrGX2iJy.js} +81 -78
- package/dist/authkit.js +9 -9
- package/dist/common/authPanelWidth.d.ts +2 -0
- package/dist/common.js +1 -1
- package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +2 -2
- package/dist/composables/Authkit/readInviteCodeFromLocation.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +1 -1
- package/dist/composables/Authkit/useOauth.d.ts +5 -9
- package/dist/composables.js +13 -13
- package/dist/feedback.js +2 -2
- package/dist/main.js +29 -29
- package/dist/message.js +3 -3
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/ai.generated.d.ts +764 -94
- package/dist/types/api/auth.generated.d.ts +24 -20
- package/dist/types/api/billing.generated.d.ts +206 -514
- package/dist/types/api/ones.generated.d.ts +4 -0
- package/dist/types/api.d.ts +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-DScDQfj5.js → useAuthkitAppsAuthPageInfo-DWd0bDP-.js} +1 -1
- package/dist/{useAuthkitAuth-DpdKRuJm.js → useAuthkitAuth-DmS-H7M2.js} +60 -53
- package/dist/{useAuthkitCreateAndUpdate-MzA4qtTh.js → useAuthkitCreateAndUpdate-oo9517Gj.js} +1 -1
- package/dist/{useAuthkitUsersProfile-aw_A7IWb.js → useAuthkitUsersProfile-BZDk21c8.js} +2 -2
- package/dist/{useBillingStatusOptions-CAsu1hrf.js → useBillingStatusOptions-B7xLU3fs.js} +1 -1
- package/dist/{useEnsureAuthenticated-BEKhtQAl.js → useEnsureAuthenticated-BuIbxqsO.js} +2 -2
- package/dist/{useLegalLinks-BijRF_ZD.js → useLegalLinks--qFGF7lO.js} +2 -2
- package/dist/{useMessageNotifications-CFku0c2R.js → useMessageNotifications-D85_-mDq.js} +1 -1
- package/dist/{useRoutePermission-v4_0B-aO.js → useRoutePermission-chEi45Nb.js} +2 -2
- package/dist/{useSEO-CbHCw4gq.js → useSEO-C6DLicfe.js} +1 -1
- package/dist/{useSubscriptionCheckout-BjPiHSjA.js → useSubscriptionCheckout-BRk5h9aC.js} +3 -3
- package/dist/{useTableHandle-TDJa_Czn.js → useTableHandle-BdujaiNX.js} +1 -1
- package/dist/{useUploadCos-DOHnz2MP.js → useUploadCos-BRKRzSy3.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/utils/apiMiddlewares.d.ts +4 -4
- package/package.json +2 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, openBlock as c, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as $, createElementVNode as y, createCommentVNode as z, createBlock as k, ref as S, withCtx as f, createTextVNode as C, watchEffect as ee, Fragment as N, renderList as te, toDisplayString as O, useSlots as re, renderSlot as j, onMounted as F, normalizeStyle as Q, onUnmounted as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "./index-D3Kp6R4z.js";
|
|
5
|
-
import { Form as x, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as
|
|
6
|
-
import { u as
|
|
7
|
-
import { e as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as ue, S as D,
|
|
5
|
+
import { Form as x, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as G, Alert as le } from "@arco-design/web-vue";
|
|
6
|
+
import { u as H } from "./useAuthkitAuth-DmS-H7M2.js";
|
|
7
|
+
import { e as T, u as ge, s as he, g as ye } from "./apiClients-DrGX2iJy.js";
|
|
8
|
+
import { u as E } from "./useAuthkitAppsAuthPageInfo-DWd0bDP-.js";
|
|
9
|
+
import { u as ue, S as D, r as we, a as _e, b as be } from "./AuthkitAppSetting-jfSU-9BO.js";
|
|
10
10
|
import { Icon as de } from "@iconify/vue";
|
|
11
11
|
import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as J } from "./useAuthkitUsersProfile-
|
|
15
|
+
import { u as Se } from "./useLegalLinks--qFGF7lO.js";
|
|
16
|
+
import { u as J } from "./useAuthkitUsersProfile-BZDk21c8.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
|
-
const
|
|
20
|
+
const ke = 440, ze = ["title", "aria-label"], Ie = /* @__PURE__ */ I({
|
|
21
21
|
__name: "AuthkitOauthItem",
|
|
22
22
|
props: {
|
|
23
23
|
size: {
|
|
@@ -46,16 +46,16 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
46
46
|
"aria-label": u.label
|
|
47
47
|
}, [s(t(de), {
|
|
48
48
|
icon: u.icon
|
|
49
|
-
}, null, 8, ["icon"])], 10,
|
|
49
|
+
}, null, 8, ["icon"])], 10, ze));
|
|
50
50
|
}
|
|
51
|
-
}), W = /* @__PURE__ */ P(
|
|
51
|
+
}), W = /* @__PURE__ */ P(Ie, [["__scopeId", "data-v-61ace547"]]), Pe = {
|
|
52
52
|
class: "OAuthList"
|
|
53
|
-
},
|
|
53
|
+
}, Ae = {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "OAuthDivider"
|
|
56
|
-
},
|
|
56
|
+
}, Ve = {
|
|
57
57
|
class: "OAuthIcons"
|
|
58
|
-
},
|
|
58
|
+
}, Ue = /* @__PURE__ */ I({
|
|
59
59
|
__name: "AuthkitOauthList",
|
|
60
60
|
props: {
|
|
61
61
|
size: {
|
|
@@ -70,45 +70,45 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
70
70
|
setup(g) {
|
|
71
71
|
const {
|
|
72
72
|
appsData: u
|
|
73
|
-
} =
|
|
73
|
+
} = E(), n = g, {
|
|
74
74
|
githubAuth: o,
|
|
75
75
|
googleAuth: v,
|
|
76
76
|
microsoftAuth: l,
|
|
77
77
|
wechatAuth: r
|
|
78
|
-
} = ue(), e =
|
|
79
|
-
return (h, i) => (c(), b("div",
|
|
78
|
+
} = ue(), e = $(() => !(!u.value.oauth.google.enabled && !u.value.oauth.microsoft.enabled && !u.value.oauth.github.enabled && !u.value.oauth.wechat.enabled));
|
|
79
|
+
return (h, i) => (c(), b("div", Pe, [e.value ? (c(), b("div", Ae, [...i[4] || (i[4] = [y("span", null, "其他登录方式", -1)])])) : z("", !0), y("div", Ve, [t(u).oauth.google.enabled ? (c(), k(W, {
|
|
80
80
|
key: 0,
|
|
81
81
|
icon: "logos:google-icon",
|
|
82
82
|
label: "Google",
|
|
83
83
|
size: n.size,
|
|
84
84
|
onClick: i[0] || (i[0] = (p) => t(v)())
|
|
85
|
-
}, null, 8, ["size"])) :
|
|
85
|
+
}, null, 8, ["size"])) : z("", !0), t(u).oauth.github.enabled ? (c(), k(W, {
|
|
86
86
|
key: 1,
|
|
87
87
|
icon: "logos:github-icon",
|
|
88
88
|
label: "Github",
|
|
89
89
|
size: n.size,
|
|
90
90
|
onClick: i[1] || (i[1] = (p) => t(o)())
|
|
91
|
-
}, null, 8, ["size"])) :
|
|
91
|
+
}, null, 8, ["size"])) : z("", !0), t(u).oauth.microsoft.enabled ? (c(), k(W, {
|
|
92
92
|
key: 2,
|
|
93
93
|
icon: "logos:microsoft-icon",
|
|
94
94
|
label: "Microsoft",
|
|
95
95
|
size: n.size,
|
|
96
96
|
onClick: i[2] || (i[2] = (p) => t(l)())
|
|
97
|
-
}, null, 8, ["size"])) :
|
|
97
|
+
}, null, 8, ["size"])) : z("", !0), t(u).oauth.wechat.enabled ? (c(), k(W, {
|
|
98
98
|
key: 3,
|
|
99
99
|
icon: "ri:wechat-fill",
|
|
100
100
|
label: "微信",
|
|
101
101
|
size: n.size,
|
|
102
102
|
onClick: i[3] || (i[3] = (p) => t(r)())
|
|
103
|
-
}, null, 8, ["size"])) :
|
|
103
|
+
}, null, 8, ["size"])) : z("", !0)])]));
|
|
104
104
|
}
|
|
105
|
-
}),
|
|
105
|
+
}), Ce = /* @__PURE__ */ P(Ue, [["__scopeId", "data-v-4ff27a11"]]), $e = {
|
|
106
106
|
class: "content"
|
|
107
|
-
},
|
|
107
|
+
}, Re = {
|
|
108
108
|
class: "sendVerifyCodeItem"
|
|
109
|
-
},
|
|
109
|
+
}, qe = {
|
|
110
110
|
class: "handle"
|
|
111
|
-
},
|
|
111
|
+
}, Be = /* @__PURE__ */ I({
|
|
112
112
|
__name: "AuthkitPasswordUpdateAndVerify",
|
|
113
113
|
props: {
|
|
114
114
|
size: {
|
|
@@ -137,7 +137,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
137
137
|
l.value = !0;
|
|
138
138
|
const {
|
|
139
139
|
data: m
|
|
140
|
-
} = await
|
|
140
|
+
} = await T.verify.email.retry.post({
|
|
141
141
|
email: e.value.email,
|
|
142
142
|
purpose: "resetPassword"
|
|
143
143
|
});
|
|
@@ -149,7 +149,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
149
149
|
p || n("submit", e.value);
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
return (p, m) => (c(), b("div",
|
|
152
|
+
return (p, m) => (c(), b("div", $e, [s(t(x), {
|
|
153
153
|
ref_key: "formRef",
|
|
154
154
|
ref: r,
|
|
155
155
|
model: e.value,
|
|
@@ -183,7 +183,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
183
183
|
message: "请输入验证码"
|
|
184
184
|
}]
|
|
185
185
|
}, {
|
|
186
|
-
default: f(() => [y("div",
|
|
186
|
+
default: f(() => [y("div", Re, [s(t(V), {
|
|
187
187
|
modelValue: e.value.userToken,
|
|
188
188
|
"onUpdate:modelValue": m[1] || (m[1] = (a) => e.value.userToken = a),
|
|
189
189
|
placeholder: "请输入验证码"
|
|
@@ -242,24 +242,24 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
242
242
|
autocomplete: ""
|
|
243
243
|
}, null, 8, ["modelValue"])]),
|
|
244
244
|
_: 1
|
|
245
|
-
}, 8, ["rules"]), y("div",
|
|
245
|
+
}, 8, ["rules"]), y("div", qe, [s(t(B), {
|
|
246
246
|
type: "primary",
|
|
247
247
|
loading: o.loading,
|
|
248
248
|
long: "",
|
|
249
249
|
size: o.size,
|
|
250
250
|
onClick: i
|
|
251
251
|
}, {
|
|
252
|
-
default: f(() => [...m[4] || (m[4] = [
|
|
252
|
+
default: f(() => [...m[4] || (m[4] = [C(" 提交 ", -1)])]),
|
|
253
253
|
_: 1
|
|
254
254
|
}, 8, ["loading", "size"])])]),
|
|
255
255
|
_: 1
|
|
256
256
|
}, 8, ["model", "size"])]));
|
|
257
257
|
}
|
|
258
|
-
}),
|
|
258
|
+
}), Te = /* @__PURE__ */ P(Be, [["__scopeId", "data-v-6748c8cb"]]), Oe = {
|
|
259
259
|
class: "content"
|
|
260
|
-
},
|
|
260
|
+
}, xe = {
|
|
261
261
|
class: "sendVerifyCodeItem"
|
|
262
|
-
},
|
|
262
|
+
}, Le = /* @__PURE__ */ I({
|
|
263
263
|
__name: "AuthkitPhonePasswordUpdateAndVerify",
|
|
264
264
|
props: {
|
|
265
265
|
size: {
|
|
@@ -301,7 +301,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
301
301
|
l.value = !0;
|
|
302
302
|
const {
|
|
303
303
|
error: a
|
|
304
|
-
} = await
|
|
304
|
+
} = await T.verify.sms.send.post({
|
|
305
305
|
phone: e.value.phone,
|
|
306
306
|
purpose: "resetPassword"
|
|
307
307
|
});
|
|
@@ -318,7 +318,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
return (m, a) => (c(), b("div",
|
|
321
|
+
return (m, a) => (c(), b("div", Oe, [s(t(x), {
|
|
322
322
|
ref_key: "formRef",
|
|
323
323
|
ref: r,
|
|
324
324
|
model: e.value,
|
|
@@ -354,7 +354,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
354
354
|
message: "请输入验证码"
|
|
355
355
|
}]
|
|
356
356
|
}, {
|
|
357
|
-
default: f(() => [y("div",
|
|
357
|
+
default: f(() => [y("div", xe, [s(t(V), {
|
|
358
358
|
modelValue: e.value.code,
|
|
359
359
|
"onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.code = d),
|
|
360
360
|
placeholder: "请输入验证码",
|
|
@@ -411,15 +411,15 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
411
411
|
size: o.size,
|
|
412
412
|
onClick: p
|
|
413
413
|
}, {
|
|
414
|
-
default: f(() => [...a[4] || (a[4] = [
|
|
414
|
+
default: f(() => [...a[4] || (a[4] = [C(" 提交 ", -1)])]),
|
|
415
415
|
_: 1
|
|
416
416
|
}, 8, ["loading", "size"])]),
|
|
417
417
|
_: 1
|
|
418
418
|
}, 8, ["model", "size"])]));
|
|
419
419
|
}
|
|
420
|
-
}),
|
|
420
|
+
}), Me = /* @__PURE__ */ P(Le, [["__scopeId", "data-v-717c5c0f"]]), Fe = {
|
|
421
421
|
class: "SwitchSignIn"
|
|
422
|
-
},
|
|
422
|
+
}, He = /* @__PURE__ */ I({
|
|
423
423
|
__name: "AuthkitSwitchSignIn",
|
|
424
424
|
emits: ["switchSignIn"],
|
|
425
425
|
setup(g, {
|
|
@@ -429,25 +429,25 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
429
429
|
function o() {
|
|
430
430
|
n("switchSignIn");
|
|
431
431
|
}
|
|
432
|
-
return (v, l) => (c(), b("div",
|
|
432
|
+
return (v, l) => (c(), b("div", Fe, [y("span", null, [l[1] || (l[1] = y("span", null, "已经有账号?", -1)), s(t(M), {
|
|
433
433
|
style: {
|
|
434
434
|
padding: "0px"
|
|
435
435
|
},
|
|
436
436
|
onClick: o
|
|
437
437
|
}, {
|
|
438
|
-
default: f(() => [...l[0] || (l[0] = [
|
|
438
|
+
default: f(() => [...l[0] || (l[0] = [C("去登陆", -1)])]),
|
|
439
439
|
_: 1
|
|
440
440
|
})])]));
|
|
441
441
|
}
|
|
442
|
-
}), ne = /* @__PURE__ */ P(
|
|
442
|
+
}), ne = /* @__PURE__ */ P(He, [["__scopeId", "data-v-fc1d3903"]]), Ee = {
|
|
443
443
|
class: "ResetPassword"
|
|
444
|
-
},
|
|
444
|
+
}, De = {
|
|
445
445
|
key: 0,
|
|
446
446
|
class: "tabsContainer"
|
|
447
|
-
},
|
|
447
|
+
}, Ge = {
|
|
448
448
|
key: 3,
|
|
449
449
|
class: "empty"
|
|
450
|
-
},
|
|
450
|
+
}, Ne = /* @__PURE__ */ I({
|
|
451
451
|
__name: "AuthkitResetPassword",
|
|
452
452
|
props: {
|
|
453
453
|
size: {
|
|
@@ -467,7 +467,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
467
467
|
}) {
|
|
468
468
|
const n = u, o = g, {
|
|
469
469
|
appsData: v
|
|
470
|
-
} =
|
|
470
|
+
} = E(), l = $(() => v.value.authMethods), r = $(() => {
|
|
471
471
|
const p = [];
|
|
472
472
|
return l.value.login.emailPassword && p.push({
|
|
473
473
|
key: "email",
|
|
@@ -490,11 +490,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
490
490
|
...p
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
|
-
return (p, m) => (c(), b("div",
|
|
493
|
+
return (p, m) => (c(), b("div", Ee, [r.value.length > 1 ? (c(), b("div", De, [s(t(oe), {
|
|
494
494
|
"active-key": e.value,
|
|
495
495
|
"onUpdate:activeKey": m[0] || (m[0] = (a) => e.value = a)
|
|
496
496
|
}, {
|
|
497
|
-
default: f(() => [(c(!0), b(
|
|
497
|
+
default: f(() => [(c(!0), b(N, null, te(r.value, (a) => (c(), k(t(se), {
|
|
498
498
|
key: a.key,
|
|
499
499
|
title: a.title
|
|
500
500
|
}, null, 8, ["title"]))), 128))]),
|
|
@@ -504,26 +504,26 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
504
504
|
style: {
|
|
505
505
|
margin: "0"
|
|
506
506
|
}
|
|
507
|
-
})])) :
|
|
507
|
+
})])) : z("", !0), e.value === "email" && l.value.login.emailPassword ? (c(), k(Te, {
|
|
508
508
|
key: 1,
|
|
509
509
|
loading: g.loading,
|
|
510
510
|
size: o.size,
|
|
511
511
|
onSubmit: i
|
|
512
|
-
}, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (c(), k(
|
|
512
|
+
}, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (c(), k(Me, {
|
|
513
513
|
key: 2,
|
|
514
514
|
loading: g.loading,
|
|
515
515
|
size: o.size,
|
|
516
516
|
onSubmit: i
|
|
517
|
-
}, null, 8, ["loading", "size"])) : (c(), b("div",
|
|
517
|
+
}, null, 8, ["loading", "size"])) : (c(), b("div", Ge, "当前应用未开放找回密码")), s(ne, {
|
|
518
518
|
onSwitchSignIn: h
|
|
519
519
|
})]));
|
|
520
520
|
}
|
|
521
|
-
}),
|
|
521
|
+
}), je = /* @__PURE__ */ P(Ne, [["__scopeId", "data-v-ca18289f"]]), Ke = {
|
|
522
522
|
key: 0,
|
|
523
523
|
class: "ServiceAgreementAndPrivacyProtection"
|
|
524
|
-
},
|
|
524
|
+
}, We = {
|
|
525
525
|
key: 1
|
|
526
|
-
},
|
|
526
|
+
}, Qe = /* @__PURE__ */ I({
|
|
527
527
|
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
528
528
|
emits: ["toUserServiceAgreement", "toPrivacyPolicy"],
|
|
529
529
|
setup(g, {
|
|
@@ -531,38 +531,38 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
531
531
|
}) {
|
|
532
532
|
const n = u, {
|
|
533
533
|
getLink: o
|
|
534
|
-
} =
|
|
534
|
+
} = Se(), v = $(() => {
|
|
535
535
|
const i = o("userServiceAgreement");
|
|
536
536
|
return i != null && i.configured ? i : void 0;
|
|
537
|
-
}), l =
|
|
537
|
+
}), l = $(() => {
|
|
538
538
|
const i = o("privacyPolicy");
|
|
539
539
|
return i != null && i.configured ? i : void 0;
|
|
540
|
-
}), r =
|
|
540
|
+
}), r = $(() => !!(v.value || l.value));
|
|
541
541
|
function e() {
|
|
542
542
|
n("toUserServiceAgreement");
|
|
543
543
|
}
|
|
544
544
|
function h() {
|
|
545
545
|
n("toPrivacyPolicy");
|
|
546
546
|
}
|
|
547
|
-
return (i, p) => r.value ? (c(), b("div",
|
|
547
|
+
return (i, p) => r.value ? (c(), b("div", Ke, [p[0] || (p[0] = y("span", null, "注册登陆即表示同意", -1)), v.value ? (c(), k(t(M), {
|
|
548
548
|
key: 0,
|
|
549
549
|
onClick: e
|
|
550
550
|
}, {
|
|
551
|
-
default: f(() => [
|
|
551
|
+
default: f(() => [C(O(v.value.label), 1)]),
|
|
552
552
|
_: 1
|
|
553
|
-
})) :
|
|
553
|
+
})) : z("", !0), v.value && l.value ? (c(), b("span", We, "和")) : z("", !0), l.value ? (c(), k(t(M), {
|
|
554
554
|
key: 2,
|
|
555
555
|
onClick: h
|
|
556
556
|
}, {
|
|
557
|
-
default: f(() => [
|
|
557
|
+
default: f(() => [C(O(l.value.label), 1)]),
|
|
558
558
|
_: 1
|
|
559
|
-
})) :
|
|
559
|
+
})) : z("", !0)])) : z("", !0);
|
|
560
560
|
}
|
|
561
|
-
}),
|
|
561
|
+
}), Je = /* @__PURE__ */ P(Qe, [["__scopeId", "data-v-c45a9ad9"]]), Xe = {
|
|
562
562
|
class: "content"
|
|
563
|
-
},
|
|
563
|
+
}, Ye = {
|
|
564
564
|
class: "handle"
|
|
565
|
-
},
|
|
565
|
+
}, Ze = /* @__PURE__ */ I({
|
|
566
566
|
__name: "AuthkitPasswordAuth",
|
|
567
567
|
props: {
|
|
568
568
|
size: {
|
|
@@ -592,7 +592,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
592
592
|
e || n("submit", l.value);
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
|
-
return (e, h) => (c(), b("div",
|
|
595
|
+
return (e, h) => (c(), b("div", Xe, [s(t(x), {
|
|
596
596
|
ref_key: "formRef",
|
|
597
597
|
ref: v,
|
|
598
598
|
model: l.value,
|
|
@@ -632,24 +632,24 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
632
632
|
autocomplete: "current-password"
|
|
633
633
|
}, null, 8, ["modelValue"])]),
|
|
634
634
|
_: 1
|
|
635
|
-
}), y("div",
|
|
635
|
+
}), y("div", Ye, [s(t(B), {
|
|
636
636
|
type: "primary",
|
|
637
637
|
loading: o.loading,
|
|
638
638
|
long: "",
|
|
639
639
|
size: o.size,
|
|
640
640
|
onClick: r
|
|
641
641
|
}, {
|
|
642
|
-
default: f(() => [...h[2] || (h[2] = [
|
|
642
|
+
default: f(() => [...h[2] || (h[2] = [C(" 登陆 ", -1)])]),
|
|
643
643
|
_: 1
|
|
644
644
|
}, 8, ["loading", "size"])])]),
|
|
645
645
|
_: 1
|
|
646
646
|
}, 8, ["model", "size"])]));
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
648
|
+
}), et = /* @__PURE__ */ P(Ze, [["__scopeId", "data-v-f2994068"]]), tt = {
|
|
649
649
|
class: "SwitchSignUpOrResetPassword"
|
|
650
|
-
},
|
|
650
|
+
}, it = {
|
|
651
651
|
key: 0
|
|
652
|
-
},
|
|
652
|
+
}, ot = /* @__PURE__ */ I({
|
|
653
653
|
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
654
654
|
props: {
|
|
655
655
|
showSignUp: {
|
|
@@ -668,33 +668,33 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
668
668
|
function l() {
|
|
669
669
|
o("switchResetPassword");
|
|
670
670
|
}
|
|
671
|
-
return (r, e) => (c(), b("div",
|
|
671
|
+
return (r, e) => (c(), b("div", tt, [n.showSignUp ? (c(), b("span", it, [e[1] || (e[1] = y("span", null, " 还没有账户?", -1)), s(t(M), {
|
|
672
672
|
style: {
|
|
673
673
|
padding: "0px"
|
|
674
674
|
},
|
|
675
675
|
onClick: v
|
|
676
676
|
}, {
|
|
677
|
-
default: f(() => [...e[0] || (e[0] = [
|
|
677
|
+
default: f(() => [...e[0] || (e[0] = [C("去注册?", -1)])]),
|
|
678
678
|
_: 1
|
|
679
|
-
})])) :
|
|
679
|
+
})])) : z("", !0), s(t(M), {
|
|
680
680
|
style: {
|
|
681
681
|
padding: "0px"
|
|
682
682
|
},
|
|
683
683
|
onClick: l
|
|
684
684
|
}, {
|
|
685
|
-
default: f(() => [...e[2] || (e[2] = [
|
|
685
|
+
default: f(() => [...e[2] || (e[2] = [C(" 忘记密码?", -1)])]),
|
|
686
686
|
_: 1
|
|
687
687
|
})]));
|
|
688
688
|
}
|
|
689
|
-
}), ce = /* @__PURE__ */ P(
|
|
689
|
+
}), ce = /* @__PURE__ */ P(ot, [["__scopeId", "data-v-9d5ae890"]]), st = {
|
|
690
690
|
class: "SignInPhone"
|
|
691
|
-
},
|
|
691
|
+
}, at = {
|
|
692
692
|
class: "content"
|
|
693
|
-
},
|
|
693
|
+
}, nt = {
|
|
694
694
|
class: "sendVerifyCodeItem"
|
|
695
|
-
},
|
|
695
|
+
}, lt = {
|
|
696
696
|
class: "handle"
|
|
697
|
-
},
|
|
697
|
+
}, rt = /* @__PURE__ */ I({
|
|
698
698
|
__name: "AuthkitSignInPhone",
|
|
699
699
|
props: {
|
|
700
700
|
size: {
|
|
@@ -711,7 +711,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
711
711
|
setup(g, {
|
|
712
712
|
emit: u
|
|
713
713
|
}) {
|
|
714
|
-
const n = u, o = g, v = re(), l =
|
|
714
|
+
const n = u, o = g, v = re(), l = $(() => !!v.OAuth), r = S(), e = S(!1), h = S(), i = S({
|
|
715
715
|
phone: void 0,
|
|
716
716
|
code: void 0
|
|
717
717
|
});
|
|
@@ -726,7 +726,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
726
726
|
e.value = !0;
|
|
727
727
|
const {
|
|
728
728
|
error: _
|
|
729
|
-
} = await
|
|
729
|
+
} = await T.verify.sms.send.post({
|
|
730
730
|
phone: i.value.phone,
|
|
731
731
|
purpose: "signIn"
|
|
732
732
|
});
|
|
@@ -742,7 +742,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
742
742
|
});
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
|
-
return (w, _) => (c(), b("div",
|
|
745
|
+
return (w, _) => (c(), b("div", st, [y("div", at, [s(t(x), {
|
|
746
746
|
ref_key: "formRef",
|
|
747
747
|
ref: h,
|
|
748
748
|
model: i.value,
|
|
@@ -778,7 +778,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
778
778
|
message: "请输入验证码"
|
|
779
779
|
}]
|
|
780
780
|
}, {
|
|
781
|
-
default: f(() => [y("div",
|
|
781
|
+
default: f(() => [y("div", nt, [s(t(V), {
|
|
782
782
|
modelValue: i.value.code,
|
|
783
783
|
"onUpdate:modelValue": _[1] || (_[1] = (U) => i.value.code = U),
|
|
784
784
|
placeholder: "请输入验证码",
|
|
@@ -794,29 +794,29 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
794
794
|
onSend: a
|
|
795
795
|
}, null, 8, ["size", "loading"])])]),
|
|
796
796
|
_: 1
|
|
797
|
-
}), y("div",
|
|
797
|
+
}), y("div", lt, [s(t(B), {
|
|
798
798
|
type: "primary",
|
|
799
799
|
loading: o.loading,
|
|
800
800
|
long: "",
|
|
801
801
|
size: o.size,
|
|
802
802
|
onClick: d
|
|
803
803
|
}, {
|
|
804
|
-
default: f(() => [..._[2] || (_[2] = [
|
|
804
|
+
default: f(() => [..._[2] || (_[2] = [C(" 登录 ", -1)])]),
|
|
805
805
|
_: 1
|
|
806
806
|
}, 8, ["loading", "size"])])]),
|
|
807
807
|
_: 1
|
|
808
|
-
}, 8, ["model", "size"])]), l.value ?
|
|
808
|
+
}, 8, ["model", "size"])]), l.value ? j(w.$slots, "OAuth", {
|
|
809
809
|
key: 0
|
|
810
|
-
}, void 0, !0) :
|
|
810
|
+
}, void 0, !0) : z("", !0), s(ce, {
|
|
811
811
|
onSwitchSignUp: p,
|
|
812
812
|
onSwitchResetPassword: m
|
|
813
813
|
})]));
|
|
814
814
|
}
|
|
815
|
-
}),
|
|
815
|
+
}), ut = /* @__PURE__ */ P(rt, [["__scopeId", "data-v-723d4155"]]), dt = {
|
|
816
816
|
class: "SignInEmailCode"
|
|
817
|
-
},
|
|
817
|
+
}, ct = {
|
|
818
818
|
class: "sendVerifyCodeItem"
|
|
819
|
-
},
|
|
819
|
+
}, pt = /* @__PURE__ */ I({
|
|
820
820
|
__name: "AuthkitSignInEmailCode",
|
|
821
821
|
props: {
|
|
822
822
|
size: {
|
|
@@ -844,7 +844,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
844
844
|
const {
|
|
845
845
|
data: m,
|
|
846
846
|
error: a
|
|
847
|
-
} = await
|
|
847
|
+
} = await T.verify.email.retry.post({
|
|
848
848
|
email: e.value.email,
|
|
849
849
|
purpose: "signIn"
|
|
850
850
|
});
|
|
@@ -861,7 +861,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
861
861
|
});
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
|
-
return (p, m) => (c(), b("div",
|
|
864
|
+
return (p, m) => (c(), b("div", dt, [s(t(x), {
|
|
865
865
|
ref_key: "formRef",
|
|
866
866
|
ref: r,
|
|
867
867
|
model: e.value,
|
|
@@ -894,7 +894,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
894
894
|
message: "请输入验证码"
|
|
895
895
|
}]
|
|
896
896
|
}, {
|
|
897
|
-
default: f(() => [y("div",
|
|
897
|
+
default: f(() => [y("div", ct, [s(t(V), {
|
|
898
898
|
modelValue: e.value.code,
|
|
899
899
|
"onUpdate:modelValue": m[1] || (m[1] = (a) => e.value.code = a),
|
|
900
900
|
placeholder: "请输入验证码",
|
|
@@ -917,18 +917,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
917
917
|
size: o.size,
|
|
918
918
|
onClick: i
|
|
919
919
|
}, {
|
|
920
|
-
default: f(() => [...m[2] || (m[2] = [
|
|
920
|
+
default: f(() => [...m[2] || (m[2] = [C(" 登录 ", -1)])]),
|
|
921
921
|
_: 1
|
|
922
922
|
}, 8, ["loading", "size"])]),
|
|
923
923
|
_: 1
|
|
924
924
|
}, 8, ["model", "size"])]));
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
926
|
+
}), mt = /* @__PURE__ */ P(pt, [["__scopeId", "data-v-7d6e80be"]]), ft = {
|
|
927
927
|
class: "SignIn"
|
|
928
|
-
},
|
|
928
|
+
}, vt = {
|
|
929
929
|
key: 0,
|
|
930
930
|
class: "tabsContainer"
|
|
931
|
-
},
|
|
931
|
+
}, gt = /* @__PURE__ */ I({
|
|
932
932
|
__name: "AuthkitSignIn",
|
|
933
933
|
props: {
|
|
934
934
|
size: {
|
|
@@ -945,9 +945,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
945
945
|
setup(g, {
|
|
946
946
|
emit: u
|
|
947
947
|
}) {
|
|
948
|
-
const n = u, o = g, v = re(), l =
|
|
948
|
+
const n = u, o = g, v = re(), l = $(() => !!v.OAuth), {
|
|
949
949
|
appsData: r
|
|
950
|
-
} =
|
|
950
|
+
} = E(), e = $(() => r.value.authMethods), h = $(() => {
|
|
951
951
|
const d = [];
|
|
952
952
|
return (e.value.login.emailPassword || e.value.login.phonePassword) && d.push({
|
|
953
953
|
key: "password",
|
|
@@ -976,11 +976,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
976
976
|
...d
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
|
-
return (d, w) => (c(), b("div",
|
|
979
|
+
return (d, w) => (c(), b("div", ft, [h.value.length > 1 ? (c(), b("div", vt, [s(t(oe), {
|
|
980
980
|
"active-key": i.value,
|
|
981
981
|
"onUpdate:activeKey": w[0] || (w[0] = (_) => i.value = _)
|
|
982
982
|
}, {
|
|
983
|
-
default: f(() => [(c(!0), b(
|
|
983
|
+
default: f(() => [(c(!0), b(N, null, te(h.value, (_) => (c(), k(t(se), {
|
|
984
984
|
key: _.key,
|
|
985
985
|
title: _.title
|
|
986
986
|
}, null, 8, ["title"]))), 128))]),
|
|
@@ -990,39 +990,39 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
990
990
|
style: {
|
|
991
991
|
margin: "0"
|
|
992
992
|
}
|
|
993
|
-
})])) :
|
|
993
|
+
})])) : z("", !0), i.value === "password" && (e.value.login.emailPassword || e.value.login.phonePassword) ? (c(), k(et, {
|
|
994
994
|
key: 1,
|
|
995
995
|
loading: o.loading,
|
|
996
996
|
size: o.size,
|
|
997
997
|
"allow-phone": e.value.login.phonePassword,
|
|
998
998
|
onSubmit: a
|
|
999
|
-
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (c(), k(
|
|
999
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (c(), k(ut, {
|
|
1000
1000
|
key: 2,
|
|
1001
1001
|
loading: o.loading,
|
|
1002
1002
|
size: o.size,
|
|
1003
1003
|
onSubmit: a
|
|
1004
|
-
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (c(), k(
|
|
1004
|
+
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (c(), k(mt, {
|
|
1005
1005
|
key: 3,
|
|
1006
1006
|
loading: o.loading,
|
|
1007
1007
|
size: o.size,
|
|
1008
1008
|
onSubmit: a
|
|
1009
|
-
}, null, 8, ["loading", "size"])) :
|
|
1009
|
+
}, null, 8, ["loading", "size"])) : z("", !0), l.value ? j(d.$slots, "OAuth", {
|
|
1010
1010
|
key: 4
|
|
1011
|
-
}, void 0, !0) :
|
|
1011
|
+
}, void 0, !0) : z("", !0), s(ce, {
|
|
1012
1012
|
"show-sign-up": e.value.signUp.email || e.value.signUp.phone,
|
|
1013
1013
|
onSwitchSignUp: p,
|
|
1014
1014
|
onSwitchResetPassword: m
|
|
1015
1015
|
}, null, 8, ["show-sign-up"])]));
|
|
1016
1016
|
}
|
|
1017
|
-
}),
|
|
1017
|
+
}), ht = /* @__PURE__ */ P(gt, [["__scopeId", "data-v-08b42828"]]), yt = {
|
|
1018
1018
|
class: "SignUpPhone"
|
|
1019
|
-
},
|
|
1019
|
+
}, wt = {
|
|
1020
1020
|
class: "content"
|
|
1021
|
-
},
|
|
1021
|
+
}, _t = {
|
|
1022
1022
|
class: "sendVerifyCodeItem"
|
|
1023
|
-
},
|
|
1023
|
+
}, bt = {
|
|
1024
1024
|
class: "handle"
|
|
1025
|
-
},
|
|
1025
|
+
}, St = /* @__PURE__ */ I({
|
|
1026
1026
|
__name: "AuthkitSignUpPhone",
|
|
1027
1027
|
props: {
|
|
1028
1028
|
size: {
|
|
@@ -1049,8 +1049,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1049
1049
|
code: void 0,
|
|
1050
1050
|
password: void 0,
|
|
1051
1051
|
confirmPassword: void 0,
|
|
1052
|
-
|
|
1053
|
-
})
|
|
1052
|
+
inviteCode: void 0
|
|
1053
|
+
});
|
|
1054
|
+
F(() => {
|
|
1055
|
+
const a = we();
|
|
1056
|
+
a && (e.value.inviteCode = a);
|
|
1057
|
+
});
|
|
1058
|
+
const h = [{
|
|
1054
1059
|
required: !0,
|
|
1055
1060
|
message: "请输入确认密码"
|
|
1056
1061
|
}, {
|
|
@@ -1066,7 +1071,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1066
1071
|
l.value = !0;
|
|
1067
1072
|
const {
|
|
1068
1073
|
error: d
|
|
1069
|
-
} = await
|
|
1074
|
+
} = await T.verify.sms.send.post({
|
|
1070
1075
|
phone: e.value.phone,
|
|
1071
1076
|
purpose: "signUp"
|
|
1072
1077
|
});
|
|
@@ -1080,11 +1085,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1080
1085
|
phone: e.value.phone,
|
|
1081
1086
|
code: e.value.code,
|
|
1082
1087
|
password: e.value.password,
|
|
1083
|
-
|
|
1088
|
+
inviteCode: e.value.inviteCode
|
|
1084
1089
|
});
|
|
1085
1090
|
});
|
|
1086
1091
|
}
|
|
1087
|
-
return (a, d) => (c(), b("div",
|
|
1092
|
+
return (a, d) => (c(), b("div", yt, [y("div", wt, [s(t(x), {
|
|
1088
1093
|
ref_key: "formRef",
|
|
1089
1094
|
ref: r,
|
|
1090
1095
|
model: e.value,
|
|
@@ -1120,7 +1125,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1120
1125
|
message: "请输入验证码"
|
|
1121
1126
|
}]
|
|
1122
1127
|
}, {
|
|
1123
|
-
default: f(() => [y("div",
|
|
1128
|
+
default: f(() => [y("div", _t, [s(t(V), {
|
|
1124
1129
|
modelValue: e.value.code,
|
|
1125
1130
|
"onUpdate:modelValue": d[1] || (d[1] = (w) => e.value.code = w),
|
|
1126
1131
|
placeholder: "请输入验证码",
|
|
@@ -1157,7 +1162,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1157
1162
|
autocomplete: "new-password"
|
|
1158
1163
|
}, null, 8, ["modelValue"])]),
|
|
1159
1164
|
_: 1
|
|
1160
|
-
}, 8, ["rules"])) :
|
|
1165
|
+
}, 8, ["rules"])) : z("", !0), o.requirePassword && e.value.password ? (c(), k(t(A), {
|
|
1161
1166
|
key: 1,
|
|
1162
1167
|
field: "confirmPassword",
|
|
1163
1168
|
label: "确认密码",
|
|
@@ -1172,29 +1177,29 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1172
1177
|
autocomplete: "new-password"
|
|
1173
1178
|
}, null, 8, ["modelValue"])]),
|
|
1174
1179
|
_: 1
|
|
1175
|
-
})) :
|
|
1176
|
-
field: "
|
|
1177
|
-
label: "
|
|
1180
|
+
})) : z("", !0), s(t(A), {
|
|
1181
|
+
field: "inviteCode",
|
|
1182
|
+
label: "邀请码",
|
|
1178
1183
|
"hide-label": "",
|
|
1179
1184
|
rules: [{
|
|
1180
1185
|
required: !1
|
|
1181
1186
|
}]
|
|
1182
1187
|
}, {
|
|
1183
1188
|
default: f(() => [s(t(V), {
|
|
1184
|
-
modelValue: e.value.
|
|
1185
|
-
"onUpdate:modelValue": d[4] || (d[4] = (w) => e.value.
|
|
1186
|
-
placeholder: "
|
|
1189
|
+
modelValue: e.value.inviteCode,
|
|
1190
|
+
"onUpdate:modelValue": d[4] || (d[4] = (w) => e.value.inviteCode = w),
|
|
1191
|
+
placeholder: "邀请码(可选)",
|
|
1187
1192
|
autocomplete: "off"
|
|
1188
1193
|
}, null, 8, ["modelValue"])]),
|
|
1189
1194
|
_: 1
|
|
1190
|
-
}), y("div",
|
|
1195
|
+
}), y("div", bt, [s(t(B), {
|
|
1191
1196
|
type: "primary",
|
|
1192
1197
|
loading: o.loading,
|
|
1193
1198
|
long: "",
|
|
1194
1199
|
size: o.size,
|
|
1195
1200
|
onClick: m
|
|
1196
1201
|
}, {
|
|
1197
|
-
default: f(() => [...d[5] || (d[5] = [
|
|
1202
|
+
default: f(() => [...d[5] || (d[5] = [C(" 注册 ", -1)])]),
|
|
1198
1203
|
_: 1
|
|
1199
1204
|
}, 8, ["loading", "size"])])]),
|
|
1200
1205
|
_: 1
|
|
@@ -1202,15 +1207,15 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1202
1207
|
onSwitchSignIn: i
|
|
1203
1208
|
})]));
|
|
1204
1209
|
}
|
|
1205
|
-
}),
|
|
1210
|
+
}), kt = /* @__PURE__ */ P(St, [["__scopeId", "data-v-47c89e83"]]), zt = {
|
|
1206
1211
|
class: "SignUp"
|
|
1207
|
-
},
|
|
1212
|
+
}, It = {
|
|
1208
1213
|
key: 0,
|
|
1209
1214
|
class: "tabsContainer"
|
|
1210
|
-
},
|
|
1215
|
+
}, Pt = {
|
|
1211
1216
|
key: 3,
|
|
1212
1217
|
class: "empty"
|
|
1213
|
-
},
|
|
1218
|
+
}, At = /* @__PURE__ */ I({
|
|
1214
1219
|
__name: "AuthkitSignUp",
|
|
1215
1220
|
props: {
|
|
1216
1221
|
size: {
|
|
@@ -1229,7 +1234,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1229
1234
|
}) {
|
|
1230
1235
|
const n = u, o = g, {
|
|
1231
1236
|
appsData: v
|
|
1232
|
-
} =
|
|
1237
|
+
} = E(), l = $(() => v.value.authMethods), r = $(() => {
|
|
1233
1238
|
const p = [];
|
|
1234
1239
|
return l.value.signUp.email && p.push({
|
|
1235
1240
|
key: "email",
|
|
@@ -1252,11 +1257,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1252
1257
|
...p
|
|
1253
1258
|
});
|
|
1254
1259
|
}
|
|
1255
|
-
return (p, m) => (c(), b("div",
|
|
1260
|
+
return (p, m) => (c(), b("div", zt, [r.value.length > 1 ? (c(), b("div", It, [s(t(oe), {
|
|
1256
1261
|
"active-key": e.value,
|
|
1257
1262
|
"onUpdate:activeKey": m[0] || (m[0] = (a) => e.value = a)
|
|
1258
1263
|
}, {
|
|
1259
|
-
default: f(() => [(c(!0), b(
|
|
1264
|
+
default: f(() => [(c(!0), b(N, null, te(r.value, (a) => (c(), k(t(se), {
|
|
1260
1265
|
key: a.key,
|
|
1261
1266
|
title: a.title
|
|
1262
1267
|
}, null, 8, ["title"]))), 128))]),
|
|
@@ -1266,23 +1271,23 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1266
1271
|
style: {
|
|
1267
1272
|
margin: "0"
|
|
1268
1273
|
}
|
|
1269
|
-
})])) :
|
|
1274
|
+
})])) : z("", !0), e.value === "email" && l.value.signUp.email ? (c(), k(_e, {
|
|
1270
1275
|
key: 1,
|
|
1271
1276
|
size: o.size,
|
|
1272
1277
|
loading: g.loading,
|
|
1273
1278
|
onSubmit: i
|
|
1274
|
-
}, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (c(), k(
|
|
1279
|
+
}, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (c(), k(kt, {
|
|
1275
1280
|
key: 2,
|
|
1276
1281
|
size: o.size,
|
|
1277
1282
|
loading: g.loading,
|
|
1278
1283
|
onSubmit: i,
|
|
1279
1284
|
onSwitchSignIn: h
|
|
1280
|
-
}, null, 8, ["size", "loading"])) : (c(), b("div",
|
|
1285
|
+
}, null, 8, ["size", "loading"])) : (c(), b("div", Pt, " 当前应用未开放用户注册 ")), e.value === "email" ? (c(), k(ne, {
|
|
1281
1286
|
key: 4,
|
|
1282
1287
|
onSwitchSignIn: h
|
|
1283
|
-
})) :
|
|
1288
|
+
})) : z("", !0)]));
|
|
1284
1289
|
}
|
|
1285
|
-
}),
|
|
1290
|
+
}), Vt = /* @__PURE__ */ P(At, [["__scopeId", "data-v-b8936231"]]), Ut = ["src"], Ct = /* @__PURE__ */ I({
|
|
1286
1291
|
__name: "AuthkitAuthTitle",
|
|
1287
1292
|
props: {
|
|
1288
1293
|
size: {
|
|
@@ -1304,9 +1309,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1304
1309
|
setup(g) {
|
|
1305
1310
|
const u = g, n = `${u.size}px`, o = `${u.fontSize}px`, v = `${u.lineHeight}px`, {
|
|
1306
1311
|
currentView: l
|
|
1307
|
-
} =
|
|
1312
|
+
} = H(), {
|
|
1308
1313
|
appsData: r
|
|
1309
|
-
} =
|
|
1314
|
+
} = E(), e = $(() => l.value === "signIn" ? `${r.value.name}登录` : l.value === "signUp" ? `${r.value.name}账号注册` : l.value === "resetPassword" ? `${r.value.name}密码重置` : "");
|
|
1310
1315
|
return (h, i) => (c(), b("div", {
|
|
1311
1316
|
class: "Title",
|
|
1312
1317
|
style: Q({
|
|
@@ -1320,13 +1325,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1320
1325
|
style: Q({
|
|
1321
1326
|
width: n
|
|
1322
1327
|
})
|
|
1323
|
-
}, null, 12,
|
|
1328
|
+
}, null, 12, Ut)) : z("", !0), y("span", null, O(e.value), 1), j(h.$slots, "default", {}, void 0, !0)], 4));
|
|
1324
1329
|
}
|
|
1325
|
-
}), pe = /* @__PURE__ */ P(
|
|
1330
|
+
}), pe = /* @__PURE__ */ P(Ct, [["__scopeId", "data-v-8ebe7939"]]), $t = {
|
|
1326
1331
|
class: "Auth"
|
|
1327
|
-
},
|
|
1332
|
+
}, Rt = {
|
|
1328
1333
|
class: "body"
|
|
1329
|
-
},
|
|
1334
|
+
}, qt = /* @__PURE__ */ I({
|
|
1330
1335
|
__name: "AuthkitAuth",
|
|
1331
1336
|
props: {
|
|
1332
1337
|
size: {
|
|
@@ -1353,18 +1358,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1353
1358
|
switchSignUp: m,
|
|
1354
1359
|
switchResetPassword: a,
|
|
1355
1360
|
switchSignIn: d
|
|
1356
|
-
} =
|
|
1361
|
+
} = H();
|
|
1357
1362
|
function w() {
|
|
1358
1363
|
o("toPrivacyPolicy");
|
|
1359
1364
|
}
|
|
1360
1365
|
function _() {
|
|
1361
1366
|
o("toUserServiceAgreement");
|
|
1362
1367
|
}
|
|
1363
|
-
return (U, R) => (c(), b("div",
|
|
1368
|
+
return (U, R) => (c(), b("div", $t, [g.showTitle ? (c(), k(pe, {
|
|
1364
1369
|
key: 0,
|
|
1365
1370
|
size: 32,
|
|
1366
1371
|
"font-size": 20
|
|
1367
|
-
})) :
|
|
1372
|
+
})) : z("", !0), y("div", Rt, [t(e) === "signIn" ? (c(), k(ht, {
|
|
1368
1373
|
key: 0,
|
|
1369
1374
|
size: n.size,
|
|
1370
1375
|
loading: t(h),
|
|
@@ -1372,28 +1377,28 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1372
1377
|
onSwitchResetPassword: t(a),
|
|
1373
1378
|
onSubmit: R[0] || (R[0] = (q) => t(v)(q))
|
|
1374
1379
|
}, {
|
|
1375
|
-
OAuth: f(() => [s(
|
|
1380
|
+
OAuth: f(() => [s(Ce, {
|
|
1376
1381
|
size: n.size
|
|
1377
1382
|
}, null, 8, ["size"])]),
|
|
1378
1383
|
_: 1
|
|
1379
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (c(), k(
|
|
1384
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (c(), k(Vt, {
|
|
1380
1385
|
key: 1,
|
|
1381
1386
|
size: n.size,
|
|
1382
1387
|
loading: t(i),
|
|
1383
1388
|
onSwitchSignIn: t(d),
|
|
1384
1389
|
onSubmit: R[1] || (R[1] = (q) => t(l)(q))
|
|
1385
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (c(), k(
|
|
1390
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (c(), k(je, {
|
|
1386
1391
|
key: 2,
|
|
1387
1392
|
size: n.size,
|
|
1388
1393
|
loading: t(p),
|
|
1389
1394
|
onSwitchSignIn: t(d),
|
|
1390
1395
|
onSubmit: R[2] || (R[2] = (q) => t(r)(q))
|
|
1391
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) :
|
|
1396
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : z("", !0), s(Je, {
|
|
1392
1397
|
onToPrivacyPolicy: w,
|
|
1393
1398
|
onToUserServiceAgreement: _
|
|
1394
1399
|
})])]));
|
|
1395
1400
|
}
|
|
1396
|
-
}),
|
|
1401
|
+
}), Bt = /* @__PURE__ */ P(qt, [["__scopeId", "data-v-c04bb63f"]]), Tt = /* @__PURE__ */ I({
|
|
1397
1402
|
__name: "AuthkitAuthModal",
|
|
1398
1403
|
props: {
|
|
1399
1404
|
size: {
|
|
@@ -1406,12 +1411,12 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1406
1411
|
}) {
|
|
1407
1412
|
const n = u, {
|
|
1408
1413
|
onSignIn: o
|
|
1409
|
-
} =
|
|
1414
|
+
} = H(), {
|
|
1410
1415
|
isOpen: v,
|
|
1411
1416
|
close: l
|
|
1412
1417
|
} = ge();
|
|
1413
1418
|
let r = null;
|
|
1414
|
-
|
|
1419
|
+
F(() => {
|
|
1415
1420
|
r = o(() => l());
|
|
1416
1421
|
}), ie(() => {
|
|
1417
1422
|
r == null || r(), r = null;
|
|
@@ -1428,22 +1433,22 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1428
1433
|
"mask-closable": !1,
|
|
1429
1434
|
"title-align": "center",
|
|
1430
1435
|
"unmount-on-close": "",
|
|
1431
|
-
width:
|
|
1436
|
+
width: t(ke),
|
|
1432
1437
|
"modal-class": "SignInModalClass",
|
|
1433
1438
|
"onUpdate:visible": e,
|
|
1434
1439
|
onClose: h
|
|
1435
1440
|
}, {
|
|
1436
1441
|
title: f(() => [s(pe)]),
|
|
1437
|
-
default: f(() => [s(
|
|
1442
|
+
default: f(() => [s(Bt, {
|
|
1438
1443
|
"show-title": !1,
|
|
1439
1444
|
size: g.size,
|
|
1440
1445
|
onToPrivacyPolicy: p[0] || (p[0] = (m) => n("toPrivacyPolicy")),
|
|
1441
1446
|
onToUserServiceAgreement: p[1] || (p[1] = (m) => n("toUserServiceAgreement"))
|
|
1442
1447
|
}, null, 8, ["size"])]),
|
|
1443
1448
|
_: 1
|
|
1444
|
-
}, 8, ["visible"]));
|
|
1449
|
+
}, 8, ["visible", "width"]));
|
|
1445
1450
|
}
|
|
1446
|
-
}),
|
|
1451
|
+
}), Ot = /* @__PURE__ */ P(Tt, [["__scopeId", "data-v-62ca7f24"]]), xt = /* @__PURE__ */ I({
|
|
1447
1452
|
__name: "AuthkitOAuthCallbackProvider",
|
|
1448
1453
|
props: {
|
|
1449
1454
|
bindIdentityRedirect: {
|
|
@@ -1461,7 +1466,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1461
1466
|
setup(g) {
|
|
1462
1467
|
const u = g, n = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
|
|
1463
1468
|
completeSignIn: o
|
|
1464
|
-
} =
|
|
1469
|
+
} = H(), {
|
|
1465
1470
|
fetchUserProfile: v
|
|
1466
1471
|
} = J();
|
|
1467
1472
|
function l(i) {
|
|
@@ -1508,11 +1513,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1508
1513
|
const _ = e();
|
|
1509
1514
|
_ && (window.location.href = _);
|
|
1510
1515
|
}
|
|
1511
|
-
return
|
|
1516
|
+
return F(() => {
|
|
1512
1517
|
h();
|
|
1513
1518
|
}), (i, p) => null;
|
|
1514
1519
|
}
|
|
1515
|
-
}),
|
|
1520
|
+
}), Vi = /* @__PURE__ */ I({
|
|
1516
1521
|
__name: "AuthkitProvider",
|
|
1517
1522
|
props: {
|
|
1518
1523
|
config: {},
|
|
@@ -1557,37 +1562,37 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1557
1562
|
restoreSession: v,
|
|
1558
1563
|
onSignIn: l,
|
|
1559
1564
|
onSignOut: r
|
|
1560
|
-
} =
|
|
1565
|
+
} = H(), {
|
|
1561
1566
|
fetchUserProfile: e,
|
|
1562
1567
|
clearUserProfile: h
|
|
1563
1568
|
} = J(), {
|
|
1564
1569
|
appsAuthPageInfoApi: i
|
|
1565
|
-
} =
|
|
1570
|
+
} = E(), p = l(() => {
|
|
1566
1571
|
e();
|
|
1567
1572
|
}), m = r(() => {
|
|
1568
1573
|
h();
|
|
1569
1574
|
});
|
|
1570
|
-
return
|
|
1575
|
+
return F(async () => {
|
|
1571
1576
|
n.fetchAppInfo && await i(), n.restoreSession && v() ? e() : h();
|
|
1572
1577
|
}), ie(() => {
|
|
1573
1578
|
p(), m();
|
|
1574
|
-
}), (a, d) => (c(), b(
|
|
1579
|
+
}), (a, d) => (c(), b(N, null, [j(a.$slots, "default"), n.handleOAuthCallback ? (c(), k(xt, {
|
|
1575
1580
|
key: 0,
|
|
1576
1581
|
"bind-identity-redirect": n.bindIdentityRedirect,
|
|
1577
1582
|
"close-popup-on-bind-success": n.closePopupOnBindSuccess,
|
|
1578
1583
|
"restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
|
|
1579
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) :
|
|
1584
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : z("", !0), n.showAuthModal ? (c(), k(Ot, {
|
|
1580
1585
|
key: 1,
|
|
1581
1586
|
size: n.authModalSize,
|
|
1582
1587
|
onToPrivacyPolicy: d[0] || (d[0] = (w) => o("toPrivacyPolicy")),
|
|
1583
1588
|
onToUserServiceAgreement: d[1] || (d[1] = (w) => o("toUserServiceAgreement"))
|
|
1584
|
-
}, null, 8, ["size"])) :
|
|
1589
|
+
}, null, 8, ["size"])) : z("", !0)], 64));
|
|
1585
1590
|
}
|
|
1586
|
-
}),
|
|
1591
|
+
}), Lt = {
|
|
1587
1592
|
class: "header"
|
|
1588
|
-
},
|
|
1593
|
+
}, Mt = ["href"], Ft = {
|
|
1589
1594
|
class: "container"
|
|
1590
|
-
},
|
|
1595
|
+
}, Ht = /* @__PURE__ */ I({
|
|
1591
1596
|
__name: "AuthkitAuthContainer",
|
|
1592
1597
|
props: {
|
|
1593
1598
|
applicationLogoUrl: {
|
|
@@ -1630,7 +1635,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1630
1635
|
}
|
|
1631
1636
|
},
|
|
1632
1637
|
setup(g) {
|
|
1633
|
-
const u = g, n =
|
|
1638
|
+
const u = g, n = $(() => u.backgroundType === "color" ? {
|
|
1634
1639
|
backgroundColor: u.backgroundColor
|
|
1635
1640
|
} : {
|
|
1636
1641
|
backgroundImage: `url(${u.backgroundImage})`
|
|
@@ -1638,7 +1643,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1638
1643
|
return (o, v) => (c(), b("div", {
|
|
1639
1644
|
class: "auth",
|
|
1640
1645
|
style: Q(n.value)
|
|
1641
|
-
}, [y("div",
|
|
1646
|
+
}, [y("div", Lt, [u.name ? (c(), b("a", {
|
|
1642
1647
|
key: 0,
|
|
1643
1648
|
href: u.appHomePage,
|
|
1644
1649
|
target: "_self",
|
|
@@ -1646,22 +1651,22 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1646
1651
|
style: Q({
|
|
1647
1652
|
color: u.linkColor
|
|
1648
1653
|
})
|
|
1649
|
-
}, " 返回主页 ", 12,
|
|
1654
|
+
}, " 返回主页 ", 12, Mt)) : z("", !0)]), y("div", Ft, [j(o.$slots, "default", {}, void 0, !0)])], 4));
|
|
1650
1655
|
}
|
|
1651
|
-
}),
|
|
1656
|
+
}), Ui = /* @__PURE__ */ P(Ht, [["__scopeId", "data-v-0e13d3ff"]]), Et = {
|
|
1652
1657
|
class: "box"
|
|
1653
|
-
}, Ht = {
|
|
1654
|
-
class: "title"
|
|
1655
1658
|
}, Dt = {
|
|
1659
|
+
class: "title"
|
|
1660
|
+
}, Gt = {
|
|
1656
1661
|
class: "content"
|
|
1657
|
-
},
|
|
1662
|
+
}, Nt = {
|
|
1658
1663
|
class: "redirect"
|
|
1659
|
-
},
|
|
1664
|
+
}, jt = {
|
|
1660
1665
|
style: {
|
|
1661
1666
|
"font-weight": "bold",
|
|
1662
1667
|
"font-size": "12px"
|
|
1663
1668
|
}
|
|
1664
|
-
},
|
|
1669
|
+
}, Kt = /* @__PURE__ */ I({
|
|
1665
1670
|
__name: "AuthkitAuthorize",
|
|
1666
1671
|
props: {
|
|
1667
1672
|
size: {
|
|
@@ -1720,7 +1725,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1720
1725
|
async function v() {
|
|
1721
1726
|
const {
|
|
1722
1727
|
data: r
|
|
1723
|
-
} = await
|
|
1728
|
+
} = await T.apps.authPageInfo.post({});
|
|
1724
1729
|
r && (o.value = {
|
|
1725
1730
|
appKey: "",
|
|
1726
1731
|
name: r.name,
|
|
@@ -1734,7 +1739,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1734
1739
|
u.value = !0;
|
|
1735
1740
|
const {
|
|
1736
1741
|
data: r
|
|
1737
|
-
} = await
|
|
1742
|
+
} = await T.oauth2.authorize.post({
|
|
1738
1743
|
client_id: n.clientId,
|
|
1739
1744
|
response_type: n.responseType,
|
|
1740
1745
|
scope: n.scope,
|
|
@@ -1743,7 +1748,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1743
1748
|
});
|
|
1744
1749
|
u.value = !1, r && (window.location = r.authorizeUrl);
|
|
1745
1750
|
}
|
|
1746
|
-
return (r, e) => (c(), b("div",
|
|
1751
|
+
return (r, e) => (c(), b("div", Et, [y("div", Dt, O(`授权 ${o.value.name}`), 1), y("div", Gt, [s(t(ve), null, {
|
|
1747
1752
|
default: f(() => [s(t(X), null, {
|
|
1748
1753
|
default: f(() => {
|
|
1749
1754
|
var h;
|
|
@@ -1753,7 +1758,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1753
1758
|
}, {
|
|
1754
1759
|
avatar: f(() => {
|
|
1755
1760
|
var i;
|
|
1756
|
-
return [s(t(
|
|
1761
|
+
return [s(t(G), {
|
|
1757
1762
|
shape: "square",
|
|
1758
1763
|
"image-url": (i = n.userInfo) == null ? void 0 : i.avatar
|
|
1759
1764
|
}, null, 8, ["image-url"])];
|
|
@@ -1767,7 +1772,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1767
1772
|
title: "公开信息",
|
|
1768
1773
|
description: "头像、昵称"
|
|
1769
1774
|
}, {
|
|
1770
|
-
avatar: f(() => [s(t(
|
|
1775
|
+
avatar: f(() => [s(t(G), {
|
|
1771
1776
|
shape: "square"
|
|
1772
1777
|
}, {
|
|
1773
1778
|
default: f(() => [...e[0] || (e[0] = [y("img", {
|
|
@@ -1784,7 +1789,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1784
1789
|
title: "个人用户数据",
|
|
1785
1790
|
description: "电子邮件地址"
|
|
1786
1791
|
}, {
|
|
1787
|
-
avatar: f(() => [s(t(
|
|
1792
|
+
avatar: f(() => [s(t(G), {
|
|
1788
1793
|
shape: "square"
|
|
1789
1794
|
}, {
|
|
1790
1795
|
default: f(() => [...e[1] || (e[1] = [y("img", {
|
|
@@ -1804,24 +1809,24 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1804
1809
|
loading: u.value,
|
|
1805
1810
|
onClick: l
|
|
1806
1811
|
}, {
|
|
1807
|
-
default: f(() => [...e[2] || (e[2] = [
|
|
1812
|
+
default: f(() => [...e[2] || (e[2] = [C(" 授权 ", -1)])]),
|
|
1808
1813
|
_: 1
|
|
1809
|
-
}, 8, ["size", "loading"]), y("div",
|
|
1814
|
+
}, 8, ["size", "loading"]), y("div", Nt, [e[3] || (e[3] = y("div", {
|
|
1810
1815
|
class: "redirect-hint"
|
|
1811
|
-
}, "授权后将跳转至", -1)), y("div",
|
|
1816
|
+
}, "授权后将跳转至", -1)), y("div", jt, O(o.value.authorizationCallback), 1)])])]));
|
|
1812
1817
|
}
|
|
1813
|
-
}),
|
|
1818
|
+
}), Ci = /* @__PURE__ */ P(Kt, [["__scopeId", "data-v-75591826"]]), Wt = {
|
|
1814
1819
|
class: "oauth-callback"
|
|
1815
|
-
},
|
|
1820
|
+
}, Qt = {
|
|
1816
1821
|
key: 0,
|
|
1817
1822
|
class: "callback-loading"
|
|
1818
|
-
},
|
|
1823
|
+
}, Jt = {
|
|
1819
1824
|
key: 1,
|
|
1820
1825
|
class: "callback-error"
|
|
1821
|
-
},
|
|
1826
|
+
}, Xt = {
|
|
1822
1827
|
key: 2,
|
|
1823
1828
|
class: "callback-success"
|
|
1824
|
-
},
|
|
1829
|
+
}, Yt = /* @__PURE__ */ I({
|
|
1825
1830
|
__name: "AuthkitOauthCallback",
|
|
1826
1831
|
props: {
|
|
1827
1832
|
defaultRedirect: {},
|
|
@@ -1835,7 +1840,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1835
1840
|
const n = g, o = u, v = S(!0), l = S(""), r = S("登录成功,正在跳转..."), {
|
|
1836
1841
|
completeSignIn: e,
|
|
1837
1842
|
restoreSession: h
|
|
1838
|
-
} =
|
|
1843
|
+
} = H(), {
|
|
1839
1844
|
fetchUserProfile: i
|
|
1840
1845
|
} = J();
|
|
1841
1846
|
async function p() {
|
|
@@ -1893,7 +1898,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1893
1898
|
const a = sessionStorage.getItem("auth_redirect");
|
|
1894
1899
|
sessionStorage.removeItem("auth_redirect"), window.location.href = a || n.defaultRedirect || "/";
|
|
1895
1900
|
}
|
|
1896
|
-
return
|
|
1901
|
+
return F(() => {
|
|
1897
1902
|
const a = new URLSearchParams(window.location.search);
|
|
1898
1903
|
if (a.has("token") || a.has("error") || a.has("bindSuccess"))
|
|
1899
1904
|
p();
|
|
@@ -1902,29 +1907,29 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1902
1907
|
sessionStorage.removeItem("auth_redirect"), window.location.href = d || n.defaultRedirect || "/";
|
|
1903
1908
|
} else
|
|
1904
1909
|
l.value = "无效的访问", v.value = !1;
|
|
1905
|
-
}), (a, d) => (c(), b("div",
|
|
1910
|
+
}), (a, d) => (c(), b("div", Wt, [v.value ? (c(), b("div", Qt, [d[0] || (d[0] = y("div", {
|
|
1906
1911
|
class: "spinner"
|
|
1907
|
-
}, null, -1)), y("p", null,
|
|
1912
|
+
}, null, -1)), y("p", null, O(g.loadingText), 1)])) : l.value ? (c(), b("div", Jt, [d[1] || (d[1] = y("div", {
|
|
1908
1913
|
class: "error-icon"
|
|
1909
|
-
}, "✕", -1)), d[2] || (d[2] = y("h2", null, "登录失败", -1)), y("p", null,
|
|
1914
|
+
}, "✕", -1)), d[2] || (d[2] = y("h2", null, "登录失败", -1)), y("p", null, O(l.value), 1), y("button", {
|
|
1910
1915
|
class: "retry-btn",
|
|
1911
1916
|
onClick: m
|
|
1912
|
-
}, "返回重试")])) : (c(), b("div",
|
|
1917
|
+
}, "返回重试")])) : (c(), b("div", Xt, [d[3] || (d[3] = y("div", {
|
|
1913
1918
|
class: "success-icon"
|
|
1914
|
-
}, "✓", -1)), y("p", null,
|
|
1919
|
+
}, "✓", -1)), y("p", null, O(r.value), 1)]))]));
|
|
1915
1920
|
}
|
|
1916
|
-
}),
|
|
1921
|
+
}), $i = /* @__PURE__ */ P(Yt, [["__scopeId", "data-v-4b4b59a1"]]), Zt = {
|
|
1917
1922
|
class: "BindEmail"
|
|
1918
|
-
},
|
|
1923
|
+
}, ei = {
|
|
1919
1924
|
class: "content"
|
|
1920
|
-
},
|
|
1925
|
+
}, ti = {
|
|
1921
1926
|
class: "sendVerifyCodeItem"
|
|
1922
|
-
},
|
|
1927
|
+
}, ii = {
|
|
1923
1928
|
class: "handle"
|
|
1924
|
-
},
|
|
1929
|
+
}, oi = {
|
|
1925
1930
|
key: 0,
|
|
1926
1931
|
class: "skip"
|
|
1927
|
-
},
|
|
1932
|
+
}, si = /* @__PURE__ */ I({
|
|
1928
1933
|
__name: "AuthkitBindEmail",
|
|
1929
1934
|
props: {
|
|
1930
1935
|
size: {
|
|
@@ -1956,7 +1961,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1956
1961
|
l.value = !0;
|
|
1957
1962
|
const {
|
|
1958
1963
|
data: a
|
|
1959
|
-
} = await
|
|
1964
|
+
} = await T.verify.email.retry.post({
|
|
1960
1965
|
email: e.value.email,
|
|
1961
1966
|
purpose: "bindEmail"
|
|
1962
1967
|
});
|
|
@@ -1975,13 +1980,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1975
1980
|
function p() {
|
|
1976
1981
|
n("skip");
|
|
1977
1982
|
}
|
|
1978
|
-
return (m, a) => (c(), b("div",
|
|
1983
|
+
return (m, a) => (c(), b("div", Zt, [a[4] || (a[4] = y("div", {
|
|
1979
1984
|
class: "header"
|
|
1980
1985
|
}, [y("h3", {
|
|
1981
1986
|
class: "title"
|
|
1982
1987
|
}, "绑定邮箱"), y("p", {
|
|
1983
1988
|
class: "subtitle"
|
|
1984
|
-
}, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div",
|
|
1989
|
+
}, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", ei, [s(t(x), {
|
|
1985
1990
|
ref_key: "formRef",
|
|
1986
1991
|
ref: r,
|
|
1987
1992
|
model: e.value,
|
|
@@ -2017,7 +2022,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2017
2022
|
message: "请输入验证码"
|
|
2018
2023
|
}]
|
|
2019
2024
|
}, {
|
|
2020
|
-
default: f(() => [y("div",
|
|
2025
|
+
default: f(() => [y("div", ti, [s(t(V), {
|
|
2021
2026
|
modelValue: e.value.userToken,
|
|
2022
2027
|
"onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.userToken = d),
|
|
2023
2028
|
placeholder: "请输入验证码",
|
|
@@ -2033,31 +2038,31 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2033
2038
|
onSend: h
|
|
2034
2039
|
}, null, 8, ["size", "loading"])])]),
|
|
2035
2040
|
_: 1
|
|
2036
|
-
}), y("div",
|
|
2041
|
+
}), y("div", ii, [s(t(B), {
|
|
2037
2042
|
type: "primary",
|
|
2038
2043
|
loading: o.loading,
|
|
2039
2044
|
long: "",
|
|
2040
2045
|
size: o.size,
|
|
2041
2046
|
onClick: i
|
|
2042
2047
|
}, {
|
|
2043
|
-
default: f(() => [...a[2] || (a[2] = [
|
|
2048
|
+
default: f(() => [...a[2] || (a[2] = [C(" 绑定邮箱 ", -1)])]),
|
|
2044
2049
|
_: 1
|
|
2045
2050
|
}, 8, ["loading", "size"])])]),
|
|
2046
2051
|
_: 1
|
|
2047
|
-
}, 8, ["model", "size"])]), o.showSkip ? (c(), b("div",
|
|
2052
|
+
}, 8, ["model", "size"])]), o.showSkip ? (c(), b("div", oi, [s(t(M), {
|
|
2048
2053
|
onClick: p
|
|
2049
2054
|
}, {
|
|
2050
|
-
default: f(() => [...a[3] || (a[3] = [
|
|
2055
|
+
default: f(() => [...a[3] || (a[3] = [C("稍后绑定", -1)])]),
|
|
2051
2056
|
_: 1
|
|
2052
|
-
})])) :
|
|
2057
|
+
})])) : z("", !0)]));
|
|
2053
2058
|
}
|
|
2054
|
-
}),
|
|
2059
|
+
}), Ri = /* @__PURE__ */ P(si, [["__scopeId", "data-v-2432c885"]]), ai = {
|
|
2055
2060
|
class: "oauth-binding-account"
|
|
2056
|
-
},
|
|
2061
|
+
}, ni = {
|
|
2057
2062
|
class: "oauth-binding-account__info"
|
|
2058
|
-
},
|
|
2063
|
+
}, li = {
|
|
2059
2064
|
class: "oauth-binding-account__name"
|
|
2060
|
-
},
|
|
2065
|
+
}, ri = /* @__PURE__ */ I({
|
|
2061
2066
|
__name: "AuthkitGithubBinding",
|
|
2062
2067
|
props: {
|
|
2063
2068
|
size: {
|
|
@@ -2071,7 +2076,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2071
2076
|
fetchUserProfile: n
|
|
2072
2077
|
} = J(), o = S("hidden"), v = S(!1);
|
|
2073
2078
|
let l;
|
|
2074
|
-
const r = g, e =
|
|
2079
|
+
const r = g, e = $(() => {
|
|
2075
2080
|
var w, _, U;
|
|
2076
2081
|
return ((_ = (w = u.value) == null ? void 0 : w.github) == null ? void 0 : _.avatar_url) || ((U = u.value) == null ? void 0 : U.avatar) || "";
|
|
2077
2082
|
}), {
|
|
@@ -2088,7 +2093,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2088
2093
|
}
|
|
2089
2094
|
const {
|
|
2090
2095
|
data: _
|
|
2091
|
-
} = await
|
|
2096
|
+
} = await T.oauth.github.login.get({
|
|
2092
2097
|
appId: w,
|
|
2093
2098
|
mode: "bind",
|
|
2094
2099
|
redirectUri: h()
|
|
@@ -2103,7 +2108,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2103
2108
|
async function m() {
|
|
2104
2109
|
const {
|
|
2105
2110
|
error: w
|
|
2106
|
-
} = await
|
|
2111
|
+
} = await T.users.unbind.oauth.post({
|
|
2107
2112
|
provider: "github"
|
|
2108
2113
|
});
|
|
2109
2114
|
w || (Z.success("解绑成功"), o.value = "hidden", n());
|
|
@@ -2114,13 +2119,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2114
2119
|
function d() {
|
|
2115
2120
|
v.value && n();
|
|
2116
2121
|
}
|
|
2117
|
-
return
|
|
2122
|
+
return F(() => {
|
|
2118
2123
|
u.value || n(), l = setInterval(d, 1e3);
|
|
2119
2124
|
}), ie(() => {
|
|
2120
2125
|
l && clearInterval(l);
|
|
2121
2126
|
}), (w, _) => {
|
|
2122
2127
|
var U, R, q;
|
|
2123
|
-
return c(), b(
|
|
2128
|
+
return c(), b(N, null, [!((U = t(u)) != null && U.github) && o.value === "hidden" ? (c(), k(t(le), {
|
|
2124
2129
|
key: 0,
|
|
2125
2130
|
title: "绑定GitHub"
|
|
2126
2131
|
}, {
|
|
@@ -2129,12 +2134,12 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2129
2134
|
type: "primary",
|
|
2130
2135
|
onClick: _[0] || (_[0] = (L) => i("bind"))
|
|
2131
2136
|
}, {
|
|
2132
|
-
default: f(() => [..._[2] || (_[2] = [
|
|
2137
|
+
default: f(() => [..._[2] || (_[2] = [C(" 绑定GitHub ", -1)])]),
|
|
2133
2138
|
_: 1
|
|
2134
2139
|
}, 8, ["size"])]),
|
|
2135
|
-
default: f(() => [_[3] || (_[3] =
|
|
2140
|
+
default: f(() => [_[3] || (_[3] = C(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2136
2141
|
_: 1
|
|
2137
|
-
})) :
|
|
2142
|
+
})) : z("", !0), (R = t(u)) != null && R.github && o.value === "hidden" ? (c(), k(t(le), {
|
|
2138
2143
|
key: 1,
|
|
2139
2144
|
title: "解绑GitHub"
|
|
2140
2145
|
}, {
|
|
@@ -2143,17 +2148,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2143
2148
|
type: "primary",
|
|
2144
2149
|
onClick: _[1] || (_[1] = (L) => i("unbind"))
|
|
2145
2150
|
}, {
|
|
2146
|
-
default: f(() => [..._[5] || (_[5] = [
|
|
2151
|
+
default: f(() => [..._[5] || (_[5] = [C(" 解绑GitHub ", -1)])]),
|
|
2147
2152
|
_: 1
|
|
2148
2153
|
}, 8, ["size"])]),
|
|
2149
2154
|
default: f(() => {
|
|
2150
2155
|
var L, K;
|
|
2151
|
-
return [y("div",
|
|
2156
|
+
return [y("div", ai, [e.value ? (c(), k(t(G), {
|
|
2152
2157
|
key: 0,
|
|
2153
2158
|
class: "oauth-binding-account__avatar",
|
|
2154
2159
|
"image-url": e.value,
|
|
2155
2160
|
size: 42
|
|
2156
|
-
}, null, 8, ["image-url"])) : (c(), k(t(
|
|
2161
|
+
}, null, 8, ["image-url"])) : (c(), k(t(G), {
|
|
2157
2162
|
key: 1,
|
|
2158
2163
|
class: "oauth-binding-account__avatar oauth-binding-account__avatar--placeholder",
|
|
2159
2164
|
size: 42
|
|
@@ -2163,42 +2168,42 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2163
2168
|
width: 22
|
|
2164
2169
|
})]),
|
|
2165
2170
|
_: 1
|
|
2166
|
-
})), y("div",
|
|
2171
|
+
})), y("div", ni, [_[4] || (_[4] = y("div", {
|
|
2167
2172
|
class: "oauth-binding-account__provider"
|
|
2168
|
-
}, "GitHub", -1)), y("div",
|
|
2173
|
+
}, "GitHub", -1)), y("div", li, O(((K = (L = t(u)) == null ? void 0 : L.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
|
|
2169
2174
|
}),
|
|
2170
2175
|
_: 1
|
|
2171
|
-
})) :
|
|
2176
|
+
})) : z("", !0), o.value === "bind" || o.value === "unbind" ? (c(), k(be, {
|
|
2172
2177
|
key: 2,
|
|
2173
2178
|
size: r.size,
|
|
2174
2179
|
email: (q = t(u)) == null ? void 0 : q.email,
|
|
2175
2180
|
onNext: a
|
|
2176
|
-
}, null, 8, ["size", "email"])) :
|
|
2181
|
+
}, null, 8, ["size", "email"])) : z("", !0)], 64);
|
|
2177
2182
|
};
|
|
2178
2183
|
}
|
|
2179
|
-
}),
|
|
2184
|
+
}), qi = /* @__PURE__ */ P(ri, [["__scopeId", "data-v-6ab8a1f9"]]);
|
|
2180
2185
|
export {
|
|
2181
|
-
|
|
2186
|
+
Bt as A,
|
|
2182
2187
|
W as O,
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2188
|
+
et as P,
|
|
2189
|
+
je as R,
|
|
2190
|
+
Je as S,
|
|
2191
|
+
xt as _,
|
|
2192
|
+
Ui as a,
|
|
2193
|
+
Ot as b,
|
|
2189
2194
|
pe as c,
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2195
|
+
Ci as d,
|
|
2196
|
+
Ri as e,
|
|
2197
|
+
qi as f,
|
|
2198
|
+
$i as g,
|
|
2199
|
+
Ce as h,
|
|
2200
|
+
Te as i,
|
|
2201
|
+
Me as j,
|
|
2202
|
+
Vi as k,
|
|
2203
|
+
ht as l,
|
|
2204
|
+
ut as m,
|
|
2205
|
+
Vt as n,
|
|
2206
|
+
kt as o,
|
|
2202
2207
|
ne as p,
|
|
2203
2208
|
ce as q
|
|
2204
2209
|
};
|