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