@synopackageland/sdk 0.10.7 → 0.10.9
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/README.md +22 -0
- package/dist/src/delegate/ExecutorApproval.vue.d.ts +4 -1
- package/dist/src/delegate/use-executor-setup.d.ts +3 -1
- package/dist/src/vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/vue.js +1354 -1338
- package/package.json +1 -1
- package/spec/protocol/v1/README.md +18 -4
package/dist/vue.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { delegateCopy as
|
|
2
|
-
import { DEFAULT_REQUEST_TIMEOUT as
|
|
3
|
-
import { inject as
|
|
4
|
-
import { SettingsSection as
|
|
5
|
-
import { Timer as
|
|
6
|
-
const Me = /* @__PURE__ */ Symbol("executor-setup");
|
|
7
|
-
function
|
|
8
|
-
return
|
|
1
|
+
import { delegateCopy as Le, appLifecycle as we, lifecycleRetryDelay as ua, lifecycleCopy as Re, shellCopy as Na, isFullPage as ga, uiLocale as ka, nasCopy as ze, nasErrorCopy as ha, format as oa, saveCopy as Je, saveError as Fe, createNasProvider as _a, identityCopy as Oa, backgroundCopy as qa, createBackgroundPickerProvider as Fa, backgroundErrorCopy as Ma, requestKey as da, labelSeparator as wa, lifecycleRefusal as Ha, errorCopy as Ka, openFileInFileStation as Xa, scopedPicker as Ga, authorizationCopy as Wa } from "./index.js";
|
|
2
|
+
import { DEFAULT_REQUEST_TIMEOUT as zo, FILE_STATION_APP as Po, LIFECYCLE_RETRY_MAX_MS as To, LIFECYCLE_STARTING_RETRY_MAX_MS as Ao, activePage as Ro, authorizationCatalogs as Io, backgroundCatalogs as Vo, bridgeCatalogs as Uo, bridgeErrorCopy as Do, catalogs as Bo, clientTimeout as Lo, createBackgroundSaveFacade as No, createFileTransfers as Oo, createPortalAccess as qo, createStandaloneContext as Fo, createStandaloneHost as Mo, decodeResponse as Ho, delegateCatalogs as Ko, encodeRequest as Xo, fileStationPath as Go, identityCatalogs as Wo, mergeCatalogs as Jo, nasCatalogs as Yo, openFolderInFileStation as Qo, portalCatalogs as Zo, portalMessages as jo, protocolCodes as es, protocolOps as as, protocolSchemas as ts, saveCatalogs as ls, shellCatalogs as ns, shellPages as os, uiLocales as ss } from "./index.js";
|
|
3
|
+
import { inject as Ve, ref as p, onBeforeUnmount as _e, Comment as Ja, Text as Ya, Fragment as le, computed as C, onMounted as Ce, watch as Ye, defineComponent as fe, openBlock as l, createBlock as f, unref as e, withCtx as t, createElementVNode as T, toDisplayString as s, createVNode as v, createTextVNode as b, createElementBlock as S, createCommentVNode as m, withModifiers as Ne, isRef as Ke, provide as Qe, useTemplateRef as aa, useSlots as Qa, watchEffect as ca, resolveDynamicComponent as ta, normalizeProps as va, guardReactiveProps as fa, renderSlot as ke, normalizeClass as sa, createSlots as Xe, Teleport as Za, markRaw as ja, h as et, renderList as Se, onUnmounted as xa, nextTick as at, normalizeStyle as Ca } from "vue";
|
|
4
|
+
import { SettingsSection as he, Callout as G, Button as N, SettingsRow as be, Skeleton as Pe, Badge as Ge, PathDisplay as Ee, Form as Oe, FormItem as Te, Select as ra, Input as Ae, FormActions as He, Dialog as Ze, ensureDeviceViewport as tt, AppRoot as lt, ConfigProvider as nt, PageContent as pa, PageHeader as ya, AppLayout as ot, AppSidebar as st, AppSidebarUser as it, FileTypeIcon as la, IconButton as na, Breadcrumb as ut, FilePicker as rt, TreeView as dt, DataGrid as ct, Link as $a, Card as ma, Checkbox as vt, LoadingArea as ft, DataTable as pt, formatFileSize as yt, Pagination as mt, MessageBox as bt } from "@synopackageland/ui";
|
|
5
|
+
import { Timer as gt, Info as kt, ChevronLeft as ht, ChevronRight as _t, RotateCw as wt, FolderOpen as xt, ShieldCheck as Ct } from "@lucide/vue";
|
|
6
|
+
const Me = /* @__PURE__ */ Symbol("executor-setup"), Sa = /* @__PURE__ */ Symbol("executor-preload");
|
|
7
|
+
function $t() {
|
|
8
|
+
return Ve(Sa, p(!1));
|
|
9
|
+
}
|
|
10
|
+
function Ea() {
|
|
11
|
+
return Ve(Me, {
|
|
9
12
|
async status() {
|
|
10
13
|
return { state: "blocked", reason: "setup-unavailable" };
|
|
11
14
|
},
|
|
@@ -17,100 +20,100 @@ function Sa() {
|
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
|
-
const
|
|
23
|
+
const St = ["password_rejected", "password_required", "password_confirm_failed"];
|
|
21
24
|
function We(n) {
|
|
22
25
|
if (n.state !== "blocked") return;
|
|
23
|
-
if (n.code) return
|
|
26
|
+
if (n.code) return St.includes(n.code) ? n.code : void 0;
|
|
24
27
|
const h = n.reason ?? "";
|
|
25
28
|
if (/^dsm_3121\b/.test(h)) return "password_rejected";
|
|
26
29
|
if (/^\S+: administrator password confirmation failed\./.test(h)) return "password_confirm_failed";
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function Et(n) {
|
|
29
32
|
return /: the executor status request failed\.$/.test(n ?? "");
|
|
30
33
|
}
|
|
31
|
-
function
|
|
34
|
+
function po(n) {
|
|
32
35
|
const h = p(!1), u = p(!1), a = p(), i = p("");
|
|
33
|
-
let o = !1, r = 0,
|
|
36
|
+
let o = !1, r = 0, y, _;
|
|
34
37
|
function d() {
|
|
35
|
-
clearTimeout(
|
|
38
|
+
clearTimeout(y), clearTimeout(_);
|
|
36
39
|
}
|
|
37
|
-
function c(
|
|
38
|
-
r++, d(), a.value = void 0, i.value =
|
|
40
|
+
function c(A = "") {
|
|
41
|
+
r++, d(), a.value = void 0, i.value = A;
|
|
39
42
|
}
|
|
40
|
-
function k(
|
|
43
|
+
function k(A) {
|
|
41
44
|
if (o) return;
|
|
42
|
-
const
|
|
43
|
-
if (!Number.isFinite(
|
|
45
|
+
const z = Date.parse(A.expiresAt) - Date.now();
|
|
46
|
+
if (!Number.isFinite(z) || z <= 0) {
|
|
44
47
|
c("expired");
|
|
45
48
|
return;
|
|
46
49
|
}
|
|
47
|
-
d(), a.value =
|
|
50
|
+
d(), a.value = A, i.value = "", y = setTimeout(() => c("expired"), z);
|
|
48
51
|
const I = r;
|
|
49
52
|
_ = setTimeout(async () => {
|
|
50
53
|
try {
|
|
51
|
-
const
|
|
52
|
-
!o && r === I && k(
|
|
54
|
+
const V = await n.call("identity.session");
|
|
55
|
+
!o && r === I && k(V);
|
|
53
56
|
} catch {
|
|
54
57
|
!o && r === I && c("expired");
|
|
55
58
|
}
|
|
56
|
-
}, Math.min(6e4,
|
|
59
|
+
}, Math.min(6e4, z));
|
|
57
60
|
}
|
|
58
|
-
async function
|
|
61
|
+
async function U() {
|
|
59
62
|
try {
|
|
60
|
-
const
|
|
63
|
+
const A = await n.call("identity.status");
|
|
61
64
|
if (o) return;
|
|
62
|
-
if (h.value =
|
|
65
|
+
if (h.value = A.enabled === !0, h.value)
|
|
63
66
|
try {
|
|
64
67
|
k(await n.call("identity.session", { bootstrap: !0 }));
|
|
65
68
|
} catch {
|
|
66
69
|
o || c();
|
|
67
70
|
}
|
|
68
|
-
} catch (
|
|
69
|
-
const
|
|
70
|
-
h.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(
|
|
71
|
+
} catch (A) {
|
|
72
|
+
const z = A?.code;
|
|
73
|
+
h.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(z || ""), h.value && (i.value = "unavailable");
|
|
71
74
|
} finally {
|
|
72
75
|
o || (u.value = !0);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
|
-
async function
|
|
78
|
+
async function g(A, z) {
|
|
76
79
|
const I = r;
|
|
77
80
|
try {
|
|
78
|
-
const
|
|
81
|
+
const V = await n.call(A, z);
|
|
79
82
|
if (o || h.value && I !== r) throw { code: "session_required" };
|
|
80
|
-
return
|
|
81
|
-
} catch (
|
|
82
|
-
const F =
|
|
83
|
-
throw !o && I === r && h.value && ["session_required", "session_revalidation_required"].includes(F || "") && c(F === "session_revalidation_required" ? "revalidate" : "expired"),
|
|
83
|
+
return V;
|
|
84
|
+
} catch (V) {
|
|
85
|
+
const F = V?.code;
|
|
86
|
+
throw !o && I === r && h.value && ["session_required", "session_revalidation_required"].includes(F || "") && c(F === "session_revalidation_required" ? "revalidate" : "expired"), V;
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
|
-
async function
|
|
87
|
-
const
|
|
88
|
-
o || (r++, k(
|
|
89
|
+
async function x(A, z, I) {
|
|
90
|
+
const V = await n.call("identity.login", { account: A, password: z, otp: I });
|
|
91
|
+
o || (r++, k(V));
|
|
89
92
|
}
|
|
90
|
-
async function
|
|
91
|
-
const
|
|
92
|
-
o || (r++, k(
|
|
93
|
+
async function R() {
|
|
94
|
+
const A = await n.call("identity.session", { bootstrap: !0 });
|
|
95
|
+
o || (r++, k(A));
|
|
93
96
|
}
|
|
94
|
-
async function
|
|
97
|
+
async function w() {
|
|
95
98
|
await n.call("identity.logout"), o || c();
|
|
96
99
|
}
|
|
97
|
-
function
|
|
100
|
+
function E() {
|
|
98
101
|
o = !0, c();
|
|
99
102
|
}
|
|
100
|
-
return { enabled: h, ready: u, subject: a, notice: i, start:
|
|
103
|
+
return { enabled: h, ready: u, subject: a, notice: i, start: U, call: g, login: x, bootstrap: R, logout: w, dispose: E };
|
|
101
104
|
}
|
|
102
|
-
function
|
|
105
|
+
function zt() {
|
|
103
106
|
const n = p(!1), h = p();
|
|
104
107
|
let u = !1, a = 0, i;
|
|
105
108
|
function o() {
|
|
106
109
|
a++, i?.abort(), i = void 0, n.value = !1, h.value = void 0;
|
|
107
110
|
}
|
|
108
|
-
async function r(
|
|
111
|
+
async function r(y) {
|
|
109
112
|
if (u || n.value) return;
|
|
110
113
|
const _ = ++a, d = new AbortController();
|
|
111
114
|
i = d, n.value = !0, h.value = void 0;
|
|
112
115
|
try {
|
|
113
|
-
const c = await
|
|
116
|
+
const c = await y(d.signal);
|
|
114
117
|
return !u && _ === a ? c : void 0;
|
|
115
118
|
} catch (c) {
|
|
116
119
|
!u && _ === a && (h.value = c);
|
|
@@ -119,24 +122,24 @@ function St() {
|
|
|
119
122
|
!u && _ === a && (n.value = !1, i = void 0);
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
|
-
return
|
|
125
|
+
return _e(() => {
|
|
123
126
|
u = !0, o();
|
|
124
127
|
}), { busy: n, error: h, run: r, cancel: o };
|
|
125
128
|
}
|
|
126
|
-
function
|
|
129
|
+
function za(n) {
|
|
127
130
|
return Array.isArray(n) && n.some((h) => {
|
|
128
131
|
const u = h;
|
|
129
|
-
return u.type ===
|
|
132
|
+
return u.type === Ja ? !1 : u.type === Ya ? String(u.children).trim() !== "" : u.type === le ? za(u.children) : !0;
|
|
130
133
|
});
|
|
131
134
|
}
|
|
132
|
-
function
|
|
135
|
+
function Pt(n) {
|
|
133
136
|
return Array.from(n.childNodes).some((h) => h.nodeType === Node.ELEMENT_NODE || h.nodeType === Node.TEXT_NODE && h.textContent.trim() !== "");
|
|
134
137
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
137
|
-
return n.map((u) => typeof u == "string" ? { id: u, title: h[u], icon:
|
|
138
|
+
const Tt = { status: kt, background: gt };
|
|
139
|
+
function At(n, h) {
|
|
140
|
+
return n.map((u) => typeof u == "string" ? { id: u, title: h[u], icon: Tt[u] } : u);
|
|
138
141
|
}
|
|
139
|
-
function
|
|
142
|
+
function Rt(n) {
|
|
140
143
|
const h = /* @__PURE__ */ new Map(), u = { items: [] };
|
|
141
144
|
for (const a of n) {
|
|
142
145
|
if (a.hidden) continue;
|
|
@@ -145,110 +148,110 @@ function Tt(n) {
|
|
|
145
148
|
}
|
|
146
149
|
return u.items.length ? [...h.values(), u] : [...h.values()];
|
|
147
150
|
}
|
|
148
|
-
const
|
|
149
|
-
function
|
|
150
|
-
const u =
|
|
151
|
-
let
|
|
152
|
-
async function I(
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
for (let
|
|
160
|
-
const j = await n.ctx.call("bg.browse", { offset:
|
|
161
|
-
if (
|
|
162
|
-
if (!Array.isArray(j.shares) || !Number.isSafeInteger(j.total) || j.total < 0 || !j.shares.length &&
|
|
151
|
+
const It = 6e4, Vt = 1e3;
|
|
152
|
+
function Pa(n, h) {
|
|
153
|
+
const u = Ea(), a = C(() => Le(n.locale)), i = p(), o = p(""), r = p(!1), y = p(!1), _ = p(!1), d = p(), c = p(), k = p(""), U = p([]), g = C(() => c.value?.scope_mode === "install-selected"), x = C(() => !!c.value?.scope_mode), R = C(() => [{ label: a.value.homeScope, value: "home" }, ...U.value]), w = C(() => !g.value || !!k.value && R.value.some(($) => $.value === k.value)), E = C(() => g.value && !c.value?.selection), A = C(() => k.value !== c.value?.selection?.scope);
|
|
154
|
+
let z = !1;
|
|
155
|
+
async function I($) {
|
|
156
|
+
const M = $ ?? await u.status();
|
|
157
|
+
if (z || (i.value = M, !n.ctx || we(M))) return;
|
|
158
|
+
const Q = await n.ctx.call("delegate.status");
|
|
159
|
+
if (z || (c.value = Q, Q.scope_mode !== "install-selected")) return;
|
|
160
|
+
const ue = [];
|
|
161
|
+
let pe = 0;
|
|
162
|
+
for (let ye = 0; ye < 128; ye++) {
|
|
163
|
+
const j = await n.ctx.call("bg.browse", { offset: pe });
|
|
164
|
+
if (z) return;
|
|
165
|
+
if (!Array.isArray(j.shares) || !Number.isSafeInteger(j.total) || j.total < 0 || !j.shares.length && pe < j.total) throw { code: "EXECUTOR_PROTOCOL" };
|
|
163
166
|
for (const oe of j.shares)
|
|
164
|
-
oe.isdir && oe.path === "/" + oe.name && !["home", "homes"].includes(oe.name.toLowerCase()) &&
|
|
165
|
-
if (
|
|
166
|
-
if (
|
|
167
|
+
oe.isdir && oe.path === "/" + oe.name && !["home", "homes"].includes(oe.name.toLowerCase()) && ue.push({ label: oe.name, value: "shared:" + oe.name });
|
|
168
|
+
if (pe += j.shares.length, pe >= j.total) break;
|
|
169
|
+
if (ye === 127) throw { code: "EXECUTOR_PROTOCOL" };
|
|
167
170
|
}
|
|
168
|
-
|
|
171
|
+
U.value = ue, k.value = Q.selection?.scope ?? Q.preselection ?? "";
|
|
169
172
|
}
|
|
170
|
-
async function
|
|
173
|
+
async function V($) {
|
|
171
174
|
if (!(!n.admin || r.value)) {
|
|
172
175
|
r.value = !0, _.value = !1, d.value = void 0;
|
|
173
176
|
try {
|
|
174
|
-
await I(
|
|
177
|
+
await I($);
|
|
175
178
|
} catch {
|
|
176
|
-
|
|
179
|
+
z || (_.value = !0);
|
|
177
180
|
} finally {
|
|
178
|
-
|
|
181
|
+
z || (r.value = !1);
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
|
-
const F = () =>
|
|
185
|
+
const F = () => V();
|
|
183
186
|
async function J() {
|
|
184
|
-
if (!n.admin || r.value || !o.value || !
|
|
187
|
+
if (!n.admin || r.value || !o.value || !w.value || _.value) return;
|
|
185
188
|
r.value = !0, _.value = !1, d.value = void 0;
|
|
186
|
-
const
|
|
187
|
-
o.value = "",
|
|
189
|
+
const $ = o.value;
|
|
190
|
+
o.value = "", y.value = !0;
|
|
188
191
|
try {
|
|
189
|
-
let
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
|
|
192
|
+
let M = g.value ? await u.authorize($, k.value) : await u.authorize($);
|
|
193
|
+
const Q = We(M);
|
|
194
|
+
if (Q) {
|
|
195
|
+
z || (d.value = { confirm: Q });
|
|
193
196
|
return;
|
|
194
197
|
}
|
|
195
|
-
if (await I(
|
|
196
|
-
|
|
198
|
+
if (await I(M), !z && g.value && M.state === "ready" && E.value && (M = await u.authorize($, k.value), await I(M)), M.state !== "ready" && M.requested && await q(M.requested) && (M = await u.status(), await I(M)), M.state !== "ready") {
|
|
199
|
+
z || (d.value = { reason: M.reason ?? "", code: M.code });
|
|
197
200
|
return;
|
|
198
201
|
}
|
|
199
|
-
|
|
202
|
+
z || h();
|
|
200
203
|
} catch {
|
|
201
|
-
|
|
204
|
+
z || (_.value = !0);
|
|
202
205
|
} finally {
|
|
203
|
-
|
|
206
|
+
z || (r.value = !1, y.value = !1);
|
|
204
207
|
}
|
|
205
208
|
}
|
|
206
|
-
async function q(
|
|
207
|
-
for (const
|
|
208
|
-
const
|
|
209
|
+
async function q($) {
|
|
210
|
+
for (const M = Date.now() + It; !z; await new Promise((Q) => setTimeout(Q, Vt))) {
|
|
211
|
+
const Q = (await n.ctx?.call("delegate.status").catch(() => {
|
|
209
212
|
}))?.selection;
|
|
210
|
-
if (
|
|
211
|
-
if (Date.now() >=
|
|
213
|
+
if (Q?.scope === $.scope && Q.generation > $.generation) return !0;
|
|
214
|
+
if (Date.now() >= M) return !1;
|
|
212
215
|
}
|
|
213
216
|
return !1;
|
|
214
217
|
}
|
|
215
|
-
const
|
|
216
|
-
return
|
|
217
|
-
u.subscribe?.((
|
|
218
|
-
!
|
|
219
|
-
}),
|
|
220
|
-
}),
|
|
221
|
-
|
|
222
|
-
}), { status: i, password: o, busy: r, confirming:
|
|
218
|
+
const Z = ($) => $?.code === "executor_starting" ? a.value.statusStarting : Et($?.reason) ? a.value.statusUnreachable : void 0;
|
|
219
|
+
return Ce(() => {
|
|
220
|
+
u.subscribe?.(($) => {
|
|
221
|
+
!z && !We($) && (i.value = $);
|
|
222
|
+
}), V(n.initial);
|
|
223
|
+
}), _e(() => {
|
|
224
|
+
z = !0, o.value = "";
|
|
225
|
+
}), { status: i, password: o, busy: r, confirming: y, error: _, failure: d, scope: c, chosen: k, options: R, dynamic: g, files: x, canConfirm: w, needsScope: E, changed: A, refresh: F, authorize: J, explain: Z };
|
|
223
226
|
}
|
|
224
|
-
function
|
|
227
|
+
function Ue(n, h) {
|
|
225
228
|
let u = !1, a, i = 0;
|
|
226
229
|
function o() {
|
|
227
230
|
clearTimeout(a), a = setTimeout(() => {
|
|
228
231
|
h().then(() => {
|
|
229
232
|
!u && n() && o();
|
|
230
233
|
});
|
|
231
|
-
},
|
|
234
|
+
}, ua(i++, n()));
|
|
232
235
|
}
|
|
233
236
|
Ye(n, (r) => {
|
|
234
237
|
clearTimeout(a), i = 0, r && !u && o();
|
|
235
|
-
}),
|
|
238
|
+
}), _e(() => {
|
|
236
239
|
u = !0, clearTimeout(a);
|
|
237
240
|
});
|
|
238
241
|
}
|
|
239
|
-
const
|
|
242
|
+
const Ut = { class: "executor-alert" }, Dt = {
|
|
240
243
|
key: 0,
|
|
241
244
|
class: "executor-reason"
|
|
242
|
-
},
|
|
245
|
+
}, Bt = {
|
|
243
246
|
key: 0,
|
|
244
247
|
class: "executor-summary"
|
|
245
|
-
},
|
|
248
|
+
}, Lt = {
|
|
246
249
|
key: 1,
|
|
247
250
|
class: "executor-summary"
|
|
248
|
-
},
|
|
251
|
+
}, Nt = ["data-executor-status"], Ot = { class: "executor-reason" }, qt = { class: "executor-help" }, Ft = {
|
|
249
252
|
key: 0,
|
|
250
253
|
class: "executor-hint"
|
|
251
|
-
},
|
|
254
|
+
}, Mt = /* @__PURE__ */ fe({
|
|
252
255
|
__name: "ExecutorSettings",
|
|
253
256
|
props: {
|
|
254
257
|
admin: { type: Boolean },
|
|
@@ -258,11 +261,11 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
258
261
|
},
|
|
259
262
|
emits: ["confirmed"],
|
|
260
263
|
setup(n, { expose: h, emit: u }) {
|
|
261
|
-
const a = n, i = u, o = C(() =>
|
|
262
|
-
return
|
|
264
|
+
const a = n, i = u, o = C(() => Le(a.locale)), { status: r, password: y, busy: _, confirming: d, error: c, failure: k, scope: U, chosen: g, options: x, dynamic: R, files: w, canConfirm: E, needsScope: A, refresh: z, authorize: I, explain: V } = Pa(a, () => i("confirmed")), F = { password_rejected: "passwordRejected", password_required: "passwordRequired", password_confirm_failed: "passwordConfirmFailed" }, J = C(() => d.value ? "confirming" : r.value ? r.value.state === "ready" ? A.value ? "scope" : "ready" : r.value.state === "needs-admin-approval" ? "needs" : "blocked" : void 0), q = C(() => ({ ready: { tone: "success", text: o.value.statusReady }, scope: { tone: "warning", text: o.value.statusScope }, needs: { tone: "warning", text: o.value.statusNeeds }, blocked: { tone: "danger", text: o.value.statusBlocked }, confirming: { tone: "info", text: o.value.statusConfirming } })[J.value ?? "confirming"]), Z = C(() => d.value ? o.value.confirmingHelp : _.value || c.value || y.value ? "" : o.value.hintPassword), $ = C(() => d.value ? void 0 : we(r.value));
|
|
265
|
+
return Ue(() => $.value, z), h({ refresh: z }), (M, Q) => n.admin ? (l(), f(e(he), {
|
|
263
266
|
key: 0,
|
|
264
267
|
title: o.value.setupTitle,
|
|
265
|
-
description: e(
|
|
268
|
+
description: e(w) ? o.value.setupHelpFiles : o.value.setupHelp,
|
|
266
269
|
collapsible: !1,
|
|
267
270
|
"aria-busy": e(_) || !e(r) && !e(d) && !e(c)
|
|
268
271
|
}, {
|
|
@@ -273,13 +276,13 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
273
276
|
role: "alert"
|
|
274
277
|
}, {
|
|
275
278
|
default: t(() => [
|
|
276
|
-
T("span",
|
|
279
|
+
T("span", Ut, [
|
|
277
280
|
T("span", null, s(o.value.setupError), 1),
|
|
278
|
-
v(e(
|
|
281
|
+
v(e(N), {
|
|
279
282
|
variant: "secondary",
|
|
280
283
|
size: "sm",
|
|
281
284
|
disabled: e(_),
|
|
282
|
-
onClick: e(
|
|
285
|
+
onClick: e(z)
|
|
283
286
|
}, {
|
|
284
287
|
default: t(() => [
|
|
285
288
|
b(s(o.value.retry), 1)
|
|
@@ -295,40 +298,40 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
295
298
|
role: "alert"
|
|
296
299
|
}, {
|
|
297
300
|
default: t(() => [
|
|
298
|
-
"confirm" in e(k) ? (l(),
|
|
301
|
+
"confirm" in e(k) ? (l(), S(le, { key: 0 }, [
|
|
299
302
|
b(s(o.value[F[e(k).confirm]]), 1)
|
|
300
|
-
], 64)) : (l(),
|
|
301
|
-
b(s(e(k).code === "session_ended" ? o.value.session : e(
|
|
302
|
-
e(k).reason ? (l(),
|
|
303
|
+
], 64)) : (l(), S(le, { key: 1 }, [
|
|
304
|
+
b(s(e(k).code === "session_ended" ? o.value.session : e(V)(e(k)) ?? o.value.setupError), 1),
|
|
305
|
+
e(k).reason ? (l(), S("span", Dt, s(e(k).reason), 1)) : m("", !0)
|
|
303
306
|
], 64))
|
|
304
307
|
]),
|
|
305
308
|
_: 1
|
|
306
|
-
})) :
|
|
307
|
-
|
|
309
|
+
})) : m("", !0),
|
|
310
|
+
$.value ? (l(), f(e(G), {
|
|
308
311
|
key: 2,
|
|
309
312
|
tone: "info",
|
|
310
313
|
role: "status"
|
|
311
314
|
}, {
|
|
312
315
|
default: t(() => [
|
|
313
|
-
b(s(e(
|
|
316
|
+
b(s(e(Re)($.value, n.locale)), 1)
|
|
314
317
|
]),
|
|
315
318
|
_: 1
|
|
316
|
-
})) : (l(),
|
|
317
|
-
!e(r) && !e(d) && !e(c) ? (l(),
|
|
319
|
+
})) : (l(), S(le, { key: 3 }, [
|
|
320
|
+
!e(r) && !e(d) && !e(c) ? (l(), S("div", Bt, [
|
|
318
321
|
v(e(be), {
|
|
319
322
|
label: o.value.status,
|
|
320
323
|
"data-placeholder-row": ""
|
|
321
324
|
}, {
|
|
322
325
|
default: t(() => [
|
|
323
|
-
v(e(
|
|
326
|
+
v(e(Pe), {
|
|
324
327
|
width: "5rem",
|
|
325
328
|
height: "20px"
|
|
326
329
|
})
|
|
327
330
|
]),
|
|
328
331
|
_: 1
|
|
329
332
|
}, 8, ["label"])
|
|
330
|
-
])) :
|
|
331
|
-
e(r) || e(d) ? (l(),
|
|
333
|
+
])) : m("", !0),
|
|
334
|
+
e(r) || e(d) ? (l(), S("div", Lt, [
|
|
332
335
|
v(e(be), {
|
|
333
336
|
label: o.value.status
|
|
334
337
|
}, {
|
|
@@ -345,7 +348,7 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
345
348
|
]),
|
|
346
349
|
_: 1
|
|
347
350
|
}, 8, ["tone"])
|
|
348
|
-
], 8,
|
|
351
|
+
], 8, Nt)
|
|
349
352
|
]),
|
|
350
353
|
_: 1
|
|
351
354
|
}, 8, ["label"]),
|
|
@@ -354,33 +357,33 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
354
357
|
label: o.value.details
|
|
355
358
|
}, {
|
|
356
359
|
default: t(() => [
|
|
357
|
-
e(
|
|
358
|
-
b(s(e(
|
|
359
|
-
T("span",
|
|
360
|
-
], 64)) : (l(),
|
|
360
|
+
e(V)(e(r)) ? (l(), S(le, { key: 0 }, [
|
|
361
|
+
b(s(e(V)(e(r))), 1),
|
|
362
|
+
T("span", Ot, s(e(r).reason), 1)
|
|
363
|
+
], 64)) : (l(), S(le, { key: 1 }, [
|
|
361
364
|
b(s(e(r).reason), 1)
|
|
362
365
|
], 64))
|
|
363
366
|
]),
|
|
364
367
|
_: 1
|
|
365
|
-
}, 8, ["label"])) :
|
|
366
|
-
e(
|
|
368
|
+
}, 8, ["label"])) : m("", !0),
|
|
369
|
+
e(U)?.selection ? (l(), f(e(be), {
|
|
367
370
|
key: 1,
|
|
368
371
|
label: o.value.protectedScope
|
|
369
372
|
}, {
|
|
370
373
|
default: t(() => [
|
|
371
|
-
v(e(
|
|
372
|
-
path: e(
|
|
374
|
+
v(e(Ee), {
|
|
375
|
+
path: e(U).selection.root
|
|
373
376
|
}, null, 8, ["path"])
|
|
374
377
|
]),
|
|
375
378
|
_: 1
|
|
376
|
-
}, 8, ["label"])) :
|
|
377
|
-
])) :
|
|
379
|
+
}, 8, ["label"])) : m("", !0)
|
|
380
|
+
])) : m("", !0),
|
|
378
381
|
J.value === "needs" ? (l(), f(e(G), {
|
|
379
382
|
key: 2,
|
|
380
383
|
tone: "info"
|
|
381
384
|
}, {
|
|
382
385
|
default: t(() => [
|
|
383
|
-
b(s(e(
|
|
386
|
+
b(s(e(w) ? o.value.needs : o.value.executorNeeds), 1)
|
|
384
387
|
]),
|
|
385
388
|
_: 1
|
|
386
389
|
})) : J.value === "scope" ? (l(), f(e(G), {
|
|
@@ -396,11 +399,11 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
396
399
|
tone: "warning"
|
|
397
400
|
}, {
|
|
398
401
|
default: t(() => [
|
|
399
|
-
b(s(e(
|
|
402
|
+
b(s(e(w) ? o.value.blocked : o.value.executorBlocked), 1)
|
|
400
403
|
]),
|
|
401
404
|
_: 1
|
|
402
|
-
})) :
|
|
403
|
-
e(
|
|
405
|
+
})) : m("", !0),
|
|
406
|
+
e(U)?.mismatch ? (l(), f(e(G), {
|
|
404
407
|
key: 5,
|
|
405
408
|
tone: "warning"
|
|
406
409
|
}, {
|
|
@@ -408,41 +411,41 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
408
411
|
b(s(o.value.scopeMismatch), 1)
|
|
409
412
|
]),
|
|
410
413
|
_: 1
|
|
411
|
-
})) :
|
|
412
|
-
e(r)?.state === "needs-admin-approval" || e(r)?.retry || e(
|
|
414
|
+
})) : m("", !0),
|
|
415
|
+
e(r)?.state === "needs-admin-approval" || e(r)?.retry || e(A) ? (l(), f(e(Oe), {
|
|
413
416
|
key: 6,
|
|
414
417
|
direction: "vertical",
|
|
415
418
|
class: "executor-form",
|
|
416
419
|
onSubmit: Ne(e(I), ["prevent"])
|
|
417
420
|
}, {
|
|
418
421
|
default: t(() => [
|
|
419
|
-
e(
|
|
420
|
-
T("p",
|
|
421
|
-
v(e(
|
|
422
|
+
e(R) ? (l(), S(le, { key: 0 }, [
|
|
423
|
+
T("p", qt, s(o.value.preselectionHelp), 1),
|
|
424
|
+
v(e(Te), {
|
|
422
425
|
label: o.value.scopeLabel,
|
|
423
426
|
"label-for": "delegate-scope"
|
|
424
427
|
}, {
|
|
425
428
|
default: t(() => [
|
|
426
|
-
v(e(
|
|
429
|
+
v(e(ra), {
|
|
427
430
|
id: "delegate-scope",
|
|
428
|
-
modelValue: e(
|
|
429
|
-
"onUpdate:modelValue":
|
|
430
|
-
options: e(
|
|
431
|
+
modelValue: e(g),
|
|
432
|
+
"onUpdate:modelValue": Q[0] || (Q[0] = (ue) => Ke(g) ? g.value = ue : null),
|
|
433
|
+
options: e(x),
|
|
431
434
|
disabled: e(_) || e(c)
|
|
432
435
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
433
436
|
]),
|
|
434
437
|
_: 1
|
|
435
438
|
}, 8, ["label"])
|
|
436
|
-
], 64)) :
|
|
437
|
-
v(e(
|
|
439
|
+
], 64)) : m("", !0),
|
|
440
|
+
v(e(Te), {
|
|
438
441
|
label: o.value.password,
|
|
439
442
|
"label-for": "delegate-password"
|
|
440
443
|
}, {
|
|
441
444
|
default: t(() => [
|
|
442
|
-
v(e(
|
|
445
|
+
v(e(Ae), {
|
|
443
446
|
id: "delegate-password",
|
|
444
|
-
modelValue: e(
|
|
445
|
-
"onUpdate:modelValue":
|
|
447
|
+
modelValue: e(y),
|
|
448
|
+
"onUpdate:modelValue": Q[1] || (Q[1] = (ue) => Ke(y) ? y.value = ue : null),
|
|
446
449
|
type: "password",
|
|
447
450
|
autocomplete: "current-password",
|
|
448
451
|
disabled: e(_) || e(c)
|
|
@@ -452,132 +455,132 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
452
455
|
}, 8, ["label"]),
|
|
453
456
|
v(e(He), null, {
|
|
454
457
|
default: t(() => [
|
|
455
|
-
v(e(
|
|
458
|
+
v(e(N), {
|
|
456
459
|
type: "submit",
|
|
457
460
|
variant: "primary",
|
|
458
461
|
loading: e(d),
|
|
459
|
-
disabled: e(_) || e(c) || !e(
|
|
462
|
+
disabled: e(_) || e(c) || !e(y) || !e(E)
|
|
460
463
|
}, {
|
|
461
464
|
default: t(() => [
|
|
462
|
-
b(s(e(
|
|
465
|
+
b(s(e(R) ? o.value.confirmShare : o.value.authorize), 1)
|
|
463
466
|
]),
|
|
464
467
|
_: 1
|
|
465
468
|
}, 8, ["loading", "disabled"]),
|
|
466
|
-
|
|
469
|
+
Z.value ? (l(), S("span", Ft, s(Z.value), 1)) : m("", !0)
|
|
467
470
|
]),
|
|
468
471
|
_: 1
|
|
469
472
|
})
|
|
470
473
|
]),
|
|
471
474
|
_: 1
|
|
472
|
-
}, 8, ["onSubmit"])) :
|
|
475
|
+
}, 8, ["onSubmit"])) : m("", !0)
|
|
473
476
|
], 64))
|
|
474
477
|
]),
|
|
475
478
|
_: 1
|
|
476
|
-
}, 8, ["title", "description", "aria-busy"])) :
|
|
479
|
+
}, 8, ["title", "description", "aria-busy"])) : m("", !0);
|
|
477
480
|
}
|
|
478
481
|
}), ge = (n, h) => {
|
|
479
482
|
const u = n.__vccOpts || n;
|
|
480
483
|
for (const [a, i] of h)
|
|
481
484
|
u[a] = i;
|
|
482
485
|
return u;
|
|
483
|
-
},
|
|
486
|
+
}, Ta = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-666ac74c"]]), Ht = {
|
|
484
487
|
key: 0,
|
|
485
488
|
class: "executor-notice"
|
|
486
|
-
},
|
|
489
|
+
}, Kt = {
|
|
487
490
|
key: 1,
|
|
488
491
|
class: "executor-notice"
|
|
489
|
-
},
|
|
492
|
+
}, Xt = { class: "executor-notice-body" }, Gt = /* @__PURE__ */ fe({
|
|
490
493
|
__name: "ExecutorNotice",
|
|
491
494
|
props: {
|
|
492
495
|
locale: {},
|
|
493
496
|
ctx: {}
|
|
494
497
|
},
|
|
495
498
|
setup(n) {
|
|
496
|
-
const h = n, u = C(() =>
|
|
497
|
-
a &&
|
|
498
|
-
const i = p("checking"), o = p(), r = p(!1),
|
|
499
|
-
let c = !1, k,
|
|
500
|
-
function
|
|
501
|
-
const
|
|
502
|
-
if (o.value = we(
|
|
503
|
-
|
|
499
|
+
const h = n, u = C(() => Le(h.locale)), a = Ve(Me, void 0) ?? h.ctx.executor;
|
|
500
|
+
a && Qe(Me, a);
|
|
501
|
+
const i = p("checking"), o = p(), r = p(!1), y = C(() => h.ctx.user?.isAdmin === !0), _ = C(() => !o.value && (i.value === "needs-admin-approval" || i.value === "blocked")), d = C(() => a?.call ? { call: (w, E) => a.call(w, E) } : h.ctx.call ? h.ctx : void 0);
|
|
502
|
+
let c = !1, k, U, g = 0;
|
|
503
|
+
function x(w) {
|
|
504
|
+
const E = o.value;
|
|
505
|
+
if (o.value = we(w), i.value = w?.state ?? "unknown", clearTimeout(U), w && !o.value) {
|
|
506
|
+
g = 0;
|
|
504
507
|
return;
|
|
505
508
|
}
|
|
506
|
-
o.value !==
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
+
o.value !== E && (g = 0), U = setTimeout(() => {
|
|
510
|
+
R();
|
|
511
|
+
}, ua(g++, o.value));
|
|
509
512
|
}
|
|
510
|
-
async function
|
|
513
|
+
async function R() {
|
|
511
514
|
if (!a) return;
|
|
512
|
-
let
|
|
515
|
+
let w;
|
|
513
516
|
try {
|
|
514
|
-
|
|
517
|
+
w = await a.status();
|
|
515
518
|
} catch {
|
|
516
|
-
|
|
519
|
+
w = void 0;
|
|
517
520
|
}
|
|
518
|
-
c ||
|
|
521
|
+
c || x(w);
|
|
519
522
|
}
|
|
520
|
-
return
|
|
521
|
-
a && (a.subscribe?.((
|
|
522
|
-
!c && !We(
|
|
523
|
+
return Ce(() => {
|
|
524
|
+
a && (a.subscribe?.((w) => {
|
|
525
|
+
!c && !We(w) && x(w);
|
|
523
526
|
}), k = h.ctx.reopen?.(() => {
|
|
524
|
-
|
|
525
|
-
}),
|
|
526
|
-
}),
|
|
527
|
-
c = !0, clearTimeout(
|
|
528
|
-
}), (
|
|
527
|
+
R();
|
|
528
|
+
}), R());
|
|
529
|
+
}), _e(() => {
|
|
530
|
+
c = !0, clearTimeout(U), k?.();
|
|
531
|
+
}), (w, E) => o.value ? (l(), S("div", Ht, [
|
|
529
532
|
v(e(G), {
|
|
530
533
|
tone: "info",
|
|
531
534
|
role: "status"
|
|
532
535
|
}, {
|
|
533
536
|
default: t(() => [
|
|
534
|
-
b(s(e(
|
|
537
|
+
b(s(e(Re)(o.value, n.locale)), 1)
|
|
535
538
|
]),
|
|
536
539
|
_: 1
|
|
537
540
|
})
|
|
538
|
-
])) : _.value ? (l(),
|
|
541
|
+
])) : _.value ? (l(), S("div", Kt, [
|
|
539
542
|
v(e(G), { tone: "warning" }, {
|
|
540
543
|
default: t(() => [
|
|
541
|
-
T("span",
|
|
542
|
-
b(s(
|
|
543
|
-
|
|
544
|
+
T("span", Xt, [
|
|
545
|
+
b(s(y.value ? u.value.noticeAdmin : u.value.noticeUser), 1),
|
|
546
|
+
y.value ? (l(), f(e(N), {
|
|
544
547
|
key: 0,
|
|
545
548
|
variant: "secondary",
|
|
546
549
|
size: "sm",
|
|
547
|
-
onClick:
|
|
550
|
+
onClick: E[0] || (E[0] = (A) => r.value = !0)
|
|
548
551
|
}, {
|
|
549
552
|
default: t(() => [
|
|
550
553
|
b(s(u.value.noticeApprove), 1)
|
|
551
554
|
]),
|
|
552
555
|
_: 1
|
|
553
|
-
})) :
|
|
556
|
+
})) : m("", !0)
|
|
554
557
|
])
|
|
555
558
|
]),
|
|
556
559
|
_: 1
|
|
557
560
|
}),
|
|
558
|
-
|
|
561
|
+
y.value ? (l(), f(e(Ze), {
|
|
559
562
|
key: 0,
|
|
560
563
|
open: r.value && _.value,
|
|
561
564
|
title: u.value.authorize,
|
|
562
565
|
width: "560px",
|
|
563
|
-
"onUpdate:open":
|
|
566
|
+
"onUpdate:open": E[1] || (E[1] = (A) => r.value = A)
|
|
564
567
|
}, {
|
|
565
568
|
default: t(() => [
|
|
566
|
-
v(
|
|
569
|
+
v(Ta, {
|
|
567
570
|
admin: !0,
|
|
568
571
|
locale: n.locale,
|
|
569
572
|
ctx: d.value,
|
|
570
|
-
onConfirmed:
|
|
573
|
+
onConfirmed: R
|
|
571
574
|
}, null, 8, ["locale", "ctx"])
|
|
572
575
|
]),
|
|
573
576
|
_: 1
|
|
574
|
-
}, 8, ["open", "title"])) :
|
|
575
|
-
])) :
|
|
577
|
+
}, 8, ["open", "title"])) : m("", !0)
|
|
578
|
+
])) : m("", !0);
|
|
576
579
|
}
|
|
577
|
-
}),
|
|
580
|
+
}), Wt = /* @__PURE__ */ ge(Gt, [["__scopeId", "data-v-1edce327"]]), Aa = /* @__PURE__ */ Symbol("synopackageland:page-actions"), Jt = { role: "alert" }, Yt = {
|
|
578
581
|
ref: "page-actions",
|
|
579
582
|
class: "app-page-actions"
|
|
580
|
-
},
|
|
583
|
+
}, Qt = ["hidden"], Zt = { class: "app-page-content" }, jt = /* @__PURE__ */ fe({
|
|
581
584
|
__name: "AppShell",
|
|
582
585
|
props: {
|
|
583
586
|
locale: {},
|
|
@@ -596,63 +599,63 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
596
599
|
},
|
|
597
600
|
emits: ["update:modelValue"],
|
|
598
601
|
setup(n, { emit: h }) {
|
|
599
|
-
const u = n, a = h, i = C(() =>
|
|
602
|
+
const u = n, a = h, i = C(() => Na(u.locale)), o = C(() => At(u.pages, i.value)), r = C(() => Rt(o.value)), y = C(() => o.value.find((V) => V.id === u.modelValue)), _ = C(() => y.value?.title ?? i.value[u.modelValue] ?? i.value.status), d = aa("scroller"), c = C(() => u.pages.some((V) => typeof V != "string"));
|
|
600
603
|
Ye(() => u.modelValue, () => {
|
|
601
604
|
c.value && !u.keepScroll && d.value && (d.value.$el.scrollTop = 0);
|
|
602
605
|
}, { flush: "post" });
|
|
603
|
-
const k =
|
|
604
|
-
function
|
|
606
|
+
const k = Qa(), U = C(() => u.denied === !0 ? {} : u.denied || void 0), g = C(() => u.ctx !== void 0 && ga(u.ctx)), x = C(() => g.value ? u.ctx : void 0), R = (V, { slots: F }) => F.default?.(), w = C(() => u.ctx !== void 0 && !g.value);
|
|
607
|
+
function E() {
|
|
605
608
|
u.ctx?.host?.activateWindow?.();
|
|
606
609
|
}
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
return
|
|
611
|
-
const F =
|
|
610
|
+
const A = C(() => x.value?.user?.name ? x.value.user : void 0);
|
|
611
|
+
Qe(Aa, aa("page-actions"));
|
|
612
|
+
const z = aa("notices"), I = p(!0);
|
|
613
|
+
return ca((V) => {
|
|
614
|
+
const F = z.value;
|
|
612
615
|
if (!F) return;
|
|
613
616
|
const J = () => {
|
|
614
|
-
I.value = !
|
|
617
|
+
I.value = !Pt(F);
|
|
615
618
|
};
|
|
616
619
|
J();
|
|
617
620
|
const q = new MutationObserver(J);
|
|
618
|
-
q.observe(F, { childList: !0, subtree: !0, characterData: !0 }),
|
|
619
|
-
}, { flush: "post" }),
|
|
620
|
-
|
|
621
|
-
}), (
|
|
621
|
+
q.observe(F, { childList: !0, subtree: !0, characterData: !0 }), V(() => q.disconnect());
|
|
622
|
+
}, { flush: "post" }), ca((V) => {
|
|
623
|
+
g.value && V(tt());
|
|
624
|
+
}), (V, F) => (l(), f(ta(n.appRoot ? e(lt) : R), va(fa(n.appRoot ? { modalScope: "app", dialogBounds: w.value ? "viewport" : "app", style: "height: 100%;", onActivate: E } : {})), {
|
|
622
625
|
default: t(() => [
|
|
623
|
-
(l(), f(
|
|
626
|
+
(l(), f(ta(n.appRoot ? e(nt) : R), va(fa(n.appRoot ? { locale: e(ka)(n.locale) } : {})), {
|
|
624
627
|
default: t(() => [
|
|
625
|
-
|
|
628
|
+
U.value ? (l(), f(e(pa), {
|
|
626
629
|
key: 0,
|
|
627
630
|
class: "app-denied",
|
|
628
631
|
width: n.pageWidth
|
|
629
632
|
}, {
|
|
630
633
|
default: t(() => [
|
|
631
|
-
|
|
634
|
+
U.value.header !== !1 ? (l(), f(e(ya), {
|
|
632
635
|
key: 0,
|
|
633
|
-
title:
|
|
634
|
-
}, null, 8, ["title"])) :
|
|
635
|
-
|
|
636
|
+
title: U.value.title ?? i.value.deniedTitle
|
|
637
|
+
}, null, 8, ["title"])) : m("", !0),
|
|
638
|
+
ke(V.$slots, "denied", {}, () => [
|
|
636
639
|
v(e(G), { tone: "danger" }, {
|
|
637
640
|
default: t(() => [
|
|
638
|
-
T("span",
|
|
641
|
+
T("span", Jt, s(U.value.message ?? i.value.deniedMessage), 1)
|
|
639
642
|
]),
|
|
640
643
|
_: 1
|
|
641
644
|
})
|
|
642
645
|
], !0)
|
|
643
646
|
]),
|
|
644
647
|
_: 3
|
|
645
|
-
}, 8, ["width"])) : (l(), f(e(
|
|
648
|
+
}, 8, ["width"])) : (l(), f(e(ot), {
|
|
646
649
|
key: 1,
|
|
647
|
-
class:
|
|
650
|
+
class: sa(["app-shell", { "app-shell-fill": y.value?.fill }]),
|
|
648
651
|
"min-height": "0",
|
|
649
|
-
"wide-layout": n.wideLayout ?? (
|
|
652
|
+
"wide-layout": n.wideLayout ?? (g.value ? "web" : "window"),
|
|
650
653
|
"sidebar-storage-key": n.sidebarStorageKey,
|
|
651
654
|
"brand-name": n.brandName ?? n.ctx?.displayName,
|
|
652
655
|
"brand-icon": n.brandIcon ?? n.ctx?.appIcon
|
|
653
656
|
}, Xe({
|
|
654
657
|
sidebar: t(() => [
|
|
655
|
-
v(e(
|
|
658
|
+
v(e(st), {
|
|
656
659
|
"model-value": n.modelValue,
|
|
657
660
|
groups: r.value,
|
|
658
661
|
"onUpdate:modelValue": F[0] || (F[0] = (J) => a("update:modelValue", J))
|
|
@@ -662,47 +665,47 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
662
665
|
v(e(pa), {
|
|
663
666
|
ref_key: "scroller",
|
|
664
667
|
ref: d,
|
|
665
|
-
class:
|
|
668
|
+
class: sa(["app-page", { "app-page-fill": y.value?.fill }]),
|
|
666
669
|
width: n.pageWidth
|
|
667
670
|
}, {
|
|
668
671
|
default: t(() => [
|
|
669
|
-
|
|
672
|
+
y.value?.header !== !1 ? (l(), f(e(ya), {
|
|
670
673
|
key: 0,
|
|
671
674
|
title: _.value,
|
|
672
|
-
description:
|
|
675
|
+
description: y.value?.description ?? n.description
|
|
673
676
|
}, Xe({
|
|
674
677
|
actions: t(() => [
|
|
675
|
-
T("div",
|
|
676
|
-
|
|
678
|
+
T("div", Yt, null, 512),
|
|
679
|
+
ke(V.$slots, "actions", { page: n.modelValue }, void 0, !0)
|
|
677
680
|
]),
|
|
678
681
|
_: 2
|
|
679
682
|
}, [
|
|
680
683
|
k.meta ? {
|
|
681
684
|
name: "meta",
|
|
682
685
|
fn: t(() => [
|
|
683
|
-
|
|
686
|
+
ke(V.$slots, "meta", { page: n.modelValue }, void 0, !0)
|
|
684
687
|
]),
|
|
685
688
|
key: "0"
|
|
686
689
|
} : void 0
|
|
687
|
-
]), 1032, ["title", "description"])) :
|
|
688
|
-
n.ctx?.executor ? (l(), f(
|
|
690
|
+
]), 1032, ["title", "description"])) : m("", !0),
|
|
691
|
+
n.ctx?.executor ? (l(), f(Wt, {
|
|
689
692
|
key: 1,
|
|
690
693
|
ctx: n.ctx,
|
|
691
694
|
locale: n.locale
|
|
692
|
-
}, null, 8, ["ctx", "locale"])) :
|
|
693
|
-
e(
|
|
695
|
+
}, null, 8, ["ctx", "locale"])) : m("", !0),
|
|
696
|
+
e(za)(k.notices?.({ page: n.modelValue })) ? (l(), S("div", {
|
|
694
697
|
key: 2,
|
|
695
698
|
ref: "notices",
|
|
696
699
|
class: "app-notices",
|
|
697
700
|
hidden: I.value
|
|
698
701
|
}, [
|
|
699
|
-
|
|
700
|
-
], 8,
|
|
701
|
-
T("div",
|
|
702
|
-
|
|
703
|
-
key:
|
|
704
|
-
})) :
|
|
705
|
-
|
|
702
|
+
ke(V.$slots, "notices", { page: n.modelValue }, void 0, !0)
|
|
703
|
+
], 8, Qt)) : m("", !0),
|
|
704
|
+
T("div", Zt, [
|
|
705
|
+
y.value?.component ? (l(), f(ta(y.value.component), {
|
|
706
|
+
key: y.value.id
|
|
707
|
+
})) : m("", !0),
|
|
708
|
+
ke(V.$slots, "default", { page: n.modelValue }, void 0, !0)
|
|
706
709
|
])
|
|
707
710
|
]),
|
|
708
711
|
_: 3
|
|
@@ -710,15 +713,15 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
710
713
|
]),
|
|
711
714
|
_: 2
|
|
712
715
|
}, [
|
|
713
|
-
k["sidebar-footer"] ||
|
|
716
|
+
k["sidebar-footer"] || A.value ? {
|
|
714
717
|
name: "sidebar-footer",
|
|
715
718
|
fn: t(() => [
|
|
716
|
-
|
|
717
|
-
|
|
719
|
+
ke(V.$slots, "sidebar-footer", {}, () => [
|
|
720
|
+
A.value ? (l(), f(e(it), {
|
|
718
721
|
key: 0,
|
|
719
|
-
name:
|
|
720
|
-
detail:
|
|
721
|
-
}, null, 8, ["name", "detail"])) :
|
|
722
|
+
name: A.value.name,
|
|
723
|
+
detail: A.value.isAdmin ? i.value.administrator : i.value.dsmUser
|
|
724
|
+
}, null, 8, ["name", "detail"])) : m("", !0)
|
|
722
725
|
], !0)
|
|
723
726
|
]),
|
|
724
727
|
key: "0"
|
|
@@ -726,7 +729,7 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
726
729
|
k.toolbar ? {
|
|
727
730
|
name: "toolbar",
|
|
728
731
|
fn: t(() => [
|
|
729
|
-
|
|
732
|
+
ke(V.$slots, "toolbar", { page: n.modelValue }, void 0, !0)
|
|
730
733
|
]),
|
|
731
734
|
key: "1"
|
|
732
735
|
} : void 0
|
|
@@ -738,38 +741,38 @@ const It = { class: "executor-alert" }, Vt = {
|
|
|
738
741
|
_: 3
|
|
739
742
|
}, 16));
|
|
740
743
|
}
|
|
741
|
-
}),
|
|
744
|
+
}), yo = /* @__PURE__ */ ge(jt, [["__scopeId", "data-v-61068e94"]]), mo = /* @__PURE__ */ fe({
|
|
742
745
|
__name: "PageActions",
|
|
743
746
|
setup(n) {
|
|
744
|
-
const h =
|
|
745
|
-
return (a, i) => u.value ? (l(), f(
|
|
747
|
+
const h = Ve(Aa, null), u = C(() => h?.value ?? null);
|
|
748
|
+
return (a, i) => u.value ? (l(), f(Za, {
|
|
746
749
|
key: 0,
|
|
747
750
|
to: u.value
|
|
748
751
|
}, [
|
|
749
|
-
|
|
750
|
-
], 8, ["to"])) :
|
|
752
|
+
ke(a.$slots, "default")
|
|
753
|
+
], 8, ["to"])) : m("", !0);
|
|
751
754
|
}
|
|
752
755
|
}), ba = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
753
|
-
function
|
|
756
|
+
function ia(n, h) {
|
|
754
757
|
let u = 0, a = n;
|
|
755
758
|
for (; a >= 1024 && u < ba.length - 1; )
|
|
756
759
|
a /= 1024, u++;
|
|
757
760
|
return `${new Intl.NumberFormat(h, { maximumFractionDigits: u ? 1 : 0 }).format(a)} ${ba[u]}`;
|
|
758
761
|
}
|
|
759
|
-
const
|
|
762
|
+
const el = ["aria-busy", "aria-label"], al = { class: "file-toolbar file-location" }, tl = ["aria-label"], ll = {
|
|
760
763
|
key: 0,
|
|
761
764
|
class: "file-toolbar"
|
|
762
|
-
},
|
|
765
|
+
}, nl = {
|
|
763
766
|
key: 1,
|
|
764
767
|
role: "status"
|
|
765
|
-
},
|
|
768
|
+
}, ol = { role: "alert" }, sl = {
|
|
766
769
|
key: 4,
|
|
767
770
|
role: "status"
|
|
768
|
-
},
|
|
771
|
+
}, il = { class: "file-columns" }, ul = ["aria-label"], rl = { class: "file-content" }, dl = { class: "file-name" }, cl = { class: "file-empty" }, vl = { class: "file-bytes" }, fl = {
|
|
769
772
|
key: 5,
|
|
770
773
|
class: "file-selection",
|
|
771
774
|
role: "status"
|
|
772
|
-
},
|
|
775
|
+
}, pl = /* @__PURE__ */ fe({
|
|
773
776
|
__name: "FileBrowser",
|
|
774
777
|
props: {
|
|
775
778
|
provider: {},
|
|
@@ -779,159 +782,159 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
779
782
|
},
|
|
780
783
|
emits: ["selected"],
|
|
781
784
|
setup(n, { emit: h }) {
|
|
782
|
-
const u = n, a = h, i = C(() =>
|
|
785
|
+
const u = n, a = h, i = C(() => ze(u.locale)), o = zt(), { busy: r, error: y } = o, _ = p([]), d = p([]), c = p([]), k = p(), U = p(), g = p(), x = p([]), R = p(), w = p({ key: "name", direction: "asc" }), E = p(0), A = p([]), z = p(!1);
|
|
783
786
|
let I = new AbortController();
|
|
784
|
-
async function
|
|
785
|
-
const
|
|
786
|
-
!
|
|
787
|
+
async function V() {
|
|
788
|
+
const B = k.value;
|
|
789
|
+
!B || B.isDir || !u.provider.download || await o.run(async (L) => (await u.provider.info(B.path, L), u.provider.download(B.path), !0));
|
|
787
790
|
}
|
|
788
791
|
async function F() {
|
|
789
|
-
const
|
|
790
|
-
if (!
|
|
791
|
-
|
|
792
|
+
const B = c.value.at(-1)?.path, L = A.value[0];
|
|
793
|
+
if (!B || !L || !u.provider.upload) return;
|
|
794
|
+
z.value = !1, await o.run(async (W) => (await u.provider.upload(B, L, W), !0)) && (A.value = [], await K(c.value), z.value = !0);
|
|
792
795
|
}
|
|
793
796
|
const J = C(() => [
|
|
794
797
|
{ key: "name", label: i.value.nameColumn, sortable: !0 },
|
|
795
798
|
{ key: "kind", label: i.value.kindColumn },
|
|
796
799
|
{ key: "bytes", label: i.value.sizeColumn, align: "right", sortable: !0 }
|
|
797
|
-
]), q =
|
|
798
|
-
function
|
|
799
|
-
return { id:
|
|
800
|
+
]), q = ja((B, { attrs: L }) => et(la, { ...L, kind: "folder" }));
|
|
801
|
+
function Z(B) {
|
|
802
|
+
return { id: B.path, label: B.name, icon: q, data: B };
|
|
800
803
|
}
|
|
801
|
-
function
|
|
802
|
-
k.value =
|
|
804
|
+
function $(B) {
|
|
805
|
+
k.value = B, a("selected", B?.path);
|
|
803
806
|
}
|
|
804
|
-
function
|
|
805
|
-
|
|
807
|
+
function M(B) {
|
|
808
|
+
U.value = B.path, $(u.mode === "folder" ? B.isDir ? B : c.value.at(-1) : B.isDir ? void 0 : B);
|
|
806
809
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
810
|
+
function Q(B) {
|
|
811
|
+
B.isDir ? Ie(B) : M(B);
|
|
809
812
|
}
|
|
810
|
-
const
|
|
811
|
-
function
|
|
812
|
-
for (const W of
|
|
813
|
-
const
|
|
814
|
-
if (W.id ===
|
|
815
|
-
const P =
|
|
813
|
+
const ue = (B) => _.value.find((L) => L.path === B);
|
|
814
|
+
function pe(B, L, O = []) {
|
|
815
|
+
for (const W of B) {
|
|
816
|
+
const de = [...O, W.data];
|
|
817
|
+
if (W.id === L) return de;
|
|
818
|
+
const P = pe(W.children ?? [], L, de);
|
|
816
819
|
if (P) return P;
|
|
817
820
|
}
|
|
818
821
|
}
|
|
819
|
-
function
|
|
820
|
-
for (const O of
|
|
821
|
-
if (O.id ===
|
|
822
|
-
const W =
|
|
822
|
+
function ye(B, L) {
|
|
823
|
+
for (const O of B) {
|
|
824
|
+
if (O.id === L) return O;
|
|
825
|
+
const W = ye(O.children ?? [], L);
|
|
823
826
|
if (W) return W;
|
|
824
827
|
}
|
|
825
828
|
}
|
|
826
|
-
function j(
|
|
827
|
-
return
|
|
829
|
+
function j(B, L, O) {
|
|
830
|
+
return B.map((W) => W.id === L ? { ...W, children: O } : W.children ? { ...W, children: j(W.children, L, O) } : W);
|
|
828
831
|
}
|
|
829
832
|
let oe = 0;
|
|
830
|
-
async function ae(
|
|
831
|
-
const
|
|
832
|
-
for (const O of
|
|
833
|
-
const W =
|
|
833
|
+
async function ae(B) {
|
|
834
|
+
const L = ++oe;
|
|
835
|
+
for (const O of B.slice(0, -1)) {
|
|
836
|
+
const W = ye(d.value, O.path);
|
|
834
837
|
if (!W) break;
|
|
835
838
|
if (W.children === void 0) {
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
838
|
-
d.value = j(d.value, W.id,
|
|
839
|
+
const de = await H(W);
|
|
840
|
+
if (L !== oe || !de) return;
|
|
841
|
+
d.value = j(d.value, W.id, de);
|
|
839
842
|
}
|
|
840
|
-
|
|
843
|
+
x.value.includes(W.id) || (x.value = [...x.value, W.id]);
|
|
841
844
|
}
|
|
842
|
-
|
|
845
|
+
R.value = B.at(-1)?.path;
|
|
843
846
|
}
|
|
844
|
-
async function H(
|
|
845
|
-
const
|
|
847
|
+
async function H(B) {
|
|
848
|
+
const L = E.value, O = I.signal;
|
|
846
849
|
try {
|
|
847
850
|
const W = [];
|
|
848
|
-
let
|
|
849
|
-
for (;
|
|
850
|
-
const P = await u.provider.list(
|
|
851
|
-
if (O.aborted ||
|
|
852
|
-
W.push(...P.entries.filter((X) => X.isDir).map(
|
|
851
|
+
let de = 0;
|
|
852
|
+
for (; de !== void 0; ) {
|
|
853
|
+
const P = await u.provider.list(B.id, { offset: de, sortBy: "name", sortDirection: "ASC" }, O);
|
|
854
|
+
if (O.aborted || L !== E.value) return;
|
|
855
|
+
W.push(...P.entries.filter((X) => X.isDir).map(Z)), de = P.nextOffset;
|
|
853
856
|
}
|
|
854
857
|
return W;
|
|
855
858
|
} catch (W) {
|
|
856
|
-
!O.aborted &&
|
|
859
|
+
!O.aborted && L === E.value && (y.value = W, $());
|
|
857
860
|
return;
|
|
858
861
|
}
|
|
859
862
|
}
|
|
860
|
-
async function
|
|
863
|
+
async function K(B, L = !1) {
|
|
861
864
|
if (r.value) return;
|
|
862
|
-
|
|
863
|
-
const O =
|
|
864
|
-
c.value =
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
const
|
|
869
|
-
function
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
}
|
|
873
|
-
function
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
const
|
|
877
|
-
function
|
|
878
|
-
r.value || (
|
|
879
|
-
}
|
|
880
|
-
function
|
|
881
|
-
r.value || (
|
|
882
|
-
}
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
}
|
|
886
|
-
function
|
|
887
|
-
r.value || (
|
|
888
|
-
}
|
|
889
|
-
return
|
|
890
|
-
|
|
891
|
-
}),
|
|
892
|
-
|
|
893
|
-
}), (
|
|
865
|
+
$(), U.value = void 0, _.value = L ? _.value : [], g.value = L ? g.value : void 0;
|
|
866
|
+
const O = L ? g.value ?? 0 : 0, W = B.at(-1)?.path;
|
|
867
|
+
c.value = B;
|
|
868
|
+
const de = await o.run((P) => W ? u.provider.list(W, { offset: O, sortBy: w.value.key, sortDirection: w.value.direction === "asc" ? "ASC" : "DESC" }, P) : u.provider.shares(O, P));
|
|
869
|
+
de && (_.value = L ? [..._.value, ...de.entries] : de.entries, g.value = de.nextOffset, W ? u.mode === "folder" && !L && $(B.at(-1)) : d.value = _.value.filter((P) => P.isDir).map(Z), L || ae(B));
|
|
870
|
+
}
|
|
871
|
+
const se = C(() => [{ id: "", display: i.value.roots }, ...c.value.map((B) => ({ id: B.path, display: B.name }))]);
|
|
872
|
+
function re(B) {
|
|
873
|
+
const L = se.value.findIndex((O) => O.id === B.id);
|
|
874
|
+
L < c.value.length && ee(c.value.slice(0, L));
|
|
875
|
+
}
|
|
876
|
+
function Ie(B) {
|
|
877
|
+
ee([...c.value, B]);
|
|
878
|
+
}
|
|
879
|
+
const xe = p([[]]), Y = p(0);
|
|
880
|
+
function ee(B) {
|
|
881
|
+
r.value || (B.at(-1)?.path !== c.value.at(-1)?.path && (xe.value = [...xe.value.slice(0, Y.value + 1), B], Y.value++), K(B));
|
|
882
|
+
}
|
|
883
|
+
function ne(B) {
|
|
884
|
+
r.value || (Y.value += B, K(xe.value[Y.value]));
|
|
885
|
+
}
|
|
886
|
+
function ve(B) {
|
|
887
|
+
w.value = { key: B?.key === "bytes" ? "size" : "name", direction: B?.direction ?? "asc" }, K(c.value);
|
|
888
|
+
}
|
|
889
|
+
function $e() {
|
|
890
|
+
r.value || (E.value++, I.abort(), I = new AbortController(), d.value = [], x.value = [], R.value = void 0, xe.value = [[]], Y.value = 0, K([]));
|
|
891
|
+
}
|
|
892
|
+
return Ce(() => {
|
|
893
|
+
K([]);
|
|
894
|
+
}), _e(() => {
|
|
895
|
+
E.value++, I.abort();
|
|
896
|
+
}), (B, L) => (l(), S("section", {
|
|
894
897
|
class: "file-browser",
|
|
895
898
|
"aria-busy": e(r),
|
|
896
899
|
"aria-label": i.value.title
|
|
897
900
|
}, [
|
|
898
|
-
T("div",
|
|
899
|
-
v(e(
|
|
901
|
+
T("div", al, [
|
|
902
|
+
v(e(na), {
|
|
900
903
|
label: i.value.back,
|
|
901
904
|
size: "sm",
|
|
902
|
-
disabled: e(r) ||
|
|
903
|
-
onClick:
|
|
905
|
+
disabled: e(r) || Y.value === 0,
|
|
906
|
+
onClick: L[0] || (L[0] = (O) => ne(-1))
|
|
904
907
|
}, {
|
|
905
908
|
default: t(() => [
|
|
906
|
-
v(e(
|
|
909
|
+
v(e(ht), {
|
|
907
910
|
size: 16,
|
|
908
911
|
"aria-hidden": "true"
|
|
909
912
|
})
|
|
910
913
|
]),
|
|
911
914
|
_: 1
|
|
912
915
|
}, 8, ["label", "disabled"]),
|
|
913
|
-
v(e(
|
|
916
|
+
v(e(na), {
|
|
914
917
|
label: i.value.forward,
|
|
915
918
|
size: "sm",
|
|
916
|
-
disabled: e(r) ||
|
|
917
|
-
onClick:
|
|
919
|
+
disabled: e(r) || Y.value === xe.value.length - 1,
|
|
920
|
+
onClick: L[1] || (L[1] = (O) => ne(1))
|
|
918
921
|
}, {
|
|
919
922
|
default: t(() => [
|
|
920
|
-
v(e(
|
|
923
|
+
v(e(_t), {
|
|
921
924
|
size: 16,
|
|
922
925
|
"aria-hidden": "true"
|
|
923
926
|
})
|
|
924
927
|
]),
|
|
925
928
|
_: 1
|
|
926
929
|
}, 8, ["label", "disabled"]),
|
|
927
|
-
v(e(
|
|
930
|
+
v(e(na), {
|
|
928
931
|
label: i.value.refresh,
|
|
929
932
|
size: "sm",
|
|
930
933
|
disabled: e(r),
|
|
931
|
-
onClick:
|
|
934
|
+
onClick: $e
|
|
932
935
|
}, {
|
|
933
936
|
default: t(() => [
|
|
934
|
-
v(e(
|
|
937
|
+
v(e(wt), {
|
|
935
938
|
size: 14,
|
|
936
939
|
"aria-hidden": "true"
|
|
937
940
|
})
|
|
@@ -942,27 +945,27 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
942
945
|
class: "file-path",
|
|
943
946
|
"aria-label": i.value.location
|
|
944
947
|
}, [
|
|
945
|
-
v(e(
|
|
946
|
-
items:
|
|
948
|
+
v(e(ut), {
|
|
949
|
+
items: se.value,
|
|
947
950
|
"collapsed-label": i.value.fullPath,
|
|
948
|
-
onClickItem:
|
|
951
|
+
onClickItem: re
|
|
949
952
|
}, null, 8, ["items", "collapsed-label"])
|
|
950
|
-
], 8,
|
|
953
|
+
], 8, tl)
|
|
951
954
|
]),
|
|
952
|
-
n.transfers && n.provider.upload && c.value.length ? (l(),
|
|
953
|
-
v(e(
|
|
954
|
-
modelValue:
|
|
955
|
-
"onUpdate:modelValue":
|
|
955
|
+
n.transfers && n.provider.upload && c.value.length ? (l(), S("div", ll, [
|
|
956
|
+
v(e(rt), {
|
|
957
|
+
modelValue: A.value,
|
|
958
|
+
"onUpdate:modelValue": L[2] || (L[2] = (O) => A.value = O),
|
|
956
959
|
variant: "compact",
|
|
957
960
|
disabled: e(r),
|
|
958
961
|
"max-files": 1,
|
|
959
962
|
"max-size": 16 * 1024 ** 3,
|
|
960
963
|
title: i.value.upload,
|
|
961
|
-
onRejected:
|
|
964
|
+
onRejected: L[3] || (L[3] = (O) => y.value = { code: "upload_size_required" })
|
|
962
965
|
}, null, 8, ["modelValue", "disabled", "title"]),
|
|
963
|
-
v(e(
|
|
966
|
+
v(e(N), {
|
|
964
967
|
variant: "primary",
|
|
965
|
-
disabled: e(r) || !
|
|
968
|
+
disabled: e(r) || !A.value.length,
|
|
966
969
|
onClick: F
|
|
967
970
|
}, {
|
|
968
971
|
default: t(() => [
|
|
@@ -970,50 +973,50 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
970
973
|
]),
|
|
971
974
|
_: 1
|
|
972
975
|
}, 8, ["disabled"])
|
|
973
|
-
])) :
|
|
974
|
-
|
|
975
|
-
n.transfers && n.provider.download && k.value && !k.value.isDir && !e(
|
|
976
|
+
])) : m("", !0),
|
|
977
|
+
z.value ? (l(), S("p", nl, s(i.value.uploaded), 1)) : m("", !0),
|
|
978
|
+
n.transfers && n.provider.download && k.value && !k.value.isDir && !e(y) ? (l(), f(e(N), {
|
|
976
979
|
key: 2,
|
|
977
980
|
variant: "secondary",
|
|
978
981
|
disabled: e(r),
|
|
979
|
-
onClick:
|
|
982
|
+
onClick: V
|
|
980
983
|
}, {
|
|
981
984
|
default: t(() => [
|
|
982
985
|
b(s(i.value.download), 1)
|
|
983
986
|
]),
|
|
984
987
|
_: 1
|
|
985
|
-
}, 8, ["disabled"])) :
|
|
986
|
-
e(
|
|
988
|
+
}, 8, ["disabled"])) : m("", !0),
|
|
989
|
+
e(y) ? (l(), f(e(G), {
|
|
987
990
|
key: 3,
|
|
988
991
|
tone: "danger"
|
|
989
992
|
}, {
|
|
990
993
|
default: t(() => [
|
|
991
|
-
T("span",
|
|
994
|
+
T("span", ol, s(e(ha)(e(y), i.value, n.locale)), 1)
|
|
992
995
|
]),
|
|
993
996
|
_: 1
|
|
994
|
-
})) :
|
|
995
|
-
e(r) ? (l(),
|
|
996
|
-
T("div",
|
|
997
|
+
})) : m("", !0),
|
|
998
|
+
e(r) ? (l(), S("p", sl, s(i.value.loading), 1)) : m("", !0),
|
|
999
|
+
T("div", il, [
|
|
997
1000
|
T("aside", {
|
|
998
1001
|
class: "file-tree",
|
|
999
1002
|
"aria-label": i.value.roots
|
|
1000
1003
|
}, [
|
|
1001
|
-
d.value.length ? (l(), f(e(
|
|
1002
|
-
key:
|
|
1004
|
+
d.value.length ? (l(), f(e(dt), {
|
|
1005
|
+
key: E.value,
|
|
1003
1006
|
"selection-style": "background",
|
|
1004
|
-
modelValue:
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1007
|
+
modelValue: R.value,
|
|
1008
|
+
"onUpdate:modelValue": L[4] || (L[4] = (O) => R.value = O),
|
|
1006
1009
|
nodes: d.value,
|
|
1007
|
-
"onUpdate:nodes":
|
|
1008
|
-
expanded:
|
|
1009
|
-
"onUpdate:expanded":
|
|
1010
|
+
"onUpdate:nodes": L[5] || (L[5] = (O) => d.value = O),
|
|
1011
|
+
expanded: x.value,
|
|
1012
|
+
"onUpdate:expanded": L[6] || (L[6] = (O) => x.value = O),
|
|
1010
1013
|
"load-children": H,
|
|
1011
|
-
"expand-label": (O, W) => e(
|
|
1012
|
-
onSelect:
|
|
1013
|
-
}, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) :
|
|
1014
|
-
], 8,
|
|
1015
|
-
T("div",
|
|
1016
|
-
e(
|
|
1014
|
+
"expand-label": (O, W) => e(oa)(W ? i.value.collapse : i.value.expand, { name: O.label }),
|
|
1015
|
+
onSelect: L[7] || (L[7] = (O) => ee(pe(d.value, O.id) ?? [O.data]))
|
|
1016
|
+
}, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : m("", !0)
|
|
1017
|
+
], 8, ul),
|
|
1018
|
+
T("div", rl, [
|
|
1019
|
+
e(y) ? m("", !0) : (l(), f(e(ct), {
|
|
1017
1020
|
key: 0,
|
|
1018
1021
|
columns: J.value,
|
|
1019
1022
|
rows: _.value.map((O) => ({ ...O, kind: O.isDir ? i.value.directoryKind : i.value.fileKind })),
|
|
@@ -1024,24 +1027,24 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1024
1027
|
"local-pagination": !1,
|
|
1025
1028
|
loading: e(r),
|
|
1026
1029
|
"loading-text": i.value.loading,
|
|
1027
|
-
sort: { key:
|
|
1030
|
+
sort: { key: w.value.key === "size" ? "bytes" : w.value.key, direction: w.value.direction },
|
|
1028
1031
|
labels: { empty: i.value.emptyFolder },
|
|
1029
1032
|
"single-select": "",
|
|
1030
|
-
"selected-keys":
|
|
1031
|
-
"onUpdate:sort":
|
|
1032
|
-
"onUpdate:selectedKeys":
|
|
1033
|
-
e(r) ||
|
|
1033
|
+
"selected-keys": U.value ? [U.value] : [],
|
|
1034
|
+
"onUpdate:sort": ve,
|
|
1035
|
+
"onUpdate:selectedKeys": L[8] || (L[8] = (O) => {
|
|
1036
|
+
e(r) || M(ue(O[0]));
|
|
1034
1037
|
}),
|
|
1035
|
-
onRowActivate:
|
|
1036
|
-
e(r) ||
|
|
1038
|
+
onRowActivate: L[9] || (L[9] = (O) => {
|
|
1039
|
+
e(r) || Q(ue(O.path));
|
|
1037
1040
|
}),
|
|
1038
|
-
onRowDblclick:
|
|
1039
|
-
e(r) ||
|
|
1041
|
+
onRowDblclick: L[10] || (L[10] = (O) => {
|
|
1042
|
+
e(r) || Q(ue(O.path));
|
|
1040
1043
|
})
|
|
1041
1044
|
}, {
|
|
1042
1045
|
"cell-name": t(({ row: O }) => [
|
|
1043
|
-
T("span",
|
|
1044
|
-
v(e(
|
|
1046
|
+
T("span", dl, [
|
|
1047
|
+
v(e(la), {
|
|
1045
1048
|
kind: O.isDir ? "folder" : "file",
|
|
1046
1049
|
name: O.name
|
|
1047
1050
|
}, null, 8, ["kind", "name"]),
|
|
@@ -1049,8 +1052,8 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1049
1052
|
])
|
|
1050
1053
|
]),
|
|
1051
1054
|
empty: t(() => [
|
|
1052
|
-
T("div",
|
|
1053
|
-
v(e(
|
|
1055
|
+
T("div", cl, [
|
|
1056
|
+
v(e(la), {
|
|
1054
1057
|
kind: "folder",
|
|
1055
1058
|
size: [40, 40]
|
|
1056
1059
|
}),
|
|
@@ -1058,30 +1061,30 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1058
1061
|
])
|
|
1059
1062
|
]),
|
|
1060
1063
|
"cell-bytes": t(({ row: O }) => [
|
|
1061
|
-
T("span",
|
|
1064
|
+
T("span", vl, s(O.isDir || O.bytes === void 0 ? "—" : e(ia)(O.bytes, e(ka)(n.locale))), 1)
|
|
1062
1065
|
]),
|
|
1063
1066
|
_: 1
|
|
1064
1067
|
}, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels", "selected-keys"])),
|
|
1065
|
-
|
|
1068
|
+
g.value !== void 0 && !e(y) ? (l(), f(e(N), {
|
|
1066
1069
|
key: 1,
|
|
1067
1070
|
variant: "secondary",
|
|
1068
1071
|
disabled: e(r),
|
|
1069
|
-
onClick:
|
|
1072
|
+
onClick: L[11] || (L[11] = (O) => K(c.value, !0))
|
|
1070
1073
|
}, {
|
|
1071
1074
|
default: t(() => [
|
|
1072
1075
|
b(s(i.value.loadMore), 1)
|
|
1073
1076
|
]),
|
|
1074
1077
|
_: 1
|
|
1075
|
-
}, 8, ["disabled"])) :
|
|
1078
|
+
}, 8, ["disabled"])) : m("", !0)
|
|
1076
1079
|
])
|
|
1077
1080
|
]),
|
|
1078
|
-
k.value && !e(
|
|
1079
|
-
], 8,
|
|
1081
|
+
k.value && !e(y) ? (l(), S("p", fl, s(e(oa)(i.value.selected, { name: k.value.path })), 1)) : m("", !0)
|
|
1082
|
+
], 8, el));
|
|
1080
1083
|
}
|
|
1081
|
-
}),
|
|
1084
|
+
}), Ra = /* @__PURE__ */ ge(pl, [["__scopeId", "data-v-70c72250"]]), yl = {
|
|
1082
1085
|
key: 0,
|
|
1083
1086
|
class: "save-consent"
|
|
1084
|
-
},
|
|
1087
|
+
}, ml = ["aria-busy", "inert"], bl = /* @__PURE__ */ fe({
|
|
1085
1088
|
__name: "NasPicker",
|
|
1086
1089
|
props: {
|
|
1087
1090
|
open: { type: Boolean },
|
|
@@ -1095,62 +1098,62 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1095
1098
|
},
|
|
1096
1099
|
emits: ["update:open", "selected", "authorized", "refused"],
|
|
1097
1100
|
setup(n, { emit: h }) {
|
|
1098
|
-
const u = n, a = h, i = p(), o = C(() =>
|
|
1101
|
+
const u = n, a = h, i = p(), o = C(() => ze(u.locale)), r = C(() => Je(u.locale)), y = p(!1), _ = p();
|
|
1099
1102
|
let d = 0, c = !1;
|
|
1100
1103
|
Ye(() => u.open, () => {
|
|
1101
1104
|
d++, i.value = void 0, _.value = void 0;
|
|
1102
|
-
}),
|
|
1105
|
+
}), _e(() => {
|
|
1103
1106
|
c = !0, d++;
|
|
1104
1107
|
});
|
|
1105
1108
|
function k() {
|
|
1106
|
-
|
|
1109
|
+
y.value || (i.value = void 0, a("update:open", !1));
|
|
1107
1110
|
}
|
|
1108
|
-
async function
|
|
1109
|
-
const
|
|
1110
|
-
if (!(
|
|
1111
|
-
if (!
|
|
1112
|
-
a("selected",
|
|
1111
|
+
async function U() {
|
|
1112
|
+
const g = i.value, x = u.destination, R = d;
|
|
1113
|
+
if (!(!g || y.value || !u.open || c || x && u.mode !== "folder")) {
|
|
1114
|
+
if (!x) {
|
|
1115
|
+
a("selected", g), k();
|
|
1113
1116
|
return;
|
|
1114
1117
|
}
|
|
1115
|
-
|
|
1118
|
+
y.value = !0, _.value = void 0;
|
|
1116
1119
|
try {
|
|
1117
|
-
const
|
|
1118
|
-
if (c ||
|
|
1119
|
-
if (!
|
|
1120
|
-
a("authorized",
|
|
1121
|
-
} catch (
|
|
1122
|
-
if (c ||
|
|
1123
|
-
if (
|
|
1124
|
-
|
|
1120
|
+
const w = await x.selectDestination({ key: x.key, path: g });
|
|
1121
|
+
if (c || R !== d) return;
|
|
1122
|
+
if (!w || typeof w.id != "string" || !w.id || typeof w.username != "string" || !w.username || w.path !== g || w.key !== x.key || w.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
|
|
1123
|
+
a("authorized", w), y.value = !1, k();
|
|
1124
|
+
} catch (w) {
|
|
1125
|
+
if (c || R !== d) return;
|
|
1126
|
+
if (w?.code === "APP_DENIED") {
|
|
1127
|
+
y.value = !1, a("refused", w), k();
|
|
1125
1128
|
return;
|
|
1126
1129
|
}
|
|
1127
|
-
_.value =
|
|
1130
|
+
_.value = w;
|
|
1128
1131
|
} finally {
|
|
1129
|
-
c || (
|
|
1132
|
+
c || (y.value = !1);
|
|
1130
1133
|
}
|
|
1131
1134
|
}
|
|
1132
1135
|
}
|
|
1133
|
-
return (
|
|
1136
|
+
return (g, x) => (l(), f(e(Ze), {
|
|
1134
1137
|
open: n.open,
|
|
1135
1138
|
title: n.title ?? (n.mode === "folder" ? o.value.choose : o.value.chooseFile),
|
|
1136
1139
|
description: n.description ?? o.value.ownPermissions,
|
|
1137
1140
|
"close-label": o.value.close,
|
|
1138
|
-
"show-close": !
|
|
1141
|
+
"show-close": !y.value,
|
|
1139
1142
|
width: "800px",
|
|
1140
|
-
onEscapeKeyDown:
|
|
1141
|
-
|
|
1143
|
+
onEscapeKeyDown: x[1] || (x[1] = (R) => {
|
|
1144
|
+
y.value && R.preventDefault();
|
|
1142
1145
|
}),
|
|
1143
|
-
onInteractOutside:
|
|
1144
|
-
|
|
1146
|
+
onInteractOutside: x[2] || (x[2] = (R) => {
|
|
1147
|
+
y.value && R.preventDefault();
|
|
1145
1148
|
}),
|
|
1146
|
-
"onUpdate:open":
|
|
1147
|
-
|
|
1149
|
+
"onUpdate:open": x[3] || (x[3] = (R) => {
|
|
1150
|
+
R || k();
|
|
1148
1151
|
})
|
|
1149
1152
|
}, {
|
|
1150
1153
|
footer: t(() => [
|
|
1151
|
-
v(e(
|
|
1154
|
+
v(e(N), {
|
|
1152
1155
|
variant: "secondary",
|
|
1153
|
-
disabled:
|
|
1156
|
+
disabled: y.value,
|
|
1154
1157
|
onClick: k
|
|
1155
1158
|
}, {
|
|
1156
1159
|
default: t(() => [
|
|
@@ -1158,10 +1161,10 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1158
1161
|
]),
|
|
1159
1162
|
_: 1
|
|
1160
1163
|
}, 8, ["disabled"]),
|
|
1161
|
-
v(e(
|
|
1164
|
+
v(e(N), {
|
|
1162
1165
|
variant: "primary",
|
|
1163
|
-
disabled: !i.value ||
|
|
1164
|
-
onClick:
|
|
1166
|
+
disabled: !i.value || y.value || !!n.destination && n.mode !== "folder",
|
|
1167
|
+
onClick: U
|
|
1165
1168
|
}, {
|
|
1166
1169
|
default: t(() => [
|
|
1167
1170
|
b(s(o.value.confirm), 1)
|
|
@@ -1170,7 +1173,7 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1170
1173
|
}, 8, ["disabled"])
|
|
1171
1174
|
]),
|
|
1172
1175
|
default: t(() => [
|
|
1173
|
-
n.destination ? (l(),
|
|
1176
|
+
n.destination ? (l(), S("p", yl, s(r.value.selection), 1)) : m("", !0),
|
|
1174
1177
|
_.value ? (l(), f(e(G), {
|
|
1175
1178
|
key: 1,
|
|
1176
1179
|
tone: "danger",
|
|
@@ -1181,157 +1184,157 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1181
1184
|
b(s(n.errorText?.(_.value) ?? e(Fe)(_.value, r.value, "select", n.locale)), 1)
|
|
1182
1185
|
]),
|
|
1183
1186
|
_: 1
|
|
1184
|
-
})) :
|
|
1187
|
+
})) : m("", !0),
|
|
1185
1188
|
T("div", {
|
|
1186
1189
|
class: "nas-picker-content",
|
|
1187
|
-
"aria-busy":
|
|
1188
|
-
inert:
|
|
1190
|
+
"aria-busy": y.value,
|
|
1191
|
+
inert: y.value
|
|
1189
1192
|
}, [
|
|
1190
|
-
n.open ? (l(), f(
|
|
1193
|
+
n.open ? (l(), f(Ra, {
|
|
1191
1194
|
key: 0,
|
|
1192
1195
|
provider: n.provider,
|
|
1193
1196
|
locale: n.locale,
|
|
1194
1197
|
mode: n.mode,
|
|
1195
|
-
onSelected:
|
|
1196
|
-
}, null, 8, ["provider", "locale", "mode"])) :
|
|
1197
|
-
], 8,
|
|
1198
|
+
onSelected: x[0] || (x[0] = (R) => i.value = R)
|
|
1199
|
+
}, null, 8, ["provider", "locale", "mode"])) : m("", !0)
|
|
1200
|
+
], 8, ml)
|
|
1198
1201
|
]),
|
|
1199
1202
|
_: 1
|
|
1200
1203
|
}, 8, ["open", "title", "description", "close-label", "show-close"]));
|
|
1201
1204
|
}
|
|
1202
|
-
}),
|
|
1205
|
+
}), je = /* @__PURE__ */ ge(bl, [["__scopeId", "data-v-46817cb6"]]), gl = { role: "alert" }, kl = { class: "files-actions" }, hl = {
|
|
1203
1206
|
key: 0,
|
|
1204
1207
|
class: "files-path",
|
|
1205
1208
|
role: "status"
|
|
1206
|
-
},
|
|
1209
|
+
}, _l = /* @__PURE__ */ fe({
|
|
1207
1210
|
__name: "FilesPage",
|
|
1208
1211
|
props: {
|
|
1209
1212
|
ctx: {}
|
|
1210
1213
|
},
|
|
1211
1214
|
setup(n) {
|
|
1212
|
-
const h = n, u = p(), a = p(), i = p(!1), o = p("folder"), r = p(!1),
|
|
1215
|
+
const h = n, u = p(), a = p(), i = p(!1), o = p("folder"), r = p(!1), y = p(""), _ = p(0), d = _a(h.ctx);
|
|
1213
1216
|
let c = !1, k;
|
|
1214
|
-
async function
|
|
1217
|
+
async function U() {
|
|
1215
1218
|
if (!c) {
|
|
1216
|
-
u.value = void 0, i.value = !1,
|
|
1219
|
+
u.value = void 0, i.value = !1, y.value = "", r.value = !1, _.value++;
|
|
1217
1220
|
try {
|
|
1218
1221
|
await h.ctx.call("nas.session.status"), c || (a.value = void 0, i.value = !0);
|
|
1219
|
-
} catch (
|
|
1222
|
+
} catch (g) {
|
|
1220
1223
|
if (c) return;
|
|
1221
|
-
a.value = we(
|
|
1224
|
+
a.value = we(g), !a.value && g?.code !== "unknown_method" && (u.value = g);
|
|
1222
1225
|
}
|
|
1223
1226
|
}
|
|
1224
1227
|
}
|
|
1225
|
-
return
|
|
1228
|
+
return Ue(() => a.value, U), Ce(() => {
|
|
1226
1229
|
k = h.ctx.reopen(() => {
|
|
1227
|
-
|
|
1228
|
-
}),
|
|
1229
|
-
}),
|
|
1230
|
+
U();
|
|
1231
|
+
}), U();
|
|
1232
|
+
}), _e(() => {
|
|
1230
1233
|
c = !0, k?.(), d.dispose();
|
|
1231
|
-
}), (
|
|
1234
|
+
}), (g, x) => (l(), S(le, null, [
|
|
1232
1235
|
a.value ? (l(), f(e(G), {
|
|
1233
1236
|
key: 0,
|
|
1234
1237
|
tone: "info",
|
|
1235
1238
|
role: "status"
|
|
1236
1239
|
}, {
|
|
1237
1240
|
default: t(() => [
|
|
1238
|
-
b(s(e(
|
|
1241
|
+
b(s(e(Re)(a.value, n.ctx.locale)), 1)
|
|
1239
1242
|
]),
|
|
1240
1243
|
_: 1
|
|
1241
|
-
})) :
|
|
1244
|
+
})) : m("", !0),
|
|
1242
1245
|
u.value ? (l(), f(e(G), {
|
|
1243
1246
|
key: 1,
|
|
1244
1247
|
tone: "danger"
|
|
1245
1248
|
}, {
|
|
1246
1249
|
default: t(() => [
|
|
1247
|
-
T("span",
|
|
1248
|
-
v(e(
|
|
1250
|
+
T("span", gl, s(e(ha)(u.value, e(ze)(n.ctx.locale), n.ctx.locale)), 1),
|
|
1251
|
+
v(e(N), {
|
|
1249
1252
|
variant: "secondary",
|
|
1250
|
-
onClick:
|
|
1253
|
+
onClick: U
|
|
1251
1254
|
}, {
|
|
1252
1255
|
default: t(() => [
|
|
1253
|
-
b(s(e(
|
|
1256
|
+
b(s(e(ze)(n.ctx.locale).refresh), 1)
|
|
1254
1257
|
]),
|
|
1255
1258
|
_: 1
|
|
1256
1259
|
})
|
|
1257
1260
|
]),
|
|
1258
1261
|
_: 1
|
|
1259
|
-
})) :
|
|
1260
|
-
i.value ? (l(), f(e(
|
|
1262
|
+
})) : m("", !0),
|
|
1263
|
+
i.value ? (l(), f(e(he), {
|
|
1261
1264
|
key: 2,
|
|
1262
|
-
title: e(
|
|
1263
|
-
description: e(
|
|
1265
|
+
title: e(ze)(n.ctx.locale).title,
|
|
1266
|
+
description: e(ze)(n.ctx.locale).ownPermissions,
|
|
1264
1267
|
collapsible: !1
|
|
1265
1268
|
}, {
|
|
1266
1269
|
default: t(() => [
|
|
1267
|
-
T("div",
|
|
1268
|
-
v(e(
|
|
1270
|
+
T("div", kl, [
|
|
1271
|
+
v(e(N), {
|
|
1269
1272
|
variant: "secondary",
|
|
1270
|
-
onClick:
|
|
1273
|
+
onClick: x[0] || (x[0] = (R) => {
|
|
1271
1274
|
o.value = "folder", r.value = !0;
|
|
1272
1275
|
})
|
|
1273
1276
|
}, {
|
|
1274
1277
|
default: t(() => [
|
|
1275
|
-
b(s(e(
|
|
1278
|
+
b(s(e(ze)(n.ctx.locale).choose), 1)
|
|
1276
1279
|
]),
|
|
1277
1280
|
_: 1
|
|
1278
1281
|
}),
|
|
1279
|
-
v(e(
|
|
1282
|
+
v(e(N), {
|
|
1280
1283
|
variant: "secondary",
|
|
1281
|
-
onClick:
|
|
1284
|
+
onClick: x[1] || (x[1] = (R) => {
|
|
1282
1285
|
o.value = "file", r.value = !0;
|
|
1283
1286
|
})
|
|
1284
1287
|
}, {
|
|
1285
1288
|
default: t(() => [
|
|
1286
|
-
b(s(e(
|
|
1289
|
+
b(s(e(ze)(n.ctx.locale).chooseFile), 1)
|
|
1287
1290
|
]),
|
|
1288
1291
|
_: 1
|
|
1289
1292
|
})
|
|
1290
1293
|
]),
|
|
1291
|
-
|
|
1292
|
-
v(e(
|
|
1293
|
-
])) :
|
|
1294
|
-
(l(), f(
|
|
1294
|
+
y.value ? (l(), S("p", hl, [
|
|
1295
|
+
v(e(Ee), { path: y.value }, null, 8, ["path"])
|
|
1296
|
+
])) : m("", !0),
|
|
1297
|
+
(l(), f(Ra, {
|
|
1295
1298
|
key: _.value,
|
|
1296
1299
|
provider: e(d),
|
|
1297
1300
|
locale: n.ctx.locale,
|
|
1298
1301
|
transfers: ""
|
|
1299
1302
|
}, null, 8, ["provider", "locale"])),
|
|
1300
|
-
v(
|
|
1303
|
+
v(je, {
|
|
1301
1304
|
provider: e(d),
|
|
1302
1305
|
locale: n.ctx.locale,
|
|
1303
1306
|
mode: o.value,
|
|
1304
1307
|
open: r.value,
|
|
1305
|
-
"onUpdate:open":
|
|
1306
|
-
onSelected:
|
|
1308
|
+
"onUpdate:open": x[2] || (x[2] = (R) => r.value = R),
|
|
1309
|
+
onSelected: x[3] || (x[3] = (R) => y.value = R)
|
|
1307
1310
|
}, null, 8, ["provider", "locale", "mode", "open"])
|
|
1308
1311
|
]),
|
|
1309
1312
|
_: 1
|
|
1310
|
-
}, 8, ["title", "description"])) :
|
|
1313
|
+
}, 8, ["title", "description"])) : m("", !0)
|
|
1311
1314
|
], 64));
|
|
1312
1315
|
}
|
|
1313
|
-
}),
|
|
1316
|
+
}), bo = /* @__PURE__ */ ge(_l, [["__scopeId", "data-v-96eb4bab"]]), wl = { role: "alert" }, xl = 5e3, go = /* @__PURE__ */ fe({
|
|
1314
1317
|
__name: "PortalSettings",
|
|
1315
1318
|
props: {
|
|
1316
1319
|
portal: {}
|
|
1317
1320
|
},
|
|
1318
1321
|
setup(n) {
|
|
1319
|
-
const h = n, u =
|
|
1322
|
+
const h = n, u = Ea(), a = h.portal.messages, i = p(), o = p(""), r = p(!1), y = p(""), _ = p(!0);
|
|
1320
1323
|
let d = !1;
|
|
1321
|
-
function c(
|
|
1322
|
-
d || (i.value =
|
|
1324
|
+
function c(z) {
|
|
1325
|
+
d || (i.value = z, o.value = z.alias || z.defaultAlias);
|
|
1323
1326
|
}
|
|
1324
1327
|
const k = h.portal.lastStatus?.();
|
|
1325
1328
|
k && c(k);
|
|
1326
|
-
const
|
|
1327
|
-
async function
|
|
1329
|
+
const U = /* @__PURE__ */ Symbol("late");
|
|
1330
|
+
async function g(z) {
|
|
1328
1331
|
if (r.value) return;
|
|
1329
|
-
r.value = !0,
|
|
1330
|
-
const I =
|
|
1332
|
+
r.value = !0, y.value = "";
|
|
1333
|
+
const I = z();
|
|
1331
1334
|
try {
|
|
1332
|
-
const
|
|
1333
|
-
if (
|
|
1334
|
-
c(
|
|
1335
|
+
const V = await Promise.race([I, new Promise((F) => setTimeout(() => F(U), xl))]);
|
|
1336
|
+
if (V !== U) {
|
|
1337
|
+
c(V);
|
|
1335
1338
|
return;
|
|
1336
1339
|
}
|
|
1337
1340
|
c(await h.portal.status());
|
|
@@ -1340,46 +1343,46 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1340
1343
|
} finally {
|
|
1341
1344
|
c(await h.portal.status());
|
|
1342
1345
|
}
|
|
1343
|
-
} catch (
|
|
1344
|
-
d || (
|
|
1346
|
+
} catch (V) {
|
|
1347
|
+
d || (y.value = a[V?.code || ""] || a.portal_unavailable);
|
|
1345
1348
|
} finally {
|
|
1346
1349
|
d || (r.value = !1);
|
|
1347
1350
|
}
|
|
1348
1351
|
}
|
|
1349
|
-
const
|
|
1350
|
-
const
|
|
1351
|
-
if (
|
|
1352
|
-
if (
|
|
1353
|
-
if (
|
|
1354
|
-
return
|
|
1352
|
+
const x = C(() => !!i.value?.canManage && !!i.value.entry && i.value.entry !== "registered"), R = C(() => {
|
|
1353
|
+
const z = i.value;
|
|
1354
|
+
if (z) {
|
|
1355
|
+
if (x.value) return z.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
|
|
1356
|
+
if (z.state !== "active")
|
|
1357
|
+
return z.canManage ? a.inactive : z.controlPanel ? void 0 : a.askAdmin;
|
|
1355
1358
|
}
|
|
1356
|
-
}),
|
|
1357
|
-
async function
|
|
1358
|
-
const
|
|
1359
|
-
return
|
|
1359
|
+
}), w = a.link?.replace(/\s*[::]\s*$/, "");
|
|
1360
|
+
async function E() {
|
|
1361
|
+
const z = await h.portal.register();
|
|
1362
|
+
return z.canManage && z.entry === "registered" && z.state === "inactive" ? (c(z), h.portal.apply(z.alias || z.defaultAlias)) : z;
|
|
1360
1363
|
}
|
|
1361
|
-
function
|
|
1364
|
+
function A() {
|
|
1362
1365
|
r.value || h.portal.status().then(c, () => {
|
|
1363
1366
|
}).finally(() => {
|
|
1364
1367
|
d || (_.value = !1);
|
|
1365
1368
|
});
|
|
1366
1369
|
}
|
|
1367
|
-
return
|
|
1368
|
-
u.subscribe?.(
|
|
1369
|
-
}),
|
|
1370
|
+
return Ce(() => {
|
|
1371
|
+
u.subscribe?.(A), A();
|
|
1372
|
+
}), _e(() => {
|
|
1370
1373
|
d = !0;
|
|
1371
|
-
}), (
|
|
1374
|
+
}), (z, I) => i.value || _.value ? (l(), f(e(he), {
|
|
1372
1375
|
key: 0,
|
|
1373
1376
|
title: e(a).title,
|
|
1374
|
-
description:
|
|
1377
|
+
description: R.value,
|
|
1375
1378
|
collapsible: !1,
|
|
1376
1379
|
"aria-busy": r.value || !i.value
|
|
1377
1380
|
}, Xe({
|
|
1378
1381
|
default: t(() => [
|
|
1379
|
-
i.value ? (l(),
|
|
1382
|
+
i.value ? (l(), S(le, { key: 1 }, [
|
|
1380
1383
|
i.value.state === "active" ? (l(), f(e(be), {
|
|
1381
1384
|
key: 0,
|
|
1382
|
-
label: e(
|
|
1385
|
+
label: e(w)
|
|
1383
1386
|
}, {
|
|
1384
1387
|
default: t(() => [
|
|
1385
1388
|
v(e($a), {
|
|
@@ -1393,20 +1396,20 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1393
1396
|
}, 8, ["href"])
|
|
1394
1397
|
]),
|
|
1395
1398
|
_: 1
|
|
1396
|
-
}, 8, ["label"])) :
|
|
1397
|
-
i.value.canManage && !
|
|
1399
|
+
}, 8, ["label"])) : m("", !0),
|
|
1400
|
+
i.value.canManage && !x.value ? (l(), f(e(Oe), {
|
|
1398
1401
|
key: 1,
|
|
1399
|
-
onSubmit: I[4] || (I[4] = Ne((
|
|
1402
|
+
onSubmit: I[4] || (I[4] = Ne((V) => g(() => n.portal.apply(o.value)), ["prevent"]))
|
|
1400
1403
|
}, {
|
|
1401
1404
|
default: t(() => [
|
|
1402
1405
|
v(e(be), {
|
|
1403
1406
|
label: e(a).alias
|
|
1404
1407
|
}, {
|
|
1405
1408
|
default: t(() => [
|
|
1406
|
-
v(e(
|
|
1409
|
+
v(e(Ae), {
|
|
1407
1410
|
id: "portal-alias",
|
|
1408
1411
|
modelValue: o.value,
|
|
1409
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
1412
|
+
"onUpdate:modelValue": I[0] || (I[0] = (V) => o.value = V),
|
|
1410
1413
|
"aria-label": e(a).alias,
|
|
1411
1414
|
maxlength: "64",
|
|
1412
1415
|
autocomplete: "off",
|
|
@@ -1422,7 +1425,7 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1422
1425
|
default: t(() => [
|
|
1423
1426
|
v(e(He), null, {
|
|
1424
1427
|
default: t(() => [
|
|
1425
|
-
v(e(
|
|
1428
|
+
v(e(N), {
|
|
1426
1429
|
type: "submit",
|
|
1427
1430
|
variant: "primary",
|
|
1428
1431
|
disabled: r.value
|
|
@@ -1432,37 +1435,37 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1432
1435
|
]),
|
|
1433
1436
|
_: 1
|
|
1434
1437
|
}, 8, ["disabled"]),
|
|
1435
|
-
i.value.state === "active" ? (l(), f(e(
|
|
1438
|
+
i.value.state === "active" ? (l(), f(e(N), {
|
|
1436
1439
|
key: 0,
|
|
1437
1440
|
variant: "secondary",
|
|
1438
1441
|
disabled: r.value,
|
|
1439
|
-
onClick: I[1] || (I[1] = (
|
|
1442
|
+
onClick: I[1] || (I[1] = (V) => g(() => n.portal.disable()))
|
|
1440
1443
|
}, {
|
|
1441
1444
|
default: t(() => [
|
|
1442
1445
|
b(s(e(a).disable), 1)
|
|
1443
1446
|
]),
|
|
1444
1447
|
_: 1
|
|
1445
|
-
}, 8, ["disabled"])) :
|
|
1446
|
-
v(e(
|
|
1448
|
+
}, 8, ["disabled"])) : m("", !0),
|
|
1449
|
+
v(e(N), {
|
|
1447
1450
|
variant: "secondary",
|
|
1448
|
-
onClick: I[2] || (I[2] = (
|
|
1451
|
+
onClick: I[2] || (I[2] = (V) => n.portal.openControlPanel())
|
|
1449
1452
|
}, {
|
|
1450
1453
|
default: t(() => [
|
|
1451
1454
|
b(s(e(a).advanced), 1)
|
|
1452
1455
|
]),
|
|
1453
1456
|
_: 1
|
|
1454
1457
|
}),
|
|
1455
|
-
i.value.entry ? (l(), f(e(
|
|
1458
|
+
i.value.entry ? (l(), f(e(N), {
|
|
1456
1459
|
key: 1,
|
|
1457
1460
|
variant: "secondary",
|
|
1458
1461
|
disabled: r.value,
|
|
1459
|
-
onClick: I[3] || (I[3] = (
|
|
1462
|
+
onClick: I[3] || (I[3] = (V) => g(() => n.portal.unregister()))
|
|
1460
1463
|
}, {
|
|
1461
1464
|
default: t(() => [
|
|
1462
1465
|
b(s(e(a).unregister), 1)
|
|
1463
1466
|
]),
|
|
1464
1467
|
_: 1
|
|
1465
|
-
}, 8, ["disabled"])) :
|
|
1468
|
+
}, 8, ["disabled"])) : m("", !0)
|
|
1466
1469
|
]),
|
|
1467
1470
|
_: 1
|
|
1468
1471
|
})
|
|
@@ -1471,23 +1474,23 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1471
1474
|
})
|
|
1472
1475
|
]),
|
|
1473
1476
|
_: 1
|
|
1474
|
-
})) :
|
|
1475
|
-
|
|
1477
|
+
})) : m("", !0),
|
|
1478
|
+
y.value ? (l(), f(e(G), {
|
|
1476
1479
|
key: 2,
|
|
1477
1480
|
tone: "danger"
|
|
1478
1481
|
}, {
|
|
1479
1482
|
default: t(() => [
|
|
1480
|
-
T("span",
|
|
1483
|
+
T("span", wl, s(y.value), 1)
|
|
1481
1484
|
]),
|
|
1482
1485
|
_: 1
|
|
1483
|
-
})) :
|
|
1484
|
-
], 64)) : (l(!0),
|
|
1486
|
+
})) : m("", !0)
|
|
1487
|
+
], 64)) : (l(!0), S(le, { key: 0 }, Se([[e(w), "20px"], [e(a).alias, "32px"], ["", "32px"]], ([V, F], J) => (l(), f(e(be), {
|
|
1485
1488
|
key: J,
|
|
1486
|
-
label:
|
|
1489
|
+
label: V,
|
|
1487
1490
|
"data-placeholder-row": ""
|
|
1488
1491
|
}, {
|
|
1489
1492
|
default: t(() => [
|
|
1490
|
-
v(e(
|
|
1493
|
+
v(e(Pe), {
|
|
1491
1494
|
width: "16rem",
|
|
1492
1495
|
height: F
|
|
1493
1496
|
}, null, 8, ["height"])
|
|
@@ -1497,24 +1500,24 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1497
1500
|
]),
|
|
1498
1501
|
_: 2
|
|
1499
1502
|
}, [
|
|
1500
|
-
i.value &&
|
|
1503
|
+
i.value && x.value ? {
|
|
1501
1504
|
name: "footer",
|
|
1502
1505
|
fn: t(() => [
|
|
1503
|
-
i.value.entry === "unregistered" ? (l(), f(e(
|
|
1506
|
+
i.value.entry === "unregistered" ? (l(), f(e(N), {
|
|
1504
1507
|
key: 0,
|
|
1505
1508
|
variant: "primary",
|
|
1506
1509
|
disabled: r.value,
|
|
1507
|
-
onClick: I[5] || (I[5] = (
|
|
1510
|
+
onClick: I[5] || (I[5] = (V) => g(E))
|
|
1508
1511
|
}, {
|
|
1509
1512
|
default: t(() => [
|
|
1510
1513
|
b(s(e(a).register), 1)
|
|
1511
1514
|
]),
|
|
1512
1515
|
_: 1
|
|
1513
|
-
}, 8, ["disabled"])) : (l(), f(e(
|
|
1516
|
+
}, 8, ["disabled"])) : (l(), f(e(N), {
|
|
1514
1517
|
key: 1,
|
|
1515
1518
|
variant: "primary",
|
|
1516
1519
|
disabled: r.value,
|
|
1517
|
-
onClick: I[6] || (I[6] = (
|
|
1520
|
+
onClick: I[6] || (I[6] = (V) => g(() => n.portal.unregister()))
|
|
1518
1521
|
}, {
|
|
1519
1522
|
default: t(() => [
|
|
1520
1523
|
b(s(e(a).unregister), 1)
|
|
@@ -1526,9 +1529,9 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1526
1529
|
} : i.value && !i.value.canManage && i.value.controlPanel ? {
|
|
1527
1530
|
name: "footer",
|
|
1528
1531
|
fn: t(() => [
|
|
1529
|
-
v(e(
|
|
1532
|
+
v(e(N), {
|
|
1530
1533
|
variant: "secondary",
|
|
1531
|
-
onClick: I[7] || (I[7] = (
|
|
1534
|
+
onClick: I[7] || (I[7] = (V) => n.portal.openControlPanel())
|
|
1532
1535
|
}, {
|
|
1533
1536
|
default: t(() => [
|
|
1534
1537
|
b(s(e(a).controlPanel), 1)
|
|
@@ -1538,65 +1541,65 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1538
1541
|
]),
|
|
1539
1542
|
key: "1"
|
|
1540
1543
|
} : void 0
|
|
1541
|
-
]), 1032, ["title", "description", "aria-busy"])) :
|
|
1544
|
+
]), 1032, ["title", "description", "aria-busy"])) : m("", !0);
|
|
1542
1545
|
}
|
|
1543
|
-
}),
|
|
1546
|
+
}), Cl = ["aria-busy"], $l = {
|
|
1544
1547
|
key: 1,
|
|
1545
1548
|
role: "status"
|
|
1546
|
-
},
|
|
1549
|
+
}, Sl = { role: "alert" }, El = { role: "status" }, zl = /* @__PURE__ */ fe({
|
|
1547
1550
|
__name: "LoginPage",
|
|
1548
1551
|
props: {
|
|
1549
1552
|
session: {},
|
|
1550
1553
|
locale: {}
|
|
1551
1554
|
},
|
|
1552
1555
|
setup(n) {
|
|
1553
|
-
const h = n, u = C(() =>
|
|
1556
|
+
const h = n, u = C(() => Oa(h.locale)), a = p(""), i = p(""), o = p(""), r = p(!1), y = p(!1), _ = p(""), d = p(), c = C(() => window.location.protocol === "https:");
|
|
1554
1557
|
let k = !1;
|
|
1555
|
-
function
|
|
1556
|
-
const
|
|
1557
|
-
return u.value.errors[
|
|
1558
|
+
function U(w) {
|
|
1559
|
+
const E = w?.code;
|
|
1560
|
+
return u.value.errors[E || ""] || u.value.errors.failed;
|
|
1558
1561
|
}
|
|
1559
|
-
async function
|
|
1560
|
-
if (!(
|
|
1561
|
-
|
|
1562
|
+
async function g() {
|
|
1563
|
+
if (!(y.value || !c.value || !a.value || !i.value || r.value && !o.value)) {
|
|
1564
|
+
y.value = !0, _.value = "";
|
|
1562
1565
|
try {
|
|
1563
1566
|
await h.session.login(a.value, i.value, o.value), i.value = "", o.value = "";
|
|
1564
|
-
} catch (
|
|
1567
|
+
} catch (w) {
|
|
1565
1568
|
if (k) return;
|
|
1566
|
-
o.value = "",
|
|
1569
|
+
o.value = "", w?.code === "otp_required" ? r.value = !0 : (_.value = U(w), i.value = "", r.value = !1);
|
|
1567
1570
|
} finally {
|
|
1568
|
-
k || (
|
|
1571
|
+
k || (y.value = !1, r.value && (await at(), k || d.value?.querySelector("input")?.focus()));
|
|
1569
1572
|
}
|
|
1570
1573
|
}
|
|
1571
1574
|
}
|
|
1572
|
-
async function
|
|
1573
|
-
if (!
|
|
1574
|
-
|
|
1575
|
+
async function x() {
|
|
1576
|
+
if (!y.value) {
|
|
1577
|
+
y.value = !0, _.value = "";
|
|
1575
1578
|
try {
|
|
1576
1579
|
await h.session.bootstrap();
|
|
1577
|
-
} catch (
|
|
1578
|
-
k || (_.value =
|
|
1580
|
+
} catch (w) {
|
|
1581
|
+
k || (_.value = U(w));
|
|
1579
1582
|
} finally {
|
|
1580
|
-
k || (
|
|
1583
|
+
k || (y.value = !1);
|
|
1581
1584
|
}
|
|
1582
1585
|
}
|
|
1583
1586
|
}
|
|
1584
|
-
function
|
|
1587
|
+
function R() {
|
|
1585
1588
|
i.value = "", o.value = "", r.value = !1, _.value = "";
|
|
1586
1589
|
}
|
|
1587
1590
|
return xa(() => {
|
|
1588
1591
|
k = !0, i.value = "", o.value = "";
|
|
1589
|
-
}), (
|
|
1592
|
+
}), (w, E) => (l(), S("main", {
|
|
1590
1593
|
class: "identity-login",
|
|
1591
|
-
"aria-busy":
|
|
1594
|
+
"aria-busy": y.value
|
|
1592
1595
|
}, [
|
|
1593
|
-
v(e(
|
|
1596
|
+
v(e(he), {
|
|
1594
1597
|
title: u.value.title,
|
|
1595
1598
|
description: u.value.intro,
|
|
1596
1599
|
collapsible: !1
|
|
1597
1600
|
}, {
|
|
1598
1601
|
default: t(() => [
|
|
1599
|
-
c.value ?
|
|
1602
|
+
c.value ? m("", !0) : (l(), f(e(G), {
|
|
1600
1603
|
key: 0,
|
|
1601
1604
|
tone: "warning",
|
|
1602
1605
|
title: u.value.httpsTitle
|
|
@@ -1606,97 +1609,97 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1606
1609
|
]),
|
|
1607
1610
|
_: 1
|
|
1608
1611
|
}, 8, ["title"])),
|
|
1609
|
-
n.session.notice.value ? (l(),
|
|
1612
|
+
n.session.notice.value ? (l(), S("p", $l, s(u.value.notices[n.session.notice.value]), 1)) : m("", !0),
|
|
1610
1613
|
_.value ? (l(), f(e(G), {
|
|
1611
1614
|
key: 2,
|
|
1612
1615
|
tone: "danger",
|
|
1613
1616
|
title: u.value.failedTitle
|
|
1614
1617
|
}, {
|
|
1615
1618
|
default: t(() => [
|
|
1616
|
-
T("span",
|
|
1619
|
+
T("span", Sl, s(_.value), 1)
|
|
1617
1620
|
]),
|
|
1618
1621
|
_: 1
|
|
1619
|
-
}, 8, ["title"])) :
|
|
1622
|
+
}, 8, ["title"])) : m("", !0),
|
|
1620
1623
|
v(e(Oe), {
|
|
1621
|
-
onSubmit: Ne(
|
|
1624
|
+
onSubmit: Ne(g, ["prevent"])
|
|
1622
1625
|
}, {
|
|
1623
1626
|
default: t(() => [
|
|
1624
|
-
v(e(
|
|
1627
|
+
v(e(Te), {
|
|
1625
1628
|
label: u.value.account
|
|
1626
1629
|
}, {
|
|
1627
1630
|
default: t(() => [
|
|
1628
|
-
v(e(
|
|
1631
|
+
v(e(Ae), {
|
|
1629
1632
|
modelValue: a.value,
|
|
1630
|
-
"onUpdate:modelValue":
|
|
1633
|
+
"onUpdate:modelValue": E[0] || (E[0] = (A) => a.value = A),
|
|
1631
1634
|
autocomplete: "username",
|
|
1632
|
-
disabled:
|
|
1635
|
+
disabled: y.value || r.value || !c.value
|
|
1633
1636
|
}, null, 8, ["modelValue", "disabled"])
|
|
1634
1637
|
]),
|
|
1635
1638
|
_: 1
|
|
1636
1639
|
}, 8, ["label"]),
|
|
1637
|
-
r.value ? (l(),
|
|
1638
|
-
T("p",
|
|
1640
|
+
r.value ? (l(), S(le, { key: 1 }, [
|
|
1641
|
+
T("p", El, s(u.value.otpPrompt), 1),
|
|
1639
1642
|
T("div", {
|
|
1640
1643
|
ref_key: "otpField",
|
|
1641
1644
|
ref: d
|
|
1642
1645
|
}, [
|
|
1643
|
-
v(e(
|
|
1646
|
+
v(e(Te), {
|
|
1644
1647
|
label: u.value.otp
|
|
1645
1648
|
}, {
|
|
1646
1649
|
default: t(() => [
|
|
1647
|
-
v(e(
|
|
1650
|
+
v(e(Ae), {
|
|
1648
1651
|
modelValue: o.value,
|
|
1649
|
-
"onUpdate:modelValue":
|
|
1652
|
+
"onUpdate:modelValue": E[2] || (E[2] = (A) => o.value = A),
|
|
1650
1653
|
inputmode: "numeric",
|
|
1651
1654
|
autocomplete: "one-time-code",
|
|
1652
|
-
disabled:
|
|
1655
|
+
disabled: y.value
|
|
1653
1656
|
}, null, 8, ["modelValue", "disabled"])
|
|
1654
1657
|
]),
|
|
1655
1658
|
_: 1
|
|
1656
1659
|
}, 8, ["label"])
|
|
1657
1660
|
], 512)
|
|
1658
|
-
], 64)) : (l(), f(e(
|
|
1661
|
+
], 64)) : (l(), f(e(Te), {
|
|
1659
1662
|
key: 0,
|
|
1660
1663
|
label: u.value.password
|
|
1661
1664
|
}, {
|
|
1662
1665
|
default: t(() => [
|
|
1663
|
-
v(e(
|
|
1666
|
+
v(e(Ae), {
|
|
1664
1667
|
modelValue: i.value,
|
|
1665
|
-
"onUpdate:modelValue":
|
|
1668
|
+
"onUpdate:modelValue": E[1] || (E[1] = (A) => i.value = A),
|
|
1666
1669
|
type: "password",
|
|
1667
1670
|
autocomplete: "current-password",
|
|
1668
|
-
disabled:
|
|
1671
|
+
disabled: y.value || !c.value
|
|
1669
1672
|
}, null, 8, ["modelValue", "disabled"])
|
|
1670
1673
|
]),
|
|
1671
1674
|
_: 1
|
|
1672
1675
|
}, 8, ["label"])),
|
|
1673
1676
|
v(e(He), null, {
|
|
1674
1677
|
default: t(() => [
|
|
1675
|
-
v(e(
|
|
1678
|
+
v(e(N), {
|
|
1676
1679
|
type: "submit",
|
|
1677
1680
|
variant: "primary",
|
|
1678
|
-
disabled:
|
|
1681
|
+
disabled: y.value || !c.value || !a.value || !i.value || r.value && !o.value
|
|
1679
1682
|
}, {
|
|
1680
1683
|
default: t(() => [
|
|
1681
|
-
b(s(
|
|
1684
|
+
b(s(y.value ? u.value.signingIn : r.value ? u.value.verify : u.value.signIn), 1)
|
|
1682
1685
|
]),
|
|
1683
1686
|
_: 1
|
|
1684
1687
|
}, 8, ["disabled"]),
|
|
1685
|
-
r.value ? (l(), f(e(
|
|
1688
|
+
r.value ? (l(), f(e(N), {
|
|
1686
1689
|
key: 0,
|
|
1687
1690
|
variant: "secondary",
|
|
1688
|
-
disabled:
|
|
1689
|
-
onClick:
|
|
1691
|
+
disabled: y.value,
|
|
1692
|
+
onClick: R
|
|
1690
1693
|
}, {
|
|
1691
1694
|
default: t(() => [
|
|
1692
1695
|
b(s(u.value.otherAccount), 1)
|
|
1693
1696
|
]),
|
|
1694
1697
|
_: 1
|
|
1695
|
-
}, 8, ["disabled"])) : (l(), f(e(
|
|
1698
|
+
}, 8, ["disabled"])) : (l(), f(e(N), {
|
|
1696
1699
|
key: 1,
|
|
1697
1700
|
variant: "secondary",
|
|
1698
|
-
disabled:
|
|
1699
|
-
onClick:
|
|
1701
|
+
disabled: y.value || !c.value,
|
|
1702
|
+
onClick: x
|
|
1700
1703
|
}, {
|
|
1701
1704
|
default: t(() => [
|
|
1702
1705
|
b(s(u.value.continueDSM), 1)
|
|
@@ -1712,129 +1715,129 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1712
1715
|
]),
|
|
1713
1716
|
_: 1
|
|
1714
1717
|
}, 8, ["title", "description"])
|
|
1715
|
-
], 8,
|
|
1718
|
+
], 8, Cl));
|
|
1716
1719
|
}
|
|
1717
|
-
}),
|
|
1720
|
+
}), ko = /* @__PURE__ */ ge(zl, [["__scopeId", "data-v-1c0358cd"]]), Pl = { class: "integration-actions" }, Tl = { role: "status" }, Al = { class: "integration-help" }, Rl = { class: "integration-help" }, Il = { class: "integration-help" }, Vl = { class: "integration-actions" }, Ul = {
|
|
1718
1721
|
key: 0,
|
|
1719
1722
|
role: "status",
|
|
1720
1723
|
"data-bg-picked": "",
|
|
1721
1724
|
class: "bg-path"
|
|
1722
|
-
},
|
|
1725
|
+
}, Dl = { class: "integration-actions" }, Bl = { key: 2 }, Ll = {
|
|
1723
1726
|
key: 3,
|
|
1724
1727
|
class: "bg-cards"
|
|
1725
|
-
},
|
|
1728
|
+
}, Nl = { class: "bg-card-body" }, Ol = {
|
|
1726
1729
|
key: 0,
|
|
1727
1730
|
class: "integration-help"
|
|
1728
|
-
},
|
|
1731
|
+
}, ql = {
|
|
1729
1732
|
key: 1,
|
|
1730
1733
|
class: "integration-help"
|
|
1731
|
-
},
|
|
1734
|
+
}, Fl = {
|
|
1732
1735
|
key: 2,
|
|
1733
1736
|
class: "integration-help bg-path"
|
|
1734
|
-
},
|
|
1737
|
+
}, Ml = {
|
|
1735
1738
|
key: 3,
|
|
1736
1739
|
class: "integration-help"
|
|
1737
|
-
},
|
|
1740
|
+
}, Hl = {
|
|
1738
1741
|
key: 4,
|
|
1739
1742
|
class: "integration-help"
|
|
1740
|
-
},
|
|
1743
|
+
}, Kl = { class: "integration-actions" }, Xl = { key: 1 }, Gl = {
|
|
1741
1744
|
key: 2,
|
|
1742
1745
|
class: "bg-cards"
|
|
1743
|
-
},
|
|
1746
|
+
}, Wl = { class: "bg-card-body" }, Jl = {
|
|
1744
1747
|
key: 0,
|
|
1745
1748
|
class: "integration-help"
|
|
1746
|
-
},
|
|
1749
|
+
}, Yl = {
|
|
1747
1750
|
key: 1,
|
|
1748
1751
|
class: "integration-help"
|
|
1749
|
-
},
|
|
1752
|
+
}, Ql = { class: "integration-help" }, Zl = { class: "integration-actions" }, jl = { class: "integration-actions" }, en = { class: "integration-actions" }, an = /* @__PURE__ */ fe({
|
|
1750
1753
|
__name: "BackgroundPanel",
|
|
1751
1754
|
props: {
|
|
1752
1755
|
ctx: {}
|
|
1753
1756
|
},
|
|
1754
1757
|
setup(n, { expose: h }) {
|
|
1755
|
-
const u = n, a = C(() =>
|
|
1756
|
-
let
|
|
1757
|
-
const
|
|
1758
|
-
async function j(P, X,
|
|
1758
|
+
const u = n, a = C(() => qa(u.ctx.locale)), i = (P, X) => oa(P, X, u.ctx.locale), o = p(), r = p([]), y = p(), _ = p(!1), d = p(!1), c = p([]), k = p(), U = p(!1), g = p("3600"), x = p(), R = p(), w = p(), E = p(!1), A = p(), z = C(() => !o.value && !y.value && !_.value && !A.value), I = p(!1), V = p(), F = p(""), J = p(""), q = Fa(u.ctx);
|
|
1759
|
+
let Z, $ = !1;
|
|
1760
|
+
const M = (P) => !["queued", "running"].includes(P.state), Q = (P) => M(P) && P.state !== "paused", ue = (P) => P.state === "running" && P.pauseRequested, pe = (P) => ue(P) ? a.value.pausing : a.value[`state_${P.state}`], ye = (P) => ue(P) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[P.state];
|
|
1761
|
+
async function j(P, X, D = !1) {
|
|
1759
1762
|
try {
|
|
1760
1763
|
return await u.ctx.call(P, X);
|
|
1761
|
-
} catch (
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1764
|
+
} catch (ce) {
|
|
1765
|
+
if ($ || D && (A.value = we(ce))) return;
|
|
1766
|
+
ce?.code === "unsupported" ? (_.value = !0, r.value = [], c.value = [], k.value = void 0, x.value = void 0, R.value = void 0, o.value = void 0, w.value = void 0, V.value = void 0, F.value && URL.revokeObjectURL(F.value), F.value = "") : $ || (y.value = ce);
|
|
1764
1767
|
return;
|
|
1765
1768
|
}
|
|
1766
1769
|
}
|
|
1767
1770
|
async function oe() {
|
|
1768
|
-
if (!(
|
|
1769
|
-
|
|
1771
|
+
if (!($ || E.value)) {
|
|
1772
|
+
E.value = !0;
|
|
1770
1773
|
try {
|
|
1771
1774
|
const P = await j("bg.status", void 0, !0);
|
|
1772
|
-
if (!P ||
|
|
1773
|
-
if (
|
|
1774
|
-
|
|
1775
|
+
if (!P || $) return;
|
|
1776
|
+
if (A.value = void 0, !P.limits || typeof P.admin != "boolean") {
|
|
1777
|
+
y.value = { code: "unavailable" };
|
|
1775
1778
|
return;
|
|
1776
1779
|
}
|
|
1777
1780
|
_.value = !1, o.value = P;
|
|
1778
1781
|
const X = await j("bg.jobs.list", void 0, !0);
|
|
1779
|
-
X &&
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1782
|
+
X && !$ && (r.value = X.jobs ?? []);
|
|
1783
|
+
const D = await j("bg.schedules.list", void 0, !0);
|
|
1784
|
+
D && !$ && (c.value = D.schedules ?? []), !$ && r.value.every(M) && c.value.every((ce) => !ce.enabled) && Z && (clearInterval(Z), Z = void 0);
|
|
1782
1785
|
} finally {
|
|
1783
|
-
|
|
1786
|
+
E.value = !1;
|
|
1784
1787
|
}
|
|
1785
1788
|
}
|
|
1786
1789
|
}
|
|
1787
1790
|
function ae() {
|
|
1788
|
-
|
|
1791
|
+
Z || (Z = setInterval(() => {
|
|
1789
1792
|
oe();
|
|
1790
1793
|
}, 3e3));
|
|
1791
1794
|
}
|
|
1792
1795
|
async function H(P) {
|
|
1793
1796
|
if (!d.value) {
|
|
1794
|
-
d.value = !0,
|
|
1797
|
+
d.value = !0, y.value = void 0;
|
|
1795
1798
|
try {
|
|
1796
|
-
await P(), await oe(), (c.value.some((X) => X.enabled) || r.value.some((X) => !
|
|
1799
|
+
await P(), await oe(), (c.value.some((X) => X.enabled) || r.value.some((X) => !M(X))) && ae();
|
|
1797
1800
|
} finally {
|
|
1798
|
-
|
|
1801
|
+
$ || (d.value = !1);
|
|
1799
1802
|
}
|
|
1800
1803
|
}
|
|
1801
1804
|
}
|
|
1802
|
-
const
|
|
1803
|
-
if (!
|
|
1804
|
-
await j("bg.jobs.purge", { owner:
|
|
1805
|
-
}),
|
|
1806
|
-
k.value = P,
|
|
1807
|
-
},
|
|
1808
|
-
if (!k.value || !
|
|
1809
|
-
await j("bg.schedules.create", { key:
|
|
1810
|
-
}),
|
|
1811
|
-
if (!
|
|
1812
|
-
await j("bg.schedules.delete", { id:
|
|
1813
|
-
}),
|
|
1814
|
-
if (!
|
|
1815
|
-
await j("bg.schedules.enable", { id:
|
|
1816
|
-
}),
|
|
1805
|
+
const K = () => H(async () => {
|
|
1806
|
+
if (!w.value) return;
|
|
1807
|
+
await j("bg.jobs.purge", { owner: w.value }) && (w.value = void 0);
|
|
1808
|
+
}), se = C(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), re = (P) => {
|
|
1809
|
+
k.value = P, U.value = !1, g.value = "3600";
|
|
1810
|
+
}, Ie = () => H(async () => {
|
|
1811
|
+
if (!k.value || !U.value) return;
|
|
1812
|
+
await j("bg.schedules.create", { key: da(), jobId: k.value.id, intervalSeconds: Number(g.value), consent: !0 }) && (k.value = void 0);
|
|
1813
|
+
}), xe = (P) => H(() => j("bg.schedules.disable", { id: P })), Y = () => H(async () => {
|
|
1814
|
+
if (!x.value) return;
|
|
1815
|
+
await j("bg.schedules.delete", { id: x.value.id }) && (x.value = void 0);
|
|
1816
|
+
}), ee = () => H(async () => {
|
|
1817
|
+
if (!R.value) return;
|
|
1818
|
+
await j("bg.schedules.enable", { id: R.value.id, consent: !0 }) && (R.value = void 0);
|
|
1819
|
+
}), ne = (P) => {
|
|
1817
1820
|
const X = new Date(P);
|
|
1818
1821
|
return Number.isFinite(X.getTime()) ? X.toLocaleString() : a.value.unknownTime;
|
|
1819
|
-
},
|
|
1822
|
+
}, ve = (P) => P.copyRetained && P.state === "succeeded" && !P.scheduleId && P.submitter?.user === o.value?.owner?.user && P.submitter?.uid === o.value?.owner?.uid, $e = (P) => H(() => j("bg.jobs.cancel", { id: P })), B = (P) => H(() => j("bg.jobs.pause", { id: P })), L = (P) => H(() => j("bg.jobs.resume", { id: P })), O = (P) => {
|
|
1820
1823
|
const X = P.lastIndexOf("/");
|
|
1821
|
-
|
|
1824
|
+
V.value = { folder: P.slice(0, X), relative: P.slice(X + 1) };
|
|
1822
1825
|
}, W = () => H(async () => {
|
|
1823
|
-
if (!
|
|
1824
|
-
await j("bg.jobs.submit", { key:
|
|
1826
|
+
if (!V.value) return;
|
|
1827
|
+
await j("bg.jobs.submit", { key: da(), ...V.value }) && (V.value = void 0);
|
|
1825
1828
|
});
|
|
1826
|
-
async function
|
|
1829
|
+
async function de(P) {
|
|
1827
1830
|
const X = await j("bg.jobs.result", { id: P.id });
|
|
1828
|
-
!X ||
|
|
1831
|
+
!X || $ || (F.value && URL.revokeObjectURL(F.value), F.value = URL.createObjectURL(new Blob([JSON.stringify(X.result, null, 2)], { type: "application/json" })), J.value = `${P.name || P.id}.sha256.json`);
|
|
1829
1832
|
}
|
|
1830
|
-
return
|
|
1833
|
+
return Ue(() => A.value, oe), h({ refresh: oe }), Ce(() => {
|
|
1831
1834
|
oe().then(() => {
|
|
1832
|
-
(c.value.some((P) => P.enabled) || r.value.some((P) => !
|
|
1835
|
+
(c.value.some((P) => P.enabled) || r.value.some((P) => !M(P))) && ae();
|
|
1833
1836
|
});
|
|
1834
|
-
}),
|
|
1835
|
-
|
|
1836
|
-
}), (P, X) => (l(), f(e(
|
|
1837
|
-
"aria-busy": d.value ||
|
|
1837
|
+
}), _e(() => {
|
|
1838
|
+
$ = !0, q.dispose(), Z && clearInterval(Z), F.value && URL.revokeObjectURL(F.value);
|
|
1839
|
+
}), (P, X) => (l(), f(e(he), {
|
|
1840
|
+
"aria-busy": d.value || E.value || z.value,
|
|
1838
1841
|
title: a.value.title,
|
|
1839
1842
|
description: _.value ? void 0 : a.value.help,
|
|
1840
1843
|
collapsible: !1,
|
|
@@ -1849,39 +1852,39 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1849
1852
|
b(s(a.value.unsupported), 1)
|
|
1850
1853
|
]),
|
|
1851
1854
|
_: 1
|
|
1852
|
-
})) : (l(),
|
|
1853
|
-
|
|
1855
|
+
})) : (l(), S(le, { key: 1 }, [
|
|
1856
|
+
A.value ? (l(), f(e(G), {
|
|
1854
1857
|
key: 0,
|
|
1855
1858
|
tone: "info",
|
|
1856
1859
|
role: "status"
|
|
1857
1860
|
}, {
|
|
1858
1861
|
default: t(() => [
|
|
1859
|
-
b(s(e(
|
|
1862
|
+
b(s(e(Re)(A.value, n.ctx.locale)), 1)
|
|
1860
1863
|
]),
|
|
1861
1864
|
_: 1
|
|
1862
|
-
})) :
|
|
1863
|
-
|
|
1865
|
+
})) : m("", !0),
|
|
1866
|
+
y.value ? (l(), f(e(G), {
|
|
1864
1867
|
key: 1,
|
|
1865
1868
|
tone: "danger",
|
|
1866
1869
|
role: "alert"
|
|
1867
1870
|
}, {
|
|
1868
1871
|
default: t(() => [
|
|
1869
|
-
b(s(e(
|
|
1872
|
+
b(s(e(Ma)(y.value, a.value, n.ctx.locale)), 1)
|
|
1870
1873
|
]),
|
|
1871
1874
|
_: 1
|
|
1872
|
-
})) :
|
|
1873
|
-
|
|
1874
|
-
(l(),
|
|
1875
|
-
key:
|
|
1875
|
+
})) : m("", !0),
|
|
1876
|
+
z.value ? (l(), S(le, { key: 2 }, [
|
|
1877
|
+
(l(), S(le, null, Se(["14rem", "24rem", "18rem", "24rem"], (D, ce) => T("p", {
|
|
1878
|
+
key: ce,
|
|
1876
1879
|
"data-placeholder-row": ""
|
|
1877
1880
|
}, [
|
|
1878
|
-
v(e(
|
|
1879
|
-
width:
|
|
1881
|
+
v(e(Pe), {
|
|
1882
|
+
width: D,
|
|
1880
1883
|
height: "20px"
|
|
1881
1884
|
}, null, 8, ["width"])
|
|
1882
1885
|
])), 64)),
|
|
1883
|
-
T("div",
|
|
1884
|
-
v(e(
|
|
1886
|
+
T("div", Pl, [
|
|
1887
|
+
v(e(N), {
|
|
1885
1888
|
variant: "secondary",
|
|
1886
1889
|
disabled: ""
|
|
1887
1890
|
}, {
|
|
@@ -1890,7 +1893,7 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1890
1893
|
]),
|
|
1891
1894
|
_: 1
|
|
1892
1895
|
}),
|
|
1893
|
-
v(e(
|
|
1896
|
+
v(e(N), {
|
|
1894
1897
|
variant: "primary",
|
|
1895
1898
|
disabled: ""
|
|
1896
1899
|
}, {
|
|
@@ -1900,26 +1903,26 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1900
1903
|
_: 1
|
|
1901
1904
|
})
|
|
1902
1905
|
])
|
|
1903
|
-
], 64)) :
|
|
1904
|
-
o.value ? (l(),
|
|
1905
|
-
T("p",
|
|
1906
|
-
T("p",
|
|
1907
|
-
T("p",
|
|
1908
|
-
T("p",
|
|
1909
|
-
T("div",
|
|
1910
|
-
v(e(
|
|
1906
|
+
], 64)) : m("", !0),
|
|
1907
|
+
o.value ? (l(), S(le, { key: 3 }, [
|
|
1908
|
+
T("p", Tl, s(o.value.worker?.alive ? i(a.value.workerRunning, { user: o.value.worker.username }) : a.value.workerStopped), 1),
|
|
1909
|
+
T("p", Al, s(i(a.value.limits, { size: o.value.limits.maxInputBytes / 1024, queue: o.value.limits.maxQueued, seconds: o.value.limits.jobTimeoutSeconds })), 1),
|
|
1910
|
+
T("p", Rl, s(o.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
|
|
1911
|
+
T("p", Il, s(i(a.value.ownerLimits, { jobs: o.value.limits.maxOwnerPending, size: o.value.limits.maxOwnerBytes / 1024 })), 1),
|
|
1912
|
+
T("div", Vl, [
|
|
1913
|
+
v(e(N), {
|
|
1911
1914
|
variant: "secondary",
|
|
1912
1915
|
disabled: d.value,
|
|
1913
|
-
onClick: X[0] || (X[0] = (
|
|
1916
|
+
onClick: X[0] || (X[0] = (D) => I.value = !0)
|
|
1914
1917
|
}, {
|
|
1915
1918
|
default: t(() => [
|
|
1916
1919
|
b(s(a.value.chooseFile), 1)
|
|
1917
1920
|
]),
|
|
1918
1921
|
_: 1
|
|
1919
1922
|
}, 8, ["disabled"]),
|
|
1920
|
-
v(e(
|
|
1923
|
+
v(e(N), {
|
|
1921
1924
|
variant: "primary",
|
|
1922
|
-
disabled: d.value || !
|
|
1925
|
+
disabled: d.value || !V.value,
|
|
1923
1926
|
onClick: W
|
|
1924
1927
|
}, {
|
|
1925
1928
|
default: t(() => [
|
|
@@ -1928,15 +1931,15 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1928
1931
|
_: 1
|
|
1929
1932
|
}, 8, ["disabled"])
|
|
1930
1933
|
]),
|
|
1931
|
-
|
|
1934
|
+
V.value ? (l(), S("p", Ul, [
|
|
1932
1935
|
b(s(i(a.value.chosen, { path: "" }).trim()) + " ", 1),
|
|
1933
|
-
v(e(
|
|
1934
|
-
path: `${
|
|
1936
|
+
v(e(Ee), {
|
|
1937
|
+
path: `${V.value.folder}/${V.value.relative}`
|
|
1935
1938
|
}, null, 8, ["path"])
|
|
1936
|
-
])) :
|
|
1937
|
-
v(
|
|
1939
|
+
])) : m("", !0),
|
|
1940
|
+
v(je, {
|
|
1938
1941
|
open: I.value,
|
|
1939
|
-
"onUpdate:open": X[1] || (X[1] = (
|
|
1942
|
+
"onUpdate:open": X[1] || (X[1] = (D) => I.value = D),
|
|
1940
1943
|
locale: n.ctx.locale,
|
|
1941
1944
|
provider: e(q),
|
|
1942
1945
|
mode: "file",
|
|
@@ -1944,27 +1947,27 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1944
1947
|
description: a.value.pickerConsent,
|
|
1945
1948
|
onSelected: O
|
|
1946
1949
|
}, null, 8, ["open", "locale", "provider", "title", "description"]),
|
|
1947
|
-
|
|
1950
|
+
w.value && o.value.admin ? (l(), f(e(G), {
|
|
1948
1951
|
key: 1,
|
|
1949
1952
|
tone: "warning"
|
|
1950
1953
|
}, {
|
|
1951
1954
|
default: t(() => [
|
|
1952
|
-
T("p", null, s(i(a.value.purgeConfirm, { user:
|
|
1953
|
-
T("div",
|
|
1954
|
-
v(e(
|
|
1955
|
+
T("p", null, s(i(a.value.purgeConfirm, { user: w.value.user, uid: w.value.uid })), 1),
|
|
1956
|
+
T("div", Dl, [
|
|
1957
|
+
v(e(N), {
|
|
1955
1958
|
variant: "secondary",
|
|
1956
1959
|
disabled: d.value,
|
|
1957
|
-
onClick:
|
|
1960
|
+
onClick: K
|
|
1958
1961
|
}, {
|
|
1959
1962
|
default: t(() => [
|
|
1960
1963
|
b(s(a.value.confirmPurge), 1)
|
|
1961
1964
|
]),
|
|
1962
1965
|
_: 1
|
|
1963
1966
|
}, 8, ["disabled"]),
|
|
1964
|
-
v(e(
|
|
1967
|
+
v(e(N), {
|
|
1965
1968
|
variant: "secondary",
|
|
1966
1969
|
disabled: d.value,
|
|
1967
|
-
onClick: X[2] || (X[2] = (
|
|
1970
|
+
onClick: X[2] || (X[2] = (D) => w.value = void 0)
|
|
1968
1971
|
}, {
|
|
1969
1972
|
default: t(() => [
|
|
1970
1973
|
b(s(a.value.keepJobs), 1)
|
|
@@ -1974,112 +1977,112 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
1974
1977
|
])
|
|
1975
1978
|
]),
|
|
1976
1979
|
_: 1
|
|
1977
|
-
})) :
|
|
1978
|
-
r.value.length ? (l(),
|
|
1979
|
-
(l(!0),
|
|
1980
|
-
key:
|
|
1981
|
-
title:
|
|
1980
|
+
})) : m("", !0),
|
|
1981
|
+
r.value.length ? (l(), S("div", Ll, [
|
|
1982
|
+
(l(!0), S(le, null, Se(r.value, (D) => (l(), f(e(ma), {
|
|
1983
|
+
key: D.id,
|
|
1984
|
+
title: D.name,
|
|
1982
1985
|
"layout-type": "compact",
|
|
1983
|
-
"data-job-state":
|
|
1984
|
-
"data-job-id":
|
|
1986
|
+
"data-job-state": D.state,
|
|
1987
|
+
"data-job-id": D.id
|
|
1985
1988
|
}, {
|
|
1986
1989
|
"header-actions": t(() => [
|
|
1987
1990
|
v(e(Ge), {
|
|
1988
|
-
tone:
|
|
1991
|
+
tone: ye(D),
|
|
1989
1992
|
"data-bg-state": ""
|
|
1990
1993
|
}, {
|
|
1991
1994
|
default: t(() => [
|
|
1992
|
-
b(s(
|
|
1995
|
+
b(s(pe(D)), 1)
|
|
1993
1996
|
]),
|
|
1994
1997
|
_: 2
|
|
1995
1998
|
}, 1032, ["tone"])
|
|
1996
1999
|
]),
|
|
1997
2000
|
default: t(() => [
|
|
1998
|
-
T("div",
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2001
|
+
T("div", Nl, [
|
|
2002
|
+
D.progress?.total ? (l(), S("span", Ol, s(i(a.value.progressItems, { done: D.progress.done, count: D.progress.total })), 1)) : m("", !0),
|
|
2003
|
+
D.progress?.totalBytes ? (l(), S("span", ql, s(i(a.value.progressBytes, { done: e(ia)(D.progress.bytes, n.ctx.locale), total: e(ia)(D.progress.totalBytes, n.ctx.locale) })), 1)) : m("", !0),
|
|
2004
|
+
D.progress?.item ? (l(), S("span", Fl, [
|
|
2002
2005
|
b(s(i(a.value.progressItem, { item: "" }).trim()) + " ", 1),
|
|
2003
|
-
v(e(
|
|
2004
|
-
path:
|
|
2006
|
+
v(e(Ee), {
|
|
2007
|
+
path: D.progress.item
|
|
2005
2008
|
}, null, 8, ["path"])
|
|
2006
|
-
])) :
|
|
2007
|
-
o.value.admin &&
|
|
2008
|
-
|
|
2009
|
-
T("div",
|
|
2010
|
-
o.value.admin &&
|
|
2009
|
+
])) : m("", !0),
|
|
2010
|
+
o.value.admin && D.submitter ? (l(), S("span", Ml, s(i(a.value.owner, { user: D.submitter.user, uid: D.submitter.uid })), 1)) : m("", !0),
|
|
2011
|
+
D.scheduleId ? (l(), S("span", Hl, s(a.value.scheduledJob), 1)) : m("", !0),
|
|
2012
|
+
T("div", Kl, [
|
|
2013
|
+
o.value.admin && D.submitter ? (l(), f(e(N), {
|
|
2011
2014
|
key: 0,
|
|
2012
2015
|
variant: "secondary",
|
|
2013
2016
|
disabled: d.value,
|
|
2014
|
-
onClick: (
|
|
2017
|
+
onClick: (ce) => w.value = D.submitter
|
|
2015
2018
|
}, {
|
|
2016
2019
|
default: t(() => [
|
|
2017
2020
|
b(s(a.value.purgeOwner), 1)
|
|
2018
2021
|
]),
|
|
2019
2022
|
_: 1
|
|
2020
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2021
|
-
!
|
|
2023
|
+
}, 8, ["disabled", "onClick"])) : m("", !0),
|
|
2024
|
+
!M(D) && !D.pauseRequested && !D.delegation_id ? (l(), f(e(N), {
|
|
2022
2025
|
key: 1,
|
|
2023
2026
|
variant: "secondary",
|
|
2024
2027
|
disabled: d.value,
|
|
2025
|
-
onClick: (
|
|
2028
|
+
onClick: (ce) => B(D.id)
|
|
2026
2029
|
}, {
|
|
2027
2030
|
default: t(() => [
|
|
2028
2031
|
b(s(a.value.pause), 1)
|
|
2029
2032
|
]),
|
|
2030
2033
|
_: 1
|
|
2031
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2032
|
-
|
|
2034
|
+
}, 8, ["disabled", "onClick"])) : m("", !0),
|
|
2035
|
+
D.state === "paused" || ue(D) ? (l(), f(e(N), {
|
|
2033
2036
|
key: 2,
|
|
2034
2037
|
variant: "secondary",
|
|
2035
2038
|
disabled: d.value,
|
|
2036
|
-
onClick: (
|
|
2039
|
+
onClick: (ce) => L(D.id)
|
|
2037
2040
|
}, {
|
|
2038
2041
|
default: t(() => [
|
|
2039
2042
|
b(s(a.value.resume), 1)
|
|
2040
2043
|
]),
|
|
2041
2044
|
_: 1
|
|
2042
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2043
|
-
|
|
2045
|
+
}, 8, ["disabled", "onClick"])) : m("", !0),
|
|
2046
|
+
Q(D) ? m("", !0) : (l(), f(e(N), {
|
|
2044
2047
|
key: 3,
|
|
2045
2048
|
variant: "secondary",
|
|
2046
2049
|
disabled: d.value,
|
|
2047
|
-
onClick: (
|
|
2050
|
+
onClick: (ce) => $e(D.id)
|
|
2048
2051
|
}, {
|
|
2049
2052
|
default: t(() => [
|
|
2050
2053
|
b(s(a.value.cancel), 1)
|
|
2051
2054
|
]),
|
|
2052
2055
|
_: 1
|
|
2053
2056
|
}, 8, ["disabled", "onClick"])),
|
|
2054
|
-
|
|
2057
|
+
ve(D) ? (l(), f(e(N), {
|
|
2055
2058
|
key: 4,
|
|
2056
2059
|
variant: "secondary",
|
|
2057
2060
|
disabled: d.value,
|
|
2058
|
-
onClick: (
|
|
2061
|
+
onClick: (ce) => re(D)
|
|
2059
2062
|
}, {
|
|
2060
2063
|
default: t(() => [
|
|
2061
2064
|
b(s(a.value.scheduleCopy), 1)
|
|
2062
2065
|
]),
|
|
2063
2066
|
_: 1
|
|
2064
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2065
|
-
|
|
2067
|
+
}, 8, ["disabled", "onClick"])) : m("", !0),
|
|
2068
|
+
D.state === "succeeded" ? (l(), f(e(N), {
|
|
2066
2069
|
key: 5,
|
|
2067
2070
|
variant: "secondary",
|
|
2068
2071
|
disabled: d.value,
|
|
2069
|
-
onClick: (
|
|
2072
|
+
onClick: (ce) => de(D)
|
|
2070
2073
|
}, {
|
|
2071
2074
|
default: t(() => [
|
|
2072
2075
|
b(s(a.value.result), 1)
|
|
2073
2076
|
]),
|
|
2074
2077
|
_: 1
|
|
2075
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2078
|
+
}, 8, ["disabled", "onClick"])) : m("", !0)
|
|
2076
2079
|
])
|
|
2077
2080
|
])
|
|
2078
2081
|
]),
|
|
2079
2082
|
_: 2
|
|
2080
2083
|
}, 1032, ["title", "data-job-state", "data-job-id"]))), 128))
|
|
2081
|
-
])) : (l(),
|
|
2082
|
-
v(e(
|
|
2084
|
+
])) : (l(), S("p", Bl, s(a.value.noJobs), 1)),
|
|
2085
|
+
v(e(he), {
|
|
2083
2086
|
"data-bg-schedules": "",
|
|
2084
2087
|
class: "bg-schedules",
|
|
2085
2088
|
title: a.value.schedulesTitle,
|
|
@@ -2090,48 +2093,48 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2090
2093
|
k.value ? (l(), f(e(Oe), {
|
|
2091
2094
|
key: 0,
|
|
2092
2095
|
class: "bg-schedule-form",
|
|
2093
|
-
onSubmit: Ne(
|
|
2096
|
+
onSubmit: Ne(Ie, ["prevent"])
|
|
2094
2097
|
}, {
|
|
2095
2098
|
default: t(() => [
|
|
2096
2099
|
T("p", null, s(i(a.value.scheduleSource, { name: k.value.name })), 1),
|
|
2097
|
-
v(e(
|
|
2100
|
+
v(e(Te), {
|
|
2098
2101
|
label: a.value.interval
|
|
2099
2102
|
}, {
|
|
2100
2103
|
default: t(() => [
|
|
2101
|
-
v(e(
|
|
2102
|
-
modelValue:
|
|
2103
|
-
"onUpdate:modelValue": X[3] || (X[3] = (
|
|
2104
|
+
v(e(ra), {
|
|
2105
|
+
modelValue: g.value,
|
|
2106
|
+
"onUpdate:modelValue": X[3] || (X[3] = (D) => g.value = D),
|
|
2104
2107
|
"data-schedule-interval": "",
|
|
2105
|
-
options:
|
|
2108
|
+
options: se.value,
|
|
2106
2109
|
disabled: d.value
|
|
2107
2110
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
2108
2111
|
]),
|
|
2109
2112
|
_: 1
|
|
2110
2113
|
}, 8, ["label"]),
|
|
2111
|
-
v(e(
|
|
2112
|
-
modelValue:
|
|
2113
|
-
"onUpdate:modelValue": X[4] || (X[4] = (
|
|
2114
|
+
v(e(vt), {
|
|
2115
|
+
modelValue: U.value,
|
|
2116
|
+
"onUpdate:modelValue": X[4] || (X[4] = (D) => U.value = D),
|
|
2114
2117
|
"data-schedule-consent": "",
|
|
2115
2118
|
disabled: d.value,
|
|
2116
2119
|
label: a.value.scheduleConsent
|
|
2117
2120
|
}, null, 8, ["modelValue", "disabled", "label"]),
|
|
2118
2121
|
v(e(He), null, {
|
|
2119
2122
|
default: t(() => [
|
|
2120
|
-
v(e(
|
|
2123
|
+
v(e(N), {
|
|
2121
2124
|
type: "submit",
|
|
2122
2125
|
variant: "primary",
|
|
2123
|
-
disabled: d.value || !
|
|
2126
|
+
disabled: d.value || !U.value
|
|
2124
2127
|
}, {
|
|
2125
2128
|
default: t(() => [
|
|
2126
2129
|
b(s(a.value.createSchedule), 1)
|
|
2127
2130
|
]),
|
|
2128
2131
|
_: 1
|
|
2129
2132
|
}, 8, ["disabled"]),
|
|
2130
|
-
v(e(
|
|
2133
|
+
v(e(N), {
|
|
2131
2134
|
type: "button",
|
|
2132
2135
|
variant: "secondary",
|
|
2133
2136
|
disabled: d.value,
|
|
2134
|
-
onClick: X[5] || (X[5] = (
|
|
2137
|
+
onClick: X[5] || (X[5] = (D) => k.value = void 0)
|
|
2135
2138
|
}, {
|
|
2136
2139
|
default: t(() => [
|
|
2137
2140
|
b(s(a.value.cancel), 1)
|
|
@@ -2143,31 +2146,31 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2143
2146
|
})
|
|
2144
2147
|
]),
|
|
2145
2148
|
_: 1
|
|
2146
|
-
})) :
|
|
2147
|
-
c.value.length ? (l(),
|
|
2148
|
-
(l(!0),
|
|
2149
|
-
key:
|
|
2150
|
-
title:
|
|
2149
|
+
})) : m("", !0),
|
|
2150
|
+
c.value.length ? (l(), S("div", Gl, [
|
|
2151
|
+
(l(!0), S(le, null, Se(c.value, (D) => (l(), f(e(ma), {
|
|
2152
|
+
key: D.id,
|
|
2153
|
+
title: D.name,
|
|
2151
2154
|
"layout-type": "compact",
|
|
2152
|
-
"data-schedule-id":
|
|
2155
|
+
"data-schedule-id": D.id
|
|
2153
2156
|
}, {
|
|
2154
2157
|
"header-actions": t(() => [
|
|
2155
2158
|
v(e(Ge), {
|
|
2156
|
-
tone:
|
|
2159
|
+
tone: D.enabled ? "success" : "neutral",
|
|
2157
2160
|
"data-bg-state": ""
|
|
2158
2161
|
}, {
|
|
2159
2162
|
default: t(() => [
|
|
2160
|
-
b(s(
|
|
2163
|
+
b(s(D.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
|
|
2161
2164
|
]),
|
|
2162
2165
|
_: 2
|
|
2163
2166
|
}, 1032, ["tone"])
|
|
2164
2167
|
]),
|
|
2165
2168
|
default: t(() => [
|
|
2166
|
-
T("div",
|
|
2167
|
-
o.value.admin ? (l(),
|
|
2168
|
-
|
|
2169
|
-
T("span",
|
|
2170
|
-
|
|
2169
|
+
T("div", Wl, [
|
|
2170
|
+
o.value.admin ? (l(), S("span", Jl, s(i(a.value.owner, { user: D.owner.user, uid: D.owner.uid })), 1)) : m("", !0),
|
|
2171
|
+
D.enabled ? (l(), S("span", Yl, s(i(a.value.nextRun, { time: ne(D.nextAt) })), 1)) : m("", !0),
|
|
2172
|
+
T("span", Ql, s(i(a.value.missedRuns, { count: D.missed })), 1),
|
|
2173
|
+
D.reason === "worker-changed" ? (l(), f(e(G), {
|
|
2171
2174
|
key: 2,
|
|
2172
2175
|
tone: "warning"
|
|
2173
2176
|
}, {
|
|
@@ -2175,7 +2178,7 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2175
2178
|
b(s(a.value.revisionChanged), 1)
|
|
2176
2179
|
]),
|
|
2177
2180
|
_: 1
|
|
2178
|
-
})) :
|
|
2181
|
+
})) : D.reason === "input-unavailable" ? (l(), f(e(G), {
|
|
2179
2182
|
key: 3,
|
|
2180
2183
|
tone: "warning"
|
|
2181
2184
|
}, {
|
|
@@ -2183,33 +2186,33 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2183
2186
|
b(s(a.value.errors["input-unavailable"]), 1)
|
|
2184
2187
|
]),
|
|
2185
2188
|
_: 1
|
|
2186
|
-
})) :
|
|
2187
|
-
T("div",
|
|
2188
|
-
|
|
2189
|
+
})) : m("", !0),
|
|
2190
|
+
T("div", Zl, [
|
|
2191
|
+
D.enabled ? (l(), f(e(N), {
|
|
2189
2192
|
key: 0,
|
|
2190
2193
|
variant: "secondary",
|
|
2191
2194
|
disabled: d.value,
|
|
2192
|
-
onClick: (
|
|
2195
|
+
onClick: (ce) => xe(D.id)
|
|
2193
2196
|
}, {
|
|
2194
2197
|
default: t(() => [
|
|
2195
2198
|
b(s(a.value.disableSchedule), 1)
|
|
2196
2199
|
]),
|
|
2197
2200
|
_: 1
|
|
2198
|
-
}, 8, ["disabled", "onClick"])) : o.value.admin ? (l(), f(e(
|
|
2201
|
+
}, 8, ["disabled", "onClick"])) : o.value.admin ? (l(), f(e(N), {
|
|
2199
2202
|
key: 1,
|
|
2200
2203
|
variant: "secondary",
|
|
2201
2204
|
disabled: d.value,
|
|
2202
|
-
onClick: (
|
|
2205
|
+
onClick: (ce) => R.value = D
|
|
2203
2206
|
}, {
|
|
2204
2207
|
default: t(() => [
|
|
2205
2208
|
b(s(a.value.enableSchedule), 1)
|
|
2206
2209
|
]),
|
|
2207
2210
|
_: 1
|
|
2208
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2209
|
-
v(e(
|
|
2211
|
+
}, 8, ["disabled", "onClick"])) : m("", !0),
|
|
2212
|
+
v(e(N), {
|
|
2210
2213
|
variant: "secondary",
|
|
2211
2214
|
disabled: d.value,
|
|
2212
|
-
onClick: (
|
|
2215
|
+
onClick: (ce) => x.value = D
|
|
2213
2216
|
}, {
|
|
2214
2217
|
default: t(() => [
|
|
2215
2218
|
b(s(a.value.deleteSchedule), 1)
|
|
@@ -2221,28 +2224,28 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2221
2224
|
]),
|
|
2222
2225
|
_: 2
|
|
2223
2226
|
}, 1032, ["title", "data-schedule-id"]))), 128))
|
|
2224
|
-
])) : (l(),
|
|
2225
|
-
|
|
2227
|
+
])) : (l(), S("p", Xl, s(a.value.noSchedules), 1)),
|
|
2228
|
+
x.value ? (l(), f(e(G), {
|
|
2226
2229
|
key: 3,
|
|
2227
2230
|
tone: "warning"
|
|
2228
2231
|
}, {
|
|
2229
2232
|
default: t(() => [
|
|
2230
|
-
T("p", null, s(i(a.value.deleteScheduleConsent, { name:
|
|
2231
|
-
T("div",
|
|
2232
|
-
v(e(
|
|
2233
|
+
T("p", null, s(i(a.value.deleteScheduleConsent, { name: x.value.name })), 1),
|
|
2234
|
+
T("div", jl, [
|
|
2235
|
+
v(e(N), {
|
|
2233
2236
|
variant: "danger",
|
|
2234
2237
|
disabled: d.value,
|
|
2235
|
-
onClick:
|
|
2238
|
+
onClick: Y
|
|
2236
2239
|
}, {
|
|
2237
2240
|
default: t(() => [
|
|
2238
2241
|
b(s(a.value.confirmDeleteSchedule), 1)
|
|
2239
2242
|
]),
|
|
2240
2243
|
_: 1
|
|
2241
2244
|
}, 8, ["disabled"]),
|
|
2242
|
-
v(e(
|
|
2245
|
+
v(e(N), {
|
|
2243
2246
|
variant: "secondary",
|
|
2244
2247
|
disabled: d.value,
|
|
2245
|
-
onClick: X[6] || (X[6] = (
|
|
2248
|
+
onClick: X[6] || (X[6] = (D) => x.value = void 0)
|
|
2246
2249
|
}, {
|
|
2247
2250
|
default: t(() => [
|
|
2248
2251
|
b(s(a.value.cancel), 1)
|
|
@@ -2252,28 +2255,28 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2252
2255
|
])
|
|
2253
2256
|
]),
|
|
2254
2257
|
_: 1
|
|
2255
|
-
})) :
|
|
2256
|
-
|
|
2258
|
+
})) : m("", !0),
|
|
2259
|
+
R.value ? (l(), f(e(G), {
|
|
2257
2260
|
key: 4,
|
|
2258
2261
|
tone: "warning"
|
|
2259
2262
|
}, {
|
|
2260
2263
|
default: t(() => [
|
|
2261
|
-
T("p", null, s(i(a.value.enableScheduleConsent, { name:
|
|
2262
|
-
T("div",
|
|
2263
|
-
v(e(
|
|
2264
|
+
T("p", null, s(i(a.value.enableScheduleConsent, { name: R.value.name })), 1),
|
|
2265
|
+
T("div", en, [
|
|
2266
|
+
v(e(N), {
|
|
2264
2267
|
variant: "primary",
|
|
2265
2268
|
disabled: d.value,
|
|
2266
|
-
onClick:
|
|
2269
|
+
onClick: ee
|
|
2267
2270
|
}, {
|
|
2268
2271
|
default: t(() => [
|
|
2269
2272
|
b(s(a.value.confirmEnableSchedule), 1)
|
|
2270
2273
|
]),
|
|
2271
2274
|
_: 1
|
|
2272
2275
|
}, 8, ["disabled"]),
|
|
2273
|
-
v(e(
|
|
2276
|
+
v(e(N), {
|
|
2274
2277
|
variant: "secondary",
|
|
2275
2278
|
disabled: d.value,
|
|
2276
|
-
onClick: X[7] || (X[7] = (
|
|
2279
|
+
onClick: X[7] || (X[7] = (D) => R.value = void 0)
|
|
2277
2280
|
}, {
|
|
2278
2281
|
default: t(() => [
|
|
2279
2282
|
b(s(a.value.cancel), 1)
|
|
@@ -2283,7 +2286,7 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2283
2286
|
])
|
|
2284
2287
|
]),
|
|
2285
2288
|
_: 1
|
|
2286
|
-
})) :
|
|
2289
|
+
})) : m("", !0)
|
|
2287
2290
|
]),
|
|
2288
2291
|
_: 1
|
|
2289
2292
|
}, 8, ["title", "description"]),
|
|
@@ -2296,165 +2299,176 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2296
2299
|
b(s(a.value.download), 1)
|
|
2297
2300
|
]),
|
|
2298
2301
|
_: 1
|
|
2299
|
-
}, 8, ["href", "download"])) :
|
|
2300
|
-
], 64)) :
|
|
2302
|
+
}, 8, ["href", "download"])) : m("", !0)
|
|
2303
|
+
], 64)) : m("", !0)
|
|
2301
2304
|
], 64))
|
|
2302
2305
|
]),
|
|
2303
2306
|
_: 1
|
|
2304
2307
|
}, 8, ["aria-busy", "title", "description"]));
|
|
2305
2308
|
}
|
|
2306
|
-
}),
|
|
2307
|
-
key:
|
|
2309
|
+
}), ho = /* @__PURE__ */ ge(an, [["__scopeId", "data-v-85b8b7a1"]]), tn = ["inert", "aria-hidden"], ln = {
|
|
2310
|
+
key: 3,
|
|
2308
2311
|
class: "executor-approval"
|
|
2309
|
-
},
|
|
2312
|
+
}, nn = {
|
|
2310
2313
|
key: 0,
|
|
2311
2314
|
class: "executor-brand"
|
|
2312
|
-
},
|
|
2315
|
+
}, on = ["src"], sn = /* @__PURE__ */ fe({
|
|
2313
2316
|
__name: "ExecutorApproval",
|
|
2314
2317
|
props: {
|
|
2315
2318
|
admin: { type: Boolean },
|
|
2316
2319
|
locale: {},
|
|
2317
|
-
ctx: {}
|
|
2320
|
+
ctx: {},
|
|
2321
|
+
preload: { type: Boolean }
|
|
2318
2322
|
},
|
|
2319
2323
|
setup(n) {
|
|
2320
|
-
const h = n, u =
|
|
2321
|
-
const
|
|
2322
|
-
return (
|
|
2324
|
+
const h = n, u = Ve(Me, void 0), a = C(() => Le(h.locale)), i = p("checking"), o = p(), r = C(() => {
|
|
2325
|
+
const g = h.ctx;
|
|
2326
|
+
return (g?.fullPage ?? (g?.host ? ga({ host: g.host }) : !1)) && g?.displayName ? g : void 0;
|
|
2323
2327
|
});
|
|
2324
|
-
function
|
|
2325
|
-
o.value =
|
|
2328
|
+
function y(g) {
|
|
2329
|
+
o.value = g, i.value = g.state;
|
|
2326
2330
|
}
|
|
2327
2331
|
let _ = !1, d;
|
|
2328
2332
|
async function c() {
|
|
2329
2333
|
try {
|
|
2330
|
-
const
|
|
2331
|
-
_ ||
|
|
2334
|
+
const g = await u.status();
|
|
2335
|
+
_ || y(g);
|
|
2332
2336
|
} catch {
|
|
2333
2337
|
_ || (o.value = void 0, i.value = "blocked");
|
|
2334
2338
|
}
|
|
2335
2339
|
}
|
|
2336
|
-
const k = C(() => we(o.value));
|
|
2337
|
-
return
|
|
2338
|
-
u && (u.subscribe?.((
|
|
2339
|
-
!_ && !We(
|
|
2340
|
+
const k = C(() => we(o.value)), U = C(() => !!h.preload && !!u && (i.value === "ready" || i.value === "checking"));
|
|
2341
|
+
return Qe(Sa, C(() => U.value && i.value === "checking")), Ue(() => k.value, c), Ce(() => {
|
|
2342
|
+
u && (u.subscribe?.((g) => {
|
|
2343
|
+
!_ && !We(g) && y(g);
|
|
2340
2344
|
}), d = h.ctx?.reopen(() => {
|
|
2341
2345
|
c();
|
|
2342
2346
|
}), c());
|
|
2343
|
-
}),
|
|
2347
|
+
}), _e(() => {
|
|
2344
2348
|
_ = !0, d?.();
|
|
2345
|
-
}), (
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
T("span", null, s(r.value.displayName), 1)
|
|
2356
|
-
])) : y("", !0),
|
|
2357
|
-
k.value ? (l(), f(e(G), {
|
|
2358
|
-
key: 1,
|
|
2359
|
-
tone: "info",
|
|
2360
|
-
role: "status"
|
|
2361
|
-
}, {
|
|
2362
|
-
default: t(() => [
|
|
2363
|
-
b(s(e(Ae)(k.value, n.locale)), 1)
|
|
2364
|
-
]),
|
|
2365
|
-
_: 1
|
|
2366
|
-
})) : n.admin ? (l(), f(Pa, {
|
|
2349
|
+
}), (g, x) => (l(), S(le, null, [
|
|
2350
|
+
U.value ? (l(), S("div", {
|
|
2351
|
+
key: 0,
|
|
2352
|
+
class: sa(["executor-pages", { "executor-preloading": i.value === "checking" }]),
|
|
2353
|
+
inert: i.value === "checking" || void 0,
|
|
2354
|
+
"aria-hidden": i.value === "checking" ? "true" : void 0
|
|
2355
|
+
}, [
|
|
2356
|
+
ke(g.$slots, "default", {}, void 0, !0)
|
|
2357
|
+
], 10, tn)) : !e(u) || i.value === "ready" ? ke(g.$slots, "default", {}, void 0, !0, 1) : m("", !0),
|
|
2358
|
+
e(u) && i.value === "checking" ? (l(), f(e(ft), {
|
|
2367
2359
|
key: 2,
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2360
|
+
text: a.value.loading
|
|
2361
|
+
}, null, 8, ["text"])) : e(u) && i.value !== "ready" ? (l(), S("div", ln, [
|
|
2362
|
+
r.value ? (l(), S("header", nn, [
|
|
2363
|
+
r.value.appIcon ? (l(), S("img", {
|
|
2364
|
+
key: 0,
|
|
2365
|
+
src: r.value.appIcon,
|
|
2366
|
+
alt: ""
|
|
2367
|
+
}, null, 8, on)) : m("", !0),
|
|
2368
|
+
T("span", null, s(r.value.displayName), 1)
|
|
2369
|
+
])) : m("", !0),
|
|
2370
|
+
k.value ? (l(), f(e(G), {
|
|
2371
|
+
key: 1,
|
|
2372
|
+
tone: "info",
|
|
2373
|
+
role: "status"
|
|
2374
|
+
}, {
|
|
2375
|
+
default: t(() => [
|
|
2376
|
+
b(s(e(Re)(k.value, n.locale)), 1)
|
|
2377
|
+
]),
|
|
2378
|
+
_: 1
|
|
2379
|
+
})) : n.admin ? (l(), f(Ta, {
|
|
2380
|
+
key: 2,
|
|
2381
|
+
admin: !0,
|
|
2382
|
+
locale: n.locale,
|
|
2383
|
+
initial: o.value,
|
|
2384
|
+
onConfirmed: c
|
|
2385
|
+
}, null, 8, ["locale", "initial"])) : (l(), f(e(G), {
|
|
2386
|
+
key: 3,
|
|
2387
|
+
tone: "info"
|
|
2388
|
+
}, {
|
|
2389
|
+
default: t(() => [
|
|
2390
|
+
b(s(i.value === "needs-admin-approval" ? a.value.executorNeeds : a.value.executorBlocked), 1)
|
|
2391
|
+
]),
|
|
2392
|
+
_: 1
|
|
2393
|
+
}))
|
|
2394
|
+
])) : m("", !0)
|
|
2395
|
+
], 64));
|
|
2382
2396
|
}
|
|
2383
|
-
}),
|
|
2397
|
+
}), _o = /* @__PURE__ */ ge(sn, [["__scopeId", "data-v-bf0dbc7c"]]), un = {
|
|
2384
2398
|
key: 2,
|
|
2385
2399
|
role: "status"
|
|
2386
|
-
},
|
|
2400
|
+
}, rn = {
|
|
2387
2401
|
key: 3,
|
|
2388
2402
|
role: "status"
|
|
2389
|
-
},
|
|
2403
|
+
}, dn = {
|
|
2390
2404
|
key: 0,
|
|
2391
2405
|
role: "status",
|
|
2392
2406
|
class: "destination"
|
|
2393
|
-
},
|
|
2407
|
+
}, cn = {
|
|
2394
2408
|
key: 0,
|
|
2395
2409
|
"data-placeholder-row": ""
|
|
2396
|
-
},
|
|
2410
|
+
}, vn = { key: 1 }, fn = {
|
|
2397
2411
|
key: 2,
|
|
2398
2412
|
class: "records"
|
|
2399
|
-
},
|
|
2413
|
+
}, pn = ["data-job-state"], yn = ["role"], mn = {
|
|
2400
2414
|
key: 0,
|
|
2401
2415
|
"data-placeholder-row": ""
|
|
2402
|
-
},
|
|
2416
|
+
}, bn = { key: 1 }, gn = {
|
|
2403
2417
|
key: 2,
|
|
2404
2418
|
class: "records"
|
|
2405
|
-
},
|
|
2419
|
+
}, kn = /* @__PURE__ */ fe({
|
|
2406
2420
|
__name: "DelegatePanel",
|
|
2407
2421
|
props: {
|
|
2408
2422
|
ctx: {}
|
|
2409
2423
|
},
|
|
2410
2424
|
setup(n, { expose: h }) {
|
|
2411
|
-
const u = n, a = C(() =>
|
|
2412
|
-
let
|
|
2413
|
-
const
|
|
2414
|
-
Ye([
|
|
2415
|
-
|
|
2425
|
+
const u = n, a = C(() => Le(u.ctx.locale)), i = C(() => wa(u.ctx.locale)), o = _a(u.ctx), r = p(), y = p([]), _ = p([]), d = p(!1), c = p(), k = p(""), U = p(!1), g = p(""), x = p(""), R = p("");
|
|
2426
|
+
let w = !1, E, A;
|
|
2427
|
+
const z = p();
|
|
2428
|
+
Ye([x, g, R], () => {
|
|
2429
|
+
A = void 0;
|
|
2416
2430
|
}, { flush: "sync" });
|
|
2417
|
-
const I = (ae) => ["queued", "running", "waiting_executor"].includes(ae.state),
|
|
2418
|
-
async function
|
|
2419
|
-
if (
|
|
2420
|
-
const [ae, H,
|
|
2421
|
-
if (
|
|
2422
|
-
ae.status === "fulfilled" && (r.value = ae.value), H.status === "fulfilled" && (
|
|
2423
|
-
const
|
|
2424
|
-
if (
|
|
2425
|
-
}
|
|
2426
|
-
async function
|
|
2427
|
-
if (!(d.value ||
|
|
2431
|
+
const I = (ae) => ["queued", "running", "waiting_executor"].includes(ae.state), V = C(() => _.value.some((ae) => ae.state === "waiting_executor")), F = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], J = C(() => V.value && F.includes(c.value?.code ?? "")), q = C(() => !r.value && !c.value && !z.value), Z = C(() => r.value && r.value.state !== "ready" && !(V.value && r.value.state === "needs-admin-approval" && F.includes(r.value.reason ?? "")));
|
|
2432
|
+
async function $() {
|
|
2433
|
+
if (w) return;
|
|
2434
|
+
const [ae, H, K] = await Promise.allSettled([u.ctx.call("delegate.status"), u.ctx.call("delegate.list"), u.ctx.call("delegate.jobs.list")]);
|
|
2435
|
+
if (w) return;
|
|
2436
|
+
ae.status === "fulfilled" && (r.value = ae.value), H.status === "fulfilled" && (y.value = (H.value.delegations ?? []).filter((re) => !re.revoked)), K.status === "fulfilled" && (_.value = K.value.jobs ?? []);
|
|
2437
|
+
const se = [ae, H, K].find((re) => re.status === "rejected");
|
|
2438
|
+
if (z.value = se && we(se.reason), se && !z.value) throw se.reason;
|
|
2439
|
+
}
|
|
2440
|
+
async function M(ae) {
|
|
2441
|
+
if (!(d.value || w)) {
|
|
2428
2442
|
d.value = !0, c.value = void 0;
|
|
2429
2443
|
try {
|
|
2430
2444
|
await ae();
|
|
2431
2445
|
} catch (H) {
|
|
2432
|
-
|
|
2446
|
+
w || (c.value = H);
|
|
2433
2447
|
} finally {
|
|
2434
|
-
|
|
2448
|
+
w || (d.value = !1);
|
|
2435
2449
|
}
|
|
2436
2450
|
}
|
|
2437
2451
|
}
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2440
|
-
const
|
|
2441
|
-
await u.ctx.call("delegate.revoke", { delegation_id: ae }), await
|
|
2442
|
-
}),
|
|
2452
|
+
const Q = () => M($);
|
|
2453
|
+
Ue(() => z.value, Q);
|
|
2454
|
+
const ue = (ae) => M(async () => {
|
|
2455
|
+
await u.ctx.call("delegate.revoke", { delegation_id: ae }), await $();
|
|
2456
|
+
}), pe = (ae) => M(async () => {
|
|
2443
2457
|
const H = await u.ctx.call("delegate.jobs.cancel", { id: ae });
|
|
2444
|
-
|
|
2445
|
-
}),
|
|
2446
|
-
|
|
2458
|
+
w || (k.value = H.revocation_pending ? a.value.pending : ""), await $();
|
|
2459
|
+
}), ye = C(() => r.value?.state === "ready" && !!g.value && !!x.value && !!R.value), j = () => M(async () => {
|
|
2460
|
+
ye.value && (await u.ctx.call("delegate.jobs.submit", { key: A ?? (A = crypto.randomUUID()), url: x.value, dest: g.value, name: R.value }), w || (x.value = "", R.value = "", g.value = ""), await $());
|
|
2447
2461
|
}), oe = (ae) => {
|
|
2448
2462
|
const H = new Date(ae);
|
|
2449
2463
|
return Number.isNaN(H.getTime()) ? "—" : H.toLocaleString(u.ctx.locale);
|
|
2450
2464
|
};
|
|
2451
|
-
return h({ refresh:
|
|
2452
|
-
|
|
2453
|
-
_.value.some(I) &&
|
|
2465
|
+
return h({ refresh: Q }), Ce(() => {
|
|
2466
|
+
Q(), E = setInterval(() => {
|
|
2467
|
+
_.value.some(I) && Q();
|
|
2454
2468
|
}, 3e3);
|
|
2455
|
-
}),
|
|
2456
|
-
|
|
2457
|
-
}), (ae, H) => (l(), f(e(
|
|
2469
|
+
}), _e(() => {
|
|
2470
|
+
w = !0, E && clearInterval(E), o.dispose();
|
|
2471
|
+
}), (ae, H) => (l(), f(e(he), {
|
|
2458
2472
|
title: a.value.title,
|
|
2459
2473
|
description: a.value.help,
|
|
2460
2474
|
collapsible: !1,
|
|
@@ -2468,51 +2482,51 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2468
2482
|
role: "alert"
|
|
2469
2483
|
}, {
|
|
2470
2484
|
default: t(() => [
|
|
2471
|
-
b(s(e(
|
|
2485
|
+
b(s(e(Ha)(c.value, n.ctx.locale) ?? e(Ka)(c.value, a.value)), 1)
|
|
2472
2486
|
]),
|
|
2473
2487
|
_: 1
|
|
2474
|
-
})) :
|
|
2475
|
-
|
|
2488
|
+
})) : m("", !0),
|
|
2489
|
+
z.value ? (l(), f(e(G), {
|
|
2476
2490
|
key: 1,
|
|
2477
2491
|
tone: "info",
|
|
2478
2492
|
role: "status"
|
|
2479
2493
|
}, {
|
|
2480
2494
|
default: t(() => [
|
|
2481
|
-
b(s(e(
|
|
2495
|
+
b(s(e(Re)(z.value, n.ctx.locale)), 1)
|
|
2482
2496
|
]),
|
|
2483
2497
|
_: 1
|
|
2484
|
-
})) :
|
|
2485
|
-
k.value ? (l(),
|
|
2486
|
-
|
|
2498
|
+
})) : m("", !0),
|
|
2499
|
+
k.value ? (l(), S("p", un, s(k.value), 1)) : m("", !0),
|
|
2500
|
+
Z.value ? (l(), S("p", rn, s(r.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : m("", !0),
|
|
2487
2501
|
v(e(Oe), {
|
|
2488
2502
|
direction: "vertical",
|
|
2489
2503
|
onSubmit: Ne(j, ["prevent"])
|
|
2490
2504
|
}, {
|
|
2491
2505
|
default: t(() => [
|
|
2492
|
-
v(e(
|
|
2506
|
+
v(e(Te), {
|
|
2493
2507
|
label: a.value.url,
|
|
2494
2508
|
"label-for": "delegate-url"
|
|
2495
2509
|
}, {
|
|
2496
2510
|
default: t(() => [
|
|
2497
|
-
v(e(
|
|
2511
|
+
v(e(Ae), {
|
|
2498
2512
|
id: "delegate-url",
|
|
2499
|
-
modelValue:
|
|
2500
|
-
"onUpdate:modelValue": H[0] || (H[0] = (
|
|
2513
|
+
modelValue: x.value,
|
|
2514
|
+
"onUpdate:modelValue": H[0] || (H[0] = (K) => x.value = K),
|
|
2501
2515
|
type: "url",
|
|
2502
2516
|
disabled: d.value || r.value?.state !== "ready"
|
|
2503
2517
|
}, null, 8, ["modelValue", "disabled"])
|
|
2504
2518
|
]),
|
|
2505
2519
|
_: 1
|
|
2506
2520
|
}, 8, ["label"]),
|
|
2507
|
-
v(e(
|
|
2521
|
+
v(e(Te), {
|
|
2508
2522
|
label: a.value.name,
|
|
2509
2523
|
"label-for": "delegate-name"
|
|
2510
2524
|
}, {
|
|
2511
2525
|
default: t(() => [
|
|
2512
|
-
v(e(
|
|
2526
|
+
v(e(Ae), {
|
|
2513
2527
|
id: "delegate-name",
|
|
2514
|
-
modelValue:
|
|
2515
|
-
"onUpdate:modelValue": H[1] || (H[1] = (
|
|
2528
|
+
modelValue: R.value,
|
|
2529
|
+
"onUpdate:modelValue": H[1] || (H[1] = (K) => R.value = K),
|
|
2516
2530
|
"data-file-name": "",
|
|
2517
2531
|
disabled: d.value || r.value?.state !== "ready"
|
|
2518
2532
|
}, null, 8, ["modelValue", "disabled"])
|
|
@@ -2520,27 +2534,27 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2520
2534
|
_: 1
|
|
2521
2535
|
}, 8, ["label"]),
|
|
2522
2536
|
T("p", null, s(a.value.size), 1),
|
|
2523
|
-
|
|
2537
|
+
g.value ? (l(), S("p", dn, [
|
|
2524
2538
|
b(s(a.value.destination) + s(i.value), 1),
|
|
2525
|
-
v(e(
|
|
2526
|
-
])) :
|
|
2539
|
+
v(e(Ee), { path: g.value }, null, 8, ["path"])
|
|
2540
|
+
])) : m("", !0),
|
|
2527
2541
|
v(e(He), null, {
|
|
2528
2542
|
default: t(() => [
|
|
2529
|
-
v(e(
|
|
2543
|
+
v(e(N), {
|
|
2530
2544
|
type: "button",
|
|
2531
2545
|
variant: "secondary",
|
|
2532
2546
|
disabled: d.value || r.value?.state !== "ready",
|
|
2533
|
-
onClick: H[2] || (H[2] = (
|
|
2547
|
+
onClick: H[2] || (H[2] = (K) => U.value = !0)
|
|
2534
2548
|
}, {
|
|
2535
2549
|
default: t(() => [
|
|
2536
2550
|
b(s(a.value.choose), 1)
|
|
2537
2551
|
]),
|
|
2538
2552
|
_: 1
|
|
2539
2553
|
}, 8, ["disabled"]),
|
|
2540
|
-
v(e(
|
|
2554
|
+
v(e(N), {
|
|
2541
2555
|
type: "submit",
|
|
2542
2556
|
variant: "primary",
|
|
2543
|
-
disabled: d.value || !
|
|
2557
|
+
disabled: d.value || !ye.value
|
|
2544
2558
|
}, {
|
|
2545
2559
|
default: t(() => [
|
|
2546
2560
|
b(s(a.value.submit), 1)
|
|
@@ -2553,74 +2567,74 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2553
2567
|
]),
|
|
2554
2568
|
_: 1
|
|
2555
2569
|
}),
|
|
2556
|
-
v(
|
|
2557
|
-
open:
|
|
2558
|
-
"onUpdate:open": H[3] || (H[3] = (
|
|
2570
|
+
v(je, {
|
|
2571
|
+
open: U.value,
|
|
2572
|
+
"onUpdate:open": H[3] || (H[3] = (K) => U.value = K),
|
|
2559
2573
|
locale: n.ctx.locale,
|
|
2560
2574
|
provider: e(o),
|
|
2561
2575
|
mode: "folder",
|
|
2562
|
-
onSelected: H[4] || (H[4] = (
|
|
2576
|
+
onSelected: H[4] || (H[4] = (K) => g.value = K)
|
|
2563
2577
|
}, null, 8, ["open", "locale", "provider"]),
|
|
2564
|
-
v(e(
|
|
2578
|
+
v(e(he), {
|
|
2565
2579
|
title: a.value.downloads,
|
|
2566
2580
|
collapsible: !1,
|
|
2567
2581
|
class: "delegate-group"
|
|
2568
2582
|
}, {
|
|
2569
2583
|
default: t(() => [
|
|
2570
|
-
q.value ? (l(),
|
|
2571
|
-
v(e(
|
|
2584
|
+
q.value ? (l(), S("p", cn, [
|
|
2585
|
+
v(e(Pe), {
|
|
2572
2586
|
width: "12rem",
|
|
2573
2587
|
height: "20px"
|
|
2574
2588
|
})
|
|
2575
|
-
])) : !_.value.length && !c.value ? (l(),
|
|
2576
|
-
(l(!0),
|
|
2577
|
-
key:
|
|
2578
|
-
"data-job-state":
|
|
2589
|
+
])) : !_.value.length && !c.value ? (l(), S("p", vn, s(a.value.noJobs), 1)) : (l(), S("ul", fn, [
|
|
2590
|
+
(l(!0), S(le, null, Se(_.value, (K) => (l(), S("li", {
|
|
2591
|
+
key: K.id,
|
|
2592
|
+
"data-job-state": K.state
|
|
2579
2593
|
}, [
|
|
2580
2594
|
T("span", {
|
|
2581
|
-
role:
|
|
2582
|
-
}, s(
|
|
2583
|
-
I(
|
|
2595
|
+
role: K.state === "waiting_executor" ? "status" : void 0
|
|
2596
|
+
}, s(K.name) + " · " + s(a.value[K.state]), 9, yn),
|
|
2597
|
+
I(K) ? (l(), f(e(N), {
|
|
2584
2598
|
key: 0,
|
|
2585
2599
|
variant: "secondary",
|
|
2586
2600
|
disabled: d.value,
|
|
2587
|
-
onClick: (
|
|
2601
|
+
onClick: (se) => pe(K.id)
|
|
2588
2602
|
}, {
|
|
2589
2603
|
default: t(() => [
|
|
2590
2604
|
b(s(a.value.cancel), 1)
|
|
2591
2605
|
]),
|
|
2592
2606
|
_: 1
|
|
2593
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2594
|
-
], 8,
|
|
2607
|
+
}, 8, ["disabled", "onClick"])) : m("", !0)
|
|
2608
|
+
], 8, pn))), 128))
|
|
2595
2609
|
]))
|
|
2596
2610
|
]),
|
|
2597
2611
|
_: 1
|
|
2598
2612
|
}, 8, ["title"]),
|
|
2599
|
-
v(e(
|
|
2613
|
+
v(e(he), {
|
|
2600
2614
|
title: a.value.delegations,
|
|
2601
2615
|
collapsible: !1,
|
|
2602
2616
|
class: "delegate-group"
|
|
2603
2617
|
}, {
|
|
2604
2618
|
default: t(() => [
|
|
2605
|
-
q.value ? (l(),
|
|
2606
|
-
v(e(
|
|
2619
|
+
q.value ? (l(), S("p", mn, [
|
|
2620
|
+
v(e(Pe), {
|
|
2607
2621
|
width: "12rem",
|
|
2608
2622
|
height: "20px"
|
|
2609
2623
|
})
|
|
2610
|
-
])) : !
|
|
2611
|
-
(l(!0),
|
|
2612
|
-
key:
|
|
2624
|
+
])) : !y.value.length && !c.value ? (l(), S("p", bn, s(a.value.noDelegations), 1)) : (l(), S("ul", gn, [
|
|
2625
|
+
(l(!0), S(le, null, Se(y.value, (K) => (l(), S("li", {
|
|
2626
|
+
key: K.delegation_id
|
|
2613
2627
|
}, [
|
|
2614
2628
|
T("div", null, [
|
|
2615
|
-
v(e(
|
|
2616
|
-
path:
|
|
2629
|
+
v(e(Ee), {
|
|
2630
|
+
path: K.path
|
|
2617
2631
|
}, null, 8, ["path"]),
|
|
2618
|
-
T("p", null, s(a.value.expires) + s(i.value) + s(oe(
|
|
2632
|
+
T("p", null, s(a.value.expires) + s(i.value) + s(oe(K.expires_at)), 1)
|
|
2619
2633
|
]),
|
|
2620
|
-
v(e(
|
|
2634
|
+
v(e(N), {
|
|
2621
2635
|
variant: "secondary",
|
|
2622
2636
|
disabled: d.value,
|
|
2623
|
-
onClick: (
|
|
2637
|
+
onClick: (se) => ue(K.delegation_id)
|
|
2624
2638
|
}, {
|
|
2625
2639
|
default: t(() => [
|
|
2626
2640
|
b(s(a.value.revoke), 1)
|
|
@@ -2636,38 +2650,38 @@ const Zt = ["aria-busy", "aria-label"], jt = { class: "file-toolbar file-locatio
|
|
|
2636
2650
|
_: 1
|
|
2637
2651
|
}, 8, ["title", "description", "aria-busy"]));
|
|
2638
2652
|
}
|
|
2639
|
-
}),
|
|
2640
|
-
function
|
|
2641
|
-
return `${
|
|
2653
|
+
}), wo = /* @__PURE__ */ ge(kn, [["__scopeId", "data-v-080a311e"]]), Be = 5, hn = 38, _n = 42, wn = 36;
|
|
2654
|
+
function Ia(n) {
|
|
2655
|
+
return `${hn + _n * Be + ((n ?? 0) > Be ? wn : 0)}px`;
|
|
2642
2656
|
}
|
|
2643
|
-
const
|
|
2644
|
-
function
|
|
2657
|
+
const Va = () => `synopackageland:saves:${location.pathname}`;
|
|
2658
|
+
function xn(n) {
|
|
2645
2659
|
try {
|
|
2646
|
-
sessionStorage.setItem(
|
|
2660
|
+
sessionStorage.setItem(Va(), String(n));
|
|
2647
2661
|
} catch {
|
|
2648
2662
|
}
|
|
2649
2663
|
}
|
|
2650
|
-
function
|
|
2664
|
+
function Cn() {
|
|
2651
2665
|
try {
|
|
2652
|
-
const n = Number.parseInt(sessionStorage.getItem(
|
|
2666
|
+
const n = Number.parseInt(sessionStorage.getItem(Va()) ?? "");
|
|
2653
2667
|
return Number.isNaN(n) ? void 0 : n;
|
|
2654
2668
|
} catch {
|
|
2655
2669
|
return;
|
|
2656
2670
|
}
|
|
2657
2671
|
}
|
|
2658
|
-
const
|
|
2672
|
+
const $n = { class: "save-alert" }, Sn = { "data-save-error": "" }, En = {
|
|
2659
2673
|
key: 0,
|
|
2660
2674
|
class: "save-help"
|
|
2661
|
-
},
|
|
2675
|
+
}, zn = {
|
|
2662
2676
|
key: 1,
|
|
2663
2677
|
"data-save-operations": ""
|
|
2664
|
-
},
|
|
2678
|
+
}, Pn = ["data-save-job", "title"], Tn = {
|
|
2665
2679
|
key: 0,
|
|
2666
2680
|
class: "save-note"
|
|
2667
|
-
},
|
|
2681
|
+
}, An = {
|
|
2668
2682
|
key: 1,
|
|
2669
2683
|
class: "save-note"
|
|
2670
|
-
},
|
|
2684
|
+
}, Rn = ["data-save-state"], In = { key: 1 }, Vn = /* @__PURE__ */ fe({
|
|
2671
2685
|
__name: "SaveOperations",
|
|
2672
2686
|
props: {
|
|
2673
2687
|
sdk: {},
|
|
@@ -2675,66 +2689,66 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2675
2689
|
initial: {}
|
|
2676
2690
|
},
|
|
2677
2691
|
setup(n, { expose: h }) {
|
|
2678
|
-
const u = n, a = C(() => Je(u.locale)), i = p([]), o = p(!1), r = p(!1),
|
|
2692
|
+
const u = n, a = C(() => Je(u.locale)), i = p([]), o = p(!1), r = p(!1), y = p(), _ = p();
|
|
2679
2693
|
let d = !1, c;
|
|
2680
|
-
const k = (q) => q.state === "copying" && q.code === "CANCEL_REQUESTED",
|
|
2681
|
-
function
|
|
2682
|
-
i.value = q, o.value = !0,
|
|
2694
|
+
const k = (q) => q.state === "copying" && q.code === "CANCEL_REQUESTED", U = (q) => k(q) ? "canceling" : q.state === "committed" && !q.receipt?.path ? "uncertain" : q.state, g = (q) => ["queued", "copying"].includes(q.state) && !k(q);
|
|
2695
|
+
function x(q) {
|
|
2696
|
+
i.value = q, o.value = !0, xn(q.length);
|
|
2683
2697
|
}
|
|
2684
|
-
async function
|
|
2698
|
+
async function R() {
|
|
2685
2699
|
let q;
|
|
2686
2700
|
try {
|
|
2687
2701
|
q = await u.sdk.operations();
|
|
2688
|
-
} catch (
|
|
2689
|
-
if (!d && (_.value = we(
|
|
2690
|
-
throw
|
|
2702
|
+
} catch (Z) {
|
|
2703
|
+
if (!d && (_.value = we(Z))) return;
|
|
2704
|
+
throw Z;
|
|
2691
2705
|
}
|
|
2692
2706
|
if (d || (_.value = void 0), !Array.isArray(q)) throw { code: "unavailable" };
|
|
2693
|
-
d ||
|
|
2707
|
+
d || x(q);
|
|
2694
2708
|
}
|
|
2695
|
-
async function
|
|
2709
|
+
async function w(q) {
|
|
2696
2710
|
if (!(d || r.value)) {
|
|
2697
|
-
r.value = !0,
|
|
2711
|
+
r.value = !0, y.value = void 0;
|
|
2698
2712
|
try {
|
|
2699
2713
|
await q();
|
|
2700
|
-
} catch (
|
|
2701
|
-
d || (i.value = [], o.value = !1,
|
|
2714
|
+
} catch (Z) {
|
|
2715
|
+
d || (i.value = [], o.value = !1, y.value = Z);
|
|
2702
2716
|
} finally {
|
|
2703
2717
|
d || (r.value = !1);
|
|
2704
2718
|
}
|
|
2705
2719
|
}
|
|
2706
2720
|
}
|
|
2707
|
-
const
|
|
2708
|
-
|
|
2709
|
-
const
|
|
2710
|
-
await q(), await
|
|
2711
|
-
}),
|
|
2712
|
-
return h({ refresh:
|
|
2713
|
-
Array.isArray(u.initial) ?
|
|
2714
|
-
i.value.some(
|
|
2721
|
+
const E = () => w(R);
|
|
2722
|
+
Ue(() => _.value, E);
|
|
2723
|
+
const A = (q) => w(async () => {
|
|
2724
|
+
await q(), await R();
|
|
2725
|
+
}), z = (q) => A(() => u.sdk.cancel({ delegation_id: q.delegation_id, job_id: q.job_id })), I = p(1), V = C(() => i.value.slice((I.value - 1) * Be, I.value * Be)), F = C(() => [{ key: "name", label: a.value.file }, { key: "state", label: a.value.status, width: "6.5rem" }, { key: "size", label: a.value.size, width: "6rem", align: "right" }, { key: "location", label: a.value.location, width: "30%" }, { key: "actions", label: "", width: "7.5rem" }]), J = (q) => ({ committed: "success", canceled: "neutral", canceling: "neutral", interrupted: "danger", uncertain: "warning" })[U(q)] ?? "info";
|
|
2726
|
+
return h({ refresh: E }), Ce(() => {
|
|
2727
|
+
Array.isArray(u.initial) ? x(u.initial) : E(), c = setInterval(() => {
|
|
2728
|
+
i.value.some(g) && E();
|
|
2715
2729
|
}, 3e3);
|
|
2716
|
-
}),
|
|
2730
|
+
}), _e(() => {
|
|
2717
2731
|
d = !0, c && clearInterval(c);
|
|
2718
|
-
}), (q,
|
|
2732
|
+
}), (q, Z) => (l(), f(e(he), {
|
|
2719
2733
|
title: a.value.operations,
|
|
2720
2734
|
description: a.value.operationsHelp,
|
|
2721
2735
|
collapsible: !1,
|
|
2722
2736
|
"aria-busy": r.value
|
|
2723
2737
|
}, {
|
|
2724
2738
|
default: t(() => [
|
|
2725
|
-
|
|
2739
|
+
y.value ? (l(), f(e(G), {
|
|
2726
2740
|
key: 0,
|
|
2727
2741
|
tone: "danger",
|
|
2728
2742
|
role: "alert"
|
|
2729
2743
|
}, {
|
|
2730
2744
|
default: t(() => [
|
|
2731
|
-
T("span",
|
|
2732
|
-
T("span",
|
|
2733
|
-
v(e(
|
|
2745
|
+
T("span", $n, [
|
|
2746
|
+
T("span", Sn, s(e(Fe)(y.value, a.value, "save", n.locale)), 1),
|
|
2747
|
+
v(e(N), {
|
|
2734
2748
|
variant: "secondary",
|
|
2735
2749
|
size: "sm",
|
|
2736
2750
|
disabled: r.value,
|
|
2737
|
-
onClick:
|
|
2751
|
+
onClick: E
|
|
2738
2752
|
}, {
|
|
2739
2753
|
default: t(() => [
|
|
2740
2754
|
b(s(a.value.retry), 1)
|
|
@@ -2744,122 +2758,122 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2744
2758
|
])
|
|
2745
2759
|
]),
|
|
2746
2760
|
_: 1
|
|
2747
|
-
})) :
|
|
2761
|
+
})) : m("", !0),
|
|
2748
2762
|
_.value ? (l(), f(e(G), {
|
|
2749
2763
|
key: 1,
|
|
2750
2764
|
tone: "info",
|
|
2751
2765
|
role: "status"
|
|
2752
2766
|
}, {
|
|
2753
2767
|
default: t(() => [
|
|
2754
|
-
b(s(e(
|
|
2768
|
+
b(s(e(Re)(_.value, n.locale)), 1)
|
|
2755
2769
|
]),
|
|
2756
2770
|
_: 1
|
|
2757
|
-
})) :
|
|
2758
|
-
|
|
2771
|
+
})) : m("", !0),
|
|
2772
|
+
ke(q.$slots, "default", {
|
|
2759
2773
|
busy: r.value,
|
|
2760
|
-
run:
|
|
2774
|
+
run: A
|
|
2761
2775
|
}, void 0, !0),
|
|
2762
2776
|
T("div", {
|
|
2763
2777
|
"data-saves-list": "",
|
|
2764
|
-
style: Ca({ minHeight: e(
|
|
2778
|
+
style: Ca({ minHeight: e(Ia)(0) })
|
|
2765
2779
|
}, [
|
|
2766
|
-
o.value && !i.value.length ? (l(),
|
|
2767
|
-
i.value.length ? (l(),
|
|
2768
|
-
v(e(
|
|
2780
|
+
o.value && !i.value.length ? (l(), S("p", En, s(a.value.noOperations), 1)) : m("", !0),
|
|
2781
|
+
i.value.length ? (l(), S("div", zn, [
|
|
2782
|
+
v(e(pt), {
|
|
2769
2783
|
columns: F.value,
|
|
2770
|
-
rows:
|
|
2784
|
+
rows: V.value,
|
|
2771
2785
|
"row-key": "job_id"
|
|
2772
2786
|
}, {
|
|
2773
|
-
"cell-name": t(({ row:
|
|
2787
|
+
"cell-name": t(({ row: $ }) => [
|
|
2774
2788
|
T("span", {
|
|
2775
2789
|
class: "save-name",
|
|
2776
|
-
"data-save-job":
|
|
2777
|
-
title:
|
|
2778
|
-
}, s(
|
|
2779
|
-
|
|
2790
|
+
"data-save-job": $.job_id,
|
|
2791
|
+
title: $.name
|
|
2792
|
+
}, s($.name), 9, Pn),
|
|
2793
|
+
U($) === "uncertain" ? (l(), S("p", Tn, s(a.value.uncertainHelp), 1)) : U($) === "interrupted" ? (l(), S("p", An, s($.code ? e(Fe)({ code: $.code }, a.value) : a.value.interruptedHelp), 1)) : m("", !0)
|
|
2780
2794
|
]),
|
|
2781
|
-
"cell-state": t(({ row:
|
|
2795
|
+
"cell-state": t(({ row: $ }) => [
|
|
2782
2796
|
T("span", {
|
|
2783
|
-
"data-save-state":
|
|
2797
|
+
"data-save-state": U($)
|
|
2784
2798
|
}, [
|
|
2785
2799
|
v(e(Ge), {
|
|
2786
|
-
tone: J(
|
|
2800
|
+
tone: J($)
|
|
2787
2801
|
}, {
|
|
2788
2802
|
default: t(() => [
|
|
2789
|
-
b(s(a.value[
|
|
2803
|
+
b(s(a.value[U($)]), 1)
|
|
2790
2804
|
]),
|
|
2791
2805
|
_: 2
|
|
2792
2806
|
}, 1032, ["tone"])
|
|
2793
|
-
], 8,
|
|
2807
|
+
], 8, Rn)
|
|
2794
2808
|
]),
|
|
2795
|
-
"cell-size": t(({ row:
|
|
2796
|
-
b(s(
|
|
2809
|
+
"cell-size": t(({ row: $ }) => [
|
|
2810
|
+
b(s($.receipt?.size !== void 0 ? e(yt)($.receipt.size) : "—"), 1)
|
|
2797
2811
|
]),
|
|
2798
|
-
"cell-location": t(({ row:
|
|
2799
|
-
|
|
2812
|
+
"cell-location": t(({ row: $ }) => [
|
|
2813
|
+
U($) === "committed" ? (l(), f(e(Ee), {
|
|
2800
2814
|
key: 0,
|
|
2801
|
-
path:
|
|
2802
|
-
}, null, 8, ["path"])) : (l(),
|
|
2815
|
+
path: $.receipt.path
|
|
2816
|
+
}, null, 8, ["path"])) : (l(), S("span", In, "—"))
|
|
2803
2817
|
]),
|
|
2804
|
-
"cell-actions": t(({ row:
|
|
2805
|
-
|
|
2818
|
+
"cell-actions": t(({ row: $ }) => [
|
|
2819
|
+
U($) === "committed" ? (l(), f(e(N), {
|
|
2806
2820
|
key: 0,
|
|
2807
2821
|
variant: "ghost",
|
|
2808
2822
|
size: "sm",
|
|
2809
2823
|
"aria-label": a.value.openFolder,
|
|
2810
2824
|
title: a.value.openFolder,
|
|
2811
|
-
onClick: (
|
|
2825
|
+
onClick: (M) => e(Xa)($.receipt.path)
|
|
2812
2826
|
}, {
|
|
2813
2827
|
default: t(() => [
|
|
2814
|
-
v(e(
|
|
2828
|
+
v(e(xt), {
|
|
2815
2829
|
class: "save-icon",
|
|
2816
2830
|
"aria-hidden": "true"
|
|
2817
2831
|
})
|
|
2818
2832
|
]),
|
|
2819
2833
|
_: 1
|
|
2820
|
-
}, 8, ["aria-label", "title", "onClick"])) :
|
|
2821
|
-
$
|
|
2834
|
+
}, 8, ["aria-label", "title", "onClick"])) : m("", !0),
|
|
2835
|
+
g($) ? (l(), f(e(N), {
|
|
2822
2836
|
key: 1,
|
|
2823
2837
|
variant: "secondary",
|
|
2824
2838
|
size: "sm",
|
|
2825
2839
|
disabled: r.value,
|
|
2826
|
-
onClick: (
|
|
2840
|
+
onClick: (M) => z($)
|
|
2827
2841
|
}, {
|
|
2828
2842
|
default: t(() => [
|
|
2829
2843
|
b(s(a.value.cancel), 1)
|
|
2830
2844
|
]),
|
|
2831
2845
|
_: 1
|
|
2832
|
-
}, 8, ["disabled", "onClick"])) :
|
|
2846
|
+
}, 8, ["disabled", "onClick"])) : m("", !0)
|
|
2833
2847
|
]),
|
|
2834
2848
|
_: 1
|
|
2835
2849
|
}, 8, ["columns", "rows"]),
|
|
2836
|
-
i.value.length > e(
|
|
2850
|
+
i.value.length > e(Be) ? (l(), f(e(mt), {
|
|
2837
2851
|
key: 0,
|
|
2838
2852
|
modelValue: I.value,
|
|
2839
|
-
"onUpdate:modelValue":
|
|
2853
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = ($) => I.value = $),
|
|
2840
2854
|
total: i.value.length,
|
|
2841
|
-
"page-size": e(
|
|
2855
|
+
"page-size": e(Be),
|
|
2842
2856
|
class: "save-pages"
|
|
2843
|
-
}, null, 8, ["modelValue", "total", "page-size"])) :
|
|
2844
|
-
])) :
|
|
2857
|
+
}, null, 8, ["modelValue", "total", "page-size"])) : m("", !0)
|
|
2858
|
+
])) : m("", !0)
|
|
2845
2859
|
], 4)
|
|
2846
2860
|
]),
|
|
2847
2861
|
_: 3
|
|
2848
2862
|
}, 8, ["title", "description", "aria-busy"]));
|
|
2849
2863
|
}
|
|
2850
|
-
}),
|
|
2864
|
+
}), Un = /* @__PURE__ */ ge(Vn, [["__scopeId", "data-v-56f34b37"]]), Dn = { class: "save-alert" }, Bn = { "data-save-error": "" }, Ln = {
|
|
2851
2865
|
key: 0,
|
|
2852
2866
|
class: "save-reason"
|
|
2853
|
-
},
|
|
2867
|
+
}, Nn = {
|
|
2854
2868
|
key: 0,
|
|
2855
2869
|
class: "save-reason"
|
|
2856
|
-
},
|
|
2870
|
+
}, On = { class: "save-alert" }, qn = { class: "save-help" }, Fn = { class: "save-actions" }, Mn = { class: "save-actions" }, Hn = { class: "save-actions" }, Kn = {
|
|
2857
2871
|
key: 1,
|
|
2858
2872
|
class: "save-none"
|
|
2859
|
-
},
|
|
2873
|
+
}, Xn = {
|
|
2860
2874
|
class: "save-danger",
|
|
2861
2875
|
"data-save-danger": ""
|
|
2862
|
-
},
|
|
2876
|
+
}, Gn = /* @__PURE__ */ fe({
|
|
2863
2877
|
__name: "BackgroundSaveSettings",
|
|
2864
2878
|
props: {
|
|
2865
2879
|
sdk: {},
|
|
@@ -2872,79 +2886,79 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2872
2886
|
},
|
|
2873
2887
|
emits: ["authorized", "confirmed", "destinations"],
|
|
2874
2888
|
setup(n, { expose: h, emit: u }) {
|
|
2875
|
-
const a = n, i = u, o = C(() => Je(a.locale)), r = C(() =>
|
|
2889
|
+
const a = n, i = u, o = C(() => Je(a.locale)), r = C(() => Le(a.locale)), y = Ve(Me, void 0), _ = C(() => a.ctx ?? (y?.call ? { call: y.call.bind(y) } : void 0)), d = Pa({ get admin() {
|
|
2876
2890
|
return a.admin;
|
|
2877
2891
|
}, get locale() {
|
|
2878
2892
|
return a.locale;
|
|
2879
2893
|
}, get ctx() {
|
|
2880
2894
|
return _.value;
|
|
2881
2895
|
} }, () => {
|
|
2882
|
-
|
|
2883
|
-
}), { password: c, busy: k, confirming:
|
|
2896
|
+
$.value = !1, i("confirmed"), re();
|
|
2897
|
+
}), { password: c, busy: k, confirming: U, failure: g, scope: x, chosen: R, options: w, dynamic: E, canConfirm: A, changed: z } = d, I = p(), V = p([]), F = p(!1), J = p(!1), q = p(), Z = p(!1), $ = p(!1), M = p(!1), Q = p(""), ue = p(!1), pe = p(), ye = p(), j = Ia(Cn()), oe = p(), ae = C(() => oe.value ?? (F.value ? we(d.status.value) : void 0));
|
|
2884
2898
|
let H = !1;
|
|
2885
|
-
async function
|
|
2886
|
-
let
|
|
2887
|
-
const
|
|
2899
|
+
async function K() {
|
|
2900
|
+
let ie;
|
|
2901
|
+
const me = I.value ? void 0 : a.sdk.operations().catch(() => {
|
|
2888
2902
|
});
|
|
2889
2903
|
try {
|
|
2890
|
-
|
|
2904
|
+
ie = await a.sdk.status();
|
|
2891
2905
|
} catch (qe) {
|
|
2892
|
-
const
|
|
2893
|
-
if (!
|
|
2894
|
-
H || (oe.value =
|
|
2906
|
+
const ea = we(qe);
|
|
2907
|
+
if (!ea && qe?.code !== "EXECUTOR_UNAVAILABLE") throw qe;
|
|
2908
|
+
H || (oe.value = ea, F.value = !ea, I.value = void 0, V.value = []);
|
|
2895
2909
|
return;
|
|
2896
2910
|
}
|
|
2897
|
-
const [te,
|
|
2898
|
-
H || (Array.isArray(
|
|
2911
|
+
const [te, De] = await Promise.all([Promise.all((a.picker?.keys ?? []).map((qe) => a.sdk.destination(qe))), me]);
|
|
2912
|
+
H || (Array.isArray(De) && (ye.value = De), oe.value = void 0, F.value = !1, I.value = ie, V.value = te, i("destinations", te));
|
|
2899
2913
|
}
|
|
2900
|
-
async function
|
|
2914
|
+
async function se(ie) {
|
|
2901
2915
|
if (!(H || J.value)) {
|
|
2902
|
-
J.value = !0, q.value = void 0,
|
|
2916
|
+
J.value = !0, q.value = void 0, Z.value = !1;
|
|
2903
2917
|
try {
|
|
2904
|
-
await
|
|
2905
|
-
} catch (
|
|
2906
|
-
H || (q.value =
|
|
2918
|
+
await ie();
|
|
2919
|
+
} catch (me) {
|
|
2920
|
+
H || (q.value = me);
|
|
2907
2921
|
} finally {
|
|
2908
2922
|
H || (J.value = !1);
|
|
2909
2923
|
}
|
|
2910
2924
|
}
|
|
2911
2925
|
}
|
|
2912
|
-
const
|
|
2926
|
+
const re = () => se(K), Ie = () => Promise.all([re(), pe.value?.refresh(), a.admin ? d.refresh() : void 0]).then(() => {
|
|
2913
2927
|
});
|
|
2914
|
-
function
|
|
2915
|
-
i("authorized",
|
|
2928
|
+
function xe(ie) {
|
|
2929
|
+
i("authorized", ie), re();
|
|
2916
2930
|
}
|
|
2917
|
-
function
|
|
2918
|
-
H || (q.value =
|
|
2931
|
+
function Y(ie) {
|
|
2932
|
+
H || (q.value = ie, Z.value = !0);
|
|
2919
2933
|
}
|
|
2920
|
-
const
|
|
2921
|
-
if ((await a.sdk.revoke({ delegation_id:
|
|
2922
|
-
await
|
|
2923
|
-
}),
|
|
2934
|
+
const ee = C(() => Z.value ? a.pickerErrorText?.(q.value) ?? Fe(q.value, o.value, "select", a.locale) : Fe(q.value, o.value, "save", a.locale)), ne = (ie) => se(async () => {
|
|
2935
|
+
if ((await a.sdk.revoke({ delegation_id: ie }))?.revoked !== !0) throw { code: "commit-uncertain" };
|
|
2936
|
+
await K();
|
|
2937
|
+
}), ve = () => se(async () => {
|
|
2924
2938
|
if (!a.admin || !I.value) return;
|
|
2925
|
-
const
|
|
2926
|
-
if ((
|
|
2927
|
-
await
|
|
2928
|
-
}),
|
|
2929
|
-
const
|
|
2930
|
-
return
|
|
2931
|
-
}),
|
|
2932
|
-
function
|
|
2933
|
-
|
|
2934
|
-
}
|
|
2935
|
-
return
|
|
2936
|
-
|
|
2937
|
-
}),
|
|
2939
|
+
const ie = I.value.disabled;
|
|
2940
|
+
if ((ie ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !ie) throw { code: "commit-uncertain" };
|
|
2941
|
+
await K();
|
|
2942
|
+
}), $e = C(() => I.value?.selection), B = C(() => !I.value && !F.value && !q.value && !ae.value), L = C(() => F.value && (!a.admin || d.status.value?.state !== "blocked") || I.value?.scopeMode === "install-selected" && !$e.value), O = C(() => a.admin && F.value && d.status.value?.state === "blocked" && !d.status.value.retry), W = C(() => !!I.value && !L.value && !I.value.disabled), de = C(() => a.admin && (L.value || F.value && !!d.status.value?.retry)), P = C(() => a.picker ? $e.value ? Ga(a.picker.provider, $e.value.root) : I.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider : void 0), X = C(() => !x.value && !d.error.value), D = (ie) => a.picker?.labels?.[ie] ?? o.value.folder, ce = { password_rejected: "passwordRejected", password_required: "passwordRequired", password_confirm_failed: "passwordConfirmFailed" }, Da = C(() => {
|
|
2943
|
+
const ie = g.value;
|
|
2944
|
+
return ie ? "confirm" in ie ? r.value[ce[ie.confirm]] : ie.code === "session_ended" ? r.value.session : d.explain(ie) ?? r.value.setupError : "";
|
|
2945
|
+
}), Ba = C(() => k.value || !c.value || !A.value || $.value && !z.value);
|
|
2946
|
+
function La() {
|
|
2947
|
+
$.value = !1, c.value = "", g.value = void 0, R.value = x.value?.selection?.scope ?? "";
|
|
2948
|
+
}
|
|
2949
|
+
return Ue(() => ae.value, () => Promise.all([re(), a.admin ? d.refresh() : void 0])), h({ refresh: Ie }), Ce(() => {
|
|
2950
|
+
re();
|
|
2951
|
+
}), _e(() => {
|
|
2938
2952
|
H = !0;
|
|
2939
|
-
}), (
|
|
2953
|
+
}), (ie, me) => (l(), f(e(he), {
|
|
2940
2954
|
title: n.title ?? o.value.title,
|
|
2941
2955
|
description: o.value.help,
|
|
2942
2956
|
collapsible: !1,
|
|
2943
|
-
"aria-busy": J.value || e(k) ||
|
|
2957
|
+
"aria-busy": J.value || e(k) || B.value,
|
|
2944
2958
|
class: "background-save-settings"
|
|
2945
2959
|
}, Xe({
|
|
2946
2960
|
default: t(() => [
|
|
2947
|
-
|
|
2961
|
+
B.value ? (l(), S(le, { key: 0 }, [
|
|
2948
2962
|
n.admin ? (l(), f(e(be), {
|
|
2949
2963
|
key: 0,
|
|
2950
2964
|
label: o.value.scopeRow,
|
|
@@ -2952,28 +2966,28 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2952
2966
|
"data-placeholder-row": ""
|
|
2953
2967
|
}, {
|
|
2954
2968
|
default: t(() => [
|
|
2955
|
-
v(e(
|
|
2969
|
+
v(e(Pe), {
|
|
2956
2970
|
width: "20rem",
|
|
2957
2971
|
height: "28px"
|
|
2958
2972
|
})
|
|
2959
2973
|
]),
|
|
2960
2974
|
_: 1
|
|
2961
|
-
}, 8, ["label"])) :
|
|
2962
|
-
(l(!0),
|
|
2975
|
+
}, 8, ["label"])) : m("", !0),
|
|
2976
|
+
(l(!0), S(le, null, Se(n.picker?.keys ?? [], (te) => (l(), f(e(be), {
|
|
2963
2977
|
key: te,
|
|
2964
|
-
label:
|
|
2978
|
+
label: D(te),
|
|
2965
2979
|
"field-width": "full",
|
|
2966
2980
|
"data-placeholder-row": ""
|
|
2967
2981
|
}, {
|
|
2968
2982
|
default: t(() => [
|
|
2969
|
-
v(e(
|
|
2983
|
+
v(e(Pe), {
|
|
2970
2984
|
width: "20rem",
|
|
2971
2985
|
height: "28px"
|
|
2972
2986
|
})
|
|
2973
2987
|
]),
|
|
2974
2988
|
_: 1
|
|
2975
2989
|
}, 8, ["label"]))), 128)),
|
|
2976
|
-
v(e(
|
|
2990
|
+
v(e(he), {
|
|
2977
2991
|
title: o.value.operations,
|
|
2978
2992
|
description: o.value.operationsHelp,
|
|
2979
2993
|
collapsible: !1
|
|
@@ -2983,7 +2997,7 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2983
2997
|
"data-saves-placeholder": "",
|
|
2984
2998
|
style: Ca({ height: e(j) })
|
|
2985
2999
|
}, [
|
|
2986
|
-
v(e(
|
|
3000
|
+
v(e(Pe), { height: "100%" })
|
|
2987
3001
|
], 4)
|
|
2988
3002
|
]),
|
|
2989
3003
|
_: 1
|
|
@@ -2994,23 +3008,23 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
2994
3008
|
role: "status"
|
|
2995
3009
|
}, {
|
|
2996
3010
|
default: t(() => [
|
|
2997
|
-
b(s(e(
|
|
3011
|
+
b(s(e(Re)(ae.value, n.locale)), 1)
|
|
2998
3012
|
]),
|
|
2999
3013
|
_: 1
|
|
3000
|
-
})) : (l(),
|
|
3014
|
+
})) : (l(), S(le, { key: 2 }, [
|
|
3001
3015
|
q.value ? (l(), f(e(G), {
|
|
3002
3016
|
key: 0,
|
|
3003
3017
|
tone: "danger",
|
|
3004
3018
|
role: "alert"
|
|
3005
3019
|
}, {
|
|
3006
3020
|
default: t(() => [
|
|
3007
|
-
T("span",
|
|
3008
|
-
T("span",
|
|
3009
|
-
v(e(
|
|
3021
|
+
T("span", Dn, [
|
|
3022
|
+
T("span", Bn, s(ee.value), 1),
|
|
3023
|
+
v(e(N), {
|
|
3010
3024
|
variant: "secondary",
|
|
3011
3025
|
size: "sm",
|
|
3012
3026
|
disabled: J.value,
|
|
3013
|
-
onClick:
|
|
3027
|
+
onClick: re
|
|
3014
3028
|
}, {
|
|
3015
3029
|
default: t(() => [
|
|
3016
3030
|
b(s(o.value.retry), 1)
|
|
@@ -3020,28 +3034,28 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3020
3034
|
])
|
|
3021
3035
|
]),
|
|
3022
3036
|
_: 1
|
|
3023
|
-
})) :
|
|
3024
|
-
e(
|
|
3037
|
+
})) : m("", !0),
|
|
3038
|
+
e(g) ? (l(), f(e(G), {
|
|
3025
3039
|
key: 1,
|
|
3026
3040
|
tone: "danger",
|
|
3027
3041
|
role: "alert"
|
|
3028
3042
|
}, {
|
|
3029
3043
|
default: t(() => [
|
|
3030
|
-
b(s(
|
|
3031
|
-
"reason" in e(
|
|
3044
|
+
b(s(Da.value), 1),
|
|
3045
|
+
"reason" in e(g) && e(g).reason ? (l(), S("span", Ln, s(e(g).reason), 1)) : m("", !0)
|
|
3032
3046
|
]),
|
|
3033
3047
|
_: 1
|
|
3034
|
-
})) :
|
|
3048
|
+
})) : m("", !0),
|
|
3035
3049
|
O.value ? (l(), f(e(G), {
|
|
3036
3050
|
key: 2,
|
|
3037
3051
|
tone: "warning"
|
|
3038
3052
|
}, {
|
|
3039
3053
|
default: t(() => [
|
|
3040
3054
|
b(s(e(d).explain(e(d).status.value) ?? r.value.blocked), 1),
|
|
3041
|
-
e(d).status.value?.reason ? (l(),
|
|
3055
|
+
e(d).status.value?.reason ? (l(), S("span", Nn, s(e(d).status.value.reason), 1)) : m("", !0)
|
|
3042
3056
|
]),
|
|
3043
3057
|
_: 1
|
|
3044
|
-
})) :
|
|
3058
|
+
})) : L.value && !n.admin ? (l(), f(e(G), {
|
|
3045
3059
|
key: 3,
|
|
3046
3060
|
tone: "info"
|
|
3047
3061
|
}, {
|
|
@@ -3049,31 +3063,31 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3049
3063
|
b(s(o.value.needs), 1)
|
|
3050
3064
|
]),
|
|
3051
3065
|
_: 1
|
|
3052
|
-
})) :
|
|
3066
|
+
})) : m("", !0),
|
|
3053
3067
|
I.value?.disabled ? (l(), f(e(G), {
|
|
3054
3068
|
key: 4,
|
|
3055
3069
|
tone: "warning"
|
|
3056
3070
|
}, {
|
|
3057
3071
|
default: t(() => [
|
|
3058
|
-
T("span",
|
|
3072
|
+
T("span", On, [
|
|
3059
3073
|
T("span", null, s(o.value.disabled), 1),
|
|
3060
|
-
n.admin ? (l(), f(e(
|
|
3074
|
+
n.admin ? (l(), f(e(N), {
|
|
3061
3075
|
key: 0,
|
|
3062
3076
|
variant: "secondary",
|
|
3063
3077
|
size: "sm",
|
|
3064
3078
|
disabled: J.value,
|
|
3065
|
-
onClick:
|
|
3079
|
+
onClick: ve
|
|
3066
3080
|
}, {
|
|
3067
3081
|
default: t(() => [
|
|
3068
3082
|
b(s(o.value.enable), 1)
|
|
3069
3083
|
]),
|
|
3070
3084
|
_: 1
|
|
3071
|
-
}, 8, ["disabled"])) :
|
|
3085
|
+
}, 8, ["disabled"])) : m("", !0)
|
|
3072
3086
|
])
|
|
3073
3087
|
]),
|
|
3074
3088
|
_: 1
|
|
3075
|
-
})) :
|
|
3076
|
-
W.value &&
|
|
3089
|
+
})) : m("", !0),
|
|
3090
|
+
W.value && V.value.some((te) => te.status === "reselection-required") ? (l(), f(e(G), {
|
|
3077
3091
|
key: 5,
|
|
3078
3092
|
tone: "warning"
|
|
3079
3093
|
}, {
|
|
@@ -3081,39 +3095,39 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3081
3095
|
b(s(o.value.reselect), 1)
|
|
3082
3096
|
]),
|
|
3083
3097
|
_: 1
|
|
3084
|
-
})) :
|
|
3085
|
-
|
|
3098
|
+
})) : m("", !0),
|
|
3099
|
+
de.value || $.value ? (l(), f(e(Oe), {
|
|
3086
3100
|
key: 6,
|
|
3087
3101
|
direction: "vertical",
|
|
3088
3102
|
class: "save-form",
|
|
3089
3103
|
onSubmit: Ne(e(d).authorize, ["prevent"])
|
|
3090
3104
|
}, {
|
|
3091
3105
|
default: t(() => [
|
|
3092
|
-
T("p",
|
|
3093
|
-
e(
|
|
3106
|
+
T("p", qn, s($.value ? o.value.changeHelp : o.value.approveHelp), 1),
|
|
3107
|
+
e(E) ? (l(), f(e(be), {
|
|
3094
3108
|
key: 0,
|
|
3095
3109
|
label: o.value.scopeRow,
|
|
3096
3110
|
"data-save-row": "scope"
|
|
3097
3111
|
}, {
|
|
3098
3112
|
default: t(() => [
|
|
3099
|
-
v(e(
|
|
3113
|
+
v(e(ra), {
|
|
3100
3114
|
id: "save-scope",
|
|
3101
|
-
modelValue: e(
|
|
3102
|
-
"onUpdate:modelValue":
|
|
3103
|
-
options: e(
|
|
3115
|
+
modelValue: e(R),
|
|
3116
|
+
"onUpdate:modelValue": me[0] || (me[0] = (te) => Ke(R) ? R.value = te : null),
|
|
3117
|
+
options: e(w),
|
|
3104
3118
|
disabled: e(k)
|
|
3105
3119
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
3106
3120
|
]),
|
|
3107
3121
|
_: 1
|
|
3108
|
-
}, 8, ["label"])) :
|
|
3122
|
+
}, 8, ["label"])) : m("", !0),
|
|
3109
3123
|
v(e(be), {
|
|
3110
3124
|
label: o.value.password
|
|
3111
3125
|
}, {
|
|
3112
3126
|
default: t(() => [
|
|
3113
|
-
v(e(
|
|
3127
|
+
v(e(Ae), {
|
|
3114
3128
|
id: "save-password",
|
|
3115
3129
|
modelValue: e(c),
|
|
3116
|
-
"onUpdate:modelValue":
|
|
3130
|
+
"onUpdate:modelValue": me[1] || (me[1] = (te) => Ke(c) ? c.value = te : null),
|
|
3117
3131
|
type: "password",
|
|
3118
3132
|
autocomplete: "current-password",
|
|
3119
3133
|
disabled: e(k)
|
|
@@ -3123,84 +3137,84 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3123
3137
|
}, 8, ["label"]),
|
|
3124
3138
|
v(e(be), {
|
|
3125
3139
|
label: "",
|
|
3126
|
-
description: e(
|
|
3140
|
+
description: e(U) ? r.value.confirmingHelp : void 0
|
|
3127
3141
|
}, {
|
|
3128
3142
|
default: t(() => [
|
|
3129
|
-
T("div",
|
|
3130
|
-
v(e(
|
|
3143
|
+
T("div", Fn, [
|
|
3144
|
+
v(e(N), {
|
|
3131
3145
|
type: "submit",
|
|
3132
3146
|
variant: "primary",
|
|
3133
|
-
loading: e(
|
|
3134
|
-
disabled:
|
|
3147
|
+
loading: e(U),
|
|
3148
|
+
disabled: Ba.value
|
|
3135
3149
|
}, {
|
|
3136
3150
|
default: t(() => [
|
|
3137
|
-
b(s(
|
|
3151
|
+
b(s($.value ? o.value.confirmChange : o.value.approve), 1)
|
|
3138
3152
|
]),
|
|
3139
3153
|
_: 1
|
|
3140
3154
|
}, 8, ["loading", "disabled"]),
|
|
3141
|
-
|
|
3155
|
+
$.value ? (l(), f(e(N), {
|
|
3142
3156
|
key: 0,
|
|
3143
3157
|
type: "button",
|
|
3144
3158
|
variant: "secondary",
|
|
3145
3159
|
disabled: e(k),
|
|
3146
|
-
onClick:
|
|
3160
|
+
onClick: La
|
|
3147
3161
|
}, {
|
|
3148
3162
|
default: t(() => [
|
|
3149
3163
|
b(s(o.value.cancelChange), 1)
|
|
3150
3164
|
]),
|
|
3151
3165
|
_: 1
|
|
3152
|
-
}, 8, ["disabled"])) :
|
|
3166
|
+
}, 8, ["disabled"])) : m("", !0)
|
|
3153
3167
|
])
|
|
3154
3168
|
]),
|
|
3155
3169
|
_: 1
|
|
3156
3170
|
}, 8, ["description"])
|
|
3157
3171
|
]),
|
|
3158
3172
|
_: 1
|
|
3159
|
-
}, 8, ["onSubmit"])) : n.admin && I.value?.scopeMode === "install-selected" &&
|
|
3173
|
+
}, 8, ["onSubmit"])) : n.admin && I.value?.scopeMode === "install-selected" && $e.value ? (l(), f(e(be), {
|
|
3160
3174
|
key: 7,
|
|
3161
3175
|
label: o.value.scopeRow,
|
|
3162
3176
|
"field-width": "full",
|
|
3163
3177
|
"data-save-row": "scope"
|
|
3164
3178
|
}, {
|
|
3165
3179
|
default: t(() => [
|
|
3166
|
-
T("div",
|
|
3167
|
-
v(e(
|
|
3168
|
-
path:
|
|
3180
|
+
T("div", Mn, [
|
|
3181
|
+
v(e(Ee), {
|
|
3182
|
+
path: $e.value.root
|
|
3169
3183
|
}, null, 8, ["path"]),
|
|
3170
|
-
e(
|
|
3184
|
+
e(E) || X.value ? (l(), f(e(N), {
|
|
3171
3185
|
key: 0,
|
|
3172
3186
|
variant: "secondary",
|
|
3173
3187
|
size: "sm",
|
|
3174
|
-
disabled: J.value || e(k) || !e(
|
|
3175
|
-
onClick:
|
|
3188
|
+
disabled: J.value || e(k) || !e(E),
|
|
3189
|
+
onClick: me[2] || (me[2] = (te) => $.value = !0)
|
|
3176
3190
|
}, {
|
|
3177
3191
|
default: t(() => [
|
|
3178
3192
|
b(s(o.value.change), 1)
|
|
3179
3193
|
]),
|
|
3180
3194
|
_: 1
|
|
3181
|
-
}, 8, ["disabled"])) :
|
|
3195
|
+
}, 8, ["disabled"])) : m("", !0)
|
|
3182
3196
|
])
|
|
3183
3197
|
]),
|
|
3184
3198
|
_: 1
|
|
3185
|
-
}, 8, ["label"])) :
|
|
3186
|
-
W.value ? (l(!0),
|
|
3199
|
+
}, 8, ["label"])) : m("", !0),
|
|
3200
|
+
W.value ? (l(!0), S(le, { key: 8 }, Se(V.value, (te) => (l(), f(e(be), {
|
|
3187
3201
|
key: te.key,
|
|
3188
|
-
label:
|
|
3202
|
+
label: D(te.key),
|
|
3189
3203
|
"field-width": "full",
|
|
3190
3204
|
"data-save-row": "folder"
|
|
3191
3205
|
}, {
|
|
3192
3206
|
default: t(() => [
|
|
3193
|
-
T("div",
|
|
3194
|
-
te.status === "active" && te.destination ? (l(), f(e(
|
|
3207
|
+
T("div", Hn, [
|
|
3208
|
+
te.status === "active" && te.destination ? (l(), f(e(Ee), {
|
|
3195
3209
|
key: 0,
|
|
3196
3210
|
path: te.destination.path
|
|
3197
|
-
}, null, 8, ["path"])) : (l(),
|
|
3198
|
-
v(e(
|
|
3211
|
+
}, null, 8, ["path"])) : (l(), S("span", Kn, s(o.value.folderNone), 1)),
|
|
3212
|
+
v(e(N), {
|
|
3199
3213
|
variant: "secondary",
|
|
3200
3214
|
size: "sm",
|
|
3201
3215
|
disabled: J.value || !P.value,
|
|
3202
|
-
onClick: (
|
|
3203
|
-
|
|
3216
|
+
onClick: (De) => {
|
|
3217
|
+
Q.value = te.key, M.value = !0;
|
|
3204
3218
|
}
|
|
3205
3219
|
}, {
|
|
3206
3220
|
default: t(() => [
|
|
@@ -3208,72 +3222,72 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3208
3222
|
]),
|
|
3209
3223
|
_: 1
|
|
3210
3224
|
}, 8, ["disabled", "onClick"]),
|
|
3211
|
-
te.status === "active" && te.destination ? (l(), f(e(
|
|
3225
|
+
te.status === "active" && te.destination ? (l(), f(e(N), {
|
|
3212
3226
|
key: 2,
|
|
3213
3227
|
variant: "ghost",
|
|
3214
3228
|
size: "sm",
|
|
3215
3229
|
disabled: J.value,
|
|
3216
|
-
onClick: (
|
|
3230
|
+
onClick: (De) => ne(te.destination.id)
|
|
3217
3231
|
}, {
|
|
3218
3232
|
default: t(() => [
|
|
3219
3233
|
b(s(o.value.revoke), 1)
|
|
3220
3234
|
]),
|
|
3221
3235
|
_: 1
|
|
3222
|
-
}, 8, ["disabled", "onClick"])) :
|
|
3236
|
+
}, 8, ["disabled", "onClick"])) : m("", !0)
|
|
3223
3237
|
])
|
|
3224
3238
|
]),
|
|
3225
3239
|
_: 2
|
|
3226
|
-
}, 1032, ["label"]))), 128)) :
|
|
3240
|
+
}, 1032, ["label"]))), 128)) : m("", !0)
|
|
3227
3241
|
], 64)),
|
|
3228
|
-
I.value && !
|
|
3242
|
+
I.value && !L.value ? (l(), f(Un, {
|
|
3229
3243
|
key: 3,
|
|
3230
3244
|
ref_key: "operations",
|
|
3231
|
-
ref:
|
|
3245
|
+
ref: pe,
|
|
3232
3246
|
sdk: n.sdk,
|
|
3233
3247
|
locale: n.locale,
|
|
3234
|
-
initial:
|
|
3248
|
+
initial: ye.value
|
|
3235
3249
|
}, {
|
|
3236
|
-
default: t(({ busy: te, run:
|
|
3237
|
-
|
|
3250
|
+
default: t(({ busy: te, run: De }) => [
|
|
3251
|
+
ke(ie.$slots, "operations", {
|
|
3238
3252
|
busy: te,
|
|
3239
|
-
run:
|
|
3253
|
+
run: De
|
|
3240
3254
|
}, void 0, !0)
|
|
3241
3255
|
]),
|
|
3242
3256
|
_: 3
|
|
3243
|
-
}, 8, ["sdk", "locale", "initial"])) :
|
|
3244
|
-
P.value ? (l(), f(
|
|
3245
|
-
key:
|
|
3246
|
-
open:
|
|
3247
|
-
"onUpdate:open":
|
|
3257
|
+
}, 8, ["sdk", "locale", "initial"])) : m("", !0),
|
|
3258
|
+
P.value ? (l(), f(je, {
|
|
3259
|
+
key: $e.value?.scope,
|
|
3260
|
+
open: M.value,
|
|
3261
|
+
"onUpdate:open": me[3] || (me[3] = (te) => M.value = te),
|
|
3248
3262
|
provider: P.value,
|
|
3249
3263
|
locale: n.locale,
|
|
3250
3264
|
mode: "folder",
|
|
3251
|
-
destination: { key:
|
|
3252
|
-
onAuthorized:
|
|
3253
|
-
onRefused:
|
|
3265
|
+
destination: { key: Q.value, selectDestination: n.sdk.selectDestination },
|
|
3266
|
+
onAuthorized: xe,
|
|
3267
|
+
onRefused: Y,
|
|
3254
3268
|
"error-text": n.pickerErrorText
|
|
3255
|
-
}, null, 8, ["open", "provider", "locale", "destination", "error-text"])) :
|
|
3256
|
-
v(e(
|
|
3257
|
-
open:
|
|
3269
|
+
}, null, 8, ["open", "provider", "locale", "destination", "error-text"])) : m("", !0),
|
|
3270
|
+
v(e(bt), {
|
|
3271
|
+
open: ue.value,
|
|
3258
3272
|
kind: "confirm",
|
|
3259
3273
|
title: o.value.disableConfirm,
|
|
3260
3274
|
message: o.value.disableHelp,
|
|
3261
|
-
options: { tone: "danger", confirmLabel: o.value.disable, cancelLabel: o.value.cancelChange, doConfirm:
|
|
3262
|
-
onSettle:
|
|
3275
|
+
options: { tone: "danger", confirmLabel: o.value.disable, cancelLabel: o.value.cancelChange, doConfirm: ve },
|
|
3276
|
+
onSettle: me[5] || (me[5] = (te) => ue.value = !1)
|
|
3263
3277
|
}, null, 8, ["open", "title", "message", "options"])
|
|
3264
3278
|
]),
|
|
3265
3279
|
_: 2
|
|
3266
3280
|
}, [
|
|
3267
|
-
n.admin && (W.value ||
|
|
3281
|
+
n.admin && (W.value || B.value) && !$.value ? {
|
|
3268
3282
|
name: "footer",
|
|
3269
3283
|
fn: t(() => [
|
|
3270
|
-
T("div",
|
|
3284
|
+
T("div", Xn, [
|
|
3271
3285
|
T("p", null, s(o.value.disableHelp), 1),
|
|
3272
|
-
v(e(
|
|
3286
|
+
v(e(N), {
|
|
3273
3287
|
variant: "secondary",
|
|
3274
3288
|
size: "sm",
|
|
3275
|
-
disabled: J.value ||
|
|
3276
|
-
onClick:
|
|
3289
|
+
disabled: J.value || B.value,
|
|
3290
|
+
onClick: me[4] || (me[4] = (te) => ue.value = !0)
|
|
3277
3291
|
}, {
|
|
3278
3292
|
default: t(() => [
|
|
3279
3293
|
b(s(o.value.disable), 1)
|
|
@@ -3286,10 +3300,10 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3286
3300
|
} : void 0
|
|
3287
3301
|
]), 1032, ["title", "description", "aria-busy"]));
|
|
3288
3302
|
}
|
|
3289
|
-
}),
|
|
3303
|
+
}), Wn = /* @__PURE__ */ ge(Gn, [["__scopeId", "data-v-d2fd6882"]]), Jn = { class: "background-save-panel" }, Yn = {
|
|
3290
3304
|
key: 0,
|
|
3291
3305
|
class: "save-example"
|
|
3292
|
-
},
|
|
3306
|
+
}, Qn = { class: "save-help" }, Zn = { class: "save-actions" }, jn = /* @__PURE__ */ fe({
|
|
3293
3307
|
__name: "BackgroundSavePanel",
|
|
3294
3308
|
props: {
|
|
3295
3309
|
sdk: {},
|
|
@@ -3303,14 +3317,14 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3303
3317
|
},
|
|
3304
3318
|
emits: ["authorized"],
|
|
3305
3319
|
setup(n, { expose: h, emit: u }) {
|
|
3306
|
-
const a = n, i = u, o = C(() => Je(a.locale)), r = C(() => wa(a.locale)),
|
|
3307
|
-
function c(
|
|
3308
|
-
const
|
|
3309
|
-
return a.sdk.exportExample({ key:
|
|
3310
|
-
}
|
|
3311
|
-
const k = (
|
|
3312
|
-
return h({ refresh: d }), (
|
|
3313
|
-
v(
|
|
3320
|
+
const a = n, i = u, o = C(() => Je(a.locale)), r = C(() => wa(a.locale)), y = p([]), _ = p(), d = () => _.value?.refresh() ?? Promise.resolve();
|
|
3321
|
+
function c(U) {
|
|
3322
|
+
const g = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (x) => x.toString(16).padStart(2, "0")).join("");
|
|
3323
|
+
return a.sdk.exportExample({ key: U, job_id: g });
|
|
3324
|
+
}
|
|
3325
|
+
const k = (U) => a.picker?.labels?.[U] ? `${o.value.example}${r.value}${a.picker.labels[U]}` : o.value.example;
|
|
3326
|
+
return h({ refresh: d }), (U, g) => (l(), S("div", Jn, [
|
|
3327
|
+
v(Wn, {
|
|
3314
3328
|
ref_key: "settings",
|
|
3315
3329
|
ref: _,
|
|
3316
3330
|
sdk: n.sdk,
|
|
@@ -3320,38 +3334,38 @@ const wn = { class: "save-alert" }, xn = { "data-save-error": "" }, Cn = {
|
|
|
3320
3334
|
picker: n.picker,
|
|
3321
3335
|
ctx: n.ctx,
|
|
3322
3336
|
"picker-error-text": n.pickerErrorText,
|
|
3323
|
-
onAuthorized:
|
|
3324
|
-
onDestinations:
|
|
3337
|
+
onAuthorized: g[0] || (g[0] = (x) => i("authorized", x)),
|
|
3338
|
+
onDestinations: g[1] || (g[1] = (x) => y.value = x.filter((R) => R.status === "active"))
|
|
3325
3339
|
}, {
|
|
3326
|
-
operations: t(({ busy:
|
|
3327
|
-
n.sampleSave &&
|
|
3328
|
-
T("p",
|
|
3329
|
-
T("div",
|
|
3330
|
-
(l(!0),
|
|
3331
|
-
key:
|
|
3340
|
+
operations: t(({ busy: x, run: R }) => [
|
|
3341
|
+
n.sampleSave && y.value.length ? (l(), S("div", Yn, [
|
|
3342
|
+
T("p", Qn, s(o.value.exampleHelp), 1),
|
|
3343
|
+
T("div", Zn, [
|
|
3344
|
+
(l(!0), S(le, null, Se(y.value, (w) => (l(), f(e(N), {
|
|
3345
|
+
key: w.key,
|
|
3332
3346
|
variant: "secondary",
|
|
3333
|
-
disabled:
|
|
3334
|
-
onClick: (
|
|
3347
|
+
disabled: x,
|
|
3348
|
+
onClick: (E) => R(() => c(w.key))
|
|
3335
3349
|
}, {
|
|
3336
3350
|
default: t(() => [
|
|
3337
|
-
b(s(k(
|
|
3351
|
+
b(s(k(w.key)), 1)
|
|
3338
3352
|
]),
|
|
3339
3353
|
_: 2
|
|
3340
3354
|
}, 1032, ["disabled", "onClick"]))), 128))
|
|
3341
3355
|
])
|
|
3342
|
-
])) :
|
|
3356
|
+
])) : m("", !0)
|
|
3343
3357
|
]),
|
|
3344
3358
|
_: 1
|
|
3345
3359
|
}, 8, ["sdk", "admin", "locale", "title", "picker", "ctx", "picker-error-text"])
|
|
3346
3360
|
]));
|
|
3347
3361
|
}
|
|
3348
|
-
}),
|
|
3349
|
-
function
|
|
3350
|
-
const n =
|
|
3362
|
+
}), xo = /* @__PURE__ */ ge(jn, [["__scopeId", "data-v-55770b8c"]]), Ua = /* @__PURE__ */ Symbol("authorization");
|
|
3363
|
+
function eo() {
|
|
3364
|
+
const n = Ve(Ua, void 0);
|
|
3351
3365
|
if (!n) throw Error("authorization controls must be placed inside AuthorizationGate");
|
|
3352
3366
|
return n;
|
|
3353
3367
|
}
|
|
3354
|
-
const
|
|
3368
|
+
const ao = { class: "authorization-content" }, to = ["aria-busy", "data-authorization-state"], lo = { class: "authorization-body" }, no = /* @__PURE__ */ fe({
|
|
3355
3369
|
__name: "AuthorizationGate",
|
|
3356
3370
|
props: {
|
|
3357
3371
|
ctx: {},
|
|
@@ -3359,98 +3373,98 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3359
3373
|
},
|
|
3360
3374
|
emits: ["ready"],
|
|
3361
3375
|
setup(n, { emit: h }) {
|
|
3362
|
-
const u = n, a = h, i = p(), o = p(), r = p(!1),
|
|
3363
|
-
let
|
|
3364
|
-
const
|
|
3365
|
-
function
|
|
3376
|
+
const u = n, a = h, i = p(), o = p(), r = p(!1), y = p(!1), _ = p(!1), d = $t();
|
|
3377
|
+
let c = [], k = !1, U = 0, g = !1, x, R = 0, w;
|
|
3378
|
+
const E = C(() => Wa(u.ctx.locale, u.name ?? u.ctx.displayName ?? "")), A = C(() => i.value || o.value), z = C(() => A.value?.state === "authorization_required"), I = C(() => ["helper_untrusted", "cli_untrusted"].includes(A.value?.reason || "")), V = C(() => z.value && !I.value), F = C(() => A.value?.state === "unavailable" ? we(A.value) : void 0), J = C(() => F.value ?? { credential_not_ready: "credential", access_denied: "denied", check_failed: "config" }[A.value?.reason ?? ""] ?? "unavailable"), q = C(() => A.value ? z.value ? E.value("title") : A.value.state === "ready" ? E.value("ready") : A.value.state === "not_admin" ? E.value("not_admin.title") : A.value.state === "session_expired" ? E.value("session_expired.title") : E.value(J.value + ".title") : E.value("checking")), Z = C(() => z.value ? E.value("purpose") : A.value?.state === "not_admin" ? E.value("not_admin.body") : A.value?.state === "session_expired" ? E.value("session_expired.body") : A.value?.state === "unavailable" ? E.value(J.value + ".body") : E.value("purpose")), $ = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], M = C(() => $.includes(A.value?.reason || "") ? A.value.reason : "unknown"), Q = C(() => I.value ? "next.reinstall" : M.value === "grant_missing" ? "next.install" : M.value === "upgrade_reapproval" || M.value === "grant_incompatible" ? "next.update" : "next.repair");
|
|
3379
|
+
function ue(Y) {
|
|
3366
3380
|
if (!Y || Y.command !== "authorization" || Y.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(Y.state) || Y.reason === "upgrade_reapproval" && Y.state !== "authorization_required") throw Error("invalid status");
|
|
3367
3381
|
return Y;
|
|
3368
3382
|
}
|
|
3369
|
-
const
|
|
3370
|
-
function
|
|
3371
|
-
const { code:
|
|
3372
|
-
return
|
|
3373
|
-
}
|
|
3374
|
-
let
|
|
3375
|
-
function
|
|
3376
|
-
clearTimeout(
|
|
3377
|
-
r.value ?
|
|
3378
|
-
},
|
|
3379
|
-
}
|
|
3380
|
-
const
|
|
3381
|
-
async function
|
|
3382
|
-
const
|
|
3383
|
-
for (let
|
|
3383
|
+
const pe = ["service_unavailable", "request_timeout", "request_canceled", "network", "app_unavailable", "internal", "auth_unavailable", "EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT", "EXECUTOR_PAUSED"], ye = ["admin_required", "app_privilege_denied", "APP_DENIED", "PERMISSION_DENIED", "cross_origin", "origin_required"];
|
|
3384
|
+
function j(Y) {
|
|
3385
|
+
const { code: ee, message: ne } = Y ?? {}, ve = we(Y);
|
|
3386
|
+
return ve ? ve === "stopped" ? "APP_STOPPED" : "APP_STARTING" : ee === "credential_not_ready" ? ee : typeof ee == "string" && ye.includes(ee) || ee === "bad_response" && /HTTP 40[13]\b/.test(String(ne)) ? "access_denied" : typeof ee == "string" && pe.includes(ee) || ee === void 0 ? "service_unavailable" : "check_failed";
|
|
3387
|
+
}
|
|
3388
|
+
let oe;
|
|
3389
|
+
function ae() {
|
|
3390
|
+
clearTimeout(x), F.value !== oe && (oe = F.value, R = 0), F.value && (x = setTimeout(() => {
|
|
3391
|
+
r.value ? g = !0 : se("status");
|
|
3392
|
+
}, ua(R++, F.value)));
|
|
3393
|
+
}
|
|
3394
|
+
const H = [1e3, 3e3];
|
|
3395
|
+
async function K(Y) {
|
|
3396
|
+
const ee = Y === "status" && !_.value ? H : [];
|
|
3397
|
+
for (let ne = 0; ; ne++) {
|
|
3384
3398
|
try {
|
|
3385
|
-
const
|
|
3386
|
-
if (
|
|
3387
|
-
} catch (
|
|
3388
|
-
if (["session_required", "credential_not_ready"].includes(
|
|
3399
|
+
const ve = ue(await u.ctx.authorization?.[Y]());
|
|
3400
|
+
if (ve.state !== "unavailable" || ne >= ee.length) return ve;
|
|
3401
|
+
} catch (ve) {
|
|
3402
|
+
if (["session_required", "credential_not_ready"].includes(ve.code) || ne >= ee.length) throw ve;
|
|
3389
3403
|
}
|
|
3390
|
-
if (await new Promise((
|
|
3404
|
+
if (await new Promise((ve) => setTimeout(ve, ee[ne])), k) throw Error("disposed");
|
|
3391
3405
|
}
|
|
3392
3406
|
}
|
|
3393
|
-
async function
|
|
3394
|
-
if (r.value ||
|
|
3395
|
-
const
|
|
3396
|
-
o.value = Y === "request" && i.value?.state === "authorization_required" ? i.value : void 0, r.value = !0,
|
|
3407
|
+
async function se(Y) {
|
|
3408
|
+
if (r.value || k) return;
|
|
3409
|
+
const ee = ++U;
|
|
3410
|
+
o.value = Y === "request" && i.value?.state === "authorization_required" ? i.value : void 0, r.value = !0, y.value = !1, i.value = void 0;
|
|
3397
3411
|
try {
|
|
3398
|
-
const
|
|
3399
|
-
if (
|
|
3400
|
-
i.value =
|
|
3401
|
-
} catch (
|
|
3402
|
-
!
|
|
3412
|
+
const ne = await K(Y);
|
|
3413
|
+
if (k || ee !== U) return;
|
|
3414
|
+
i.value = ne, _.value = ne.state !== "ready", ne.state === "ready" && re(!0), ne.state === "ready" && a("ready");
|
|
3415
|
+
} catch (ne) {
|
|
3416
|
+
!k && ee === U && (i.value = ne.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : o.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: j(ne) }, y.value = J.value === "unavailable", _.value = !0);
|
|
3403
3417
|
} finally {
|
|
3404
|
-
!
|
|
3418
|
+
!k && ee === U && (r.value = !1, o.value = void 0, g ? (g = !1, se("status")) : ae());
|
|
3405
3419
|
}
|
|
3406
3420
|
}
|
|
3407
|
-
function
|
|
3408
|
-
const
|
|
3409
|
-
|
|
3421
|
+
function re(Y) {
|
|
3422
|
+
const ee = c;
|
|
3423
|
+
c = [], ee.forEach((ne) => ne(Y));
|
|
3410
3424
|
}
|
|
3411
|
-
function
|
|
3412
|
-
_.value = Y, Y ||
|
|
3425
|
+
function Ie(Y) {
|
|
3426
|
+
_.value = Y, Y || re(!1);
|
|
3413
3427
|
}
|
|
3414
|
-
function
|
|
3415
|
-
return i.value?.state === "ready" ? Promise.resolve(!0) : (r.value || (_.value = !0), new Promise((Y) =>
|
|
3428
|
+
function xe() {
|
|
3429
|
+
return i.value?.state === "ready" ? Promise.resolve(!0) : (r.value || (_.value = !0), new Promise((Y) => c.push(Y)));
|
|
3416
3430
|
}
|
|
3417
|
-
return
|
|
3418
|
-
|
|
3419
|
-
r.value ?
|
|
3420
|
-
}),
|
|
3431
|
+
return Qe(Ua, { state: C(() => i.value?.state ?? "checking"), requireAuthorization: xe, text: E, busy: r, canManage: () => !!u.ctx.authorization?.canManage?.(), revoke: () => se("revoke") }), Ce(() => {
|
|
3432
|
+
w = u.ctx.reopen(() => {
|
|
3433
|
+
r.value ? g = !0 : se("status");
|
|
3434
|
+
}), se("status");
|
|
3421
3435
|
}), xa(() => {
|
|
3422
|
-
|
|
3423
|
-
}), (Y,
|
|
3424
|
-
T("div",
|
|
3425
|
-
|
|
3436
|
+
k = !0, U++, clearTimeout(x), re(!1), typeof w == "function" && w();
|
|
3437
|
+
}), (Y, ee) => (l(), S(le, null, [
|
|
3438
|
+
T("div", ao, [
|
|
3439
|
+
ke(Y.$slots, "default", {}, void 0, !0)
|
|
3426
3440
|
]),
|
|
3427
|
-
v(e(
|
|
3428
|
-
open: _.value,
|
|
3429
|
-
title:
|
|
3441
|
+
v(e(Ze), {
|
|
3442
|
+
open: _.value && !e(d),
|
|
3443
|
+
title: q.value,
|
|
3430
3444
|
width: "480px",
|
|
3431
|
-
"onUpdate:open":
|
|
3445
|
+
"onUpdate:open": Ie
|
|
3432
3446
|
}, {
|
|
3433
3447
|
footer: t(() => [
|
|
3434
|
-
|
|
3448
|
+
V.value ? (l(), f(e(N), {
|
|
3435
3449
|
key: 0,
|
|
3436
3450
|
variant: "primary",
|
|
3437
3451
|
loading: r.value,
|
|
3438
3452
|
disabled: r.value,
|
|
3439
|
-
onClick:
|
|
3453
|
+
onClick: ee[0] || (ee[0] = (ne) => se("request"))
|
|
3440
3454
|
}, {
|
|
3441
3455
|
default: t(() => [
|
|
3442
|
-
b(s(r.value ?
|
|
3456
|
+
b(s(r.value ? E.value("authorizing") : E.value("authorize")), 1)
|
|
3443
3457
|
]),
|
|
3444
3458
|
_: 1
|
|
3445
|
-
}, 8, ["loading", "disabled"])) : (l(), f(e(
|
|
3459
|
+
}, 8, ["loading", "disabled"])) : (l(), f(e(N), {
|
|
3446
3460
|
key: 1,
|
|
3447
3461
|
variant: "primary",
|
|
3448
3462
|
loading: r.value,
|
|
3449
3463
|
disabled: r.value,
|
|
3450
|
-
onClick:
|
|
3464
|
+
onClick: ee[1] || (ee[1] = (ne) => se("status"))
|
|
3451
3465
|
}, {
|
|
3452
3466
|
default: t(() => [
|
|
3453
|
-
b(s(r.value ?
|
|
3467
|
+
b(s(r.value ? E.value("checking") : E.value("retry")), 1)
|
|
3454
3468
|
]),
|
|
3455
3469
|
_: 1
|
|
3456
3470
|
}, 8, ["loading", "disabled"]))
|
|
@@ -3461,43 +3475,43 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3461
3475
|
"aria-busy": r.value,
|
|
3462
3476
|
"data-authorization-state": i.value?.state || "checking"
|
|
3463
3477
|
}, [
|
|
3464
|
-
T("p",
|
|
3465
|
-
|
|
3478
|
+
T("p", lo, s(Z.value), 1),
|
|
3479
|
+
z.value ? (l(), f(e(G), {
|
|
3466
3480
|
key: 0,
|
|
3467
3481
|
class: "authorization-status",
|
|
3468
|
-
tone: ["grant_missing", "upgrade_reapproval"].includes(
|
|
3469
|
-
title:
|
|
3482
|
+
tone: ["grant_missing", "upgrade_reapproval"].includes(M.value) ? "info" : "warning",
|
|
3483
|
+
title: E.value("reason." + M.value)
|
|
3470
3484
|
}, {
|
|
3471
3485
|
default: t(() => [
|
|
3472
|
-
b(s(
|
|
3486
|
+
b(s(E.value(Q.value)), 1)
|
|
3473
3487
|
]),
|
|
3474
3488
|
_: 1
|
|
3475
|
-
}, 8, ["tone", "title"])) :
|
|
3476
|
-
|
|
3489
|
+
}, 8, ["tone", "title"])) : m("", !0),
|
|
3490
|
+
y.value ? (l(), f(e(G), {
|
|
3477
3491
|
key: 1,
|
|
3478
3492
|
class: "authorization-failed",
|
|
3479
3493
|
tone: "warning"
|
|
3480
3494
|
}, {
|
|
3481
3495
|
default: t(() => [
|
|
3482
|
-
b(s(
|
|
3496
|
+
b(s(E.value("failed")), 1)
|
|
3483
3497
|
]),
|
|
3484
3498
|
_: 1
|
|
3485
|
-
})) :
|
|
3486
|
-
], 8,
|
|
3499
|
+
})) : m("", !0)
|
|
3500
|
+
], 8, to)
|
|
3487
3501
|
]),
|
|
3488
3502
|
_: 1
|
|
3489
3503
|
}, 8, ["open", "title"])
|
|
3490
3504
|
], 64));
|
|
3491
3505
|
}
|
|
3492
|
-
}),
|
|
3506
|
+
}), Co = /* @__PURE__ */ ge(no, [["__scopeId", "data-v-59492506"]]), oo = { class: "authorization-setting" }, so = {
|
|
3493
3507
|
class: "authorization-state",
|
|
3494
3508
|
role: "status"
|
|
3495
|
-
},
|
|
3509
|
+
}, io = { class: "authorization-revoke-body" }, uo = /* @__PURE__ */ fe({
|
|
3496
3510
|
__name: "AuthorizationSettings",
|
|
3497
3511
|
setup(n) {
|
|
3498
|
-
const { state: h, requireAuthorization: u, text: a, busy: i, canManage: o, revoke: r } =
|
|
3499
|
-
return (d, c) => (l(),
|
|
3500
|
-
v(e(
|
|
3512
|
+
const { state: h, requireAuthorization: u, text: a, busy: i, canManage: o, revoke: r } = eo(), y = p(!1), _ = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
|
|
3513
|
+
return (d, c) => (l(), S(le, null, [
|
|
3514
|
+
v(e(he), {
|
|
3501
3515
|
title: e(a)("settings.title"),
|
|
3502
3516
|
collapsible: !1
|
|
3503
3517
|
}, {
|
|
@@ -3508,26 +3522,26 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3508
3522
|
align: "center"
|
|
3509
3523
|
}, {
|
|
3510
3524
|
default: t(() => [
|
|
3511
|
-
T("div",
|
|
3512
|
-
T("span",
|
|
3513
|
-
e(h) === "ready" ? (l(), f(e(
|
|
3525
|
+
T("div", oo, [
|
|
3526
|
+
T("span", so, [
|
|
3527
|
+
e(h) === "ready" ? (l(), f(e(Ct), {
|
|
3514
3528
|
key: 0,
|
|
3515
3529
|
size: 16,
|
|
3516
3530
|
"aria-hidden": "true"
|
|
3517
|
-
})) :
|
|
3531
|
+
})) : m("", !0),
|
|
3518
3532
|
b(s(e(a)(_[e(h)])), 1)
|
|
3519
3533
|
]),
|
|
3520
|
-
e(h) === "ready" && e(o)() ? (l(), f(e(
|
|
3534
|
+
e(h) === "ready" && e(o)() ? (l(), f(e(N), {
|
|
3521
3535
|
key: 0,
|
|
3522
3536
|
variant: "secondary",
|
|
3523
3537
|
disabled: e(i),
|
|
3524
|
-
onClick: c[0] || (c[0] = (k) =>
|
|
3538
|
+
onClick: c[0] || (c[0] = (k) => y.value = !0)
|
|
3525
3539
|
}, {
|
|
3526
3540
|
default: t(() => [
|
|
3527
3541
|
b(s(e(a)("revoke")), 1)
|
|
3528
3542
|
]),
|
|
3529
3543
|
_: 1
|
|
3530
|
-
}, 8, ["disabled"])) : e(h) !== "ready" && e(h) !== "checking" ? (l(), f(e(
|
|
3544
|
+
}, 8, ["disabled"])) : e(h) !== "ready" && e(h) !== "checking" ? (l(), f(e(N), {
|
|
3531
3545
|
key: 1,
|
|
3532
3546
|
variant: "secondary",
|
|
3533
3547
|
onClick: c[1] || (c[1] = (k) => e(u)())
|
|
@@ -3536,7 +3550,7 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3536
3550
|
b(s(e(a)("settings.details")), 1)
|
|
3537
3551
|
]),
|
|
3538
3552
|
_: 1
|
|
3539
|
-
})) :
|
|
3553
|
+
})) : m("", !0)
|
|
3540
3554
|
])
|
|
3541
3555
|
]),
|
|
3542
3556
|
_: 1
|
|
@@ -3544,27 +3558,27 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3544
3558
|
]),
|
|
3545
3559
|
_: 1
|
|
3546
3560
|
}, 8, ["title"]),
|
|
3547
|
-
v(e(
|
|
3548
|
-
open:
|
|
3549
|
-
"onUpdate:open": c[4] || (c[4] = (k) =>
|
|
3561
|
+
v(e(Ze), {
|
|
3562
|
+
open: y.value,
|
|
3563
|
+
"onUpdate:open": c[4] || (c[4] = (k) => y.value = k),
|
|
3550
3564
|
title: e(a)("revoke.title"),
|
|
3551
3565
|
width: "480px"
|
|
3552
3566
|
}, {
|
|
3553
3567
|
footer: t(() => [
|
|
3554
|
-
v(e(
|
|
3568
|
+
v(e(N), {
|
|
3555
3569
|
variant: "secondary",
|
|
3556
|
-
onClick: c[2] || (c[2] = (k) =>
|
|
3570
|
+
onClick: c[2] || (c[2] = (k) => y.value = !1)
|
|
3557
3571
|
}, {
|
|
3558
3572
|
default: t(() => [
|
|
3559
3573
|
b(s(e(a)("cancel")), 1)
|
|
3560
3574
|
]),
|
|
3561
3575
|
_: 1
|
|
3562
3576
|
}),
|
|
3563
|
-
v(e(
|
|
3577
|
+
v(e(N), {
|
|
3564
3578
|
variant: "danger",
|
|
3565
3579
|
disabled: e(i),
|
|
3566
3580
|
onClick: c[3] || (c[3] = (k) => {
|
|
3567
|
-
|
|
3581
|
+
y.value = !1, e(r)();
|
|
3568
3582
|
})
|
|
3569
3583
|
}, {
|
|
3570
3584
|
default: t(() => [
|
|
@@ -3574,91 +3588,93 @@ const Zn = { class: "authorization-content" }, jn = ["aria-busy", "data-authoriz
|
|
|
3574
3588
|
}, 8, ["disabled"])
|
|
3575
3589
|
]),
|
|
3576
3590
|
default: t(() => [
|
|
3577
|
-
T("p",
|
|
3591
|
+
T("p", io, s(e(a)("revoke.body")), 1)
|
|
3578
3592
|
]),
|
|
3579
3593
|
_: 1
|
|
3580
3594
|
}, 8, ["open", "title"])
|
|
3581
3595
|
], 64));
|
|
3582
3596
|
}
|
|
3583
|
-
}),
|
|
3597
|
+
}), $o = /* @__PURE__ */ ge(uo, [["__scopeId", "data-v-f031e7c7"]]);
|
|
3584
3598
|
export {
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3599
|
+
yo as AppShell,
|
|
3600
|
+
Co as AuthorizationGate,
|
|
3601
|
+
$o as AuthorizationSettings,
|
|
3602
|
+
ho as BackgroundPanel,
|
|
3603
|
+
xo as BackgroundSavePanel,
|
|
3604
|
+
Wn as BackgroundSaveSettings,
|
|
3605
|
+
zo as DEFAULT_REQUEST_TIMEOUT,
|
|
3606
|
+
wo as DelegatePanel,
|
|
3607
|
+
_o as ExecutorApproval,
|
|
3608
|
+
Wt as ExecutorNotice,
|
|
3609
|
+
Sa as ExecutorPreloadKey,
|
|
3610
|
+
Ta as ExecutorSettings,
|
|
3596
3611
|
Me as ExecutorSetupKey,
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3612
|
+
Po as FILE_STATION_APP,
|
|
3613
|
+
Ra as FileBrowser,
|
|
3614
|
+
bo as FilesPage,
|
|
3615
|
+
To as LIFECYCLE_RETRY_MAX_MS,
|
|
3616
|
+
Ao as LIFECYCLE_STARTING_RETRY_MAX_MS,
|
|
3617
|
+
ko as LoginPage,
|
|
3618
|
+
je as NasPicker,
|
|
3619
|
+
mo as PageActions,
|
|
3620
|
+
Aa as PageActionsTarget,
|
|
3621
|
+
go as PortalSettings,
|
|
3622
|
+
Ro as activePage,
|
|
3608
3623
|
we as appLifecycle,
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3624
|
+
Io as authorizationCatalogs,
|
|
3625
|
+
Wa as authorizationCopy,
|
|
3626
|
+
Vo as backgroundCatalogs,
|
|
3627
|
+
qa as backgroundCopy,
|
|
3628
|
+
Ma as backgroundErrorCopy,
|
|
3629
|
+
Uo as bridgeCatalogs,
|
|
3630
|
+
Do as bridgeErrorCopy,
|
|
3631
|
+
Bo as catalogs,
|
|
3632
|
+
Lo as clientTimeout,
|
|
3633
|
+
Fa as createBackgroundPickerProvider,
|
|
3634
|
+
No as createBackgroundSaveFacade,
|
|
3635
|
+
Oo as createFileTransfers,
|
|
3621
3636
|
_a as createNasProvider,
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3637
|
+
qo as createPortalAccess,
|
|
3638
|
+
po as createSession,
|
|
3639
|
+
Fo as createStandaloneContext,
|
|
3640
|
+
Mo as createStandaloneHost,
|
|
3641
|
+
Ho as decodeResponse,
|
|
3642
|
+
Ko as delegateCatalogs,
|
|
3643
|
+
Le as delegateCopy,
|
|
3644
|
+
Xo as encodeRequest,
|
|
3645
|
+
Ka as errorCopy,
|
|
3646
|
+
Go as fileStationPath,
|
|
3647
|
+
oa as format,
|
|
3648
|
+
Wo as identityCatalogs,
|
|
3649
|
+
Oa as identityCopy,
|
|
3635
3650
|
ga as isFullPage,
|
|
3636
3651
|
wa as labelSeparator,
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3652
|
+
Re as lifecycleCopy,
|
|
3653
|
+
Ha as lifecycleRefusal,
|
|
3654
|
+
ua as lifecycleRetryDelay,
|
|
3655
|
+
Jo as mergeCatalogs,
|
|
3656
|
+
Yo as nasCatalogs,
|
|
3657
|
+
ze as nasCopy,
|
|
3643
3658
|
ha as nasErrorCopy,
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3659
|
+
Xa as openFileInFileStation,
|
|
3660
|
+
Qo as openFolderInFileStation,
|
|
3661
|
+
Zo as portalCatalogs,
|
|
3662
|
+
jo as portalMessages,
|
|
3663
|
+
es as protocolCodes,
|
|
3664
|
+
as as protocolOps,
|
|
3665
|
+
ts as protocolSchemas,
|
|
3666
|
+
da as requestKey,
|
|
3667
|
+
ls as saveCatalogs,
|
|
3653
3668
|
Je as saveCopy,
|
|
3654
3669
|
Fe as saveError,
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3670
|
+
Ga as scopedPicker,
|
|
3671
|
+
ns as shellCatalogs,
|
|
3672
|
+
Na as shellCopy,
|
|
3673
|
+
os as shellPages,
|
|
3659
3674
|
ka as uiLocale,
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3675
|
+
ss as uiLocales,
|
|
3676
|
+
eo as useAuthorization,
|
|
3677
|
+
$t as useExecutorPreload,
|
|
3678
|
+
Ea as useExecutorSetup,
|
|
3679
|
+
zt as useNasRequest
|
|
3664
3680
|
};
|