@wssto2/vue-core 0.12.1 → 0.13.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/CHANGELOG.md +33 -0
- package/README.md +4 -2
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CzQbD2Pc.js → AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js} +1 -1
- package/dist/{Activity-CdkJW68R.js → Activity-ChfxdvXf.js} +24 -23
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js} +33 -33
- package/dist/{Changes-DxK_QfiB.js → Changes-BCa43_mO.js} +18 -17
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js → CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js → DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js → DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js} +2 -2
- package/dist/{DeadLetters-DnA7LP1w.js → DeadLetters-wFTqhISU.js} +5 -5
- package/dist/{General-2matxl2Y.js → General-jW7u4MjH.js} +16 -15
- package/dist/{IncidentRecord-Bt3G4HlX.js → IncidentRecord-zTemLz2R.js} +6 -6
- package/dist/{IncidentsList-2iwgqp9J.js → IncidentsList-yu0xSMrH.js} +6 -6
- package/dist/{NewRolePage-DhGFwvk3.js → NewRolePage-CQ5UVaHs.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js → NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js → PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js} +2 -2
- package/dist/{ProfilePage-CpuyDBAv.js → ProfilePage-Ca3x3UAH.js} +79 -77
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js → RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js → ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js → RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js} +2 -2
- package/dist/{RolePage-DaNv049g.js → RolePage-BUj1w1m1.js} +5 -5
- package/dist/{RolesPage-6hlzJes_.js → RolesPage-NKzBUsrM.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js} +2 -2
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js} +10 -9
- package/dist/{ServiceAccountRecord-0-JF5lRx.js → ServiceAccountRecord-ClbyeLhL.js} +8 -8
- package/dist/{ServiceAccountsList-DcsnOcf-.js → ServiceAccountsList-B2VDnYxD.js} +5 -5
- package/dist/{Sessions-DgWhpk-i.js → Sessions-BjkciyHH.js} +23 -21
- package/dist/{SettingsPage-BXPWATYU.js → SettingsPage-Csb14qsx.js} +7 -7
- package/dist/{SignIn-DPoUwHZd.js → SignIn-DPFMv4C7.js} +14 -12
- package/dist/{SignInPage-OyrVemro.js → SignInPage-DukoFqkt.js} +2 -2
- package/dist/{SignIns-BMDrZVVp.js → SignIns-DvdpNkiS.js} +23 -22
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js → TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js} +2 -2
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js → Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js} +1 -1
- package/dist/{UserRecord-BW-gdCqi.js → UserRecord-B9SeSWQh.js} +57 -55
- package/dist/{UsersList-B3ZF_1Dj.js → UsersList-CREG8q3l.js} +4 -4
- package/dist/access/index.js +4 -4
- package/dist/app/application.d.ts +14 -6
- package/dist/app/current.d.ts +11 -0
- package/dist/app/environment.d.ts +8 -0
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +14 -12
- package/dist/application-DomS6sbx.js +435 -0
- package/dist/collection/http.d.ts +16 -1
- package/dist/collection/index.d.ts +1 -1
- package/dist/collection/index.js +34 -32
- package/dist/content/Money.vue.d.ts +1 -1
- package/dist/content/index.js +151 -158
- package/dist/{contributions-CeG4bszd.js → contributions-obnyn03x.js} +1 -1
- package/dist/current-B0lHKTWr.js +17 -0
- package/dist/form/DateField.vue.d.ts +2 -2
- package/dist/form/DateTimeField.vue.d.ts +2 -2
- package/dist/form/MoneyField.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +1 -1
- package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
- package/dist/form/date/days.d.ts +3 -3
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1111 -1081
- package/dist/form/zodErrorMap.d.ts +35 -0
- package/dist/format/format.d.ts +51 -6
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/format-DoKs29bZ.js +118 -0
- package/dist/{guards-Biv_SlGn.js → guards-DGcSfTEh.js} +1 -1
- package/dist/http-DOEfFCDA.js +107 -0
- package/dist/i18n/index.js +15 -15
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.js +43 -40
- package/dist/identity/usePreferences.d.ts +19 -0
- package/dist/incidents/clientErrorReporter.d.ts +2 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-kEHY7hcG.js → index-Be9Q1PB_.js} +78 -76
- package/dist/{index-Cq9TuOqH.js → index-DZikGJ8L.js} +457 -511
- package/dist/{index-ClJeyW3F.js → index-D_yyd4C2.js} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +5 -2
- package/dist/modules/identity/entities.d.ts +4 -0
- package/dist/modules/identity/routes.d.ts +5 -2
- package/dist/modules/identity/schemas.d.ts +6 -2
- package/dist/modules/incident/routes.d.ts +2 -0
- package/dist/modules/incident/schemas.d.ts +2 -0
- package/dist/{navigation-TnVFYRaX.js → navigation-CctcxT51.js} +1 -1
- package/dist/{neighbors-OyvGi233.js → neighbors-Csfan8Ho.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/Tip.vue.d.ts +41 -0
- package/dist/onboarding/index.d.ts +1 -0
- package/dist/onboarding/index.js +145 -0
- package/dist/onboarding/tips.d.ts +5 -0
- package/dist/page/index.js +3 -3
- package/dist/phone/index.js +74 -74
- package/dist/phone/phone.d.ts +3 -3
- package/dist/platform/httpSession.d.ts +1 -1
- package/dist/platform/index.d.ts +2 -0
- package/dist/platform/index.js +16 -13
- package/dist/platform/preferences.d.ts +35 -0
- package/dist/platform/session.d.ts +6 -1
- package/dist/platform-DtISOEt7.js +284 -0
- package/dist/playwright/session.d.ts +2 -0
- package/dist/preferences-hYhrw8Uy.js +91 -0
- package/dist/resource/index.d.ts +1 -0
- package/dist/resource/index.js +24 -8
- package/dist/resource/read.d.ts +16 -0
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-BsKEzEME.js → rowLayout-y1IB_h2r.js} +2 -2
- package/dist/{sections-CvUwZ-S1.js → sections-fkW_IJLc.js} +1 -1
- package/dist/{serverMessages-B6GHgi40.js → serverMessages-Ddghrewh.js} +1 -1
- package/dist/shell/darkMode.d.ts +13 -8
- package/dist/shell/index.js +396 -384
- package/dist/{state-6KSYsVw0.js → state-CXMexi0l.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/app.d.ts +11 -0
- package/dist/testing/format.d.ts +4 -2
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +96 -89
- package/dist/testing/platform.d.ts +2 -0
- package/dist/usePreferences-B8LIZp_f.js +47 -0
- package/dist/{useTypedEntry-C_Bk4sI0.js → useTypedEntry-DKs8I1yP.js} +279 -280
- package/package.json +6 -2
- package/src/styles/components.css +17 -0
- package/dist/application-CuzT-0vW.js +0 -420
- package/dist/format-D8KUBmbS.js +0 -87
- package/dist/http-Dm0uXY9O.js +0 -95
- package/dist/intlLocale-CeRU44qJ.js +0 -4
- package/dist/platform-BQOX_Ntw.js +0 -283
|
@@ -1,229 +1,178 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as
|
|
3
|
-
import { k as Ie, u as
|
|
4
|
-
import { d as
|
|
5
|
-
import { d as
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import { a as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { t as
|
|
11
|
-
import { u as I, h as
|
|
1
|
+
import { i as K } from "./preferences-hYhrw8Uy.js";
|
|
2
|
+
import { d as ne, p as se } from "./feature-DdUAfyi4.js";
|
|
3
|
+
import { k as Ie, u as Pe } from "./keepAlive-ClGnsIzT.js";
|
|
4
|
+
import { d as X } from "./defineRoutes-BGAdiIrt.js";
|
|
5
|
+
import { d as N } from "./context-Ch1r4fdN.js";
|
|
6
|
+
import { defineComponent as $, computed as A, watch as ee, openBlock as m, createElementBlock as w, ref as oe, useTemplateRef as je, watchEffect as Ke, onBeforeUnmount as Le, createVNode as h, unref as t, createElementVNode as g, toDisplayString as _, createCommentVNode as k, createBlock as v, useId as Re, Teleport as ze, normalizeClass as ae, createTextVNode as E, withCtx as p, mergeProps as j, h as Te, Fragment as R, renderList as D, createSlots as me, renderSlot as Ue } from "vue";
|
|
7
|
+
import { a as Y } from "./error-CD7x0Jrz.js";
|
|
8
|
+
import { u as pe } from "./environment-Dva-SG8D.js";
|
|
9
|
+
import { u as B } from "./describeError-B-NMa--w.js";
|
|
10
|
+
import { t as z } from "./toast-CqSDTWRX.js";
|
|
11
|
+
import { u as I, h as W, f as te } from "./platform-DtISOEt7.js";
|
|
12
|
+
import { i as H, r as qe, l as Fe, s as Ne, a as Be } from "./usePreferences-B8LIZp_f.js";
|
|
12
13
|
import { useI18n as C } from "vue-i18n";
|
|
13
|
-
import { _ as
|
|
14
|
-
import { useRouter as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { u as
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { u as
|
|
21
|
-
import { u as
|
|
22
|
-
import { c as
|
|
14
|
+
import { _ as fe } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
15
|
+
import { useRouter as ge, useRoute as Ve, RouterLink as Me } from "vue-router";
|
|
16
|
+
import { _ as _e } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js";
|
|
17
|
+
import { _ as T } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
|
|
18
|
+
import { u as De } from "./leaveGuard-Cc8yeLxM.js";
|
|
19
|
+
import { _ as We } from "./FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js";
|
|
20
|
+
import { _ as L } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
|
|
21
|
+
import { u as Ge } from "./mediaQuery-CygcXmFW.js";
|
|
22
|
+
import { u as Xe } from "./useDialog-DfNmqM-0.js";
|
|
23
|
+
import { c as Ye } from "./closeOverlays-CjVsIrpL.js";
|
|
23
24
|
import { u as He, a as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
|
|
24
|
-
import { u as J } from "./format-
|
|
25
|
-
import { b as
|
|
26
|
-
import { _ as
|
|
27
|
-
import { g as
|
|
28
|
-
import { u as
|
|
29
|
-
import { u as
|
|
30
|
-
import { _ as
|
|
31
|
-
import { d as
|
|
32
|
-
import { z as
|
|
25
|
+
import { u as J } from "./format-DoKs29bZ.js";
|
|
26
|
+
import { b as Je } from "./routeResource-DlTsGTg_.js";
|
|
27
|
+
import { _ as F } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
28
|
+
import { g as U } from "./options-B48UiYsG.js";
|
|
29
|
+
import { u as he, _ as be } from "./useCommand-Ch_nx1AQ.js";
|
|
30
|
+
import { u as ye } from "./serverMessages-Ddghrewh.js";
|
|
31
|
+
import { _ as Qe } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
|
|
32
|
+
import { d as Ze, r as et } from "./http-DOEfFCDA.js";
|
|
33
|
+
import { z as r } from "zod";
|
|
33
34
|
import "./ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js";
|
|
34
|
-
import { _ as
|
|
35
|
-
import { _ as
|
|
36
|
-
import { _ as
|
|
37
|
-
import { _ as
|
|
35
|
+
import { _ as G } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
36
|
+
import { _ as tt } from "./DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js";
|
|
37
|
+
import { _ as nt } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
38
|
+
import { _ as st } from "./AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js";
|
|
38
39
|
import "./routes-Beyr5NQo.js";
|
|
39
|
-
const
|
|
40
|
-
login: h("POST", "/v1/auth/login", { public: !0 }),
|
|
41
|
-
refresh: h("POST", "/v1/auth/refresh", { public: !0 }),
|
|
42
|
-
logout: h("POST", "/v1/auth/logout"),
|
|
43
|
-
me: h("GET", "/v1/auth/me"),
|
|
44
|
-
changeLocale: h("POST", "/v1/auth/change-locale"),
|
|
45
|
-
loginAs: h("POST", "/v1/auth/login-as"),
|
|
46
|
-
loginAsReturn: h("POST", "/v1/auth/login-as/return"),
|
|
47
|
-
usersList: h("GET", "/v1/iam/users", { permission: "iam.user:view" }),
|
|
48
|
-
usersShow: h("GET", "/v1/iam/users/:id", { permission: "iam.user:view" }),
|
|
49
|
-
usersCreate: h("POST", "/v1/iam/users", { permission: "iam.user:manage" }),
|
|
50
|
-
usersUpdate: h("PUT", "/v1/iam/users/:id", { permission: "iam.user:manage" }),
|
|
51
|
-
usersSetPassword: h("PUT", "/v1/iam/users/:id/password", { permission: "iam.user:manage" }),
|
|
52
|
-
usersDeactivate: h("POST", "/v1/iam/users/:id/deactivate", { permission: "iam.user:manage" }),
|
|
53
|
-
usersActivate: h("POST", "/v1/iam/users/:id/activate", { permission: "iam.user:manage" }),
|
|
54
|
-
usersUnlock: h("POST", "/v1/iam/users/:id/unlock", { permission: "iam.user:manage" }),
|
|
55
|
-
usersSignins: h("GET", "/v1/iam/users/:id/signins", { permission: "iam.user:view" }),
|
|
56
|
-
usersChanges: h("GET", "/v1/iam/users/:id/changes", { permission: "iam.user:view" }),
|
|
57
|
-
usersActivity: h("GET", "/v1/iam/users/:id/activity", { permission: "iam.user.activity:view" }),
|
|
58
|
-
usersSessions: h("GET", "/v1/iam/users/:id/sessions", { permission: "iam.user:view" }),
|
|
59
|
-
usersRevokeSession: h("DELETE", "/v1/iam/users/:id/sessions/:session_id", { permission: "iam.user:manage" }),
|
|
60
|
-
usersRevokeSessions: h("DELETE", "/v1/iam/users/:id/sessions", { permission: "iam.user:manage" }),
|
|
61
|
-
profileShow: h("GET", "/v1/iam/profile"),
|
|
62
|
-
profileUpdate: h("PUT", "/v1/iam/profile"),
|
|
63
|
-
profileChangePassword: h("PUT", "/v1/iam/profile/password"),
|
|
64
|
-
profileRequestEmail: h("POST", "/v1/iam/profile/email"),
|
|
65
|
-
profileResendEmail: h("POST", "/v1/iam/profile/email/resend"),
|
|
66
|
-
profileConfirmEmail: h("POST", "/v1/iam/profile/email/confirm"),
|
|
67
|
-
profileCancelEmail: h("DELETE", "/v1/iam/profile/email"),
|
|
68
|
-
profileSignins: h("GET", "/v1/iam/profile/signins"),
|
|
69
|
-
profileSessions: h("GET", "/v1/iam/profile/sessions"),
|
|
70
|
-
profileRevokeSession: h("DELETE", "/v1/iam/profile/sessions/:session_id")
|
|
71
|
-
}, [nt, xe] = B("vue-core.identity"), Q = (e) => F(e) && e.kind === "unauthorized";
|
|
72
|
-
function st(e) {
|
|
73
|
-
if (!F(e) || e.code !== "identity.signin.locked") return null;
|
|
74
|
-
const n = e.params?.locked_until, o = typeof n == "string" ? new Date(n) : null;
|
|
75
|
-
return o && !Number.isNaN(o.getTime()) ? o : null;
|
|
76
|
-
}
|
|
77
|
-
async function ot({ http: e, session: n }, o) {
|
|
78
|
-
await e.request(P.login, o, { handleUnauthorized: !1 }), await ae({ session: n });
|
|
79
|
-
}
|
|
80
|
-
async function ae({ session: e }) {
|
|
81
|
-
const n = await e.refresh();
|
|
82
|
-
if (n.status === "failed") throw n.error;
|
|
83
|
-
if (n.status !== "authenticated") throw new Error("The server accepted the request but reports nobody signed in.");
|
|
84
|
-
}
|
|
85
|
-
async function it(e, n) {
|
|
86
|
-
await e.http.request(P.loginAs, { user_id: n }), await ae(e);
|
|
87
|
-
}
|
|
88
|
-
async function at(e) {
|
|
89
|
-
await e.http.request(P.loginAsReturn), await ae(e);
|
|
90
|
-
}
|
|
91
|
-
const rt = { hidden: "" }, ct = /* @__PURE__ */ E({
|
|
40
|
+
const [ot, ve] = N("vue-core.identity"), rt = { hidden: "" }, at = /* @__PURE__ */ $({
|
|
92
41
|
__name: "LocaleSync",
|
|
93
42
|
setup(e) {
|
|
94
|
-
const { http: n, session: o } = I(), s =
|
|
95
|
-
const
|
|
43
|
+
const { http: n, session: o } = I(), s = pe(), a = B(), c = A(() => {
|
|
44
|
+
const i = o.state.value, l = i.status === "authenticated" ? i.user.locale : void 0;
|
|
96
45
|
return typeof l == "string" ? l : null;
|
|
97
46
|
});
|
|
98
47
|
let d = null;
|
|
99
|
-
return
|
|
100
|
-
d =
|
|
101
|
-
}, { immediate: !0 }),
|
|
102
|
-
if (!(o.state.value.status !== "authenticated" ||
|
|
48
|
+
return ee(c, async (i) => {
|
|
49
|
+
d = i, i !== null && i !== s.locale.value && s.locales.includes(i) && await s.setLocale(i);
|
|
50
|
+
}, { immediate: !0 }), ee(s.locale, async (i) => {
|
|
51
|
+
if (!(o.state.value.status !== "authenticated" || i === d))
|
|
103
52
|
try {
|
|
104
|
-
await n.request(
|
|
53
|
+
await n.request(K.changeLocale, { locale: i }), d = i;
|
|
105
54
|
} catch (l) {
|
|
106
|
-
if (
|
|
107
|
-
|
|
55
|
+
if (H(l)) return;
|
|
56
|
+
z.error(a(l)), Y(l) && l.code === "identity.locale.unsupported" && d !== null && await s.setLocale(d);
|
|
108
57
|
}
|
|
109
|
-
}), (
|
|
58
|
+
}), (i, l) => (m(), w("span", rt));
|
|
110
59
|
}
|
|
111
60
|
});
|
|
112
|
-
function
|
|
113
|
-
const e = I(), n =
|
|
61
|
+
function xe() {
|
|
62
|
+
const e = I(), n = ge(), { home: o } = ve(), s = B(), a = oe(!1), c = A(() => W(e.session.state.value)?.impersonator != null);
|
|
114
63
|
async function d() {
|
|
115
64
|
a.value = !0;
|
|
116
65
|
try {
|
|
117
|
-
await
|
|
118
|
-
} catch (
|
|
119
|
-
|
|
66
|
+
await qe(e), await n.push(o);
|
|
67
|
+
} catch (i) {
|
|
68
|
+
H(i) || z.error(s(i)), e.session.refresh();
|
|
120
69
|
} finally {
|
|
121
70
|
a.value = !1;
|
|
122
71
|
}
|
|
123
72
|
}
|
|
124
73
|
return { impersonating: c, returning: a, leave: d };
|
|
125
74
|
}
|
|
126
|
-
const
|
|
75
|
+
const it = { class: "min-w-0 flex-1" }, ct = { class: "hidden md:inline" }, lt = { class: "md:hidden" }, ut = ["disabled"], dt = /* @__PURE__ */ $({
|
|
127
76
|
__name: "ImpersonationBanner",
|
|
128
77
|
setup(e) {
|
|
129
|
-
const { t: n } = C(), o = I(), { returning: s, leave: a } =
|
|
130
|
-
const u =
|
|
78
|
+
const { t: n } = C(), o = I(), { returning: s, leave: a } = xe(), c = A(() => W(o.session.state.value)?.impersonator ?? null), d = A(() => {
|
|
79
|
+
const u = W(o.session.state.value)?.user;
|
|
131
80
|
return typeof u?.name == "string" ? u.name : typeof u?.login == "string" ? u.login : String(u?.id ?? "");
|
|
132
|
-
}),
|
|
81
|
+
}), i = je("strip");
|
|
133
82
|
let l = null;
|
|
134
83
|
return Ke(() => {
|
|
135
84
|
l?.disconnect(), l = null;
|
|
136
|
-
const u =
|
|
85
|
+
const u = i.value;
|
|
137
86
|
if (!u) return void document.documentElement.style.removeProperty("--shell-banner-h");
|
|
138
87
|
if (typeof ResizeObserver > "u") return;
|
|
139
88
|
const f = () => document.documentElement.style.setProperty("--shell-banner-h", `${u.offsetHeight}px`);
|
|
140
89
|
l = new ResizeObserver(f), l.observe(u), f();
|
|
141
|
-
}, { flush: "post" }),
|
|
90
|
+
}, { flush: "post" }), Le(() => {
|
|
142
91
|
l?.disconnect(), document.documentElement.style.removeProperty("--shell-banner-h");
|
|
143
|
-
}), (u, f) => c.value ? (m(),
|
|
92
|
+
}), (u, f) => c.value ? (m(), w("div", {
|
|
144
93
|
key: 0,
|
|
145
94
|
ref_key: "strip",
|
|
146
|
-
ref:
|
|
95
|
+
ref: i,
|
|
147
96
|
role: "status",
|
|
148
97
|
"data-impersonation-banner": "",
|
|
149
98
|
class: "sticky top-0 z-40 flex flex-wrap items-center gap-x-3 gap-y-1.5 bg-status-warning-surface px-4 py-2 text-subheadline text-status-warning-content shadow-[inset_0_-1px_0_rgb(154_74_7/0.25)]"
|
|
150
99
|
}, [
|
|
151
|
-
|
|
100
|
+
h(t(fe), {
|
|
152
101
|
name: "informationLine",
|
|
153
102
|
size: 18,
|
|
154
103
|
class: "shrink-0 compact:hidden"
|
|
155
104
|
}),
|
|
156
|
-
g("span",
|
|
157
|
-
g("span",
|
|
158
|
-
g("span",
|
|
105
|
+
g("span", it, [
|
|
106
|
+
g("span", ct, _(t(n)("core.identity.impersonation.banner", { name: d.value })), 1),
|
|
107
|
+
g("span", lt, _(t(n)("core.identity.impersonation.banner_short", { name: d.value })), 1)
|
|
159
108
|
]),
|
|
160
109
|
g("button", {
|
|
161
110
|
type: "button",
|
|
162
111
|
disabled: t(s),
|
|
163
112
|
class: "hit-target cursor-pointer rounded-control bg-status-warning-solid px-3 py-1 text-footnote font-semibold whitespace-nowrap text-white transition duration-motion-fast hover:brightness-110 disabled:opacity-45",
|
|
164
113
|
onClick: f[0] || (f[0] = //@ts-ignore
|
|
165
|
-
(...
|
|
166
|
-
}, _(t(n)("core.identity.impersonation.return")), 9,
|
|
167
|
-
], 512)) :
|
|
114
|
+
(...y) => t(a) && t(a)(...y))
|
|
115
|
+
}, _(t(n)("core.identity.impersonation.return")), 9, ut)
|
|
116
|
+
], 512)) : k("", !0);
|
|
168
117
|
}
|
|
169
|
-
}),
|
|
118
|
+
}), mt = /* @__PURE__ */ $({
|
|
170
119
|
__name: "ReturnMenuItem",
|
|
171
120
|
setup(e) {
|
|
172
|
-
const { t: n } = C(), { impersonating: o, leave: s } =
|
|
173
|
-
return (a, c) => t(o) ? (m(),
|
|
121
|
+
const { t: n } = C(), { impersonating: o, leave: s } = xe();
|
|
122
|
+
return (a, c) => t(o) ? (m(), v(_e, {
|
|
174
123
|
key: 0,
|
|
175
124
|
label: t(n)("core.identity.impersonation.return"),
|
|
176
125
|
icon: "logoutBoxRLine",
|
|
177
126
|
"data-return-menu-item": "",
|
|
178
127
|
onClick: t(s)
|
|
179
|
-
}, null, 8, ["label", "onClick"])) :
|
|
128
|
+
}, null, 8, ["label", "onClick"])) : k("", !0);
|
|
180
129
|
}
|
|
181
130
|
});
|
|
182
|
-
function
|
|
183
|
-
const { t: n } = C(), o = I(), s = J(), a =
|
|
131
|
+
function pt(e = {}) {
|
|
132
|
+
const { t: n } = C(), o = I(), s = J(), a = B(), d = He({
|
|
184
133
|
defaults: () => ({ login: e.login ?? "", password: "" }),
|
|
185
134
|
validator: {
|
|
186
135
|
safeParse(l) {
|
|
187
|
-
const u = l, f = ["login", "password"].filter((
|
|
136
|
+
const u = l, f = ["login", "password"].filter((y) => u[y] === "").map((y) => ({ path: [y], message: n("core.identity.signin.required") }));
|
|
188
137
|
return f.length === 0 ? { success: !0, data: u } : { success: !1, error: { issues: f } };
|
|
189
138
|
}
|
|
190
139
|
},
|
|
191
140
|
failureMessage(l, u) {
|
|
192
|
-
const f =
|
|
193
|
-
return f ? n("core.errors.identity.signin.locked", { locked_until: s.time(f) }) :
|
|
141
|
+
const f = Fe(u);
|
|
142
|
+
return f ? n("core.errors.identity.signin.locked", { locked_until: s.time(f) }) : Y(u) ? a(u) : void 0;
|
|
194
143
|
}
|
|
195
|
-
}),
|
|
196
|
-
return { form: d, passwordError:
|
|
144
|
+
}), i = A(() => d.errors.first("password") ?? (d.failure.value?.error ? d.failure.value.message : void 0));
|
|
145
|
+
return { form: d, passwordError: i, submit: async () => (await d.submit((l) => Ne(o, l))).status === "saved" };
|
|
197
146
|
}
|
|
198
|
-
const
|
|
147
|
+
const ft = ["aria-labelledby"], gt = ["id"], _t = { class: "mt-1 text-subheadline text-content-muted" }, ht = { class: "flex items-center gap-2 rounded-control bg-status-success-surface px-2.5 py-2 text-footnote text-status-success-content" }, bt = { class: "flex flex-col gap-1.5" }, yt = { class: "text-footnote text-content-muted" }, vt = {
|
|
199
148
|
class: "rounded-control bg-fill px-2.5 py-2 text-body text-content-muted",
|
|
200
149
|
"data-expiry-login": ""
|
|
201
|
-
},
|
|
150
|
+
}, xt = /* @__PURE__ */ $({
|
|
202
151
|
__name: "SessionExpiry",
|
|
203
152
|
setup(e) {
|
|
204
|
-
const { t: n } = C(), { session: o } = I(), s =
|
|
205
|
-
const
|
|
153
|
+
const { t: n } = C(), { session: o } = I(), s = Ve(), a = De(), c = B(), d = Ge(), i = Re(), l = A(() => {
|
|
154
|
+
const S = o.state.value, O = S.status === "anonymous" && S.reason === "expired" ? S.previous?.user : void 0;
|
|
206
155
|
return typeof O?.login == "string" ? O.login : null;
|
|
207
|
-
}), u = A(() => l.value !== null && s.meta.public !== !0), f =
|
|
208
|
-
} }), { isOpen: x } =
|
|
209
|
-
|
|
210
|
-
|
|
156
|
+
}), u = A(() => l.value !== null && s.meta.public !== !0), f = oe(null), y = Xe(f, { onEscape: () => {
|
|
157
|
+
} }), { isOpen: x } = y, { form: b, passwordError: q, submit: M } = pt({ login: l.value ?? "" });
|
|
158
|
+
ee(u, (S) => {
|
|
159
|
+
S ? (b.hydrate({ login: l.value ?? "", password: "" }), Ye(), z.dismiss(), y.present()) : y.dismissWithoutAsking();
|
|
211
160
|
}, { immediate: !0, flush: "post" });
|
|
212
|
-
async function
|
|
161
|
+
async function P() {
|
|
213
162
|
if (!(a.hasUnsavedChanges() && !await a.confirm()))
|
|
214
163
|
try {
|
|
215
164
|
await o.signOut();
|
|
216
|
-
} catch (
|
|
217
|
-
|
|
165
|
+
} catch (S) {
|
|
166
|
+
H(S) || z.error(c(S));
|
|
218
167
|
}
|
|
219
168
|
}
|
|
220
|
-
return (
|
|
221
|
-
t(x) ? (m(),
|
|
169
|
+
return (S, O) => (m(), v(ze, { to: "body" }, [
|
|
170
|
+
t(x) ? (m(), w("div", {
|
|
222
171
|
key: 0,
|
|
223
172
|
class: "relative z-10000",
|
|
224
173
|
role: "alertdialog",
|
|
225
174
|
"aria-modal": "true",
|
|
226
|
-
"aria-labelledby": t(
|
|
175
|
+
"aria-labelledby": t(i),
|
|
227
176
|
"data-session-expiry": ""
|
|
228
177
|
}, [
|
|
229
178
|
O[0] || (O[0] = g("div", {
|
|
@@ -231,93 +180,93 @@ const _t = ["aria-labelledby"], ht = ["id"], vt = { class: "mt-1 text-subheadlin
|
|
|
231
180
|
"aria-hidden": "true"
|
|
232
181
|
}, null, -1)),
|
|
233
182
|
g("div", {
|
|
234
|
-
class:
|
|
183
|
+
class: ae(["fixed inset-0 flex p-4", t(d) ? "items-end p-0" : "items-center justify-center"])
|
|
235
184
|
}, [
|
|
236
185
|
g("div", {
|
|
237
186
|
ref_key: "panel",
|
|
238
187
|
ref: f,
|
|
239
188
|
tabindex: "-1",
|
|
240
|
-
class:
|
|
189
|
+
class: ae(["flex w-full flex-col gap-4 bg-surface-overlay p-6 shadow-float outline-none", t(d) ? "rounded-t-2xl pb-[max(2rem,var(--app-safe-bottom))]" : "max-w-sm rounded-menu"])
|
|
241
190
|
}, [
|
|
242
191
|
g("div", null, [
|
|
243
192
|
g("h2", {
|
|
244
|
-
id: t(
|
|
193
|
+
id: t(i),
|
|
245
194
|
class: "text-headline font-semibold text-content-strong"
|
|
246
|
-
}, _(t(n)("core.identity.expired.title")), 9,
|
|
247
|
-
g("p",
|
|
195
|
+
}, _(t(n)("core.identity.expired.title")), 9, gt),
|
|
196
|
+
g("p", _t, _(t(n)("core.identity.expired.body")), 1)
|
|
248
197
|
]),
|
|
249
|
-
g("p",
|
|
250
|
-
|
|
198
|
+
g("p", ht, [
|
|
199
|
+
h(t(fe), {
|
|
251
200
|
name: "checkboxCircleFill",
|
|
252
201
|
size: 16,
|
|
253
202
|
class: "shrink-0"
|
|
254
203
|
}),
|
|
255
|
-
|
|
204
|
+
E(" " + _(t(n)("core.identity.expired.kept")), 1)
|
|
256
205
|
]),
|
|
257
|
-
|
|
206
|
+
h(t(We), { onSubmit: t(M) }, {
|
|
258
207
|
default: p(() => [
|
|
259
208
|
g("div", bt, [
|
|
260
|
-
g("span",
|
|
261
|
-
g("span",
|
|
209
|
+
g("span", yt, _(t(n)("core.identity.username")), 1),
|
|
210
|
+
g("span", vt, _(l.value), 1)
|
|
262
211
|
]),
|
|
263
|
-
|
|
212
|
+
h(t(L), j(t(b).bind("password"), {
|
|
264
213
|
label: t(n)("core.identity.signin.password"),
|
|
265
214
|
type: "password",
|
|
266
215
|
autocomplete: "current-password",
|
|
267
216
|
required: "",
|
|
268
|
-
error: t(
|
|
217
|
+
error: t(q)
|
|
269
218
|
}), null, 16, ["label", "error"]),
|
|
270
|
-
|
|
219
|
+
h(t(T), {
|
|
271
220
|
type: "submit",
|
|
272
221
|
prominence: "primary",
|
|
273
222
|
class: "w-full",
|
|
274
|
-
processing: t(
|
|
223
|
+
processing: t(b).submitting.value
|
|
275
224
|
}, {
|
|
276
225
|
default: p(() => [
|
|
277
|
-
|
|
226
|
+
E(_(t(n)("core.identity.signin.submit")), 1)
|
|
278
227
|
]),
|
|
279
228
|
_: 1
|
|
280
229
|
}, 8, ["processing"])
|
|
281
230
|
]),
|
|
282
231
|
_: 1
|
|
283
232
|
}, 8, ["onSubmit"]),
|
|
284
|
-
|
|
233
|
+
h(t(T), {
|
|
285
234
|
prominence: "plain",
|
|
286
235
|
class: "self-center",
|
|
287
|
-
onClick:
|
|
236
|
+
onClick: P
|
|
288
237
|
}, {
|
|
289
238
|
default: p(() => [
|
|
290
|
-
|
|
239
|
+
E(_(t(n)("core.identity.expired.sign_out")), 1)
|
|
291
240
|
]),
|
|
292
241
|
_: 1
|
|
293
242
|
})
|
|
294
243
|
], 2)
|
|
295
244
|
], 2)
|
|
296
|
-
], 8,
|
|
245
|
+
], 8, ft)) : k("", !0)
|
|
297
246
|
]));
|
|
298
247
|
}
|
|
299
|
-
}),
|
|
300
|
-
login: { name: "login", path: "/login", component: () => import("./SignInPage-
|
|
248
|
+
}), wt = X({
|
|
249
|
+
login: { name: "login", path: "/login", component: () => import("./SignInPage-DukoFqkt.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
|
|
301
250
|
});
|
|
302
251
|
function Xn(e = {}) {
|
|
303
|
-
return
|
|
252
|
+
return ne({
|
|
304
253
|
id: "identity",
|
|
305
|
-
routes:
|
|
306
|
-
context:
|
|
254
|
+
routes: wt.records,
|
|
255
|
+
context: se(ot, { home: e.home ?? "/" }),
|
|
307
256
|
holdsExpiredSession: !0,
|
|
308
257
|
contributions: [
|
|
309
258
|
// Not optional: a shell without a `host` could not ask for the password, and the person would be stuck on a dead page.
|
|
310
|
-
{ id: "identity.expiry", slot: "host", component:
|
|
259
|
+
{ id: "identity.expiry", slot: "host", component: xt, scope: "always" },
|
|
311
260
|
// Not optional either: acting as somebody else must always be visible.
|
|
312
|
-
{ id: "identity.impersonation", slot: "banner", component:
|
|
261
|
+
{ id: "identity.impersonation", slot: "banner", component: dt, scope: "authenticated" },
|
|
313
262
|
// The same way out in the account menu (a shell without that slot shows only the banner's button).
|
|
314
|
-
{ id: "identity.return", slot: "accountMenu", component:
|
|
315
|
-
{ id: "identity.locale", slot: "host", component:
|
|
263
|
+
{ id: "identity.return", slot: "accountMenu", component: mt, scope: "authenticated", optional: !0, order: -20 },
|
|
264
|
+
{ id: "identity.locale", slot: "host", component: at, scope: "authenticated", optional: !0 }
|
|
316
265
|
],
|
|
317
266
|
effects: [Ie()]
|
|
318
267
|
});
|
|
319
268
|
}
|
|
320
|
-
const
|
|
269
|
+
const kt = (e) => Y(e) && e.kind === "unauthorized";
|
|
321
270
|
function Yn(e = {}) {
|
|
322
271
|
const n = e.tokenKey ?? "embed_access_token", o = e.expiresKey ?? "embed_expires_at", s = () => {
|
|
323
272
|
try {
|
|
@@ -333,9 +282,9 @@ function Yn(e = {}) {
|
|
|
333
282
|
}
|
|
334
283
|
};
|
|
335
284
|
return {
|
|
336
|
-
start(d,
|
|
285
|
+
start(d, i) {
|
|
337
286
|
try {
|
|
338
|
-
s()?.setItem(n, d), s()?.setItem(o,
|
|
287
|
+
s()?.setItem(n, d), s()?.setItem(o, i);
|
|
339
288
|
} catch {
|
|
340
289
|
}
|
|
341
290
|
},
|
|
@@ -357,17 +306,17 @@ const $t = (e) => () => {
|
|
|
357
306
|
const n = e.token();
|
|
358
307
|
return n ? { Authorization: `Bearer ${n}` } : {};
|
|
359
308
|
};
|
|
360
|
-
function
|
|
309
|
+
function St(e, n, o, s) {
|
|
361
310
|
return {
|
|
362
311
|
async load(a) {
|
|
363
312
|
if (!s.active()) return e.load(a);
|
|
364
313
|
if (s.expired())
|
|
365
314
|
return s.end(), null;
|
|
366
315
|
try {
|
|
367
|
-
const { data: c } = await n.request(
|
|
368
|
-
return
|
|
316
|
+
const { data: c } = await n.request(K.me, void 0, { signal: a, handleUnauthorized: !1 });
|
|
317
|
+
return te(c, o);
|
|
369
318
|
} catch (c) {
|
|
370
|
-
if (!
|
|
319
|
+
if (!kt(c)) throw c;
|
|
371
320
|
return s.end(), null;
|
|
372
321
|
}
|
|
373
322
|
},
|
|
@@ -380,119 +329,119 @@ function Tt(e, n, o, s) {
|
|
|
380
329
|
}
|
|
381
330
|
};
|
|
382
331
|
}
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
332
|
+
const Et = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ct = (e) => {
|
|
333
|
+
if (!Et(e)) throw new TypeError("expected an object");
|
|
385
334
|
if (typeof e.id != "number") throw new TypeError("id: expected a number");
|
|
386
335
|
for (const n of ["login", "name", "email", "locale"])
|
|
387
336
|
if (typeof e[n] != "string") throw new TypeError(`${n}: expected a string`);
|
|
388
337
|
return { id: e.id, login: e.login, name: e.name, email: e.email, locale: e.locale };
|
|
389
|
-
},
|
|
338
|
+
}, Z = (e) => Y(e) && e.kind === "unauthorized", we = (e, n) => e.request(K.refresh, { refresh_token: "" }, { signal: n, handleUnauthorized: !1 });
|
|
390
339
|
function Ot(e, n) {
|
|
391
340
|
return {
|
|
392
341
|
async load(o) {
|
|
393
342
|
try {
|
|
394
|
-
const { data: s } = await e.request(
|
|
395
|
-
return
|
|
343
|
+
const { data: s } = await e.request(K.me, void 0, { signal: o, handleUnauthorized: !1 });
|
|
344
|
+
return te(s, n);
|
|
396
345
|
} catch (s) {
|
|
397
|
-
if (!
|
|
346
|
+
if (!Z(s)) throw s;
|
|
398
347
|
}
|
|
399
348
|
try {
|
|
400
|
-
const { data: s } = await
|
|
401
|
-
return
|
|
349
|
+
const { data: s } = await we(e, o);
|
|
350
|
+
return te(s, n);
|
|
402
351
|
} catch (s) {
|
|
403
|
-
if (
|
|
352
|
+
if (Z(s)) return null;
|
|
404
353
|
throw s;
|
|
405
354
|
}
|
|
406
355
|
},
|
|
407
356
|
async signOut() {
|
|
408
357
|
try {
|
|
409
|
-
await e.request(
|
|
358
|
+
await e.request(K.logout, void 0, { handleUnauthorized: !1 });
|
|
410
359
|
} catch (o) {
|
|
411
|
-
if (!
|
|
360
|
+
if (!Z(o)) throw o;
|
|
412
361
|
}
|
|
413
362
|
}
|
|
414
363
|
};
|
|
415
364
|
}
|
|
416
|
-
function
|
|
417
|
-
const n = e?.parseUser ??
|
|
365
|
+
function Hn(e) {
|
|
366
|
+
const n = e?.parseUser ?? Ct, o = e?.embed;
|
|
418
367
|
return {
|
|
419
368
|
session: (a) => {
|
|
420
369
|
const c = Ot(a, n);
|
|
421
|
-
return o ?
|
|
370
|
+
return o ? St(c, a, n, o) : c;
|
|
422
371
|
},
|
|
423
372
|
...(o || e?.renewable) && { renewable: () => !o?.active() && (e?.renewable?.() ?? !0) },
|
|
424
373
|
...o && { headers: $t(o), onSessionExpired: o.end },
|
|
425
374
|
async renewSession(a, c) {
|
|
426
375
|
try {
|
|
427
|
-
return await
|
|
376
|
+
return await we(c), (await a.refresh()).status === "authenticated";
|
|
428
377
|
} catch {
|
|
429
378
|
return !1;
|
|
430
379
|
}
|
|
431
380
|
}
|
|
432
381
|
};
|
|
433
382
|
}
|
|
434
|
-
const
|
|
435
|
-
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-
|
|
436
|
-
}), At = /* @__PURE__ */
|
|
383
|
+
const ke = X({
|
|
384
|
+
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-Ca3x3UAH.js"), meta: { titleKey: "core.profile.title" } }
|
|
385
|
+
}), At = /* @__PURE__ */ $({
|
|
437
386
|
__name: "ProfileMenuItem",
|
|
438
387
|
setup(e) {
|
|
439
388
|
const { t: n } = C();
|
|
440
|
-
return (o, s) => (m(),
|
|
389
|
+
return (o, s) => (m(), v(_e, {
|
|
441
390
|
label: t(n)("core.profile.menu"),
|
|
442
391
|
icon: "user3Line",
|
|
443
|
-
to: t(
|
|
392
|
+
to: t(ke).index,
|
|
444
393
|
"data-profile-menu-item": ""
|
|
445
394
|
}, null, 8, ["label", "to"]));
|
|
446
395
|
}
|
|
447
|
-
}), [It, $e] =
|
|
448
|
-
function
|
|
449
|
-
const o =
|
|
396
|
+
}), [It, $e] = N("vue-core.users"), Pt = Symbol("vue-core.users.person"), [Jn, Qn] = N("vue-core.users.personActions"), [Zn, es] = N("vue-core.users.personSessions"), ie = ["general", "signin", "sessions", "signins", "changes", "activity"];
|
|
397
|
+
function ce(e, n) {
|
|
398
|
+
const o = $({
|
|
450
399
|
name: `PersonSection(${e.path})`,
|
|
451
400
|
setup() {
|
|
452
|
-
const s =
|
|
453
|
-
return () => s.data.value ?
|
|
401
|
+
const s = Je(Pt);
|
|
402
|
+
return () => s.data.value ? Te(e.component, e.props?.(s.data.value) ?? {}) : null;
|
|
454
403
|
}
|
|
455
404
|
});
|
|
456
405
|
return { name: `users.record.${e.path}`, path: e.path, component: o, meta: { ...e.meta, ...n !== void 0 && { section: { ...e.meta.section, groupKey: n } } } };
|
|
457
406
|
}
|
|
458
|
-
function
|
|
407
|
+
function jt(e, n) {
|
|
459
408
|
for (const { path: s, after: a } of n)
|
|
460
|
-
if (a !== void 0 && !
|
|
461
|
-
throw new Error(`usersFeature: the section "${s}" is placed after "${a}", which is not a section of a person's record (${
|
|
462
|
-
const o = (s) => n.filter((a) => a.after === s.path).map((a) =>
|
|
463
|
-
return [...e.flatMap((s) => [s, ...o(s)]), ...n.filter((s) => s.after === void 0).map((s) =>
|
|
409
|
+
if (a !== void 0 && !ie.includes(a))
|
|
410
|
+
throw new Error(`usersFeature: the section "${s}" is placed after "${a}", which is not a section of a person's record (${ie.join(", ")}).`);
|
|
411
|
+
const o = (s) => n.filter((a) => a.after === s.path).map((a) => ce(a, s.meta?.section?.groupKey));
|
|
412
|
+
return [...e.flatMap((s) => [s, ...o(s)]), ...n.filter((s) => s.after === void 0).map((s) => ce(s))];
|
|
464
413
|
}
|
|
465
|
-
const
|
|
466
|
-
index: { name: "users.index", path: "/users", component: () => import("./UsersList-
|
|
414
|
+
const le = "iam.user:view", ts = "iam.user:manage", Kt = "iam.user.activity:view", Se = X({
|
|
415
|
+
index: { name: "users.index", path: "/users", component: () => import("./UsersList-CREG8q3l.js"), meta: { access: le, titleKey: "core.users.title" } },
|
|
467
416
|
record: {
|
|
468
417
|
name: "users.record",
|
|
469
418
|
path: "/users/:id",
|
|
470
|
-
component: () => import("./UserRecord-
|
|
471
|
-
meta: { access:
|
|
419
|
+
component: () => import("./UserRecord-B9SeSWQh.js"),
|
|
420
|
+
meta: { access: le, titleKey: "core.users.title", remountOnParam: "id" },
|
|
472
421
|
children: [
|
|
473
|
-
{ name: "users.record.general", path: "general", component: () => import("./General-
|
|
474
|
-
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-
|
|
475
|
-
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-
|
|
476
|
-
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-
|
|
477
|
-
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-
|
|
478
|
-
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-
|
|
422
|
+
{ name: "users.record.general", path: "general", component: () => import("./General-jW7u4MjH.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
|
|
423
|
+
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-DPFMv4C7.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
|
|
424
|
+
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-BjkciyHH.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
|
|
425
|
+
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-DvdpNkiS.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
|
|
426
|
+
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-BCa43_mO.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
|
|
427
|
+
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-ChfxdvXf.js"), meta: { access: Kt, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
|
|
479
428
|
]
|
|
480
429
|
}
|
|
481
430
|
});
|
|
482
|
-
function
|
|
483
|
-
return
|
|
431
|
+
function Lt(e, n, o) {
|
|
432
|
+
return Se.records.map((s) => {
|
|
484
433
|
if (s.name === "users.index") return { ...s, path: e, ...n.list && { component: n.list } };
|
|
485
434
|
if (s.name !== "users.record") return s;
|
|
486
435
|
const a = (s.children ?? []).map((c) => c.name === "users.record.general" && n.general ? { ...c, component: n.general } : c);
|
|
487
|
-
return { ...s, path: `${e}/:id`, children:
|
|
436
|
+
return { ...s, path: `${e}/:id`, children: jt(a, o) };
|
|
488
437
|
});
|
|
489
438
|
}
|
|
490
|
-
function
|
|
439
|
+
function ns(e = {}) {
|
|
491
440
|
const n = e.people ?? !0, o = e.profile ?? !0, s = e.signInAs ?? "iam.user:impersonate", a = e.replace ?? {}, c = (e.path ?? "/users").replace(/\/+$/, "") || "/users";
|
|
492
|
-
return
|
|
441
|
+
return ne({
|
|
493
442
|
id: "users",
|
|
494
|
-
routes: [...n ?
|
|
495
|
-
context:
|
|
443
|
+
routes: [...n ? Lt(c, a, e.sections ?? []) : [], ...o ? ke.records : []],
|
|
444
|
+
context: se(It, {
|
|
496
445
|
signInAs: s,
|
|
497
446
|
activityAreas: e.activityAreas ?? {},
|
|
498
447
|
profileSections: e.profileSections ?? [],
|
|
@@ -501,13 +450,13 @@ function ss(e = {}) {
|
|
|
501
450
|
activityRecords: e.activityRecords ?? {},
|
|
502
451
|
changeWords: e.changeWords
|
|
503
452
|
}),
|
|
504
|
-
navigation: n && e.destination ? [{ destination: e.destination, to:
|
|
453
|
+
navigation: n && e.destination ? [{ destination: e.destination, to: Se.index, within: ["users.record"] }] : [],
|
|
505
454
|
// The entry of the account menu; a shell without that menu leaves it out.
|
|
506
455
|
contributions: o ? [{ id: "users.profile", slot: "accountMenu", component: At, scope: "authenticated", optional: !0, order: -10 }] : [],
|
|
507
456
|
requires: n && s !== !1 ? ["identity"] : []
|
|
508
457
|
});
|
|
509
458
|
}
|
|
510
|
-
const
|
|
459
|
+
const Rt = /* @__PURE__ */ $({
|
|
511
460
|
__name: "DeactivateDialog",
|
|
512
461
|
props: {
|
|
513
462
|
id: {},
|
|
@@ -516,16 +465,16 @@ const jt = /* @__PURE__ */ E({
|
|
|
516
465
|
},
|
|
517
466
|
emits: ["done"],
|
|
518
467
|
setup(e, { expose: n, emit: o }) {
|
|
519
|
-
const s = e, a = o, { t: c } = C(), { http: d } = I(),
|
|
520
|
-
...
|
|
468
|
+
const s = e, a = o, { t: c } = C(), { http: d } = I(), i = he({
|
|
469
|
+
...ye(),
|
|
521
470
|
defaults: () => ({}),
|
|
522
|
-
run: () => d.request(
|
|
471
|
+
run: () => d.request(K.usersDeactivate, { id: s.id }),
|
|
523
472
|
done: () => {
|
|
524
|
-
|
|
473
|
+
z.success(c("core.users.deactivate.done", { name: s.name })), a("done");
|
|
525
474
|
}
|
|
526
475
|
});
|
|
527
|
-
return n({ open: () =>
|
|
528
|
-
command: t(
|
|
476
|
+
return n({ open: () => i.present() }), (l, u) => (m(), v(t(be), {
|
|
477
|
+
command: t(i),
|
|
529
478
|
title: t(c)("core.users.deactivate.title"),
|
|
530
479
|
subtitle: s.name,
|
|
531
480
|
"confirm-label": t(c)("core.users.actions.deactivate_short"),
|
|
@@ -534,28 +483,28 @@ const jt = /* @__PURE__ */ E({
|
|
|
534
483
|
size: "md"
|
|
535
484
|
}, {
|
|
536
485
|
default: p(() => [
|
|
537
|
-
|
|
486
|
+
h(t(V), { "data-deactivate-dialog": "" }, {
|
|
538
487
|
default: p(() => [
|
|
539
|
-
|
|
488
|
+
h(t(U), {
|
|
540
489
|
layout: "setting",
|
|
541
490
|
label: t(c)("core.users.deactivate.signs_out", { n: s.sessionCount ?? 0 }),
|
|
542
491
|
sub: t(c)("core.users.deactivate.signs_out_sub")
|
|
543
492
|
}, {
|
|
544
493
|
leading: p(() => [
|
|
545
|
-
|
|
494
|
+
h(t(F), {
|
|
546
495
|
tone: "anchor",
|
|
547
496
|
icon: "logoutBoxRLine"
|
|
548
497
|
})
|
|
549
498
|
]),
|
|
550
499
|
_: 1
|
|
551
500
|
}, 8, ["label", "sub"]),
|
|
552
|
-
|
|
501
|
+
h(t(U), {
|
|
553
502
|
layout: "setting",
|
|
554
503
|
label: t(c)("core.users.deactivate.cannot_sign_in"),
|
|
555
504
|
sub: t(c)("core.users.deactivate.cannot_sign_in_sub")
|
|
556
505
|
}, {
|
|
557
506
|
leading: p(() => [
|
|
558
|
-
|
|
507
|
+
h(t(F), {
|
|
559
508
|
tone: "anchor",
|
|
560
509
|
icon: "lockLine"
|
|
561
510
|
})
|
|
@@ -569,25 +518,25 @@ const jt = /* @__PURE__ */ E({
|
|
|
569
518
|
_: 1
|
|
570
519
|
}, 8, ["command", "title", "subtitle", "confirm-label", "busy-label", "done-label"]));
|
|
571
520
|
}
|
|
572
|
-
}), zt = /* @__PURE__ */
|
|
521
|
+
}), zt = /* @__PURE__ */ $({
|
|
573
522
|
__name: "NewUserDialog",
|
|
574
523
|
emits: ["created"],
|
|
575
524
|
setup(e, { expose: n, emit: o }) {
|
|
576
|
-
const { t: s } = C(), { http: a } = I(), c =
|
|
577
|
-
safeParse(
|
|
578
|
-
const { repeat:
|
|
579
|
-
return M === null && O.push({ path: ["locale"], message:
|
|
525
|
+
const { t: s } = C(), { http: a } = I(), c = pe(), d = ye(), i = Pe(), l = () => ({ login: "", name: "", email: "", phone: "", locale: c.locale.value, password: "", repeat: "" }), u = (b) => b.trim() === "", f = {
|
|
526
|
+
safeParse(b) {
|
|
527
|
+
const { repeat: q, locale: M, ...P } = b, S = s("core.account.validation.required"), O = ["login", "name", "email", "password"].filter((Q) => u(P[Q])).map((Q) => ({ path: [Q], message: S }));
|
|
528
|
+
return M === null && O.push({ path: ["locale"], message: S }), !u(P.password) && q !== P.password && O.push({ path: ["repeat"], message: u(q) ? S : s("core.account.validation.mismatch") }), O.length > 0 ? { success: !1, error: { issues: O } } : { success: !0, data: { ...P, locale: M ?? "", phone: u(P.phone) ? void 0 : P.phone } };
|
|
580
529
|
}
|
|
581
|
-
},
|
|
530
|
+
}, y = o, x = he({
|
|
582
531
|
...d,
|
|
583
532
|
defaults: l,
|
|
584
533
|
validator: f,
|
|
585
|
-
run: async (
|
|
586
|
-
done: (
|
|
587
|
-
|
|
534
|
+
run: async (b) => (await a.request(K.usersCreate, b)).data,
|
|
535
|
+
done: (b) => {
|
|
536
|
+
z.success(s("core.users.create.done", { name: b.name })), y("created", b);
|
|
588
537
|
}
|
|
589
538
|
});
|
|
590
|
-
return n({ create: () => x.present() }), (
|
|
539
|
+
return n({ create: () => x.present() }), (b, q) => (m(), v(t(be), {
|
|
591
540
|
command: t(x),
|
|
592
541
|
title: t(s)("core.users.create.title"),
|
|
593
542
|
subtitle: t(s)("core.users.create.subtitle"),
|
|
@@ -595,45 +544,45 @@ const jt = /* @__PURE__ */ E({
|
|
|
595
544
|
size: "md"
|
|
596
545
|
}, {
|
|
597
546
|
default: p(() => [
|
|
598
|
-
|
|
547
|
+
h(t(V), { "label-width": "11rem" }, {
|
|
599
548
|
default: p(() => [
|
|
600
|
-
|
|
549
|
+
h(t(L), j(t(x).form.bind("name"), {
|
|
601
550
|
label: t(s)("core.users.fields.name"),
|
|
602
551
|
required: "",
|
|
603
552
|
autocomplete: "off"
|
|
604
553
|
}), null, 16, ["label"]),
|
|
605
|
-
|
|
554
|
+
h(t(L), j(t(x).form.bind("login"), {
|
|
606
555
|
label: t(s)("core.users.fields.login"),
|
|
607
556
|
required: "",
|
|
608
557
|
mono: "",
|
|
609
558
|
autocomplete: "off"
|
|
610
559
|
}), null, 16, ["label"]),
|
|
611
|
-
|
|
560
|
+
h(t(L), j(t(x).form.bind("password"), {
|
|
612
561
|
label: t(s)("core.users.fields.password"),
|
|
613
562
|
type: "password",
|
|
614
563
|
required: "",
|
|
615
564
|
autocomplete: "new-password"
|
|
616
565
|
}), null, 16, ["label"]),
|
|
617
|
-
|
|
566
|
+
h(t(L), j(t(x).form.bind("repeat"), {
|
|
618
567
|
label: t(s)("core.users.fields.password_repeat"),
|
|
619
568
|
type: "password",
|
|
620
569
|
required: "",
|
|
621
570
|
autocomplete: "new-password"
|
|
622
571
|
}), null, 16, ["label"]),
|
|
623
|
-
|
|
572
|
+
h(t(L), j(t(x).form.bind("email"), {
|
|
624
573
|
label: t(s)("core.users.fields.email"),
|
|
625
574
|
type: "email",
|
|
626
575
|
required: "",
|
|
627
576
|
autocomplete: "off"
|
|
628
577
|
}), null, 16, ["label"]),
|
|
629
|
-
|
|
578
|
+
h(t(L), j(t(x).form.bind("phone"), {
|
|
630
579
|
label: t(s)("core.users.fields.phone"),
|
|
631
580
|
type: "tel",
|
|
632
581
|
autocomplete: "off"
|
|
633
582
|
}), null, 16, ["label"]),
|
|
634
|
-
|
|
583
|
+
h(t(Qe), j(t(x).form.bind("locale"), {
|
|
635
584
|
label: t(s)("core.users.fields.locale"),
|
|
636
|
-
options: t(
|
|
585
|
+
options: t(i),
|
|
637
586
|
required: ""
|
|
638
587
|
}), null, 16, ["label", "options"])
|
|
639
588
|
]),
|
|
@@ -644,120 +593,123 @@ const jt = /* @__PURE__ */ E({
|
|
|
644
593
|
}, 8, ["command", "title", "subtitle", "confirm-label"]));
|
|
645
594
|
}
|
|
646
595
|
});
|
|
647
|
-
function
|
|
596
|
+
function ss() {
|
|
648
597
|
const { replace: e } = $e();
|
|
649
|
-
return { newUser: e.newUser ?? zt, deactivate: e.deactivate ??
|
|
598
|
+
return { newUser: e.newUser ?? zt, deactivate: e.deactivate ?? Rt };
|
|
650
599
|
}
|
|
651
|
-
|
|
652
|
-
id:
|
|
653
|
-
area:
|
|
654
|
-
from:
|
|
655
|
-
to:
|
|
656
|
-
page:
|
|
657
|
-
per_page:
|
|
600
|
+
r.object({
|
|
601
|
+
id: r.number().int(),
|
|
602
|
+
area: r.string().max(32).optional(),
|
|
603
|
+
from: r.string().max(10).optional(),
|
|
604
|
+
to: r.string().max(10).optional(),
|
|
605
|
+
page: r.number().int().optional(),
|
|
606
|
+
per_page: r.number().int().optional()
|
|
607
|
+
});
|
|
608
|
+
r.object({
|
|
609
|
+
locale: r.string().min(1).max(16)
|
|
658
610
|
});
|
|
659
|
-
|
|
660
|
-
|
|
611
|
+
r.object({
|
|
612
|
+
current_password: r.string().min(1).max(200),
|
|
613
|
+
new_password: r.string().min(1).max(200),
|
|
614
|
+
new_password_confirmation: r.string().min(1).max(200)
|
|
661
615
|
});
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
616
|
+
const Tt = r.enum(["all", "access", "details"]);
|
|
617
|
+
r.object({
|
|
618
|
+
id: r.number().int(),
|
|
619
|
+
view: Tt.optional(),
|
|
620
|
+
page: r.number().int().optional(),
|
|
621
|
+
per_page: r.number().int().optional()
|
|
666
622
|
});
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
id: i.number().int(),
|
|
670
|
-
view: qt.optional(),
|
|
671
|
-
page: i.number().int().optional(),
|
|
672
|
-
per_page: i.number().int().optional()
|
|
623
|
+
r.object({
|
|
624
|
+
code: r.string().min(1).max(12)
|
|
673
625
|
});
|
|
674
|
-
|
|
675
|
-
|
|
626
|
+
r.object({
|
|
627
|
+
login: r.string().min(1).max(100),
|
|
628
|
+
name: r.string().min(1).max(150),
|
|
629
|
+
email: r.string().min(1).max(255),
|
|
630
|
+
phone: r.string().max(30).optional(),
|
|
631
|
+
locale: r.string().min(1).max(16),
|
|
632
|
+
password: r.string().min(1).max(200),
|
|
633
|
+
ext: r.unknown().optional()
|
|
676
634
|
});
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
email: i.string().min(1).max(255),
|
|
681
|
-
phone: i.string().max(30).optional(),
|
|
682
|
-
locale: i.string().min(1).max(16),
|
|
683
|
-
password: i.string().min(1).max(200),
|
|
684
|
-
ext: i.unknown().optional()
|
|
635
|
+
r.object({
|
|
636
|
+
id: r.number().int(),
|
|
637
|
+
details: r.unknown().optional()
|
|
685
638
|
});
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
639
|
+
const Ee = r.enum(["never", "idle"]), Ut = r.enum(["active", "locked", "inactive", "all"]);
|
|
640
|
+
r.object({
|
|
641
|
+
view: Ut.optional(),
|
|
642
|
+
search: r.string().max(100).optional(),
|
|
643
|
+
order_col: r.string().max(16).optional(),
|
|
644
|
+
order_dir: r.string().max(4).optional(),
|
|
645
|
+
page: r.number().int().optional(),
|
|
646
|
+
per_page: r.number().int().optional(),
|
|
647
|
+
last_sign_in: Ee.optional()
|
|
689
648
|
});
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
view: Ft.optional(),
|
|
693
|
-
search: i.string().max(100).optional(),
|
|
694
|
-
order_col: i.string().max(16).optional(),
|
|
695
|
-
order_dir: i.string().max(4).optional(),
|
|
696
|
-
page: i.number().int().optional(),
|
|
697
|
-
per_page: i.number().int().optional(),
|
|
698
|
-
last_sign_in: Ce.optional()
|
|
649
|
+
r.object({
|
|
650
|
+
user_id: r.number().int().refine((e) => e !== 0, { params: { code: "required" } })
|
|
699
651
|
});
|
|
700
|
-
|
|
701
|
-
|
|
652
|
+
r.object({
|
|
653
|
+
login: r.string().min(1).max(100),
|
|
654
|
+
password: r.string().min(1).max(200)
|
|
702
655
|
});
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
password: i.string().min(1).max(200)
|
|
656
|
+
r.object({
|
|
657
|
+
session_id: r.number().int()
|
|
706
658
|
});
|
|
707
|
-
|
|
708
|
-
|
|
659
|
+
const Ce = r.enum(["all", "failed"]);
|
|
660
|
+
r.object({
|
|
661
|
+
view: Ce.optional(),
|
|
662
|
+
page: r.number().int().optional(),
|
|
663
|
+
per_page: r.number().int().optional()
|
|
709
664
|
});
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
view: Pe.optional(),
|
|
713
|
-
page: i.number().int().optional(),
|
|
714
|
-
per_page: i.number().int().optional()
|
|
665
|
+
r.object({
|
|
666
|
+
refresh_token: r.string().max(255)
|
|
715
667
|
});
|
|
716
|
-
|
|
717
|
-
|
|
668
|
+
r.object({
|
|
669
|
+
email: r.string().min(1).max(255),
|
|
670
|
+
current_password: r.string().min(1).max(200)
|
|
718
671
|
});
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
672
|
+
r.object({
|
|
673
|
+
id: r.number().int(),
|
|
674
|
+
password: r.string().min(1).max(200)
|
|
722
675
|
});
|
|
723
|
-
|
|
724
|
-
id:
|
|
725
|
-
|
|
676
|
+
r.object({
|
|
677
|
+
id: r.number().int(),
|
|
678
|
+
view: Ce.optional(),
|
|
679
|
+
page: r.number().int().optional(),
|
|
680
|
+
per_page: r.number().int().optional()
|
|
726
681
|
});
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
view: Pe.optional(),
|
|
730
|
-
page: i.number().int().optional(),
|
|
731
|
-
per_page: i.number().int().optional()
|
|
682
|
+
r.object({
|
|
683
|
+
preferences: r.unknown()
|
|
732
684
|
});
|
|
733
|
-
|
|
734
|
-
name:
|
|
735
|
-
phone:
|
|
685
|
+
r.object({
|
|
686
|
+
name: r.string().min(1).max(150),
|
|
687
|
+
phone: r.string().max(30).optional()
|
|
736
688
|
});
|
|
737
|
-
|
|
738
|
-
id:
|
|
739
|
-
login:
|
|
740
|
-
name:
|
|
741
|
-
email:
|
|
742
|
-
phone:
|
|
743
|
-
locale:
|
|
744
|
-
ext:
|
|
689
|
+
r.object({
|
|
690
|
+
id: r.number().int(),
|
|
691
|
+
login: r.string().min(1).max(100),
|
|
692
|
+
name: r.string().min(1).max(150),
|
|
693
|
+
email: r.string().min(1).max(255),
|
|
694
|
+
phone: r.string().max(30).optional(),
|
|
695
|
+
locale: r.string().min(1).max(16),
|
|
696
|
+
ext: r.unknown().optional()
|
|
745
697
|
});
|
|
746
|
-
|
|
747
|
-
id:
|
|
698
|
+
r.object({
|
|
699
|
+
id: r.number().int()
|
|
748
700
|
});
|
|
749
|
-
|
|
750
|
-
id:
|
|
751
|
-
session_id:
|
|
701
|
+
r.object({
|
|
702
|
+
id: r.number().int(),
|
|
703
|
+
session_id: r.number().int()
|
|
752
704
|
});
|
|
753
|
-
const
|
|
754
|
-
function
|
|
755
|
-
return
|
|
705
|
+
const qt = ["active", "locked", "inactive", "all"];
|
|
706
|
+
function Ft(e) {
|
|
707
|
+
return Ze({
|
|
756
708
|
id: "identity.users",
|
|
757
709
|
stateVersion: 1,
|
|
758
710
|
load: async (n, { signal: o }) => {
|
|
759
711
|
const s = await e.request(
|
|
760
|
-
|
|
712
|
+
K.usersList,
|
|
761
713
|
{
|
|
762
714
|
view: n.view ?? void 0,
|
|
763
715
|
search: n.search || void 0,
|
|
@@ -765,26 +717,26 @@ function Dt(e) {
|
|
|
765
717
|
order_dir: n.sort ? n.direction : void 0,
|
|
766
718
|
page: n.page,
|
|
767
719
|
per_page: n.pageSize,
|
|
768
|
-
last_sign_in:
|
|
720
|
+
last_sign_in: Ee.safeParse(n.filters.last_sign_in).data
|
|
769
721
|
},
|
|
770
722
|
{ signal: o }
|
|
771
723
|
);
|
|
772
|
-
return
|
|
724
|
+
return et(s, n);
|
|
773
725
|
},
|
|
774
726
|
key: (n) => n.id,
|
|
775
|
-
query: { sorts: ["login", "name", "email", "created_at"], filters: ["last_sign_in"], views:
|
|
727
|
+
query: { sorts: ["login", "name", "email", "created_at"], filters: ["last_sign_in"], views: qt },
|
|
776
728
|
defaults: { sort: "name", direction: "asc", view: "active" }
|
|
777
729
|
});
|
|
778
730
|
}
|
|
779
|
-
function
|
|
731
|
+
function os() {
|
|
780
732
|
const { collection: e } = $e(), { http: n } = I();
|
|
781
|
-
return e ??
|
|
733
|
+
return e ?? Ft(n);
|
|
782
734
|
}
|
|
783
|
-
const
|
|
735
|
+
const rs = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "positive", Nt = {
|
|
784
736
|
key: 0,
|
|
785
737
|
class: "flex items-center justify-between gap-3 px-row-inset text-footnote text-content-muted",
|
|
786
738
|
"data-page-bar": ""
|
|
787
|
-
},
|
|
739
|
+
}, Bt = { class: "flex gap-2" }, as = /* @__PURE__ */ $({
|
|
788
740
|
__name: "PageBar",
|
|
789
741
|
props: {
|
|
790
742
|
page: {},
|
|
@@ -794,31 +746,31 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
794
746
|
emits: ["update:page"],
|
|
795
747
|
setup(e, { emit: n }) {
|
|
796
748
|
const o = e, s = n, { t: a } = C();
|
|
797
|
-
return (c, d) => o.lastPage > 1 ? (m(),
|
|
749
|
+
return (c, d) => o.lastPage > 1 ? (m(), w("div", Nt, [
|
|
798
750
|
g("span", null, _(t(a)("core.collection.page.page_of", { current: o.page, total: o.lastPage })) + " · " + _(o.total), 1),
|
|
799
|
-
g("span",
|
|
800
|
-
|
|
751
|
+
g("span", Bt, [
|
|
752
|
+
h(t(T), {
|
|
801
753
|
size: "sm",
|
|
802
754
|
disabled: o.page <= 1,
|
|
803
|
-
onClick: d[0] || (d[0] = (
|
|
755
|
+
onClick: d[0] || (d[0] = (i) => s("update:page", o.page - 1))
|
|
804
756
|
}, {
|
|
805
757
|
default: p(() => [
|
|
806
|
-
|
|
758
|
+
E(_(t(a)("core.collection.page.previous")), 1)
|
|
807
759
|
]),
|
|
808
760
|
_: 1
|
|
809
761
|
}, 8, ["disabled"]),
|
|
810
|
-
|
|
762
|
+
h(t(T), {
|
|
811
763
|
size: "sm",
|
|
812
764
|
disabled: o.page >= o.lastPage,
|
|
813
|
-
onClick: d[1] || (d[1] = (
|
|
765
|
+
onClick: d[1] || (d[1] = (i) => s("update:page", o.page + 1))
|
|
814
766
|
}, {
|
|
815
767
|
default: p(() => [
|
|
816
|
-
|
|
768
|
+
E(_(t(a)("core.collection.page.next")), 1)
|
|
817
769
|
]),
|
|
818
770
|
_: 1
|
|
819
771
|
}, 8, ["disabled"])
|
|
820
772
|
])
|
|
821
|
-
])) :
|
|
773
|
+
])) : k("", !0);
|
|
822
774
|
}
|
|
823
775
|
}), Vt = {
|
|
824
776
|
class: "flex flex-col gap-y-0.5 md:flex-row md:flex-wrap md:items-center md:gap-x-1.5",
|
|
@@ -826,14 +778,14 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
826
778
|
}, Mt = {
|
|
827
779
|
key: 0,
|
|
828
780
|
class: "font-mono"
|
|
829
|
-
},
|
|
781
|
+
}, Dt = {
|
|
830
782
|
key: 1,
|
|
831
783
|
"aria-hidden": "true",
|
|
832
784
|
class: "hidden md:inline"
|
|
833
|
-
},
|
|
785
|
+
}, Wt = {
|
|
834
786
|
key: 0,
|
|
835
787
|
class: "mt-1 flex flex-wrap gap-1"
|
|
836
|
-
},
|
|
788
|
+
}, is = /* @__PURE__ */ $({
|
|
837
789
|
__name: "SessionList",
|
|
838
790
|
props: {
|
|
839
791
|
sessions: {},
|
|
@@ -844,63 +796,63 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
844
796
|
emits: ["end"],
|
|
845
797
|
setup(e, { emit: n }) {
|
|
846
798
|
const o = e, s = n, { t: a } = C(), c = J();
|
|
847
|
-
return (d,
|
|
799
|
+
return (d, i) => (m(), v(t(V), {
|
|
848
800
|
header: o.header,
|
|
849
801
|
footer: o.footer
|
|
850
802
|
}, {
|
|
851
803
|
default: p(() => [
|
|
852
|
-
o.sessions.length === 0 ? (m(),
|
|
804
|
+
o.sessions.length === 0 ? (m(), v(t(U), {
|
|
853
805
|
key: 0,
|
|
854
806
|
layout: "setting",
|
|
855
807
|
label: t(a)("core.account.sessions.empty")
|
|
856
|
-
}, null, 8, ["label"])) :
|
|
857
|
-
(m(!0),
|
|
808
|
+
}, null, 8, ["label"])) : k("", !0),
|
|
809
|
+
(m(!0), w(R, null, D(o.sessions, (l) => (m(), v(t(U), {
|
|
858
810
|
key: l.id,
|
|
859
811
|
layout: "setting",
|
|
860
812
|
label: l.device || t(a)("core.account.sessions.unknown_device"),
|
|
861
813
|
"data-session": l.id
|
|
862
|
-
},
|
|
814
|
+
}, me({
|
|
863
815
|
leading: p(() => [
|
|
864
|
-
|
|
816
|
+
h(t(F), {
|
|
865
817
|
tone: "anchor",
|
|
866
818
|
icon: "deviceLine"
|
|
867
819
|
})
|
|
868
820
|
]),
|
|
869
821
|
sub: p(() => [
|
|
870
822
|
g("span", Vt, [
|
|
871
|
-
l.ip ? (m(),
|
|
872
|
-
l.ip ? (m(),
|
|
823
|
+
l.ip ? (m(), w("span", Mt, _(l.ip), 1)) : k("", !0),
|
|
824
|
+
l.ip ? (m(), w("span", Dt, "·")) : k("", !0),
|
|
873
825
|
g("span", null, _(t(a)("core.account.sessions.last_active", { when: t(c).dateTime(l.last_used_at) })), 1),
|
|
874
|
-
|
|
826
|
+
i[0] || (i[0] = g("span", {
|
|
875
827
|
"aria-hidden": "true",
|
|
876
828
|
class: "hidden md:inline"
|
|
877
829
|
}, "·", -1)),
|
|
878
830
|
g("span", null, _(t(a)("core.account.sessions.expires", { when: t(c).dateTime(l.expires_at) })), 1)
|
|
879
831
|
]),
|
|
880
|
-
l.current || l.opened_by ? (m(),
|
|
881
|
-
l.current ? (m(),
|
|
832
|
+
l.current || l.opened_by ? (m(), w("span", Wt, [
|
|
833
|
+
l.current ? (m(), v(t(G), {
|
|
882
834
|
key: 0,
|
|
883
835
|
tone: "positive",
|
|
884
836
|
dot: "",
|
|
885
837
|
"data-session-current": ""
|
|
886
838
|
}, {
|
|
887
839
|
default: p(() => [
|
|
888
|
-
|
|
840
|
+
E(_(t(a)("core.account.sessions.this_device")), 1)
|
|
889
841
|
]),
|
|
890
842
|
_: 1
|
|
891
|
-
})) :
|
|
892
|
-
l.opened_by ? (m(),
|
|
843
|
+
})) : k("", !0),
|
|
844
|
+
l.opened_by ? (m(), v(t(G), {
|
|
893
845
|
key: 1,
|
|
894
846
|
tone: "warning",
|
|
895
847
|
"data-session-opened-by": ""
|
|
896
848
|
}, {
|
|
897
849
|
default: p(() => [
|
|
898
|
-
|
|
850
|
+
E(_(l.opened_by.name ? t(a)("core.account.sessions.opened_by", { name: l.opened_by.name }) : t(a)("core.account.sessions.opened_by_other")), 1)
|
|
899
851
|
]),
|
|
900
852
|
_: 2
|
|
901
|
-
}, 1024)) :
|
|
902
|
-
])) :
|
|
903
|
-
o.canEnd && !l.current ? (m(),
|
|
853
|
+
}, 1024)) : k("", !0)
|
|
854
|
+
])) : k("", !0),
|
|
855
|
+
o.canEnd && !l.current ? (m(), v(t(T), {
|
|
904
856
|
key: 1,
|
|
905
857
|
prominence: "plain",
|
|
906
858
|
tone: "critical",
|
|
@@ -910,17 +862,17 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
910
862
|
onClick: (u) => s("end", l)
|
|
911
863
|
}, {
|
|
912
864
|
default: p(() => [
|
|
913
|
-
|
|
865
|
+
E(_(t(a)("core.account.sessions.end")), 1)
|
|
914
866
|
]),
|
|
915
867
|
_: 1
|
|
916
|
-
}, 8, ["data-end-session-inline", "onClick"])) :
|
|
868
|
+
}, 8, ["data-end-session-inline", "onClick"])) : k("", !0)
|
|
917
869
|
]),
|
|
918
870
|
_: 2
|
|
919
871
|
}, [
|
|
920
872
|
o.canEnd && !l.current ? {
|
|
921
873
|
name: "trailing",
|
|
922
874
|
fn: p(() => [
|
|
923
|
-
|
|
875
|
+
h(t(T), {
|
|
924
876
|
prominence: "plain",
|
|
925
877
|
tone: "critical",
|
|
926
878
|
size: "sm",
|
|
@@ -929,7 +881,7 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
929
881
|
onClick: (u) => s("end", l)
|
|
930
882
|
}, {
|
|
931
883
|
default: p(() => [
|
|
932
|
-
|
|
884
|
+
E(_(t(a)("core.account.sessions.end")), 1)
|
|
933
885
|
]),
|
|
934
886
|
_: 1
|
|
935
887
|
}, 8, ["data-end-session", "onClick"])
|
|
@@ -941,14 +893,14 @@ const as = (e) => e === "locked" ? "critical" : e === "inactive" ? "neutral" : "
|
|
|
941
893
|
_: 1
|
|
942
894
|
}, 8, ["header", "footer"]));
|
|
943
895
|
}
|
|
944
|
-
}),
|
|
896
|
+
}), Gt = 80, Xt = (e) => /Edg\/|EdgA\/|EdgiOS\//.test(e) ? "Edge" : /Firefox\/|FxiOS\//.test(e) ? "Firefox" : /Chrome\/|CriOS\//.test(e) ? "Chrome" : /Safari\/|iPhone|iPad/.test(e) ? "Safari" : "", Yt = (e) => e.includes("iPhone") ? "iPhone" : e.includes("iPad") ? "iPad" : e.includes("Android") ? "Android" : e.includes("Windows") ? "Windows" : /Mac OS X|Macintosh/.test(e) ? "macOS" : /Linux|X11/.test(e) ? "Linux" : "";
|
|
945
897
|
function Oe(e) {
|
|
946
898
|
const n = e.trim();
|
|
947
899
|
if (n === "") return "";
|
|
948
|
-
const o =
|
|
949
|
-
return o && s ? `${o} · ${s}` : [...n].slice(0,
|
|
900
|
+
const o = Xt(n), s = Yt(n);
|
|
901
|
+
return o && s ? `${o} · ${s}` : [...n].slice(0, Gt).join("");
|
|
950
902
|
}
|
|
951
|
-
const
|
|
903
|
+
const Ht = {
|
|
952
904
|
signed_in: { tone: "positive", byOther: !1 },
|
|
953
905
|
wrong_password: { tone: "critical", byOther: !1 },
|
|
954
906
|
locked_out: { tone: "critical", byOther: !1 },
|
|
@@ -959,14 +911,14 @@ const Qt = {
|
|
|
959
911
|
session_revoked: { tone: "neutral", byOther: !0 }
|
|
960
912
|
};
|
|
961
913
|
function re(e) {
|
|
962
|
-
const n =
|
|
914
|
+
const n = Ht[e];
|
|
963
915
|
return n ? { ...n, known: !0 } : { tone: "neutral", byOther: !1, known: !1 };
|
|
964
916
|
}
|
|
965
917
|
function Ae(e, n) {
|
|
966
918
|
const o = re(e);
|
|
967
919
|
return o.known ? o.byOther && n ? `core.account.signins.events_by.${e}` : `core.account.signins.events.${e}` : "core.account.signins.events.unknown";
|
|
968
920
|
}
|
|
969
|
-
const
|
|
921
|
+
const Jt = ["title"], Qt = { class: "font-mono" }, cs = /* @__PURE__ */ $({
|
|
970
922
|
__name: "SignInList",
|
|
971
923
|
props: {
|
|
972
924
|
rows: {},
|
|
@@ -975,26 +927,26 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
975
927
|
},
|
|
976
928
|
setup(e) {
|
|
977
929
|
const n = e, { t: o } = C(), s = J(), a = (c) => o(Ae(c.event, c.actor?.name || null), { name: c.actor?.name ?? "" });
|
|
978
|
-
return (c, d) => (m(),
|
|
930
|
+
return (c, d) => (m(), v(t(V), {
|
|
979
931
|
header: n.header,
|
|
980
932
|
footer: n.footer,
|
|
981
933
|
"data-signin-list": ""
|
|
982
|
-
},
|
|
934
|
+
}, me({
|
|
983
935
|
default: p(() => [
|
|
984
|
-
n.rows.length === 0 ? (m(),
|
|
936
|
+
n.rows.length === 0 ? (m(), v(t(U), {
|
|
985
937
|
key: 0,
|
|
986
938
|
layout: "setting",
|
|
987
939
|
label: t(o)("core.account.signins.empty"),
|
|
988
940
|
"data-signin-empty": ""
|
|
989
|
-
}, null, 8, ["label"])) :
|
|
990
|
-
(m(!0),
|
|
991
|
-
key:
|
|
941
|
+
}, null, 8, ["label"])) : k("", !0),
|
|
942
|
+
(m(!0), w(R, null, D(n.rows, (i) => (m(), v(t(U), {
|
|
943
|
+
key: i.id,
|
|
992
944
|
layout: "setting",
|
|
993
|
-
label: t(Oe)(
|
|
945
|
+
label: t(Oe)(i.device) || t(o)("core.account.sessions.unknown_device"),
|
|
994
946
|
"data-signin-row": ""
|
|
995
947
|
}, {
|
|
996
948
|
leading: p(() => [
|
|
997
|
-
|
|
949
|
+
h(t(F), {
|
|
998
950
|
tone: "neutral",
|
|
999
951
|
icon: "timeLine"
|
|
1000
952
|
})
|
|
@@ -1002,26 +954,26 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1002
954
|
sub: p(() => [
|
|
1003
955
|
g("span", {
|
|
1004
956
|
class: "flex flex-col gap-y-0.5 md:flex-row md:flex-wrap md:items-center md:gap-x-1.5",
|
|
1005
|
-
title:
|
|
957
|
+
title: i.device,
|
|
1006
958
|
"data-signin-facts": ""
|
|
1007
959
|
}, [
|
|
1008
|
-
g("span", null, _(t(s).dateTime(
|
|
1009
|
-
|
|
960
|
+
g("span", null, _(t(s).dateTime(i.created_at)), 1),
|
|
961
|
+
i.ip ? (m(), w(R, { key: 0 }, [
|
|
1010
962
|
d[0] || (d[0] = g("span", {
|
|
1011
963
|
"aria-hidden": "true",
|
|
1012
964
|
class: "hidden md:inline"
|
|
1013
965
|
}, "·", -1)),
|
|
1014
|
-
g("span",
|
|
1015
|
-
], 64)) :
|
|
1016
|
-
], 8,
|
|
966
|
+
g("span", Qt, _(i.ip), 1)
|
|
967
|
+
], 64)) : k("", !0)
|
|
968
|
+
], 8, Jt)
|
|
1017
969
|
]),
|
|
1018
970
|
default: p(() => [
|
|
1019
|
-
|
|
1020
|
-
tone: t(re)(
|
|
1021
|
-
"data-event":
|
|
971
|
+
h(t(G), {
|
|
972
|
+
tone: t(re)(i.event).tone,
|
|
973
|
+
"data-event": i.event
|
|
1022
974
|
}, {
|
|
1023
975
|
default: p(() => [
|
|
1024
|
-
|
|
976
|
+
E(_(a(i)), 1)
|
|
1025
977
|
]),
|
|
1026
978
|
_: 2
|
|
1027
979
|
}, 1032, ["tone", "data-event"])
|
|
@@ -1034,19 +986,19 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1034
986
|
c.$slots["header-trailing"] ? {
|
|
1035
987
|
name: "header-trailing",
|
|
1036
988
|
fn: p(() => [
|
|
1037
|
-
|
|
989
|
+
Ue(c.$slots, "header-trailing")
|
|
1038
990
|
]),
|
|
1039
991
|
key: "0"
|
|
1040
992
|
} : void 0
|
|
1041
993
|
]), 1032, ["header", "footer"]));
|
|
1042
994
|
}
|
|
1043
|
-
}),
|
|
995
|
+
}), Zt = {
|
|
1044
996
|
class: "overflow-hidden rounded-group bg-surface-cell shadow-group",
|
|
1045
997
|
"data-signin-table": ""
|
|
1046
|
-
},
|
|
998
|
+
}, en = ["title"], tn = { class: "font-mono text-footnote" }, nn = {
|
|
1047
999
|
class: "px-4 py-8 text-center text-body text-content-muted",
|
|
1048
1000
|
"data-signin-empty": ""
|
|
1049
|
-
},
|
|
1001
|
+
}, ls = /* @__PURE__ */ $({
|
|
1050
1002
|
__name: "SignInTable",
|
|
1051
1003
|
props: {
|
|
1052
1004
|
rows: {},
|
|
@@ -1059,71 +1011,71 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1059
1011
|
{ key: "device", label: o("core.account.signins.columns.device"), hideBelow: "md", width: 320, mobile: "hidden" },
|
|
1060
1012
|
{ key: "ip", label: o("core.account.signins.columns.ip"), hideBelow: "md", width: 140, mobile: "hidden" }
|
|
1061
1013
|
]), a = (c) => o(Ae(c.event, c.actor?.name || null), { name: c.actor?.name ?? "" });
|
|
1062
|
-
return (c, d) => (m(),
|
|
1063
|
-
|
|
1014
|
+
return (c, d) => (m(), w("div", Zt, [
|
|
1015
|
+
h(t(tt), {
|
|
1064
1016
|
rows: n.rows,
|
|
1065
1017
|
columns: s.value,
|
|
1066
|
-
"row-key": (
|
|
1018
|
+
"row-key": (i) => i.id,
|
|
1067
1019
|
loading: n.loading
|
|
1068
1020
|
}, {
|
|
1069
|
-
"cell-event": p(({ item:
|
|
1070
|
-
|
|
1071
|
-
tone: t(re)(
|
|
1072
|
-
"data-event":
|
|
1021
|
+
"cell-event": p(({ item: i }) => [
|
|
1022
|
+
h(t(G), {
|
|
1023
|
+
tone: t(re)(i.event).tone,
|
|
1024
|
+
"data-event": i.event
|
|
1073
1025
|
}, {
|
|
1074
1026
|
default: p(() => [
|
|
1075
|
-
|
|
1027
|
+
E(_(a(i)), 1)
|
|
1076
1028
|
]),
|
|
1077
1029
|
_: 2
|
|
1078
1030
|
}, 1032, ["tone", "data-event"])
|
|
1079
1031
|
]),
|
|
1080
|
-
"cell-device": p(({ item:
|
|
1032
|
+
"cell-device": p(({ item: i }) => [
|
|
1081
1033
|
g("span", {
|
|
1082
1034
|
class: "block truncate",
|
|
1083
|
-
title:
|
|
1084
|
-
}, _(t(Oe)(
|
|
1035
|
+
title: i.device
|
|
1036
|
+
}, _(t(Oe)(i.device) || "—"), 9, en)
|
|
1085
1037
|
]),
|
|
1086
|
-
"cell-ip": p(({ item:
|
|
1087
|
-
g("span",
|
|
1038
|
+
"cell-ip": p(({ item: i }) => [
|
|
1039
|
+
g("span", tn, _(i.ip || "—"), 1)
|
|
1088
1040
|
]),
|
|
1089
1041
|
empty: p(() => [
|
|
1090
|
-
g("p",
|
|
1042
|
+
g("p", nn, _(t(o)("core.account.signins.empty")), 1)
|
|
1091
1043
|
]),
|
|
1092
1044
|
_: 1
|
|
1093
1045
|
}, 8, ["rows", "columns", "row-key", "loading"])
|
|
1094
1046
|
]));
|
|
1095
1047
|
}
|
|
1096
|
-
}),
|
|
1048
|
+
}), sn = { class: "flex items-center pl-0.5" }, on = { class: "flex flex-wrap items-center gap-x-1.5" }, rn = {
|
|
1097
1049
|
class: "font-medium text-content",
|
|
1098
1050
|
"data-change-actor": ""
|
|
1099
|
-
},
|
|
1051
|
+
}, an = { key: 1 }, us = /* @__PURE__ */ $({
|
|
1100
1052
|
__name: "ChangeFeed",
|
|
1101
1053
|
props: {
|
|
1102
1054
|
rows: {},
|
|
1103
1055
|
words: { type: Function }
|
|
1104
1056
|
},
|
|
1105
1057
|
setup(e) {
|
|
1106
|
-
const n = e, { t: o, te: s } = C(), a = (u, f) => o(u, f ?? {}), c = J(), d = /* @__PURE__ */ new Set(["created", "activated", "deactivated", "password"]),
|
|
1058
|
+
const n = e, { t: o, te: s } = C(), a = (u, f) => o(u, f ?? {}), c = J(), d = /* @__PURE__ */ new Set(["created", "activated", "deactivated", "password"]), i = (u) => o(`core.users.changes.fields.${u}`), l = A(
|
|
1107
1059
|
() => n.rows.map((u) => {
|
|
1108
|
-
const f = n.words?.(u, a),
|
|
1109
|
-
return { row: u, sentence:
|
|
1060
|
+
const f = n.words?.(u, a), y = f?.sentence ?? (s(`core.users.changes.actions.${u.action}`) ? o(`core.users.changes.actions.${u.action}`) : o("core.users.changes.actions.unknown")), x = d.has(u.action) ? [] : u.fields.filter((b) => b !== "password" && s(`core.users.changes.fields.${b}`)).map((b) => b in u.before || b in u.after ? o("core.users.changes.diff", { field: i(b), before: u.before[b] || "—", after: u.after[b] || "—" }) : i(b));
|
|
1061
|
+
return { row: u, sentence: y, details: [...x, ...f?.details ?? []] };
|
|
1110
1062
|
})
|
|
1111
1063
|
);
|
|
1112
|
-
return (u, f) => (m(),
|
|
1064
|
+
return (u, f) => (m(), v(t(V), { "data-change-feed": "" }, {
|
|
1113
1065
|
default: p(() => [
|
|
1114
|
-
(m(!0),
|
|
1115
|
-
key:
|
|
1066
|
+
(m(!0), w(R, null, D(l.value, (y) => (m(), v(t(U), {
|
|
1067
|
+
key: y.row.id,
|
|
1116
1068
|
layout: "setting",
|
|
1117
|
-
label:
|
|
1069
|
+
label: y.sentence,
|
|
1118
1070
|
"data-change-row": ""
|
|
1119
1071
|
}, {
|
|
1120
1072
|
leading: p(() => [
|
|
1121
|
-
g("span",
|
|
1122
|
-
|
|
1073
|
+
g("span", sn, [
|
|
1074
|
+
y.row.actor?.name ? (m(), v(t(nt), {
|
|
1123
1075
|
key: 0,
|
|
1124
|
-
name:
|
|
1076
|
+
name: y.row.actor.name,
|
|
1125
1077
|
size: "sm"
|
|
1126
|
-
}, null, 8, ["name"])) : (m(),
|
|
1078
|
+
}, null, 8, ["name"])) : (m(), v(t(F), {
|
|
1127
1079
|
key: 1,
|
|
1128
1080
|
tone: "anchor",
|
|
1129
1081
|
icon: "edit"
|
|
@@ -1131,26 +1083,26 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1131
1083
|
])
|
|
1132
1084
|
]),
|
|
1133
1085
|
sub: p(() => [
|
|
1134
|
-
g("span",
|
|
1135
|
-
|
|
1136
|
-
g("span",
|
|
1086
|
+
g("span", on, [
|
|
1087
|
+
y.row.actor ? (m(), w(R, { key: 0 }, [
|
|
1088
|
+
g("span", rn, _(y.row.actor.name || t(o)("core.account.somebody_else")), 1),
|
|
1137
1089
|
f[0] || (f[0] = g("span", { "aria-hidden": "true" }, "·", -1))
|
|
1138
|
-
], 64)) :
|
|
1139
|
-
(m(!0),
|
|
1140
|
-
typeof x != "string" ? (m(),
|
|
1090
|
+
], 64)) : k("", !0),
|
|
1091
|
+
(m(!0), w(R, null, D(y.details, (x, b) => (m(), w(R, { key: b }, [
|
|
1092
|
+
typeof x != "string" ? (m(), v(t(Me), {
|
|
1141
1093
|
key: 0,
|
|
1142
1094
|
to: x.to,
|
|
1143
1095
|
class: "text-content-link",
|
|
1144
1096
|
"data-change-link": ""
|
|
1145
1097
|
}, {
|
|
1146
1098
|
default: p(() => [
|
|
1147
|
-
|
|
1099
|
+
E(_(x.text), 1)
|
|
1148
1100
|
]),
|
|
1149
1101
|
_: 2
|
|
1150
|
-
}, 1032, ["to"])) : (m(),
|
|
1102
|
+
}, 1032, ["to"])) : (m(), w("span", an, _(x), 1)),
|
|
1151
1103
|
f[1] || (f[1] = g("span", { "aria-hidden": "true" }, "·", -1))
|
|
1152
1104
|
], 64))), 128)),
|
|
1153
|
-
g("span", null, _(t(c).dateTime(
|
|
1105
|
+
g("span", null, _(t(c).dateTime(y.row.created_at)), 1)
|
|
1154
1106
|
])
|
|
1155
1107
|
]),
|
|
1156
1108
|
_: 2
|
|
@@ -1159,7 +1111,7 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1159
1111
|
_: 1
|
|
1160
1112
|
}));
|
|
1161
1113
|
}
|
|
1162
|
-
}),
|
|
1114
|
+
}), ds = /* @__PURE__ */ $({
|
|
1163
1115
|
__name: "SignInAsButton",
|
|
1164
1116
|
props: {
|
|
1165
1117
|
userId: {},
|
|
@@ -1167,98 +1119,92 @@ const Zt = ["title"], en = { class: "font-mono" }, ls = /* @__PURE__ */ E({
|
|
|
1167
1119
|
permission: {}
|
|
1168
1120
|
},
|
|
1169
1121
|
setup(e) {
|
|
1170
|
-
const n = e, { t: o } = C(), s = I(), a =
|
|
1171
|
-
const f =
|
|
1122
|
+
const n = e, { t: o } = C(), s = I(), a = ge(), { home: c } = ve(), d = B(), i = oe(!1), l = A(() => {
|
|
1123
|
+
const f = W(s.session.state.value);
|
|
1172
1124
|
return f !== null && f.impersonator === void 0 && f.user.id !== n.userId;
|
|
1173
1125
|
});
|
|
1174
1126
|
async function u() {
|
|
1175
|
-
|
|
1127
|
+
i.value = !0;
|
|
1176
1128
|
try {
|
|
1177
|
-
await
|
|
1129
|
+
await Be(s, n.userId), await a.push(c);
|
|
1178
1130
|
} catch (f) {
|
|
1179
|
-
|
|
1131
|
+
H(f) || z.error(d(f, { fallback: o("core.identity.impersonation.sign_in_as_failed", { name: n.name }) }));
|
|
1180
1132
|
} finally {
|
|
1181
|
-
|
|
1133
|
+
i.value = !1;
|
|
1182
1134
|
}
|
|
1183
1135
|
}
|
|
1184
|
-
return (f,
|
|
1136
|
+
return (f, y) => l.value ? (m(), v(t(st), {
|
|
1185
1137
|
key: 0,
|
|
1186
1138
|
permission: n.permission
|
|
1187
1139
|
}, {
|
|
1188
1140
|
default: p(() => [
|
|
1189
|
-
|
|
1190
|
-
processing:
|
|
1141
|
+
h(t(T), {
|
|
1142
|
+
processing: i.value,
|
|
1191
1143
|
"data-sign-in-as": "",
|
|
1192
1144
|
onClick: u
|
|
1193
1145
|
}, {
|
|
1194
1146
|
default: p(() => [
|
|
1195
|
-
|
|
1147
|
+
E(_(t(o)("core.identity.impersonation.sign_in_as", { name: n.name })), 1)
|
|
1196
1148
|
]),
|
|
1197
1149
|
_: 1
|
|
1198
1150
|
}, 8, ["processing"])
|
|
1199
1151
|
]),
|
|
1200
1152
|
_: 1
|
|
1201
|
-
}, 8, ["permission"])) :
|
|
1153
|
+
}, 8, ["permission"])) : k("", !0);
|
|
1202
1154
|
}
|
|
1203
|
-
}), [
|
|
1204
|
-
index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-
|
|
1155
|
+
}), [cn, ms] = N("vue-core.serviceaccounts"), ue = "iam.serviceaccount:view", ps = "iam.serviceaccount:manage", fs = "iam.serviceaccount:revoke", de = X({
|
|
1156
|
+
index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-B2VDnYxD.js"), meta: { access: ue, titleKey: "core.serviceaccounts.title_plural" } },
|
|
1205
1157
|
record: {
|
|
1206
1158
|
name: "serviceaccounts.record",
|
|
1207
1159
|
path: "/iam/service-accounts/:id",
|
|
1208
|
-
component: () => import("./ServiceAccountRecord-
|
|
1209
|
-
meta: { access:
|
|
1160
|
+
component: () => import("./ServiceAccountRecord-ClbyeLhL.js"),
|
|
1161
|
+
meta: { access: ue, titleKey: "core.serviceaccounts.title_plural", remountOnParam: "id" }
|
|
1210
1162
|
}
|
|
1211
1163
|
});
|
|
1212
|
-
function
|
|
1213
|
-
return
|
|
1164
|
+
function gs(e = {}) {
|
|
1165
|
+
return ne({
|
|
1214
1166
|
id: "serviceaccounts",
|
|
1215
|
-
routes:
|
|
1216
|
-
context:
|
|
1217
|
-
navigation: e.destination ? [{ destination: e.destination, to:
|
|
1167
|
+
routes: de.records,
|
|
1168
|
+
context: se(cn, { tenants: e.tenants ?? null }),
|
|
1169
|
+
navigation: e.destination ? [{ destination: e.destination, to: de.index, within: ["serviceaccounts.record"] }] : [],
|
|
1218
1170
|
requires: ["access"]
|
|
1219
1171
|
});
|
|
1220
1172
|
}
|
|
1221
1173
|
export {
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
ms as _,
|
|
1238
|
-
gt as a,
|
|
1239
|
-
os as b,
|
|
1240
|
-
Te as c,
|
|
1241
|
-
is as d,
|
|
1242
|
-
Zn as e,
|
|
1174
|
+
Ct as A,
|
|
1175
|
+
ke as B,
|
|
1176
|
+
gs as C,
|
|
1177
|
+
Ft as D,
|
|
1178
|
+
ns as E,
|
|
1179
|
+
ts as M,
|
|
1180
|
+
Pt as P,
|
|
1181
|
+
fs as R,
|
|
1182
|
+
qt as U,
|
|
1183
|
+
ds as _,
|
|
1184
|
+
pt as a,
|
|
1185
|
+
ss as b,
|
|
1186
|
+
Se as c,
|
|
1187
|
+
os as d,
|
|
1188
|
+
Qn as e,
|
|
1243
1189
|
$e as f,
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1190
|
+
es as g,
|
|
1191
|
+
is as h,
|
|
1192
|
+
ls as i,
|
|
1193
|
+
as as j,
|
|
1248
1194
|
us as k,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1195
|
+
ms as l,
|
|
1196
|
+
ps as m,
|
|
1197
|
+
de as n,
|
|
1198
|
+
Jn as o,
|
|
1199
|
+
Zn as p,
|
|
1200
|
+
cs as q,
|
|
1201
|
+
Rt as r,
|
|
1202
|
+
rs as s,
|
|
1203
|
+
zt as t,
|
|
1204
|
+
ve as u,
|
|
1205
|
+
$t as v,
|
|
1206
|
+
Yn as w,
|
|
1207
|
+
Xn as x,
|
|
1208
|
+
Hn as y,
|
|
1209
|
+
Ot as z
|
|
1264
1210
|
};
|