@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
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
import { defineComponent as B, ref as L, useTemplateRef as te, openBlock as o, createElementBlock as b, createVNode as u, unref as e, withCtx as _, Fragment as q, renderList as M, createElementVNode as O, createTextVNode as z, toDisplayString as w, createBlock as h, mergeProps as F, createCommentVNode as S, computed as D, watch as se, onMounted as ie, resolveDynamicComponent as ne } from "vue";
|
|
2
|
+
import { useI18n as V } from "vue-i18n";
|
|
3
|
+
import { useRouter as ae } from "vue-router";
|
|
4
|
+
import { a as oe } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-GUTIXuNd.js";
|
|
5
|
+
import { t as C } from "./toast-CqSDTWRX.js";
|
|
6
|
+
import { u as U } from "./fieldMessages-DTXpWnBd.js";
|
|
7
|
+
import { _ as W } from "./AsyncSection.vue_vue_type_script_setup_true_lang-B0NfvG3B.js";
|
|
8
|
+
import { n as T, u as le, a as re } from "./index-g-qbUeTk.js";
|
|
9
|
+
import { _ as H } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
10
|
+
import { _ as j } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
11
|
+
import { _ as ce } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
12
|
+
import { u as ue } from "./format-D8X4zsx6.js";
|
|
13
|
+
import { _ as R } from "./FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js";
|
|
14
|
+
import { g as x } from "./options-g8RwEhBk.js";
|
|
15
|
+
import { _ as de } from "./TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js";
|
|
16
|
+
import { _ as fe } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
17
|
+
import { _ as me } from "./Menu.vue_vue_type_script_setup_true_lang-DsFOeCVe.js";
|
|
18
|
+
import { _ as pe } from "./MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js";
|
|
19
|
+
import { _ as E } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
20
|
+
import { _ as I } from "./ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js";
|
|
21
|
+
import { u as X } from "./platform-Dl1fbScN.js";
|
|
22
|
+
import { u as Y } from "./useLoad-W4tfxmm5.js";
|
|
23
|
+
import { _ as ee } from "./SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js";
|
|
24
|
+
import { _ as _e } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
25
|
+
import { u as ve } from "./FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js";
|
|
26
|
+
import { _ as ge } from "./FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js";
|
|
27
|
+
import { _ as A } from "./TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js";
|
|
28
|
+
import { a as K, n as be } from "./useTypedEntry-C7k7Dyl-.js";
|
|
29
|
+
const he = {
|
|
30
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
31
|
+
"data-notification-devices": ""
|
|
32
|
+
}, ye = { class: "flex justify-end gap-2 p-3" }, $e = { class: "flex flex-col gap-0.5" }, ke = { key: 0 }, we = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "mt-1 flex flex-wrap gap-1"
|
|
35
|
+
}, xe = /* @__PURE__ */ B({
|
|
36
|
+
__name: "DevicesSection",
|
|
37
|
+
props: {
|
|
38
|
+
devices: {},
|
|
39
|
+
hash: {}
|
|
40
|
+
},
|
|
41
|
+
setup(a) {
|
|
42
|
+
const i = a, { t } = V(), d = ue(), s = U(), l = L(null), r = L(""), m = L(!1), v = L(null), c = te("dialog"), n = L(null);
|
|
43
|
+
function f(g) {
|
|
44
|
+
l.value = g.id, r.value = g.label;
|
|
45
|
+
}
|
|
46
|
+
async function p() {
|
|
47
|
+
const g = r.value.trim();
|
|
48
|
+
if (!(l.value === null || !g)) {
|
|
49
|
+
m.value = !0;
|
|
50
|
+
try {
|
|
51
|
+
await i.devices.rename(l.value, g), l.value = null;
|
|
52
|
+
} catch ($) {
|
|
53
|
+
C.error(s.sentence($, t("core.notifications.settings.devices.rename_error")));
|
|
54
|
+
} finally {
|
|
55
|
+
m.value = !1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function k(g) {
|
|
60
|
+
v.value = g.id;
|
|
61
|
+
try {
|
|
62
|
+
await i.devices.test(g.id), C.success(t("core.notifications.settings.devices.test_sent"));
|
|
63
|
+
} catch ($) {
|
|
64
|
+
C.error(s.sentence($, t("core.notifications.settings.devices.test_error")));
|
|
65
|
+
} finally {
|
|
66
|
+
v.value = null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const P = (g) => [
|
|
70
|
+
{ id: "rename", label: t("core.notifications.settings.devices.rename"), icon: "edit", onSelect: () => f(g) },
|
|
71
|
+
{ id: "test", label: t("core.notifications.settings.devices.test"), icon: "notification3Line", disabled: !g.active, processing: v.value === g.id, onSelect: () => void k(g) },
|
|
72
|
+
{ id: "remove", label: t("core.notifications.settings.devices.remove"), icon: "deleteBin2Line", tone: "critical", onSelect: () => {
|
|
73
|
+
n.value = g, c.value?.present(g);
|
|
74
|
+
} }
|
|
75
|
+
];
|
|
76
|
+
async function Z(g) {
|
|
77
|
+
try {
|
|
78
|
+
await i.devices.remove(g.id);
|
|
79
|
+
} catch ($) {
|
|
80
|
+
C.error(s.sentence($, t("core.notifications.settings.devices.remove_error")));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return (g, $) => (o(), b("section", he, [
|
|
84
|
+
u(H, {
|
|
85
|
+
title: e(t)("core.notifications.settings.devices.title"),
|
|
86
|
+
description: e(t)("core.notifications.settings.devices.description")
|
|
87
|
+
}, null, 8, ["title", "description"]),
|
|
88
|
+
u(e(W), {
|
|
89
|
+
state: i.devices.loaded.state.value,
|
|
90
|
+
"skeleton-rows": 2,
|
|
91
|
+
"empty-title": e(t)("core.notifications.settings.devices.empty"),
|
|
92
|
+
"empty-icon": "deviceLine",
|
|
93
|
+
onRetry: $[2] || ($[2] = (y) => i.devices.loaded.reload())
|
|
94
|
+
}, {
|
|
95
|
+
default: _(() => [
|
|
96
|
+
u(e(R), null, {
|
|
97
|
+
default: _(() => [
|
|
98
|
+
(o(!0), b(q, null, M(i.devices.list.value, (y) => (o(), b(q, {
|
|
99
|
+
key: y.id
|
|
100
|
+
}, [
|
|
101
|
+
l.value === y.id ? (o(), b(q, { key: 0 }, [
|
|
102
|
+
u(e(de), {
|
|
103
|
+
modelValue: r.value,
|
|
104
|
+
"onUpdate:modelValue": $[0] || ($[0] = (N) => r.value = N),
|
|
105
|
+
label: e(t)("core.notifications.settings.devices.label"),
|
|
106
|
+
"max-length": 100,
|
|
107
|
+
"data-device": y.id
|
|
108
|
+
}, null, 8, ["modelValue", "label", "data-device"]),
|
|
109
|
+
O("div", ye, [
|
|
110
|
+
u(e(j), {
|
|
111
|
+
size: "sm",
|
|
112
|
+
onClick: $[1] || ($[1] = (N) => l.value = null)
|
|
113
|
+
}, {
|
|
114
|
+
default: _(() => [
|
|
115
|
+
z(w(e(t)("core.actions.cancel")), 1)
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}),
|
|
119
|
+
u(e(j), {
|
|
120
|
+
prominence: "primary",
|
|
121
|
+
size: "sm",
|
|
122
|
+
processing: m.value,
|
|
123
|
+
disabled: !r.value.trim(),
|
|
124
|
+
"data-device-save": "",
|
|
125
|
+
onClick: p
|
|
126
|
+
}, {
|
|
127
|
+
default: _(() => [
|
|
128
|
+
z(w(e(t)("core.actions.save")), 1)
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, ["processing", "disabled"])
|
|
132
|
+
])
|
|
133
|
+
], 64)) : (o(), h(e(x), {
|
|
134
|
+
key: 1,
|
|
135
|
+
layout: "setting",
|
|
136
|
+
label: y.label,
|
|
137
|
+
"data-device": y.id
|
|
138
|
+
}, {
|
|
139
|
+
leading: _(() => [
|
|
140
|
+
u(e(ce), {
|
|
141
|
+
tone: "anchor",
|
|
142
|
+
icon: "deviceLine"
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
sub: _(() => [
|
|
146
|
+
O("span", $e, [
|
|
147
|
+
O("span", null, w(e(t)("core.notifications.settings.devices.last_seen", { when: e(d).dateTime(y.last_seen_at) })), 1),
|
|
148
|
+
y.last_success_at ? (o(), b("span", ke, w(e(t)("core.notifications.settings.devices.last_push", { when: e(d).dateTime(y.last_success_at) })), 1)) : S("", !0)
|
|
149
|
+
]),
|
|
150
|
+
y.endpoint_hash === i.hash || !y.active ? (o(), b("span", we, [
|
|
151
|
+
y.endpoint_hash === i.hash ? (o(), h(e(E), {
|
|
152
|
+
key: 0,
|
|
153
|
+
tone: "positive",
|
|
154
|
+
dot: "",
|
|
155
|
+
"data-device-current": ""
|
|
156
|
+
}, {
|
|
157
|
+
default: _(() => [
|
|
158
|
+
z(w(e(t)("core.notifications.settings.devices.this_device")), 1)
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
})) : S("", !0),
|
|
162
|
+
y.active ? S("", !0) : (o(), h(e(E), {
|
|
163
|
+
key: 1,
|
|
164
|
+
tone: "warning",
|
|
165
|
+
"data-device-disabled": ""
|
|
166
|
+
}, {
|
|
167
|
+
default: _(() => [
|
|
168
|
+
z(w(e(t)("core.notifications.settings.devices.disabled")), 1)
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}))
|
|
172
|
+
])) : S("", !0)
|
|
173
|
+
]),
|
|
174
|
+
trailing: _(() => [
|
|
175
|
+
u(e(me), {
|
|
176
|
+
items: P(y),
|
|
177
|
+
label: e(t)("core.notifications.settings.devices.menu", { label: y.label })
|
|
178
|
+
}, {
|
|
179
|
+
trigger: _((N) => [
|
|
180
|
+
u(e(pe), F({ ref_for: !0 }, N, {
|
|
181
|
+
label: e(t)("core.notifications.settings.devices.menu", { label: y.label }),
|
|
182
|
+
"data-device-menu": ""
|
|
183
|
+
}), null, 16, ["label"])
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["items", "label"])
|
|
187
|
+
]),
|
|
188
|
+
_: 2
|
|
189
|
+
}, 1032, ["label", "data-device"]))
|
|
190
|
+
], 64))), 128))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
})
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["state", "empty-title"]),
|
|
197
|
+
u(e(fe), {
|
|
198
|
+
ref_key: "dialog",
|
|
199
|
+
ref: c,
|
|
200
|
+
tone: "critical",
|
|
201
|
+
icon: "deleteBin2Line",
|
|
202
|
+
title: e(t)("core.notifications.settings.devices.remove_title"),
|
|
203
|
+
message: e(t)("core.notifications.settings.devices.remove_body", { label: n.value?.label ?? "" }),
|
|
204
|
+
"confirm-label": e(t)("core.notifications.settings.devices.remove"),
|
|
205
|
+
action: Z
|
|
206
|
+
}, null, 8, ["title", "message", "confirm-label"])
|
|
207
|
+
]));
|
|
208
|
+
}
|
|
209
|
+
}), qe = ["data-state"], Se = {
|
|
210
|
+
key: 0,
|
|
211
|
+
class: "h-14 animate-pulse rounded-xl bg-fill-strong motion-reduce:animate-none",
|
|
212
|
+
"aria-hidden": "true"
|
|
213
|
+
}, Ce = /* @__PURE__ */ B({
|
|
214
|
+
__name: "ThisDeviceSection",
|
|
215
|
+
props: {
|
|
216
|
+
device: {}
|
|
217
|
+
},
|
|
218
|
+
emits: ["changed"],
|
|
219
|
+
setup(a, { emit: i }) {
|
|
220
|
+
const t = a, d = i, { t: s } = V();
|
|
221
|
+
async function l() {
|
|
222
|
+
try {
|
|
223
|
+
await t.device.enable() === "on" && C.success(s("core.notifications.settings.push.enabled_toast")), d("changed");
|
|
224
|
+
} catch {
|
|
225
|
+
C.error(s("core.notifications.settings.push.enable_error"));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async function r() {
|
|
229
|
+
try {
|
|
230
|
+
await t.device.disable();
|
|
231
|
+
} catch {
|
|
232
|
+
C.error(s("core.notifications.settings.push.disable_error"));
|
|
233
|
+
}
|
|
234
|
+
d("changed");
|
|
235
|
+
}
|
|
236
|
+
return (m, v) => (o(), b("section", {
|
|
237
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
238
|
+
"data-state": t.device.state.value,
|
|
239
|
+
"data-notification-this-device": ""
|
|
240
|
+
}, [
|
|
241
|
+
u(H, {
|
|
242
|
+
title: e(s)("core.notifications.settings.push.title"),
|
|
243
|
+
description: e(s)("core.notifications.settings.push.description")
|
|
244
|
+
}, null, 8, ["title", "description"]),
|
|
245
|
+
t.device.state.value === "loading" ? (o(), b("div", Se)) : t.device.state.value === "unsupported" ? (o(), h(e(R), { key: 1 }, {
|
|
246
|
+
default: _(() => [
|
|
247
|
+
u(e(x), {
|
|
248
|
+
layout: "setting",
|
|
249
|
+
label: e(s)("core.notifications.settings.push.unsupported")
|
|
250
|
+
}, null, 8, ["label"])
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
})) : t.device.state.value === "ios-browser" ? (o(), h(e(R), {
|
|
254
|
+
key: 2,
|
|
255
|
+
header: e(s)("core.notifications.settings.push.ios_title")
|
|
256
|
+
}, {
|
|
257
|
+
default: _(() => [
|
|
258
|
+
u(e(x), {
|
|
259
|
+
layout: "setting",
|
|
260
|
+
label: `1. ${e(s)("core.notifications.settings.push.ios_step_share")}`
|
|
261
|
+
}, null, 8, ["label"]),
|
|
262
|
+
u(e(x), {
|
|
263
|
+
layout: "setting",
|
|
264
|
+
label: `2. ${e(s)("core.notifications.settings.push.ios_step_add")}`
|
|
265
|
+
}, null, 8, ["label"]),
|
|
266
|
+
u(e(x), {
|
|
267
|
+
layout: "setting",
|
|
268
|
+
label: `3. ${e(s)("core.notifications.settings.push.ios_step_open")}`
|
|
269
|
+
}, null, 8, ["label"])
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
}, 8, ["header"])) : t.device.state.value === "denied" ? (o(), h(e(R), { key: 3 }, {
|
|
273
|
+
default: _(() => [
|
|
274
|
+
u(e(x), {
|
|
275
|
+
layout: "setting",
|
|
276
|
+
label: e(s)("core.notifications.settings.push.denied_title"),
|
|
277
|
+
sub: e(s)("core.notifications.settings.push.denied_help")
|
|
278
|
+
}, null, 8, ["label", "sub"])
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
})) : (o(), h(e(R), { key: 4 }, {
|
|
282
|
+
default: _(() => [
|
|
283
|
+
u(e(x), {
|
|
284
|
+
layout: "setting",
|
|
285
|
+
label: e(s)("core.notifications.settings.push.row")
|
|
286
|
+
}, {
|
|
287
|
+
default: _(() => [
|
|
288
|
+
u(e(E), {
|
|
289
|
+
tone: t.device.state.value === "on" ? "positive" : "neutral",
|
|
290
|
+
dot: ""
|
|
291
|
+
}, {
|
|
292
|
+
default: _(() => [
|
|
293
|
+
z(w(t.device.state.value === "on" ? e(s)("core.notifications.settings.push.on") : e(s)("core.notifications.settings.push.off")), 1)
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
}, 8, ["tone"])
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["label"]),
|
|
300
|
+
t.device.state.value === "off" ? (o(), h(I, {
|
|
301
|
+
key: 0,
|
|
302
|
+
label: e(s)("core.notifications.settings.push.enable"),
|
|
303
|
+
disabled: t.device.busy.value,
|
|
304
|
+
"data-push-enable": "",
|
|
305
|
+
onClick: l
|
|
306
|
+
}, null, 8, ["label", "disabled"])) : (o(), h(I, {
|
|
307
|
+
key: 1,
|
|
308
|
+
label: e(s)("core.notifications.settings.push.disable"),
|
|
309
|
+
tone: "critical",
|
|
310
|
+
disabled: t.device.busy.value,
|
|
311
|
+
"data-push-disable": "",
|
|
312
|
+
onClick: r
|
|
313
|
+
}, null, 8, ["label", "disabled"]))
|
|
314
|
+
]),
|
|
315
|
+
_: 1
|
|
316
|
+
}))
|
|
317
|
+
], 8, qe));
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
function Te(a = X().http) {
|
|
321
|
+
const i = Y(async ({ signal: d }) => (await a.request(T.devices, void 0, { signal: d })).data.items), t = D(() => i.data.value ?? []);
|
|
322
|
+
return {
|
|
323
|
+
loaded: i,
|
|
324
|
+
list: t,
|
|
325
|
+
async rename(d, s) {
|
|
326
|
+
const { data: l } = await a.request(T.deviceRename, { id: d, label: s });
|
|
327
|
+
i.update(t.value.map((r) => r.id === d ? l : r));
|
|
328
|
+
},
|
|
329
|
+
async remove(d) {
|
|
330
|
+
i.update((await a.request(T.deviceRemove, { id: d })).data.items);
|
|
331
|
+
},
|
|
332
|
+
async test(d) {
|
|
333
|
+
i.update((await a.request(T.deviceTest, { id: d })).data.items);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function Re() {
|
|
338
|
+
const { t: a, te: i } = V();
|
|
339
|
+
return (t) => {
|
|
340
|
+
const d = `notifications.categories.${t}`, s = `${d}.description`;
|
|
341
|
+
return { label: i(`${d}.label`) ? a(`${d}.label`) : t, ...i(s) ? { description: a(s) } : {} };
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
const Le = {
|
|
345
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
346
|
+
"data-notification-channels": ""
|
|
347
|
+
}, Ve = { class: "flex items-center gap-1.5 text-body text-content-muted" }, ze = ["data-channel"], Be = /* @__PURE__ */ B({
|
|
348
|
+
__name: "ChannelsSection",
|
|
349
|
+
props: {
|
|
350
|
+
preferences: {}
|
|
351
|
+
},
|
|
352
|
+
emits: ["change"],
|
|
353
|
+
setup(a, { emit: i }) {
|
|
354
|
+
const t = a, d = i, { t: s } = V(), l = Re(), r = D(() => [...t.preferences.email_available ? ["email"] : [], ...t.preferences.push_available ? ["push"] : []]);
|
|
355
|
+
return (m, v) => (o(), b("section", Le, [
|
|
356
|
+
u(H, {
|
|
357
|
+
title: e(s)("core.notifications.settings.channels.title"),
|
|
358
|
+
description: e(s)("core.notifications.settings.email.in_app"),
|
|
359
|
+
"data-in-app": ""
|
|
360
|
+
}, null, 8, ["title", "description"]),
|
|
361
|
+
r.value.length === 0 ? (o(), h(e(R), {
|
|
362
|
+
key: 0,
|
|
363
|
+
"data-email-unavailable": ""
|
|
364
|
+
}, {
|
|
365
|
+
default: _(() => [
|
|
366
|
+
u(e(x), {
|
|
367
|
+
layout: "setting",
|
|
368
|
+
label: e(s)("core.notifications.settings.email.unavailable")
|
|
369
|
+
}, null, 8, ["label"])
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
})) : S("", !0),
|
|
373
|
+
(o(!0), b(q, null, M(r.value.length === 0 ? [] : t.preferences.categories, (c) => (o(), h(e(R), {
|
|
374
|
+
key: c.category,
|
|
375
|
+
header: e(l)(c.category).label,
|
|
376
|
+
footer: e(l)(c.category).description,
|
|
377
|
+
"data-category": c.category
|
|
378
|
+
}, {
|
|
379
|
+
default: _(() => [
|
|
380
|
+
(o(!0), b(q, null, M(r.value, (n) => (o(), b(q, { key: n }, [
|
|
381
|
+
c[n].source === "enforced" ? (o(), h(e(x), {
|
|
382
|
+
key: 0,
|
|
383
|
+
"data-channel": n,
|
|
384
|
+
layout: "setting",
|
|
385
|
+
label: e(s)(`core.notifications.settings.channels.${n}`),
|
|
386
|
+
sub: e(s)("core.notifications.settings.email.locked")
|
|
387
|
+
}, {
|
|
388
|
+
default: _(() => [
|
|
389
|
+
O("span", Ve, [
|
|
390
|
+
u(e(_e), {
|
|
391
|
+
name: "lockLine",
|
|
392
|
+
size: 14
|
|
393
|
+
}),
|
|
394
|
+
z(w(c[n].enabled ? e(s)("core.form.yes") : e(s)("core.form.no")), 1)
|
|
395
|
+
])
|
|
396
|
+
]),
|
|
397
|
+
_: 2
|
|
398
|
+
}, 1032, ["data-channel", "label", "sub"])) : (o(), b("div", {
|
|
399
|
+
key: 1,
|
|
400
|
+
"data-channel": n
|
|
401
|
+
}, [
|
|
402
|
+
u(e(ee), {
|
|
403
|
+
"model-value": c[n].enabled,
|
|
404
|
+
label: e(s)(`core.notifications.settings.channels.${n}`),
|
|
405
|
+
"onUpdate:modelValue": (f) => d("change", c.category, n, f)
|
|
406
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"])
|
|
407
|
+
], 8, ze))
|
|
408
|
+
], 64))), 128))
|
|
409
|
+
]),
|
|
410
|
+
_: 2
|
|
411
|
+
}, 1032, ["header", "footer", "data-category"]))), 128))
|
|
412
|
+
]));
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
function Q(a, i) {
|
|
416
|
+
return { ...a, categories: a.categories.map((t) => t.category === i.category ? i : t) };
|
|
417
|
+
}
|
|
418
|
+
function De(a, i, t, d) {
|
|
419
|
+
const s = a.categories.find((l) => l.category === i);
|
|
420
|
+
return s ? Q(a, { ...s, [t]: { enabled: d, source: "person" } }) : a;
|
|
421
|
+
}
|
|
422
|
+
function G(a) {
|
|
423
|
+
return be(Math.floor(a / 60), a % 60) ?? "00:00";
|
|
424
|
+
}
|
|
425
|
+
function J(a) {
|
|
426
|
+
const i = K(a);
|
|
427
|
+
return i === null ? null : i.hour * 60 + i.minute;
|
|
428
|
+
}
|
|
429
|
+
const He = (a) => ({ enabled: a.enabled, start: G(a.start), end: G(a.end) }), Pe = {
|
|
430
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
431
|
+
"data-notification-quiet-hours": ""
|
|
432
|
+
}, Ne = {
|
|
433
|
+
key: 0,
|
|
434
|
+
class: "px-row-inset text-footnote text-content-destructive",
|
|
435
|
+
role: "alert",
|
|
436
|
+
"data-quiet-failure": ""
|
|
437
|
+
}, Oe = /* @__PURE__ */ B({
|
|
438
|
+
__name: "QuietHoursSection",
|
|
439
|
+
props: {
|
|
440
|
+
quietHours: {},
|
|
441
|
+
timeZone: {},
|
|
442
|
+
submit: { type: Function }
|
|
443
|
+
},
|
|
444
|
+
setup(a) {
|
|
445
|
+
const i = a, { t } = V(), d = {
|
|
446
|
+
safeParse(c) {
|
|
447
|
+
const n = c, f = J(n.start), p = J(n.end), k = [
|
|
448
|
+
...f === null ? [{ path: ["start"], message: t("core.notifications.settings.quiet.required") }] : [],
|
|
449
|
+
...p === null ? [{ path: ["end"], message: t("core.notifications.settings.quiet.required") }] : [],
|
|
450
|
+
...f !== null && f === p ? [{ path: ["end"], message: t("core.notifications.settings.quiet.same") }] : []
|
|
451
|
+
];
|
|
452
|
+
return k.length > 0 || f === null || p === null ? { success: !1, error: { issues: k } } : { success: !0, data: { enabled: n.enabled, start: f, end: p } };
|
|
453
|
+
}
|
|
454
|
+
}, s = ve({ ...U(), defaults: () => He(i.quietHours), validator: d }), l = D(() => {
|
|
455
|
+
const { enabled: c, start: n, end: f } = s.values, p = K(n), k = K(f);
|
|
456
|
+
if (!c) return t("core.notifications.settings.quiet.summary_off");
|
|
457
|
+
if (!p || !k || p.hour === k.hour && p.minute === k.minute) return "";
|
|
458
|
+
const P = ({ hour: g, minute: $ }) => `${String(g).padStart(2, "0")}:${String($).padStart(2, "0")}`, Z = i.timeZone && i.timeZone !== "Local";
|
|
459
|
+
return t(`core.notifications.settings.quiet.${Z ? "summary_on" : "summary_on_no_zone"}`, { start: P(p), end: P(k), zone: i.timeZone });
|
|
460
|
+
}), r = L("");
|
|
461
|
+
let m = !1;
|
|
462
|
+
async function v() {
|
|
463
|
+
if (!(m || !s.dirty.value)) {
|
|
464
|
+
m = !0;
|
|
465
|
+
try {
|
|
466
|
+
for (; s.dirty.value; ) {
|
|
467
|
+
const c = await s.submit((n) => i.submit(n));
|
|
468
|
+
if (c.status === "saved") r.value = "";
|
|
469
|
+
else if (c.status === "failed" && c.failure.error !== null)
|
|
470
|
+
r.value = c.failure.message, s.reset();
|
|
471
|
+
else break;
|
|
472
|
+
}
|
|
473
|
+
} finally {
|
|
474
|
+
m = !1;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return se(() => [s.values.enabled, s.values.start, s.values.end], v), (c, n) => (o(), b("section", Pe, [
|
|
479
|
+
u(H, {
|
|
480
|
+
title: e(t)("core.notifications.settings.quiet.title"),
|
|
481
|
+
description: e(t)("core.notifications.settings.quiet.description")
|
|
482
|
+
}, null, 8, ["title", "description"]),
|
|
483
|
+
u(e(ge), {
|
|
484
|
+
form: e(s),
|
|
485
|
+
onSubmit: v
|
|
486
|
+
}, {
|
|
487
|
+
default: _(() => [
|
|
488
|
+
u(e(R), {
|
|
489
|
+
footer: l.value,
|
|
490
|
+
"data-quiet-summary": ""
|
|
491
|
+
}, {
|
|
492
|
+
default: _(() => [
|
|
493
|
+
u(e(ee), F(e(s).bind("enabled"), {
|
|
494
|
+
label: e(t)("core.notifications.settings.quiet.enabled")
|
|
495
|
+
}), null, 16, ["label"]),
|
|
496
|
+
e(s).values.enabled ? (o(), b(q, { key: 0 }, [
|
|
497
|
+
u(e(A), F(e(s).bind("start"), {
|
|
498
|
+
label: e(t)("core.notifications.settings.quiet.start")
|
|
499
|
+
}), null, 16, ["label"]),
|
|
500
|
+
u(e(A), F(e(s).bind("end"), {
|
|
501
|
+
label: e(t)("core.notifications.settings.quiet.end")
|
|
502
|
+
}), null, 16, ["label"])
|
|
503
|
+
], 64)) : S("", !0)
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["footer"])
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
}, 8, ["form"]),
|
|
510
|
+
r.value ? (o(), b("p", Ne, w(r.value), 1)) : S("", !0)
|
|
511
|
+
]));
|
|
512
|
+
}
|
|
513
|
+
}), Fe = { class: "flex flex-col gap-10" }, Me = ["data-settings-section"], Ze = /* @__PURE__ */ B({
|
|
514
|
+
__name: "SettingsBody",
|
|
515
|
+
props: {
|
|
516
|
+
preferences: {},
|
|
517
|
+
settings: {}
|
|
518
|
+
},
|
|
519
|
+
emits: ["change"],
|
|
520
|
+
setup(a, { emit: i }) {
|
|
521
|
+
const t = a, d = i, { t: s } = V(), l = le(), r = l.push && t.preferences.push_available, m = r ? re() : null, v = r ? Te() : null;
|
|
522
|
+
ie(() => void m?.inspect());
|
|
523
|
+
const c = D(
|
|
524
|
+
() => [
|
|
525
|
+
{ id: "channels", order: 0 },
|
|
526
|
+
...t.preferences.email_available || r ? [{ id: "quiet", order: 10 }] : [],
|
|
527
|
+
...r ? [{ id: "device", order: 20 }, { id: "devices", order: 30 }] : [],
|
|
528
|
+
...l.sections.filter((n) => n.visible?.(t.preferences) ?? !0).map((n, f) => ({ id: n.id, order: n.order ?? 100 + f, section: n }))
|
|
529
|
+
].sort((n, f) => n.order - f.order)
|
|
530
|
+
);
|
|
531
|
+
return (n, f) => (o(), b("div", Fe, [
|
|
532
|
+
(o(!0), b(q, null, M(c.value, (p) => (o(), b(q, {
|
|
533
|
+
key: p.id
|
|
534
|
+
}, [
|
|
535
|
+
p.id === "channels" ? (o(), h(Be, {
|
|
536
|
+
key: 0,
|
|
537
|
+
preferences: t.preferences,
|
|
538
|
+
onChange: f[0] || (f[0] = (...k) => d("change", ...k))
|
|
539
|
+
}, null, 8, ["preferences"])) : p.id === "quiet" ? (o(), h(Oe, {
|
|
540
|
+
key: 1,
|
|
541
|
+
"quiet-hours": t.preferences.quiet_hours,
|
|
542
|
+
"time-zone": t.preferences.time_zone,
|
|
543
|
+
submit: t.settings.saveQuietHours
|
|
544
|
+
}, null, 8, ["quiet-hours", "time-zone", "submit"])) : p.id === "device" && e(m) ? (o(), h(Ce, {
|
|
545
|
+
key: 2,
|
|
546
|
+
device: e(m),
|
|
547
|
+
onChanged: f[1] || (f[1] = (k) => e(v)?.loaded.reload())
|
|
548
|
+
}, null, 8, ["device"])) : p.id === "devices" && e(v) ? (o(), h(xe, {
|
|
549
|
+
key: 3,
|
|
550
|
+
devices: e(v),
|
|
551
|
+
hash: e(m)?.hash.value ?? null
|
|
552
|
+
}, null, 8, ["devices", "hash"])) : "section" in p ? (o(), b("section", {
|
|
553
|
+
key: 4,
|
|
554
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
555
|
+
"data-settings-section": p.id
|
|
556
|
+
}, [
|
|
557
|
+
u(H, {
|
|
558
|
+
title: e(s)(p.section.titleKey),
|
|
559
|
+
description: p.section.descriptionKey ? e(s)(p.section.descriptionKey) : void 0
|
|
560
|
+
}, null, 8, ["title", "description"]),
|
|
561
|
+
(o(), h(ne(p.section.component), {
|
|
562
|
+
preferences: t.preferences
|
|
563
|
+
}, null, 8, ["preferences"]))
|
|
564
|
+
], 8, Me)) : S("", !0)
|
|
565
|
+
], 64))), 128))
|
|
566
|
+
]));
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
function Ee(a = X().http) {
|
|
570
|
+
const i = Y(async ({ signal: l }) => (await a.request(T.preferences, void 0, { signal: l })).data), t = L([]);
|
|
571
|
+
async function d(l, r, m) {
|
|
572
|
+
const v = i.data.value, c = v?.categories.find((n) => n.category === l);
|
|
573
|
+
if (!(!v || !c || t.value.includes(l))) {
|
|
574
|
+
i.update(De(v, l, r, m)), t.value = [...t.value, l];
|
|
575
|
+
try {
|
|
576
|
+
const { data: n } = r === "email" ? await a.request(T.preferencesSetEmail, { category: l, email: m }) : await a.request(T.preferencesSetPush, { category: l, push: m }), f = i.data.value;
|
|
577
|
+
f && i.update(Q(f, n));
|
|
578
|
+
} catch (n) {
|
|
579
|
+
const f = i.data.value;
|
|
580
|
+
throw f && i.update(Q(f, c)), n;
|
|
581
|
+
} finally {
|
|
582
|
+
t.value = t.value.filter((n) => n !== l);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
async function s(l) {
|
|
587
|
+
const { data: r } = await a.request(T.quietHours, l), m = i.data.value;
|
|
588
|
+
return m && i.update({ ...m, quiet_hours: r }), r;
|
|
589
|
+
}
|
|
590
|
+
return { loaded: i, saving: t, setChannel: d, saveQuietHours: s };
|
|
591
|
+
}
|
|
592
|
+
const gt = /* @__PURE__ */ B({
|
|
593
|
+
__name: "SettingsPage",
|
|
594
|
+
setup(a) {
|
|
595
|
+
const { t: i } = V(), t = ae(), d = U(), s = Ee(), l = D(() => t.hasRoute("profile") ? { label: i("core.profile.menu"), to: { name: "profile" } } : void 0);
|
|
596
|
+
async function r(m, v, c) {
|
|
597
|
+
try {
|
|
598
|
+
await s.setChannel(m, v, c);
|
|
599
|
+
} catch (n) {
|
|
600
|
+
C.error(d.sentence(n, i("core.notifications.settings.email.save_failed")));
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return (m, v) => (o(), h(e(oe), {
|
|
604
|
+
title: e(i)("core.notifications.settings.title"),
|
|
605
|
+
description: e(i)("core.notifications.settings.description"),
|
|
606
|
+
back: l.value,
|
|
607
|
+
width: "readable"
|
|
608
|
+
}, {
|
|
609
|
+
default: _(() => [
|
|
610
|
+
u(e(W), {
|
|
611
|
+
state: e(s).loaded.state.value,
|
|
612
|
+
"skeleton-rows": 6,
|
|
613
|
+
"is-empty": () => !1,
|
|
614
|
+
onRetry: v[0] || (v[0] = (c) => e(s).loaded.reload())
|
|
615
|
+
}, {
|
|
616
|
+
default: _(({ value: c }) => [
|
|
617
|
+
u(Ze, {
|
|
618
|
+
preferences: c,
|
|
619
|
+
settings: e(s),
|
|
620
|
+
onChange: r
|
|
621
|
+
}, null, 8, ["preferences", "settings"])
|
|
622
|
+
]),
|
|
623
|
+
_: 1
|
|
624
|
+
}, 8, ["state"])
|
|
625
|
+
]),
|
|
626
|
+
_: 1
|
|
627
|
+
}, 8, ["title", "description", "back"]));
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
export {
|
|
631
|
+
gt as default
|
|
632
|
+
};
|
|
@@ -3,15 +3,15 @@ import { useI18n as A } from "vue-i18n";
|
|
|
3
3
|
import { _ as B } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
4
4
|
import { _ as V } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
5
5
|
import { u as D } from "./format-D8X4zsx6.js";
|
|
6
|
-
import { _ as p } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import {
|
|
8
|
-
import { u as U } from "./describeError-
|
|
9
|
-
import { c as q, P as z, b as F, _ as L, i as O, d as T } from "./index-
|
|
6
|
+
import { _ as p } from "./FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js";
|
|
7
|
+
import { g as b } from "./options-g8RwEhBk.js";
|
|
8
|
+
import { u as U } from "./describeError-BqGAUZgX.js";
|
|
9
|
+
import { c as q, P as z, b as F, _ as L, i as O, d as T } from "./index-kqk7Mclb.js";
|
|
10
10
|
import { t as h } from "./toast-CqSDTWRX.js";
|
|
11
|
-
import { u as j, h as G } from "./platform-
|
|
12
|
-
import { b as H } from "./routeResource-
|
|
11
|
+
import { u as j, h as G } from "./platform-Dl1fbScN.js";
|
|
12
|
+
import { b as H } from "./routeResource-CcYA75T2.js";
|
|
13
13
|
import { _ as J } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
14
|
-
import { _ as K } from "./ActionRow.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as K } from "./ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js";
|
|
15
15
|
import { _ as M } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
16
16
|
const Q = {
|
|
17
17
|
key: 0,
|
|
@@ -3,10 +3,10 @@ import { useI18n as x } from "vue-i18n";
|
|
|
3
3
|
import { useRoute as y, useRouter as h } from "vue-router";
|
|
4
4
|
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
5
5
|
import { _ as N } from "./Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js";
|
|
6
|
-
import { _ as S } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as a } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { r as $ } from "./guards-
|
|
9
|
-
import { u as C, a as E } from "./index-
|
|
6
|
+
import { _ as S } from "./FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js";
|
|
7
|
+
import { _ as a } from "./TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js";
|
|
8
|
+
import { r as $ } from "./guards-DRh4zmxO.js";
|
|
9
|
+
import { u as C, a as E } from "./index-kqk7Mclb.js";
|
|
10
10
|
const V = { class: "flex flex-1 flex-col items-center justify-center gap-8" }, k = { class: "text-xl font-semibold text-content-strong" }, H = /* @__PURE__ */ d({
|
|
11
11
|
__name: "SignInPage",
|
|
12
12
|
setup(q) {
|