@wssto2/vue-core 0.4.28 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js → AccessGate.vue_vue_type_script_setup_true_lang-Nw1IsB8N.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-QPvYudWc.js → ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js} +1 -1
- package/dist/{Activity-BWkVX1Nx.js → Activity-CoGI2_GL.js} +7 -7
- package/dist/{Changes-MG77TDwz.js → Changes-Cwfe6wbX.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Bnpv9TEj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CtvHtFLy.js} +4 -4
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js → DateField.vue_vue_type_script_setup_true_lang-DRuWzSaX.js} +1 -1
- package/dist/{DeadLetters-CkDE71B3.js → DeadLetters-DyA5Dqn0.js} +7 -7
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js → FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js → FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js} +2 -2
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js → FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js} +2 -2
- package/dist/{General-UTBVEXbN.js → General-DTEfxWls.js} +10 -10
- package/dist/MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js +28 -0
- package/dist/{NewRolePage-B7DwFWPk.js → NewRolePage-CRZoUajV.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js → NumberField.vue_vue_type_script_setup_true_lang-ButMV_sf.js} +1 -1
- package/dist/ProfilePage-DLY81mvN.js +764 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-gXbxXG2R.js +325 -0
- package/dist/RolePage-B9t586Q8.js +314 -0
- package/dist/{RolesPage-B5RwSZ89.js → RolesPage-BRdG-OSL.js} +6 -6
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Cy9Oi0ts.js} +1 -1
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js → SegmentedField.vue_vue_type_script_setup_true_lang-BwyMvkis.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js → SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js} +11 -12
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DhoTd5D7.js +133 -0
- package/dist/{Sessions-DWj2OGo0.js → Sessions-vGyUOnPG.js} +5 -5
- package/dist/SettingsPage-V8WeADZZ.js +632 -0
- package/dist/{SignIn-COThB9XN.js → SignIn-C-3i8RG6.js} +7 -7
- package/dist/{SignInPage-CdzgSvRm.js → SignInPage-D2NA3VKU.js} +4 -4
- package/dist/SignIns-eoYPB6kB.js +121 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js → SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js → TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js → TextareaField.vue_vue_type_script_setup_true_lang-DsjK2C9T.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js → TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js} +1 -1
- package/dist/{UserRecord-BWMnXz4q.js → UserRecord-BaQl2zzQ.js} +13 -13
- package/dist/{UsersList-Chq8yM5C.js → UsersList-BfXWgH5K.js} +9 -9
- package/dist/access/RoleCompareDialog.vue.d.ts +1 -1
- package/dist/access/RoleEditor.vue.d.ts +2 -0
- package/dist/access/constraints.d.ts +28 -0
- package/dist/access/context.d.ts +5 -0
- package/dist/access/feature.d.ts +17 -0
- package/dist/access/index.d.ts +3 -1
- package/dist/access/index.js +11 -9
- package/dist/access/refusals.d.ts +20 -2
- package/dist/app/index.js +6 -6
- package/dist/client/index.js +19 -11
- package/dist/{client-k9euDWF4.js → client-BHPFfBj3.js} +20 -20
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +66 -37
- package/dist/{contributions-BVBZP5Jb.js → contributions-DVQPcjJz.js} +1 -1
- package/dist/{describeError-B-NMa--w.js → describeError-BqGAUZgX.js} +1 -1
- package/dist/{error-CD7x0Jrz.js → error-Bb_dr_Ay.js} +2 -2
- package/dist/{fieldMessages-6HVzSDqG.js → fieldMessages-DTXpWnBd.js} +7 -7
- package/dist/form/index.js +1235 -1412
- package/dist/{guards-BJZjc3FZ.js → guards-DRh4zmxO.js} +1 -1
- package/dist/{http-BFfkA7gN.js → http-D_pBg22D.js} +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +30 -30
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.js +8 -6
- package/dist/identity/profile/DetailsFields.vue.d.ts +8 -0
- package/dist/identity/profile/{DetailsPanel.vue.d.ts → DetailsGroup.vue.d.ts} +4 -1
- package/dist/identity/profile/{EmailPanel.vue.d.ts → EmailGroup.vue.d.ts} +1 -1
- package/dist/identity/profile/SignInsGroup.vue.d.ts +2 -0
- package/dist/identity/profile/profileSections.d.ts +37 -0
- package/dist/identity/shared/SignInList.vue.d.ts +22 -0
- package/dist/identity/shared/deviceLabel.d.ts +7 -0
- package/dist/identity/useReturnToOwnAccount.d.ts +10 -0
- package/dist/identity/users/context.d.ts +3 -0
- package/dist/identity/users/feature.d.ts +3 -0
- package/dist/index-WkbzC_ee.js +745 -0
- package/dist/index-g-qbUeTk.js +630 -0
- package/dist/index-kqk7Mclb.js +480 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/notification/entities.d.ts +19 -0
- package/dist/modules/notification/routes.d.ts +25 -1
- package/dist/modules/notification/schemas.d.ts +24 -0
- package/dist/{navigation-DpcDF0rX.js → navigation-DuQwti76.js} +1 -1
- package/dist/{neighbors-RVQ4O3Qv.js → neighbors-IMRQ4rkm.js} +22 -22
- package/dist/notifications/context.d.ts +24 -1
- package/dist/notifications/feature.d.ts +10 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/push/DevicesSection.vue.d.ts +12 -0
- package/dist/notifications/push/ThisDeviceSection.vue.d.ts +15 -0
- package/dist/notifications/push/browser.d.ts +40 -0
- package/dist/notifications/push/devices.d.ts +15 -0
- package/dist/notifications/push/thisDevice.d.ts +28 -0
- package/dist/notifications/settings/ChannelsSection.vue.d.ts +16 -0
- package/dist/notifications/settings/{QuietHoursPanel.vue.d.ts → QuietHoursSection.vue.d.ts} +3 -1
- package/dist/notifications/settings/SettingsBody.vue.d.ts +17 -0
- package/dist/notifications/settings/settings.d.ts +4 -3
- package/dist/notifications/settings/state.d.ts +4 -2
- package/dist/options-g8RwEhBk.js +366 -0
- package/dist/overlay/index.js +37 -59
- package/dist/page/index.js +1 -1
- package/dist/phone/index.js +10 -11
- package/dist/platform/index.js +3 -3
- package/dist/{platform-PZpUkkMS.js → platform-Dl1fbScN.js} +2 -2
- package/dist/push-worker/index.d.ts +91 -0
- package/dist/push-worker/index.js +54 -0
- package/dist/resource/index.js +1 -1
- package/dist/{routeResource-DlTsGTg_.js → routeResource-CcYA75T2.js} +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{sections-CeZl-Jxg.js → sections-D5rgQ4YB.js} +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/signInEvents-DWShrJox.js +30 -0
- package/dist/state/index.js +1 -1
- package/dist/{status-dGvfh1TP.js → status-C2gHqkj6.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DHJFKB26.js → suggestions-CfFTHi8y.js} +2 -2
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-Cj-APj-P.js → useCommand-CtqheKUv.js} +2 -2
- package/dist/useGroupSheet-ATvc0IiM.js +278 -0
- package/dist/{useLoad-M7V-AVwR.js → useLoad-W4tfxmm5.js} +1 -1
- package/dist/{useResourceForm-tGYTfKhH.js → useResourceForm-CJfl8rj_.js} +1 -1
- package/package.json +6 -2
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +0 -35
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +0 -95
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +0 -46
- package/dist/ProfilePage-C8VhiKIh.js +0 -654
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DRHmjA9w.js +0 -300
- package/dist/RolePage-ODFu68Ce.js +0 -315
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js +0 -111
- package/dist/SettingsPage-C3fPSmi7.js +0 -255
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Bs0yTi2E.js +0 -79
- package/dist/SignIns-cztICmqt.js +0 -66
- package/dist/control-B4SdblL6.js +0 -350
- package/dist/identity/profile/PanelActions.vue.d.ts +0 -17
- package/dist/index-BhtJR4c_.js +0 -459
- package/dist/index-C3E6DcO0.js +0 -706
- package/dist/index-sTBBHqNG.js +0 -504
- package/dist/notifications/settings/EmailPanel.vue.d.ts +0 -14
- package/dist/options-Ba_0uLWN.js +0 -18
- package/dist/route-goWMxDUN.js +0 -13
- package/dist/transport-BnP7WC0Y.js +0 -4
- /package/dist/identity/{profile/PasswordPanel.vue.d.ts → ReturnMenuItem.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SessionsPanel.vue.d.ts → PasswordGroup.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SignInsPanel.vue.d.ts → SessionsGroup.vue.d.ts} +0 -0
|
@@ -1,654 +0,0 @@
|
|
|
1
|
-
import { defineComponent as A, watch as X, openBlock as v, createBlock as S, unref as e, withCtx as u, createVNode as r, mergeProps as E, useModel as pe, useId as fe, useTemplateRef as J, ref as w, onMounted as me, onBeforeUnmount as ve, computed as M, createElementBlock as I, withModifiers as _e, toDisplayString as b, createCommentVNode as W, createElementVNode as x, createTextVNode as N, Fragment as le, mergeModels as oe } from "vue";
|
|
2
|
-
import { useI18n as R } from "vue-i18n";
|
|
3
|
-
import { a as ge } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-GUTIXuNd.js";
|
|
4
|
-
import { u as L } from "./platform-PZpUkkMS.js";
|
|
5
|
-
import { _ as Q } from "./AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js";
|
|
6
|
-
import { u as Y } from "./useLoad-M7V-AVwR.js";
|
|
7
|
-
import { i as k, d as G } from "./index-BhtJR4c_.js";
|
|
8
|
-
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
|
|
9
|
-
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js";
|
|
10
|
-
import { _ as U } from "./TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
|
|
11
|
-
import { _ as H } from "./Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js";
|
|
12
|
-
import { t as C } from "./toast-CqSDTWRX.js";
|
|
13
|
-
import { u as O } from "./fieldMessages-6HVzSDqG.js";
|
|
14
|
-
import { _ as re } from "./PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js";
|
|
15
|
-
import { _ as B } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
16
|
-
import { _ as ye } from "./KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
17
|
-
import { u as ie } from "./format-D8X4zsx6.js";
|
|
18
|
-
import { _ as we } from "./Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
19
|
-
import { a as K } from "./error-CD7x0Jrz.js";
|
|
20
|
-
import { a as be } from "./leaveGuard-Cc8yeLxM.js";
|
|
21
|
-
import { _ as xe } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
22
|
-
import { _ as he } from "./OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
|
|
23
|
-
import { _ as $e } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
24
|
-
import { _ as qe } from "./SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js";
|
|
25
|
-
import { _ as ke } from "./PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js";
|
|
26
|
-
import { _ as Ce } from "./SignInTable.vue_vue_type_script_setup_true_lang-Bs0yTi2E.js";
|
|
27
|
-
import { _ as Se } from "./ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js";
|
|
28
|
-
const Pe = /* @__PURE__ */ A({
|
|
29
|
-
__name: "DetailsPanel",
|
|
30
|
-
props: {
|
|
31
|
-
profile: {}
|
|
32
|
-
},
|
|
33
|
-
emits: ["updated"],
|
|
34
|
-
setup(q, { emit: o }) {
|
|
35
|
-
const m = q, t = o, { t: s } = R(), { http: i } = L(), n = {
|
|
36
|
-
safeParse(l) {
|
|
37
|
-
const { name: c, phone: g } = l;
|
|
38
|
-
return c.trim() === "" ? { success: !1, error: { issues: [{ path: ["name"], message: s("core.account.validation.required") }] } } : { success: !0, data: { name: c, phone: g.trim() === "" ? void 0 : g } };
|
|
39
|
-
}
|
|
40
|
-
}, d = Z({ ...O(), defaults: () => ({ name: "", phone: "" }), validator: n });
|
|
41
|
-
X(() => m.profile, (l) => d.hydrate({ name: l.name, phone: l.phone }), { immediate: !0 });
|
|
42
|
-
async function a() {
|
|
43
|
-
const l = await d.submit(async (c) => (await i.request(k.profileUpdate, c)).data);
|
|
44
|
-
l.status === "saved" && (C.success(s("core.profile.details.saved")), t("updated", l.value));
|
|
45
|
-
}
|
|
46
|
-
return (l, c) => (v(), S(e(H), {
|
|
47
|
-
title: e(s)("core.profile.details.title"),
|
|
48
|
-
icon: "user3Line",
|
|
49
|
-
"data-profile-details": ""
|
|
50
|
-
}, {
|
|
51
|
-
footer: u(() => [
|
|
52
|
-
r(re, {
|
|
53
|
-
label: e(s)("core.profile.details.submit"),
|
|
54
|
-
processing: e(d).submitting.value,
|
|
55
|
-
dirty: e(d).dirty.value,
|
|
56
|
-
onSubmit: a,
|
|
57
|
-
onCancel: c[0] || (c[0] = (g) => e(d).reset())
|
|
58
|
-
}, null, 8, ["label", "processing", "dirty"])
|
|
59
|
-
]),
|
|
60
|
-
default: u(() => [
|
|
61
|
-
r(e(ee), {
|
|
62
|
-
form: e(d),
|
|
63
|
-
onSubmit: a
|
|
64
|
-
}, {
|
|
65
|
-
default: u(() => [
|
|
66
|
-
r(e(U), E(e(d).bind("name"), {
|
|
67
|
-
label: e(s)("core.users.fields.name"),
|
|
68
|
-
required: "",
|
|
69
|
-
autocomplete: "name"
|
|
70
|
-
}), null, 16, ["label"]),
|
|
71
|
-
r(e(U), E(e(d).bind("phone"), {
|
|
72
|
-
label: e(s)("core.users.fields.phone"),
|
|
73
|
-
type: "tel",
|
|
74
|
-
autocomplete: "tel"
|
|
75
|
-
}), null, 16, ["label"]),
|
|
76
|
-
r(e(U), {
|
|
77
|
-
"model-value": m.profile.login,
|
|
78
|
-
label: e(s)("core.users.fields.login"),
|
|
79
|
-
hint: e(s)("core.profile.details.login_hint"),
|
|
80
|
-
disabled: "",
|
|
81
|
-
mono: "",
|
|
82
|
-
"data-profile-login": ""
|
|
83
|
-
}, null, 8, ["model-value", "label", "hint"])
|
|
84
|
-
]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["form"])
|
|
87
|
-
]),
|
|
88
|
-
_: 1
|
|
89
|
-
}, 8, ["title"]));
|
|
90
|
-
}
|
|
91
|
-
}), Ve = {
|
|
92
|
-
key: 0,
|
|
93
|
-
class: "max-w-sm text-body text-content-muted"
|
|
94
|
-
}, Ee = ["id"], Ne = {
|
|
95
|
-
key: 2,
|
|
96
|
-
class: "mt-3 text-footnote text-content-muted",
|
|
97
|
-
"data-verify-expires": ""
|
|
98
|
-
}, Ue = { class: "mt-6 flex w-full flex-col gap-2" }, Ae = /* @__PURE__ */ A({
|
|
99
|
-
__name: "VerifyCode",
|
|
100
|
-
props: /* @__PURE__ */ oe({
|
|
101
|
-
description: { default: void 0 },
|
|
102
|
-
length: { default: 6 },
|
|
103
|
-
resendAvailableAt: { default: null },
|
|
104
|
-
expiresAt: { default: null },
|
|
105
|
-
error: { default: "" },
|
|
106
|
-
expired: { type: Boolean, default: !1 },
|
|
107
|
-
verifying: { type: Boolean, default: !1 },
|
|
108
|
-
resending: { type: Boolean, default: !1 }
|
|
109
|
-
}, {
|
|
110
|
-
modelValue: { default: "" },
|
|
111
|
-
modelModifiers: {}
|
|
112
|
-
}),
|
|
113
|
-
emits: /* @__PURE__ */ oe(["verify", "resend", "cancel"], ["update:modelValue"]),
|
|
114
|
-
setup(q, { expose: o, emit: m }) {
|
|
115
|
-
const t = q, s = pe(q, "modelValue"), i = m, { t: n } = R(), d = ie(), a = fe(), l = J("otp"), c = w(Date.now());
|
|
116
|
-
let g;
|
|
117
|
-
me(() => g = setInterval(() => c.value = Date.now(), 1e3)), ve(() => clearInterval(g));
|
|
118
|
-
const _ = M(() => {
|
|
119
|
-
const $ = t.resendAvailableAt ? Date.parse(t.resendAvailableAt) : Number.NaN;
|
|
120
|
-
return Number.isNaN($) ? 0 : Math.max(0, Math.ceil(($ - c.value) / 1e3));
|
|
121
|
-
}), P = M(() => `${Math.floor(_.value / 60)}:${String(_.value % 60).padStart(2, "0")}`), y = M(() => t.expiresAt && !t.expired ? d.time(t.expiresAt) : ""), h = M(() => s.value.length === t.length), z = M(() => t.verifying || t.resending);
|
|
122
|
-
function D($ = s.value) {
|
|
123
|
-
$.length === t.length && !z.value && !t.expired && i("verify", $);
|
|
124
|
-
}
|
|
125
|
-
function j() {
|
|
126
|
-
_.value === 0 && !z.value && i("resend");
|
|
127
|
-
}
|
|
128
|
-
return X(() => t.error, ($) => {
|
|
129
|
-
$ && (s.value = "", l.value?.focus());
|
|
130
|
-
}), o({ focus: () => l.value?.focus() }), ($, V) => (v(), I("form", {
|
|
131
|
-
class: "flex flex-col items-center text-center",
|
|
132
|
-
"data-verify-code": "",
|
|
133
|
-
novalidate: "",
|
|
134
|
-
onSubmit: V[2] || (V[2] = _e((F) => D(), ["prevent"]))
|
|
135
|
-
}, [
|
|
136
|
-
t.description ? (v(), I("p", Ve, b(t.description), 1)) : W("", !0),
|
|
137
|
-
r(e(he), {
|
|
138
|
-
ref_key: "otp",
|
|
139
|
-
ref: l,
|
|
140
|
-
modelValue: s.value,
|
|
141
|
-
"onUpdate:modelValue": V[0] || (V[0] = (F) => s.value = F),
|
|
142
|
-
class: "mt-6",
|
|
143
|
-
length: t.length,
|
|
144
|
-
invalid: !!t.error,
|
|
145
|
-
disabled: t.expired || t.verifying,
|
|
146
|
-
"described-by": t.error ? e(a) : void 0,
|
|
147
|
-
autofocus: "",
|
|
148
|
-
onComplete: D
|
|
149
|
-
}, null, 8, ["modelValue", "length", "invalid", "disabled", "described-by"]),
|
|
150
|
-
t.error ? (v(), I("p", {
|
|
151
|
-
key: 1,
|
|
152
|
-
id: e(a),
|
|
153
|
-
role: "alert",
|
|
154
|
-
class: "mt-3 text-footnote text-content-destructive",
|
|
155
|
-
"data-verify-error": ""
|
|
156
|
-
}, b(t.error), 9, Ee)) : y.value ? (v(), I("p", Ne, b(e(n)("core.profile.email.valid_until", { time: y.value })), 1)) : W("", !0),
|
|
157
|
-
x("div", Ue, [
|
|
158
|
-
t.expired ? W("", !0) : (v(), S(e(B), {
|
|
159
|
-
key: 0,
|
|
160
|
-
type: "submit",
|
|
161
|
-
prominence: "primary",
|
|
162
|
-
size: "lg",
|
|
163
|
-
class: "w-full justify-center",
|
|
164
|
-
disabled: !h.value || t.resending,
|
|
165
|
-
processing: t.verifying,
|
|
166
|
-
"data-verify-submit": ""
|
|
167
|
-
}, {
|
|
168
|
-
default: u(() => [
|
|
169
|
-
N(b(e(n)("core.profile.email.verify")), 1)
|
|
170
|
-
]),
|
|
171
|
-
_: 1
|
|
172
|
-
}, 8, ["disabled", "processing"])),
|
|
173
|
-
r(e(B), {
|
|
174
|
-
prominence: t.expired ? "primary" : "standard",
|
|
175
|
-
size: "lg",
|
|
176
|
-
class: "w-full justify-center",
|
|
177
|
-
disabled: _.value > 0 || t.verifying,
|
|
178
|
-
processing: t.resending,
|
|
179
|
-
"data-verify-resend": "",
|
|
180
|
-
onClick: j
|
|
181
|
-
}, {
|
|
182
|
-
default: u(() => [
|
|
183
|
-
_.value > 0 ? (v(), I(le, { key: 0 }, [
|
|
184
|
-
N(b(e(n)("core.profile.email.resend_in", { time: P.value })), 1)
|
|
185
|
-
], 64)) : (v(), I(le, { key: 1 }, [
|
|
186
|
-
N(b(t.expired ? e(n)("core.profile.email.request_new") : e(n)("core.profile.email.resend")), 1)
|
|
187
|
-
], 64))
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
}, 8, ["prominence", "disabled", "processing"]),
|
|
191
|
-
r(e(B), {
|
|
192
|
-
prominence: "link",
|
|
193
|
-
class: "mt-1 self-center",
|
|
194
|
-
disabled: t.verifying,
|
|
195
|
-
"data-verify-cancel": "",
|
|
196
|
-
onClick: V[1] || (V[1] = (F) => i("cancel"))
|
|
197
|
-
}, {
|
|
198
|
-
default: u(() => [
|
|
199
|
-
N(b(e(n)("core.profile.email.cancel_change")), 1)
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["disabled"])
|
|
203
|
-
])
|
|
204
|
-
], 32));
|
|
205
|
-
}
|
|
206
|
-
}), Re = { class: "text-body text-content-muted" }, De = {
|
|
207
|
-
key: 1,
|
|
208
|
-
class: "px-2 py-4 sm:px-6"
|
|
209
|
-
}, Fe = /* @__PURE__ */ A({
|
|
210
|
-
__name: "EmailChangeDialog",
|
|
211
|
-
emits: ["pending", "changed", "cancelled"],
|
|
212
|
-
setup(q, { expose: o, emit: m }) {
|
|
213
|
-
const t = m, { t: s } = R(), { http: i } = L(), n = O(), d = J("modal"), a = w("request"), l = w(null), c = w(!1), _ = Z({ ...n, defaults: () => ({ email: "", password: "" }), validator: {
|
|
214
|
-
safeParse(p) {
|
|
215
|
-
const { email: f, password: T } = p, se = s("core.account.validation.required"), ae = [...f.trim() === "" ? [{ path: ["email"], message: se }] : [], ...T === "" ? [{ path: ["password"], message: se }] : []];
|
|
216
|
-
return ae.length > 0 ? { success: !1, error: { issues: ae } } : { success: !0, data: { email: f.trim(), current_password: T } };
|
|
217
|
-
}
|
|
218
|
-
}, serverField: (p) => p === "current_password" ? "password" : p }), { confirmDiscard: P } = be(() => c.value && a.value === "request" && _.dirty.value), y = w(""), h = w(""), z = w(!1), D = w(!1), j = w(!1), $ = w(!1), V = ["identity.code.expired", "identity.code.too_many_attempts", "identity.code.no_pending"];
|
|
219
|
-
function F() {
|
|
220
|
-
y.value = "", h.value = "", z.value = !1;
|
|
221
|
-
}
|
|
222
|
-
function ne(p) {
|
|
223
|
-
l.value = p, a.value = p ? "verify" : "request", _.hydrate({ email: "", password: "" }), F(), d.value?.present();
|
|
224
|
-
}
|
|
225
|
-
async function te() {
|
|
226
|
-
const p = await _.submit(async (f) => (await i.request(k.profileRequestEmail, f)).data);
|
|
227
|
-
p.status === "saved" && (l.value = p.value, F(), a.value = "verify", t("pending", p.value));
|
|
228
|
-
}
|
|
229
|
-
async function de(p) {
|
|
230
|
-
if (!D.value) {
|
|
231
|
-
D.value = !0, h.value = "";
|
|
232
|
-
try {
|
|
233
|
-
const f = (await i.request(k.profileConfirmEmail, { code: p })).data;
|
|
234
|
-
t("changed", f), C.success(s("core.profile.email.changed")), d.value?.dismiss();
|
|
235
|
-
} catch (f) {
|
|
236
|
-
if (G(f)) return;
|
|
237
|
-
if (K(f) && f.fields.email?.[0]) {
|
|
238
|
-
l.value = null, t("pending", null), a.value = "request", _.errors.set({ email: [n.describeFieldError(f.fields.email[0])] });
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
z.value = K(f) && f.code !== null && V.includes(f.code), h.value = n.sentence(f, s("core.profile.email.verify_failed"));
|
|
242
|
-
} finally {
|
|
243
|
-
D.value = !1;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
async function ce() {
|
|
248
|
-
if (!j.value) {
|
|
249
|
-
j.value = !0;
|
|
250
|
-
try {
|
|
251
|
-
l.value = (await i.request(k.profileResendEmail)).data, F(), t("pending", l.value), C.success(s("core.profile.email.code_sent", { email: l.value.email }));
|
|
252
|
-
} catch (p) {
|
|
253
|
-
if (G(p)) return;
|
|
254
|
-
if (K(p) && p.code === "identity.code.no_pending") {
|
|
255
|
-
l.value = null, t("pending", null), a.value = "request";
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
h.value = n.sentence(p, s("core.profile.email.resend_failed"));
|
|
259
|
-
} finally {
|
|
260
|
-
j.value = !1;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
async function ue() {
|
|
265
|
-
if (!$.value) {
|
|
266
|
-
$.value = !0;
|
|
267
|
-
try {
|
|
268
|
-
await i.request(k.profileCancelEmail), l.value = null, t("cancelled"), C.success(s("core.profile.email.cancelled")), d.value?.dismiss();
|
|
269
|
-
} catch (p) {
|
|
270
|
-
G(p) || C.error(n.sentence(p, s("core.profile.email.cancel_failed")));
|
|
271
|
-
} finally {
|
|
272
|
-
$.value = !1;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return o({ present: ne }), (p, f) => (v(), S(e(xe), {
|
|
277
|
-
ref_key: "modal",
|
|
278
|
-
ref: d,
|
|
279
|
-
size: "md",
|
|
280
|
-
title: a.value === "request" ? e(s)("core.profile.email.change_title") : e(s)("core.profile.email.verify_title"),
|
|
281
|
-
"primary-label": a.value === "request" ? e(s)("core.profile.email.send_code") : void 0,
|
|
282
|
-
"without-footer": a.value === "verify",
|
|
283
|
-
status: e(_).submitting.value ? "processing" : "idle",
|
|
284
|
-
"before-dismiss": e(P),
|
|
285
|
-
onPrimary: te,
|
|
286
|
-
onPresented: f[1] || (f[1] = (T) => c.value = !0),
|
|
287
|
-
onDismissed: f[2] || (f[2] = (T) => c.value = !1)
|
|
288
|
-
}, {
|
|
289
|
-
default: u(() => [
|
|
290
|
-
a.value === "request" ? (v(), S(e(ee), {
|
|
291
|
-
key: 0,
|
|
292
|
-
form: e(_),
|
|
293
|
-
onSubmit: te
|
|
294
|
-
}, {
|
|
295
|
-
default: u(() => [
|
|
296
|
-
x("p", Re, b(e(s)("core.profile.email.request_hint")), 1),
|
|
297
|
-
r(e(U), E(e(_).bind("email"), {
|
|
298
|
-
label: e(s)("core.profile.email.new_email"),
|
|
299
|
-
type: "email",
|
|
300
|
-
required: "",
|
|
301
|
-
autocomplete: "email"
|
|
302
|
-
}), null, 16, ["label"]),
|
|
303
|
-
r(e(U), E(e(_).bind("password"), {
|
|
304
|
-
label: e(s)("core.profile.email.current_password"),
|
|
305
|
-
type: "password",
|
|
306
|
-
required: "",
|
|
307
|
-
autocomplete: "current-password"
|
|
308
|
-
}), null, 16, ["label"])
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
}, 8, ["form"])) : (v(), I("div", De, [
|
|
312
|
-
r(Ae, {
|
|
313
|
-
modelValue: y.value,
|
|
314
|
-
"onUpdate:modelValue": f[0] || (f[0] = (T) => y.value = T),
|
|
315
|
-
description: e(s)("core.profile.email.verify_description", { email: l.value?.email ?? "" }),
|
|
316
|
-
"resend-available-at": l.value?.resend_available_at ?? null,
|
|
317
|
-
"expires-at": l.value?.expires_at ?? null,
|
|
318
|
-
error: h.value,
|
|
319
|
-
expired: z.value,
|
|
320
|
-
verifying: D.value,
|
|
321
|
-
resending: j.value,
|
|
322
|
-
onVerify: de,
|
|
323
|
-
onResend: ce,
|
|
324
|
-
onCancel: ue
|
|
325
|
-
}, null, 8, ["modelValue", "description", "resend-available-at", "expires-at", "error", "expired", "verifying", "resending"])
|
|
326
|
-
]))
|
|
327
|
-
]),
|
|
328
|
-
_: 1
|
|
329
|
-
}, 8, ["title", "primary-label", "without-footer", "status", "before-dismiss"]));
|
|
330
|
-
}
|
|
331
|
-
}), Ie = { class: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" }, Me = { class: "text-footnote" }, Be = { class: "mt-2 flex flex-wrap gap-2" }, Le = /* @__PURE__ */ A({
|
|
332
|
-
__name: "EmailPanel",
|
|
333
|
-
props: {
|
|
334
|
-
profile: {}
|
|
335
|
-
},
|
|
336
|
-
emits: ["updated"],
|
|
337
|
-
setup(q, { emit: o }) {
|
|
338
|
-
const m = q, t = o, { t: s } = R(), { http: i } = L(), n = ie(), d = O(), a = J("dialog"), l = w(!1), c = M(() => m.profile.pending_email), g = (P) => t("updated", { ...m.profile, pending_email: P });
|
|
339
|
-
async function _() {
|
|
340
|
-
if (!l.value) {
|
|
341
|
-
l.value = !0;
|
|
342
|
-
try {
|
|
343
|
-
await i.request(k.profileCancelEmail), C.success(s("core.profile.email.cancelled")), g(null);
|
|
344
|
-
} catch (P) {
|
|
345
|
-
G(P) || C.error(d.sentence(P, s("core.profile.email.cancel_failed")));
|
|
346
|
-
} finally {
|
|
347
|
-
l.value = !1;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return (P, y) => (v(), S(e(H), {
|
|
352
|
-
title: e(s)("core.profile.email.title"),
|
|
353
|
-
icon: "mailUnreadFill",
|
|
354
|
-
"data-profile-email": ""
|
|
355
|
-
}, {
|
|
356
|
-
default: u(() => [
|
|
357
|
-
x("div", Ie, [
|
|
358
|
-
x("dl", null, [
|
|
359
|
-
r(e(ye), {
|
|
360
|
-
label: e(s)("core.profile.email.current"),
|
|
361
|
-
value: m.profile.email,
|
|
362
|
-
"data-profile-email-current": ""
|
|
363
|
-
}, null, 8, ["label", "value"])
|
|
364
|
-
]),
|
|
365
|
-
r(e(B), {
|
|
366
|
-
icon: "mailUnreadFill",
|
|
367
|
-
"data-email-change": "",
|
|
368
|
-
onClick: y[0] || (y[0] = (h) => a.value?.present(null))
|
|
369
|
-
}, {
|
|
370
|
-
default: u(() => [
|
|
371
|
-
N(b(e(s)("core.profile.email.change")), 1)
|
|
372
|
-
]),
|
|
373
|
-
_: 1
|
|
374
|
-
})
|
|
375
|
-
]),
|
|
376
|
-
c.value ? (v(), S(e(we), {
|
|
377
|
-
key: 0,
|
|
378
|
-
tone: "info",
|
|
379
|
-
class: "mt-4",
|
|
380
|
-
"data-email-pending": ""
|
|
381
|
-
}, {
|
|
382
|
-
default: u(() => [
|
|
383
|
-
x("p", null, b(e(s)("core.profile.email.pending", { email: c.value.email })), 1),
|
|
384
|
-
x("p", Me, b(e(s)("core.profile.email.valid_until", { time: e(n).time(c.value.expires_at) })), 1),
|
|
385
|
-
x("div", Be, [
|
|
386
|
-
r(e(B), {
|
|
387
|
-
size: "sm",
|
|
388
|
-
prominence: "primary",
|
|
389
|
-
"data-email-enter-code": "",
|
|
390
|
-
onClick: y[1] || (y[1] = (h) => a.value?.present(c.value))
|
|
391
|
-
}, {
|
|
392
|
-
default: u(() => [
|
|
393
|
-
N(b(e(s)("core.profile.email.enter_code")), 1)
|
|
394
|
-
]),
|
|
395
|
-
_: 1
|
|
396
|
-
}),
|
|
397
|
-
r(e(B), {
|
|
398
|
-
size: "sm",
|
|
399
|
-
processing: l.value,
|
|
400
|
-
"data-email-cancel": "",
|
|
401
|
-
onClick: _
|
|
402
|
-
}, {
|
|
403
|
-
default: u(() => [
|
|
404
|
-
N(b(e(s)("core.profile.email.cancel_change")), 1)
|
|
405
|
-
]),
|
|
406
|
-
_: 1
|
|
407
|
-
}, 8, ["processing"])
|
|
408
|
-
])
|
|
409
|
-
]),
|
|
410
|
-
_: 1
|
|
411
|
-
})) : W("", !0),
|
|
412
|
-
r(Fe, {
|
|
413
|
-
ref_key: "dialog",
|
|
414
|
-
ref: a,
|
|
415
|
-
onPending: g,
|
|
416
|
-
onChanged: y[2] || (y[2] = (h) => t("updated", h)),
|
|
417
|
-
onCancelled: y[3] || (y[3] = (h) => g(null))
|
|
418
|
-
}, null, 512)
|
|
419
|
-
]),
|
|
420
|
-
_: 1
|
|
421
|
-
}, 8, ["title"]));
|
|
422
|
-
}
|
|
423
|
-
}), ze = { class: "flex justify-end" }, je = /* @__PURE__ */ A({
|
|
424
|
-
__name: "PasswordPanel",
|
|
425
|
-
setup(q) {
|
|
426
|
-
const { t: o } = R(), { http: m } = L(), t = w(!1), s = {
|
|
427
|
-
safeParse(d) {
|
|
428
|
-
const a = d, l = o("core.account.validation.required"), c = [
|
|
429
|
-
...a.current === "" ? [{ path: ["current"], message: l }] : [],
|
|
430
|
-
...a.password === "" ? [{ path: ["password"], message: l }] : [],
|
|
431
|
-
...a.password !== "" && a.repeat !== a.password ? [{ path: ["repeat"], message: a.repeat === "" ? l : o("core.account.validation.mismatch") }] : []
|
|
432
|
-
];
|
|
433
|
-
return c.length > 0 ? { success: !1, error: { issues: c } } : { success: !0, data: { current_password: a.current, new_password: a.password, new_password_confirmation: a.repeat } };
|
|
434
|
-
}
|
|
435
|
-
}, i = Z({
|
|
436
|
-
...O(),
|
|
437
|
-
defaults: () => ({ current: "", password: "", repeat: "" }),
|
|
438
|
-
validator: s,
|
|
439
|
-
// The server names its fields; the draft's are shorter.
|
|
440
|
-
serverField: (d) => ({ current_password: "current", new_password: "password", new_password_confirmation: "repeat" })[d] ?? d
|
|
441
|
-
});
|
|
442
|
-
async function n() {
|
|
443
|
-
(await i.submit((a) => m.request(k.profileChangePassword, a))).status === "saved" && (i.hydrate({ current: "", password: "", repeat: "" }), t.value = !1, C.success(o("core.profile.password.changed")));
|
|
444
|
-
}
|
|
445
|
-
return (d, a) => (v(), S(e(H), {
|
|
446
|
-
title: e(o)("core.profile.password.title"),
|
|
447
|
-
icon: "key2Line",
|
|
448
|
-
"data-profile-password": ""
|
|
449
|
-
}, {
|
|
450
|
-
footer: u(() => [
|
|
451
|
-
r(re, {
|
|
452
|
-
label: e(o)("core.profile.password.submit"),
|
|
453
|
-
processing: e(i).submitting.value,
|
|
454
|
-
dirty: e(i).dirty.value,
|
|
455
|
-
onSubmit: n,
|
|
456
|
-
onCancel: a[1] || (a[1] = (l) => e(i).reset())
|
|
457
|
-
}, null, 8, ["label", "processing", "dirty"])
|
|
458
|
-
]),
|
|
459
|
-
default: u(() => [
|
|
460
|
-
r(e(ee), {
|
|
461
|
-
form: e(i),
|
|
462
|
-
onSubmit: n
|
|
463
|
-
}, {
|
|
464
|
-
default: u(() => [
|
|
465
|
-
r(e(U), E(e(i).bind("current"), {
|
|
466
|
-
type: t.value ? "text" : "password",
|
|
467
|
-
label: e(o)("core.profile.password.current"),
|
|
468
|
-
required: "",
|
|
469
|
-
autocomplete: "current-password"
|
|
470
|
-
}), null, 16, ["type", "label"]),
|
|
471
|
-
r(e(U), E(e(i).bind("password"), {
|
|
472
|
-
type: t.value ? "text" : "password",
|
|
473
|
-
label: e(o)("core.profile.password.new"),
|
|
474
|
-
required: "",
|
|
475
|
-
autocomplete: "new-password"
|
|
476
|
-
}), null, 16, ["type", "label"]),
|
|
477
|
-
r(e(U), E(e(i).bind("repeat"), {
|
|
478
|
-
type: t.value ? "text" : "password",
|
|
479
|
-
label: e(o)("core.profile.password.repeat"),
|
|
480
|
-
required: "",
|
|
481
|
-
autocomplete: "new-password"
|
|
482
|
-
}), null, 16, ["type", "label"]),
|
|
483
|
-
x("div", ze, [
|
|
484
|
-
r(e(B), E({
|
|
485
|
-
prominence: "link",
|
|
486
|
-
size: "sm",
|
|
487
|
-
icon: t.value ? "eyeOff" : "eye"
|
|
488
|
-
}, { "aria-pressed": t.value }, {
|
|
489
|
-
"data-password-visibility": "",
|
|
490
|
-
onClick: a[0] || (a[0] = (l) => t.value = !t.value)
|
|
491
|
-
}), {
|
|
492
|
-
default: u(() => [
|
|
493
|
-
N(b(t.value ? e(o)("core.profile.password.hide") : e(o)("core.profile.password.show")), 1)
|
|
494
|
-
]),
|
|
495
|
-
_: 1
|
|
496
|
-
}, 16, ["icon"])
|
|
497
|
-
])
|
|
498
|
-
]),
|
|
499
|
-
_: 1
|
|
500
|
-
}, 8, ["form"])
|
|
501
|
-
]),
|
|
502
|
-
_: 1
|
|
503
|
-
}, 8, ["title"]));
|
|
504
|
-
}
|
|
505
|
-
}), Te = { class: "p-3" }, Ge = /* @__PURE__ */ A({
|
|
506
|
-
__name: "SessionsPanel",
|
|
507
|
-
setup(q) {
|
|
508
|
-
const { t: o } = R(), { http: m } = L(), t = O(), s = Y(async ({ signal: l }) => (await m.request(k.profileSessions, void 0, { signal: l })).data), i = M(() => s.data.value?.sessions ?? []), n = J("dialog"), d = w(null);
|
|
509
|
-
async function a(l) {
|
|
510
|
-
try {
|
|
511
|
-
await m.request(k.profileRevokeSession, { session_id: l.id }), C.success(o("core.account.sessions.ended"));
|
|
512
|
-
} catch (c) {
|
|
513
|
-
G(c) || C.error(t.sentence(c, o("core.account.sessions.end_failed")));
|
|
514
|
-
}
|
|
515
|
-
await s.reload();
|
|
516
|
-
}
|
|
517
|
-
return (l, c) => (v(), S(e(H), {
|
|
518
|
-
title: e(o)("core.profile.sessions.title"),
|
|
519
|
-
icon: "deviceLine",
|
|
520
|
-
flush: "",
|
|
521
|
-
"data-profile-sessions": ""
|
|
522
|
-
}, {
|
|
523
|
-
default: u(() => [
|
|
524
|
-
r(e(Q), {
|
|
525
|
-
state: e(s).state.value,
|
|
526
|
-
"skeleton-rows": 3,
|
|
527
|
-
"is-empty": () => !1,
|
|
528
|
-
onRetry: c[1] || (c[1] = (g) => e(s).reload())
|
|
529
|
-
}, {
|
|
530
|
-
default: u(() => [
|
|
531
|
-
x("div", Te, [
|
|
532
|
-
r(qe, {
|
|
533
|
-
sessions: i.value,
|
|
534
|
-
"can-end": "",
|
|
535
|
-
footer: e(o)("core.profile.sessions.footer"),
|
|
536
|
-
onEnd: c[0] || (c[0] = (g) => {
|
|
537
|
-
d.value = g, n.value?.present(g);
|
|
538
|
-
})
|
|
539
|
-
}, null, 8, ["sessions", "footer"])
|
|
540
|
-
])
|
|
541
|
-
]),
|
|
542
|
-
_: 1
|
|
543
|
-
}, 8, ["state"]),
|
|
544
|
-
r(e($e), {
|
|
545
|
-
ref_key: "dialog",
|
|
546
|
-
ref: n,
|
|
547
|
-
tone: "critical",
|
|
548
|
-
icon: "logoutBoxRLine",
|
|
549
|
-
title: e(o)("core.account.sessions.end_title"),
|
|
550
|
-
message: e(o)("core.account.sessions.end_body", { device: d.value?.device || e(o)("core.account.sessions.unknown_device") }),
|
|
551
|
-
"confirm-label": e(o)("core.account.sessions.end"),
|
|
552
|
-
action: a
|
|
553
|
-
}, null, 8, ["title", "message", "confirm-label"])
|
|
554
|
-
]),
|
|
555
|
-
_: 1
|
|
556
|
-
}, 8, ["title"]));
|
|
557
|
-
}
|
|
558
|
-
}), He = { class: "px-3 pt-3" }, Oe = { class: "px-3 pt-3" }, We = { class: "py-3" }, Xe = { class: "px-4 pb-3 text-footnote text-content-muted" }, Je = /* @__PURE__ */ A({
|
|
559
|
-
__name: "SignInsPanel",
|
|
560
|
-
setup(q) {
|
|
561
|
-
const { t: o } = R(), { http: m } = L(), t = ["all", "failed"], s = w("all"), i = w(1), n = Y(async ({ signal: d }) => (await m.request(k.profileSignins, { view: s.value, page: i.value, per_page: 20 }, { signal: d })).data);
|
|
562
|
-
return X(s, () => {
|
|
563
|
-
i.value = 1, n.reload();
|
|
564
|
-
}), X(i, () => void n.reload()), (d, a) => (v(), S(e(H), {
|
|
565
|
-
title: e(o)("core.profile.signins.title"),
|
|
566
|
-
icon: "timeFill",
|
|
567
|
-
flush: "",
|
|
568
|
-
"data-profile-signins": ""
|
|
569
|
-
}, {
|
|
570
|
-
default: u(() => [
|
|
571
|
-
x("div", He, [
|
|
572
|
-
r(Se, {
|
|
573
|
-
modelValue: s.value,
|
|
574
|
-
"onUpdate:modelValue": a[0] || (a[0] = (l) => s.value = l),
|
|
575
|
-
views: t,
|
|
576
|
-
counts: e(n).data.value?.meta?.views,
|
|
577
|
-
"label-of": (l) => e(o)(`core.account.signins.views.${l}`),
|
|
578
|
-
label: e(o)("core.profile.signins.title")
|
|
579
|
-
}, null, 8, ["modelValue", "counts", "label-of", "label"])
|
|
580
|
-
]),
|
|
581
|
-
r(e(Q), {
|
|
582
|
-
state: e(n).state.value,
|
|
583
|
-
"skeleton-rows": 4,
|
|
584
|
-
"is-empty": () => !1,
|
|
585
|
-
onRetry: a[2] || (a[2] = (l) => e(n).reload())
|
|
586
|
-
}, {
|
|
587
|
-
default: u(({ value: l }) => [
|
|
588
|
-
x("div", Oe, [
|
|
589
|
-
r(Ce, {
|
|
590
|
-
rows: l.data
|
|
591
|
-
}, null, 8, ["rows"])
|
|
592
|
-
]),
|
|
593
|
-
x("div", We, [
|
|
594
|
-
r(ke, {
|
|
595
|
-
page: i.value,
|
|
596
|
-
"onUpdate:page": a[1] || (a[1] = (c) => i.value = c),
|
|
597
|
-
"last-page": l.last_page,
|
|
598
|
-
total: l.total
|
|
599
|
-
}, null, 8, ["page", "last-page", "total"])
|
|
600
|
-
]),
|
|
601
|
-
x("p", Xe, b(e(o)("core.profile.signins.footer")), 1)
|
|
602
|
-
]),
|
|
603
|
-
_: 1
|
|
604
|
-
}, 8, ["state"])
|
|
605
|
-
]),
|
|
606
|
-
_: 1
|
|
607
|
-
}, 8, ["title"]));
|
|
608
|
-
}
|
|
609
|
-
}), Ke = { class: "grid grid-cols-1 items-start gap-4 lg:grid-cols-2" }, Qe = { class: "flex flex-col gap-4" }, kt = /* @__PURE__ */ A({
|
|
610
|
-
__name: "ProfilePage",
|
|
611
|
-
setup(q) {
|
|
612
|
-
const { t: o } = R(), { http: m, session: t } = L(), s = Y(async ({ signal: n }) => (await m.request(k.profileShow, void 0, { signal: n })).data);
|
|
613
|
-
function i(n) {
|
|
614
|
-
s.update(n), t.refresh();
|
|
615
|
-
}
|
|
616
|
-
return (n, d) => (v(), S(e(ge), {
|
|
617
|
-
title: e(o)("core.profile.title"),
|
|
618
|
-
description: e(o)("core.profile.description"),
|
|
619
|
-
width: "content"
|
|
620
|
-
}, {
|
|
621
|
-
default: u(() => [
|
|
622
|
-
r(e(Q), {
|
|
623
|
-
state: e(s).state.value,
|
|
624
|
-
"skeleton-rows": 6,
|
|
625
|
-
"is-empty": () => !1,
|
|
626
|
-
onRetry: d[0] || (d[0] = (a) => e(s).reload())
|
|
627
|
-
}, {
|
|
628
|
-
default: u(({ value: a }) => [
|
|
629
|
-
x("div", Ke, [
|
|
630
|
-
x("div", Qe, [
|
|
631
|
-
r(Pe, {
|
|
632
|
-
profile: a,
|
|
633
|
-
onUpdated: i
|
|
634
|
-
}, null, 8, ["profile"]),
|
|
635
|
-
r(Le, {
|
|
636
|
-
profile: a,
|
|
637
|
-
onUpdated: i
|
|
638
|
-
}, null, 8, ["profile"])
|
|
639
|
-
]),
|
|
640
|
-
r(je),
|
|
641
|
-
r(Ge, { class: "lg:col-span-2" }),
|
|
642
|
-
r(Je, { class: "lg:col-span-2" })
|
|
643
|
-
])
|
|
644
|
-
]),
|
|
645
|
-
_: 1
|
|
646
|
-
}, 8, ["state"])
|
|
647
|
-
]),
|
|
648
|
-
_: 1
|
|
649
|
-
}, 8, ["title", "description"]));
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
export {
|
|
653
|
-
kt as default
|
|
654
|
-
};
|