@synopackageland/sdk 0.46.0 → 0.46.2
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 +23 -0
- package/dist/index.js +2906 -2887
- package/dist/src/context.d.ts +1 -1
- package/dist/src/delegate/BackgroundSavePanel.vue.d.ts +1 -1
- package/dist/src/delegate/BackgroundSaveSettings.vue.d.ts +1 -1
- package/dist/src/delegate/ExecutorApproval.vue.d.ts +1 -1
- package/dist/src/delegate/ExecutorNotice.vue.d.ts +1 -1
- package/dist/src/delegate/ExecutorSettings.vue.d.ts +1 -1
- package/dist/src/delegate/use-scope-approval.d.ts +1 -1
- package/dist/src/dsm/filestation.d.ts +2 -0
- package/dist/src/nas/provider.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/vue.js +709 -708
- package/executor-manifest.json +1 -1
- package/package.json +1 -1
package/dist/vue.js
CHANGED
|
@@ -32,125 +32,125 @@ function At(t) {
|
|
|
32
32
|
return /: the executor status request failed\.$/.test(t ?? "");
|
|
33
33
|
}
|
|
34
34
|
function Is(t) {
|
|
35
|
-
const c = b(), n = w(() => c.value ? { code: c.value, ...na({ code: c.value }, t.locale, t.displayName) } : void 0), a = b(!1),
|
|
36
|
-
let
|
|
35
|
+
const c = b(), n = w(() => c.value ? { code: c.value, ...na({ code: c.value }, t.locale, t.displayName) } : void 0), a = b(!1), r = b(!1), i = b(), u = b("");
|
|
36
|
+
let v = !1, p = 0, d, f;
|
|
37
37
|
function x() {
|
|
38
|
-
clearTimeout(d), clearTimeout(
|
|
38
|
+
clearTimeout(d), clearTimeout(f);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
p++, x(), i.value = void 0,
|
|
40
|
+
function P(B = "") {
|
|
41
|
+
p++, x(), i.value = void 0, u.value = B;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function $(B) {
|
|
44
44
|
const K = Fe(B);
|
|
45
|
-
return
|
|
45
|
+
return v || !K ? !1 : (P(), c.value = K, !0);
|
|
46
46
|
}
|
|
47
|
-
async function
|
|
47
|
+
async function k(B, K) {
|
|
48
48
|
const D = p;
|
|
49
49
|
try {
|
|
50
50
|
return await t.call(B, K);
|
|
51
|
-
} catch (
|
|
52
|
-
throw D === p &&
|
|
51
|
+
} catch (T) {
|
|
52
|
+
throw D === p && $(T), T;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
55
|
+
function E(B) {
|
|
56
|
+
if (v) return;
|
|
57
57
|
const K = Date.parse(B.expiresAt) - Date.now();
|
|
58
58
|
if (!Number.isFinite(K) || K <= 0) {
|
|
59
|
-
|
|
59
|
+
P("expired");
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
x(), c.value = void 0, i.value = B,
|
|
62
|
+
x(), c.value = void 0, i.value = B, u.value = "", d = setTimeout(() => P("expired"), K);
|
|
63
63
|
const D = p;
|
|
64
|
-
|
|
64
|
+
f = setTimeout(async () => {
|
|
65
65
|
try {
|
|
66
|
-
const
|
|
67
|
-
!
|
|
68
|
-
} catch (
|
|
69
|
-
!
|
|
66
|
+
const T = await k("identity.session");
|
|
67
|
+
!v && p === D && E(T);
|
|
68
|
+
} catch (T) {
|
|
69
|
+
!v && p === D && !$(T) && P("expired");
|
|
70
70
|
}
|
|
71
71
|
}, Math.min(6e4, K));
|
|
72
72
|
}
|
|
73
73
|
async function C() {
|
|
74
74
|
try {
|
|
75
|
-
const B = await
|
|
76
|
-
if (
|
|
75
|
+
const B = await k("identity.status");
|
|
76
|
+
if (v) return;
|
|
77
77
|
if (c.value = void 0, a.value = B.enabled === !0, a.value)
|
|
78
78
|
try {
|
|
79
|
-
|
|
79
|
+
E(await k("identity.session", { bootstrap: !0 }));
|
|
80
80
|
} catch (K) {
|
|
81
|
-
!
|
|
81
|
+
!v && !Fe(K) && P();
|
|
82
82
|
}
|
|
83
83
|
} catch (B) {
|
|
84
|
-
if (
|
|
84
|
+
if (v) return;
|
|
85
85
|
const K = B?.code;
|
|
86
|
-
a.value = !Fe(B) && !["unknown_method", "session_required"].includes(K || ""), a.value && (
|
|
86
|
+
a.value = !Fe(B) && !["unknown_method", "session_required"].includes(K || ""), a.value && (u.value = "unavailable");
|
|
87
87
|
} finally {
|
|
88
|
-
|
|
88
|
+
v || (r.value = !0);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
async function
|
|
91
|
+
async function A(B, K) {
|
|
92
92
|
const D = p;
|
|
93
93
|
try {
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
return
|
|
97
|
-
} catch (
|
|
98
|
-
D === p &&
|
|
99
|
-
const M =
|
|
100
|
-
throw !
|
|
94
|
+
const T = await t.call(B, K);
|
|
95
|
+
if (v || a.value && D !== p) throw { code: "session_required" };
|
|
96
|
+
return T;
|
|
97
|
+
} catch (T) {
|
|
98
|
+
D === p && $(T);
|
|
99
|
+
const M = T?.code;
|
|
100
|
+
throw !v && D === p && a.value && ["session_required", "session_revalidation_required"].includes(M || "") && P(M === "session_revalidation_required" ? "revalidate" : "expired"), T;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
async function z(B, K) {
|
|
104
104
|
if (!t.batch) throw { code: "unsupported", message: "batch client unavailable" };
|
|
105
105
|
const D = p;
|
|
106
106
|
try {
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
for (const M of
|
|
110
|
-
return
|
|
111
|
-
} catch (
|
|
112
|
-
throw D === p &&
|
|
107
|
+
const T = await t.batch(B, K);
|
|
108
|
+
if (v || a.value && D !== p) throw { code: "session_required" };
|
|
109
|
+
for (const M of T) M.success || (D === p && $(M.error), D === p && a.value && ["session_required", "session_revalidation_required"].includes(M.error.code) && P(M.error.code === "session_revalidation_required" ? "revalidate" : "expired"));
|
|
110
|
+
return T;
|
|
111
|
+
} catch (T) {
|
|
112
|
+
throw D === p && $(T), T;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
async function ae(B, K, D) {
|
|
116
|
-
const
|
|
117
|
-
|
|
116
|
+
const T = await k("identity.login", { account: B, password: K, otp: D });
|
|
117
|
+
v || (p++, E(T));
|
|
118
118
|
}
|
|
119
119
|
async function F() {
|
|
120
|
-
const B = await
|
|
121
|
-
|
|
120
|
+
const B = await k("identity.session", { bootstrap: !0 });
|
|
121
|
+
v || (p++, E(B));
|
|
122
122
|
}
|
|
123
123
|
async function G() {
|
|
124
|
-
await
|
|
124
|
+
await k("identity.logout"), v || P();
|
|
125
125
|
}
|
|
126
126
|
function X() {
|
|
127
|
-
|
|
127
|
+
v = !0, P();
|
|
128
128
|
}
|
|
129
|
-
return { enabled: a, ready:
|
|
129
|
+
return { enabled: a, ready: r, subject: i, notice: u, denied: n, start: C, call: A, batch: z, login: ae, bootstrap: F, logout: G, dispose: X };
|
|
130
130
|
}
|
|
131
131
|
function zt() {
|
|
132
132
|
const t = b(!1), c = b();
|
|
133
|
-
let n = !1, a = 0,
|
|
133
|
+
let n = !1, a = 0, r;
|
|
134
134
|
function i() {
|
|
135
|
-
a++,
|
|
135
|
+
a++, r?.abort(), r = void 0, t.value = !1, c.value = void 0;
|
|
136
136
|
}
|
|
137
|
-
async function
|
|
137
|
+
async function u(v) {
|
|
138
138
|
if (n || t.value) return;
|
|
139
139
|
const p = ++a, d = new AbortController();
|
|
140
|
-
|
|
140
|
+
r = d, t.value = !0, c.value = void 0;
|
|
141
141
|
try {
|
|
142
|
-
const
|
|
143
|
-
return !n && p === a ?
|
|
144
|
-
} catch (
|
|
145
|
-
!n && p === a && (c.value =
|
|
142
|
+
const f = await v(d.signal);
|
|
143
|
+
return !n && p === a ? f : void 0;
|
|
144
|
+
} catch (f) {
|
|
145
|
+
!n && p === a && (c.value = f);
|
|
146
146
|
return;
|
|
147
147
|
} finally {
|
|
148
|
-
!n && p === a && (t.value = !1,
|
|
148
|
+
!n && p === a && (t.value = !1, r = void 0);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
return ge(() => {
|
|
152
152
|
n = !0, i();
|
|
153
|
-
}), { busy: t, error: c, run:
|
|
153
|
+
}), { busy: t, error: c, run: u, cancel: i };
|
|
154
154
|
}
|
|
155
155
|
const $a = ".sds-standalone-main-window";
|
|
156
156
|
function Rt(t) {
|
|
@@ -158,16 +158,16 @@ function Rt(t) {
|
|
|
158
158
|
try {
|
|
159
159
|
const n = t.closest($a);
|
|
160
160
|
if (!t.isConnected || !n || n.classList.contains("sds-standalone-main-window--no-banner")) return c;
|
|
161
|
-
const a = (
|
|
161
|
+
const a = (r) => Array.from(n.querySelectorAll(r)).some((i) => {
|
|
162
162
|
if (t.contains(i) || i.closest($a) !== n || !i.textContent?.trim()) return !1;
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
163
|
+
const u = i.ownerDocument.defaultView;
|
|
164
|
+
if (!u) return !1;
|
|
165
165
|
for (let p = i; p; p = p.parentElement) {
|
|
166
|
-
const d =
|
|
166
|
+
const d = u.getComputedStyle(p);
|
|
167
167
|
if (p.hidden || d.display === "none" || d.visibility === "hidden" || d.visibility === "collapse" || d.opacity === "0") return !1;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
170
|
-
return
|
|
169
|
+
const v = i.getBoundingClientRect();
|
|
170
|
+
return v.width > 0 && v.height > 0;
|
|
171
171
|
});
|
|
172
172
|
return {
|
|
173
173
|
brand: a(".sds-standalone-main-window-header-text"),
|
|
@@ -194,28 +194,28 @@ function Nt(t) {
|
|
|
194
194
|
const c = /* @__PURE__ */ new Map(), n = { items: [] };
|
|
195
195
|
for (const a of t) {
|
|
196
196
|
if (a.hidden) continue;
|
|
197
|
-
let
|
|
198
|
-
|
|
197
|
+
let r = a.placement === "bottom" ? n : c.get(a.group);
|
|
198
|
+
r || c.set(a.group, r = a.group === void 0 ? { items: [] } : { label: a.group, items: [] }), r.items.push({ key: a.id, label: a.title, icon: a.icon, badge: a.badge });
|
|
199
199
|
}
|
|
200
200
|
return n.items.length ? [...c.values(), n] : [...c.values()];
|
|
201
201
|
}
|
|
202
202
|
const Lt = { password_rejected: "passwordRejected", password_required: "passwordRequired", password_confirm_failed: "passwordConfirmFailed" }, Vt = 6e4, Bt = 1e3;
|
|
203
203
|
function Ma(t, c) {
|
|
204
|
-
const n = Oa(), a = w(() => Re(t.locale)),
|
|
204
|
+
const n = Oa(), a = w(() => Re(t.locale)), r = b(), i = b(""), u = b(!1), v = b(!1), p = b(!1), d = b(), f = b(!1), x = w(() => f.value ? a.value.passwordRequired : d.value && "confirm" in d.value ? a.value[Lt[d.value.confirm]] : "");
|
|
205
205
|
qe(i, () => {
|
|
206
|
-
|
|
206
|
+
f.value = !1;
|
|
207
207
|
});
|
|
208
|
-
const
|
|
208
|
+
const P = b(), $ = b(""), k = b([]), E = Qa({ webApi: t.ctx?.webApi }), C = w(() => P.value?.scope_mode === "install-selected"), A = w(() => !!P.value?.scope_mode), z = w(() => [{ label: a.value.homeScope, value: "home" }, ...k.value]), ae = w(() => !C.value || !!$.value && z.value.some((N) => N.value === $.value)), F = w(() => C.value && !P.value?.selection);
|
|
209
209
|
let G = !1;
|
|
210
210
|
async function X(N) {
|
|
211
211
|
const le = N ?? await n.status();
|
|
212
|
-
if (G || (
|
|
212
|
+
if (G || (r.value = le, !t.ctx || Se(le))) return;
|
|
213
213
|
const O = await t.ctx.call("delegate.status");
|
|
214
|
-
if (G || (
|
|
214
|
+
if (G || (P.value = O, O.scope_mode !== "install-selected")) return;
|
|
215
215
|
const Z = [];
|
|
216
216
|
let ie = 0;
|
|
217
217
|
for (let ce = 0; ce < 128; ce++) {
|
|
218
|
-
const J = await
|
|
218
|
+
const J = await E.shares(ie, new AbortController().signal);
|
|
219
219
|
if (G) return;
|
|
220
220
|
if (!Array.isArray(J.shares) || !Number.isSafeInteger(J.total) || J.total < 0 || !J.shares.length && ie < J.total) throw { code: "EXECUTOR_PROTOCOL" };
|
|
221
221
|
for (const H of J.shares)
|
|
@@ -223,34 +223,34 @@ function Ma(t, c) {
|
|
|
223
223
|
if (ie += J.shares.length, ie >= J.total) break;
|
|
224
224
|
if (ce === 127) throw { code: "EXECUTOR_PROTOCOL" };
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
k.value = Z, $.value = O.selection?.scope ?? O.preselection ?? "";
|
|
227
227
|
}
|
|
228
228
|
async function B(N) {
|
|
229
|
-
if (!(!t.admin ||
|
|
230
|
-
|
|
229
|
+
if (!(!t.admin || u.value)) {
|
|
230
|
+
u.value = !0, p.value = !1, d.value = void 0;
|
|
231
231
|
try {
|
|
232
232
|
await X(N);
|
|
233
233
|
} catch {
|
|
234
234
|
G || (p.value = !0);
|
|
235
235
|
} finally {
|
|
236
|
-
G || (
|
|
236
|
+
G || (u.value = !1);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
const K = () => B();
|
|
241
241
|
async function D() {
|
|
242
|
-
if (!t.admin ||
|
|
243
|
-
|
|
244
|
-
const N = i.value, le =
|
|
245
|
-
i.value = "",
|
|
242
|
+
if (!t.admin || u.value || !i.value || !ae.value || p.value) return;
|
|
243
|
+
u.value = !0, p.value = !1, d.value = void 0;
|
|
244
|
+
const N = i.value, le = $.value;
|
|
245
|
+
i.value = "", v.value = !0;
|
|
246
246
|
try {
|
|
247
|
-
let O = C.value ? await n.authorize(N,
|
|
247
|
+
let O = C.value ? await n.authorize(N, $.value) : await n.authorize(N);
|
|
248
248
|
const Z = ta(O);
|
|
249
249
|
if (Z) {
|
|
250
250
|
G || (d.value = { confirm: Z }, i.value = N);
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
if (await X(O), !G && C.value && O.state === "ready" && F.value && (O = await n.authorize(N,
|
|
253
|
+
if (await X(O), !G && C.value && O.state === "ready" && F.value && (O = await n.authorize(N, $.value), await X(O)), O.state !== "ready" && O.requested && await M(O.requested) && (O = await n.status(), await X(O)), O.state === "ready" && C.value && P.value?.selection?.scope !== le) {
|
|
254
254
|
G || (d.value = { reason: "", code: "selection_failed" });
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
@@ -262,11 +262,11 @@ function Ma(t, c) {
|
|
|
262
262
|
} catch {
|
|
263
263
|
G || (p.value = !0);
|
|
264
264
|
} finally {
|
|
265
|
-
G || (
|
|
265
|
+
G || (u.value = !1, v.value = !1);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
return !i.value && !
|
|
268
|
+
function T() {
|
|
269
|
+
return !i.value && !u.value ? (f.value = !0, Promise.resolve()) : D();
|
|
270
270
|
}
|
|
271
271
|
async function M(N) {
|
|
272
272
|
for (const le = Date.now() + Vt; !G; await new Promise((O) => setTimeout(O, Bt))) {
|
|
@@ -280,23 +280,23 @@ function Ma(t, c) {
|
|
|
280
280
|
const se = (N) => N?.code === "executor_starting" ? a.value.statusStarting : At(N?.reason) ? a.value.statusUnreachable : void 0;
|
|
281
281
|
return we(() => {
|
|
282
282
|
n.subscribe?.((N) => {
|
|
283
|
-
!G && !ta(N) && (
|
|
283
|
+
!G && !ta(N) && (r.value = N);
|
|
284
284
|
}), B(t.initial);
|
|
285
285
|
}), ge(() => {
|
|
286
286
|
G = !0, i.value = "";
|
|
287
|
-
}), { status:
|
|
287
|
+
}), { status: r, password: i, busy: u, confirming: v, error: p, failure: d, passwordError: x, scope: P, chosen: $, options: z, dynamic: C, files: A, webapiProfiles: n.webapiProfiles, canConfirm: ae, needsScope: F, refresh: K, authorize: D, submit: T, explain: se };
|
|
288
288
|
}
|
|
289
289
|
function He(t, c) {
|
|
290
|
-
let n = !1, a,
|
|
290
|
+
let n = !1, a, r = 0;
|
|
291
291
|
function i() {
|
|
292
292
|
clearTimeout(a), a = setTimeout(() => {
|
|
293
293
|
c().then(() => {
|
|
294
294
|
!n && t() && i();
|
|
295
295
|
});
|
|
296
|
-
}, fa(
|
|
296
|
+
}, fa(r++, t()));
|
|
297
297
|
}
|
|
298
|
-
qe(t, (
|
|
299
|
-
clearTimeout(a),
|
|
298
|
+
qe(t, (u) => {
|
|
299
|
+
clearTimeout(a), r = 0, u && !n && i();
|
|
300
300
|
}), ge(() => {
|
|
301
301
|
n = !0, clearTimeout(a);
|
|
302
302
|
});
|
|
@@ -308,8 +308,8 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
308
308
|
locale: {}
|
|
309
309
|
},
|
|
310
310
|
setup(t) {
|
|
311
|
-
const c = t, n = w(() => Re(c.locale)), a = w(() => c.status?.approval),
|
|
312
|
-
return (
|
|
311
|
+
const c = t, n = w(() => Re(c.locale)), a = w(() => c.status?.approval), r = w(() => c.status?.state === "needs-admin-approval" && (c.status.code === "task_outdated" || !!a.value)), i = w(() => a.value?.permissions === "unchanged" ? n.value.upgradeUnchanged : a.value?.permissions === "expanded" ? n.value.upgradeExpanded : n.value.upgradeReview), u = (v) => v?.slice(0, 12) ?? "—";
|
|
312
|
+
return (v, p) => r.value ? (l(), _("section", {
|
|
313
313
|
key: 0,
|
|
314
314
|
class: "executor-upgrade",
|
|
315
315
|
"data-approval-diff": "",
|
|
@@ -327,12 +327,12 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
327
327
|
}, [
|
|
328
328
|
S("dt", null, o(d.name), 1),
|
|
329
329
|
S("dd", null, [
|
|
330
|
-
S("code", null, o(
|
|
330
|
+
S("code", null, o(u(d.old)) + " → " + o(u(d.new)), 1)
|
|
331
331
|
])
|
|
332
332
|
], 64))), 128)),
|
|
333
333
|
S("dt", null, o(n.value.upgradePolicyLabel), 1),
|
|
334
334
|
S("dd", null, [
|
|
335
|
-
S("code", null, o(
|
|
335
|
+
S("code", null, o(u(a.value.old_policy_digest)) + " → " + o(u(a.value.new_policy_digest)), 1)
|
|
336
336
|
])
|
|
337
337
|
]),
|
|
338
338
|
a.value.policy_changes.length ? (l(), _("details", Ht, [
|
|
@@ -351,8 +351,8 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
351
351
|
}
|
|
352
352
|
}), ve = (t, c) => {
|
|
353
353
|
const n = t.__vccOpts || t;
|
|
354
|
-
for (const [a,
|
|
355
|
-
n[a] =
|
|
354
|
+
for (const [a, r] of c)
|
|
355
|
+
n[a] = r;
|
|
356
356
|
return n;
|
|
357
357
|
}, Jt = /* @__PURE__ */ ve(Xt, [["__scopeId", "data-v-aa18745e"]]), Wt = ["data-audience"], Yt = {
|
|
358
358
|
class: "executor-consent-icon",
|
|
@@ -389,8 +389,8 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
389
389
|
webapiProfiles: {}
|
|
390
390
|
},
|
|
391
391
|
setup(t) {
|
|
392
|
-
const c = t, n = w(() => c.status?.code === "task_outdated" || !!c.status?.approval), a = w(() => Re(c.locale)),
|
|
393
|
-
return (
|
|
392
|
+
const c = t, n = w(() => c.status?.code === "task_outdated" || !!c.status?.approval), a = w(() => Re(c.locale)), r = w(() => Pa([a.value.consentWhy, c.purpose || (c.files ? a.value.consentPurposeFiles : a.value.consentPurpose)], c.locale ?? "en")), i = w(() => [a.value.pointPassword, a.value.pointLimited, a.value.pointUpdate, a.value.pointRevoke]);
|
|
393
|
+
return (u, v) => (l(), _("div", {
|
|
394
394
|
class: De(["executor-consent", `executor-consent-${t.layout ?? "inline"}`]),
|
|
395
395
|
"data-executor-consent": "",
|
|
396
396
|
"data-audience": t.admin ? "admin" : "user"
|
|
@@ -403,7 +403,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
403
403
|
S("div", Qt, [
|
|
404
404
|
S("div", Zt, [
|
|
405
405
|
S("p", jt, o(t.admin ? n.value ? a.value.upgradeConsentTitle : a.value.consentTitle : a.value.consentTitleUser), 1),
|
|
406
|
-
S("p", el, o(
|
|
406
|
+
S("p", el, o(r.value), 1),
|
|
407
407
|
t.admin ? y("", !0) : (l(), _("p", al, o(a.value.consentAsk), 1))
|
|
408
408
|
]),
|
|
409
409
|
t.webapiProfiles && Object.keys(t.webapiProfiles).length ? (l(), _("ul", tl, [
|
|
@@ -412,9 +412,9 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
412
412
|
h(": " + o(p.purpose) + " ", 1),
|
|
413
413
|
S("details", null, [
|
|
414
414
|
S("summary", null, o(a.value.details), 1),
|
|
415
|
-
(l(!0), _(j, null, pe(p.apis, (
|
|
415
|
+
(l(!0), _(j, null, pe(p.apis, (f, x) => (l(), _("div", { key: x }, [
|
|
416
416
|
S("code", null, o(x), 1),
|
|
417
|
-
(l(!0), _(j, null, pe(
|
|
417
|
+
(l(!0), _(j, null, pe(f, (P, $) => (l(), _("div", { key: $ }, o($) + " (" + o(P.join(", ")) + ")", 1))), 128))
|
|
418
418
|
]))), 128)),
|
|
419
419
|
p.raw_max_bytes ? (l(), _("code", ll, o(a.value.rawLimit) + ": " + o(p.raw_max_bytes), 1)) : y("", !0)
|
|
420
420
|
])
|
|
@@ -425,7 +425,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
425
425
|
status: t.status,
|
|
426
426
|
locale: t.locale
|
|
427
427
|
}, null, 8, ["status", "locale"])) : y("", !0),
|
|
428
|
-
he(
|
|
428
|
+
he(u.$slots, "default", {}, void 0, !0),
|
|
429
429
|
t.admin ? (l(), _("details", nl, [
|
|
430
430
|
S("summary", null, [
|
|
431
431
|
m(e(Va), {
|
|
@@ -464,18 +464,18 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
464
464
|
},
|
|
465
465
|
emits: ["confirmed"],
|
|
466
466
|
setup(t, { expose: c, emit: n }) {
|
|
467
|
-
const a = t,
|
|
468
|
-
He(() =>
|
|
469
|
-
const M = w(() => !
|
|
467
|
+
const a = t, r = n, i = w(() => Re(a.locale)), { status: u, password: v, busy: p, confirming: d, error: f, failure: x, passwordError: P, scope: $, chosen: k, options: E, dynamic: C, files: A, webapiProfiles: z, canConfirm: ae, needsScope: F, refresh: G, submit: X, explain: B } = Ma(a, () => r("confirmed")), K = w(() => d.value ? "confirming" : u.value ? u.value.state === "ready" ? "ready" : "blocked" : void 0), D = w(() => ({ ready: { tone: "success", text: i.value.statusReady }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[K.value ?? "confirming"]), T = w(() => d.value ? void 0 : Se(u.value));
|
|
468
|
+
He(() => T.value, G);
|
|
469
|
+
const M = w(() => !T.value && (u.value?.state === "needs-admin-approval" || F.value)), se = w(() => M.value || !!u.value?.retry);
|
|
470
470
|
return c({ refresh: G }), (N, le) => t.admin ? (l(), g(e(_e), {
|
|
471
471
|
key: 0,
|
|
472
472
|
title: t.title ?? i.value.setupTitle,
|
|
473
|
-
description: M.value ? void 0 : e(
|
|
473
|
+
description: M.value ? void 0 : e(A) ? i.value.setupHelpFiles : i.value.setupHelp,
|
|
474
474
|
collapsible: !1,
|
|
475
|
-
"aria-busy": e(p) || !e(
|
|
475
|
+
"aria-busy": e(p) || !e(u) && !e(d) && !e(f)
|
|
476
476
|
}, {
|
|
477
477
|
default: s(() => [
|
|
478
|
-
e(
|
|
478
|
+
e(f) ? (l(), g(e(Q), {
|
|
479
479
|
key: 0,
|
|
480
480
|
tone: "danger",
|
|
481
481
|
role: "alert"
|
|
@@ -508,17 +508,17 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
508
508
|
]),
|
|
509
509
|
_: 1
|
|
510
510
|
})) : y("", !0),
|
|
511
|
-
|
|
511
|
+
T.value ? (l(), g(e(Q), {
|
|
512
512
|
key: 2,
|
|
513
513
|
tone: "info",
|
|
514
514
|
role: "status"
|
|
515
515
|
}, {
|
|
516
516
|
default: s(() => [
|
|
517
|
-
h(o(e(Ve)(
|
|
517
|
+
h(o(e(Ve)(T.value, t.locale)), 1)
|
|
518
518
|
]),
|
|
519
519
|
_: 1
|
|
520
520
|
})) : (l(), _(j, { key: 3 }, [
|
|
521
|
-
!e(
|
|
521
|
+
!e(u) && !e(d) && !e(f) ? (l(), _("div", ul, [
|
|
522
522
|
m(e(xe), {
|
|
523
523
|
label: i.value.status,
|
|
524
524
|
"data-placeholder-row": ""
|
|
@@ -532,7 +532,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
532
532
|
_: 1
|
|
533
533
|
}, 8, ["label"])
|
|
534
534
|
])) : y("", !0),
|
|
535
|
-
(e(
|
|
535
|
+
(e(u) || e(d)) && !M.value ? (l(), _("div", rl, [
|
|
536
536
|
m(e(xe), {
|
|
537
537
|
label: i.value.status
|
|
538
538
|
}, {
|
|
@@ -553,27 +553,27 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
553
553
|
]),
|
|
554
554
|
_: 1
|
|
555
555
|
}, 8, ["label"]),
|
|
556
|
-
e(
|
|
556
|
+
e(u)?.reason && (e(u).state === "blocked" || e(u).state === "unsupported") ? (l(), g(e(xe), {
|
|
557
557
|
key: 0,
|
|
558
558
|
label: i.value.details
|
|
559
559
|
}, {
|
|
560
560
|
default: s(() => [
|
|
561
|
-
e(B)(e(
|
|
562
|
-
h(o(e(B)(e(
|
|
563
|
-
S("span", cl, o(e(
|
|
561
|
+
e(B)(e(u)) ? (l(), _(j, { key: 0 }, [
|
|
562
|
+
h(o(e(B)(e(u))), 1),
|
|
563
|
+
S("span", cl, o(e(u).reason), 1)
|
|
564
564
|
], 64)) : (l(), _(j, { key: 1 }, [
|
|
565
|
-
h(o(e(
|
|
565
|
+
h(o(e(u).reason), 1)
|
|
566
566
|
], 64))
|
|
567
567
|
]),
|
|
568
568
|
_: 1
|
|
569
569
|
}, 8, ["label"])) : y("", !0),
|
|
570
|
-
e(
|
|
570
|
+
e($)?.selection ? (l(), g(e(xe), {
|
|
571
571
|
key: 1,
|
|
572
572
|
label: i.value.protectedScope
|
|
573
573
|
}, {
|
|
574
574
|
default: s(() => [
|
|
575
575
|
m(e(Le), {
|
|
576
|
-
path: e(
|
|
576
|
+
path: e($).selection.root
|
|
577
577
|
}, null, 8, ["path"])
|
|
578
578
|
]),
|
|
579
579
|
_: 1
|
|
@@ -584,11 +584,11 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
584
584
|
tone: "warning"
|
|
585
585
|
}, {
|
|
586
586
|
default: s(() => [
|
|
587
|
-
h(o(e(
|
|
587
|
+
h(o(e(A) ? i.value.blocked : i.value.executorBlocked), 1)
|
|
588
588
|
]),
|
|
589
589
|
_: 1
|
|
590
590
|
})) : y("", !0),
|
|
591
|
-
e(
|
|
591
|
+
e($)?.mismatch ? (l(), g(e(Q), {
|
|
592
592
|
key: 3,
|
|
593
593
|
tone: "warning"
|
|
594
594
|
}, {
|
|
@@ -597,7 +597,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
597
597
|
]),
|
|
598
598
|
_: 1
|
|
599
599
|
})) : y("", !0),
|
|
600
|
-
se.value ? (l(), g(Xe(M.value ? la : "div"), ea(ya({ key: 4 }, M.value ? { admin: !0, locale: t.locale, files: e(
|
|
600
|
+
se.value ? (l(), g(Xe(M.value ? la : "div"), ea(ya({ key: 4 }, M.value ? { admin: !0, locale: t.locale, files: e(A), purpose: t.purpose, layout: t.layout, webapiProfiles: e(z), status: e(u) } : {})), {
|
|
601
601
|
default: s(() => [
|
|
602
602
|
m(e(Ke), {
|
|
603
603
|
direction: "vertical",
|
|
@@ -613,10 +613,10 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
613
613
|
default: s(() => [
|
|
614
614
|
m(e(ba), {
|
|
615
615
|
id: "delegate-scope",
|
|
616
|
-
modelValue: e(
|
|
617
|
-
"onUpdate:modelValue": le[0] || (le[0] = (O) => aa(
|
|
618
|
-
options: e(
|
|
619
|
-
disabled: e(p) || e(
|
|
616
|
+
modelValue: e(k),
|
|
617
|
+
"onUpdate:modelValue": le[0] || (le[0] = (O) => aa(k) ? k.value = O : null),
|
|
618
|
+
options: e(E),
|
|
619
|
+
disabled: e(p) || e(f)
|
|
620
620
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
621
621
|
]),
|
|
622
622
|
_: 1
|
|
@@ -624,8 +624,8 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
624
624
|
m(e(Pe), {
|
|
625
625
|
label: i.value.password,
|
|
626
626
|
description: e(d) ? i.value.confirmingHelp : i.value.passwordNote,
|
|
627
|
-
help: e(
|
|
628
|
-
"validate-status": e(
|
|
627
|
+
help: e(P),
|
|
628
|
+
"validate-status": e(P) ? "error" : void 0,
|
|
629
629
|
"validate-message-display-mode": "text"
|
|
630
630
|
}, {
|
|
631
631
|
after: s(({ classes: O }) => [
|
|
@@ -634,7 +634,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
634
634
|
type: "submit",
|
|
635
635
|
variant: "primary",
|
|
636
636
|
loading: e(d),
|
|
637
|
-
disabled: e(p) || e(
|
|
637
|
+
disabled: e(p) || e(f) || !e(ae)
|
|
638
638
|
}, {
|
|
639
639
|
default: s(() => [
|
|
640
640
|
h(o(e(C) ? i.value.confirmShare : i.value.authorize), 1)
|
|
@@ -645,12 +645,12 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
645
645
|
default: s(() => [
|
|
646
646
|
m(e(ze), {
|
|
647
647
|
id: "delegate-password",
|
|
648
|
-
modelValue: e(
|
|
649
|
-
"onUpdate:modelValue": le[1] || (le[1] = (O) => aa(
|
|
648
|
+
modelValue: e(v),
|
|
649
|
+
"onUpdate:modelValue": le[1] || (le[1] = (O) => aa(v) ? v.value = O : null),
|
|
650
650
|
type: "password",
|
|
651
651
|
autocomplete: "current-password",
|
|
652
|
-
invalid: !!e(
|
|
653
|
-
disabled: e(p) || e(
|
|
652
|
+
invalid: !!e(P),
|
|
653
|
+
disabled: e(p) || e(f)
|
|
654
654
|
}, null, 8, ["modelValue", "invalid", "disabled"])
|
|
655
655
|
]),
|
|
656
656
|
_: 1
|
|
@@ -666,7 +666,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
666
666
|
_: 1
|
|
667
667
|
}, 8, ["title", "description", "aria-busy"])) : y("", !0);
|
|
668
668
|
}
|
|
669
|
-
}), Ka = /* @__PURE__ */ ve(vl, [["__scopeId", "data-v-
|
|
669
|
+
}), Ka = /* @__PURE__ */ ve(vl, [["__scopeId", "data-v-8d081934"]]), fl = {
|
|
670
670
|
key: 0,
|
|
671
671
|
class: "executor-notice"
|
|
672
672
|
}, pl = {
|
|
@@ -682,19 +682,19 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
682
682
|
setup(t) {
|
|
683
683
|
const c = t, n = w(() => Re(c.locale)), a = Te(Ye, void 0) ?? c.ctx.executor;
|
|
684
684
|
a && Oe(Ye, a);
|
|
685
|
-
const
|
|
686
|
-
let
|
|
687
|
-
function
|
|
688
|
-
const
|
|
689
|
-
if (i.value = Se(C),
|
|
690
|
-
|
|
685
|
+
const r = b("checking"), i = b(), u = b(!1), v = w(() => c.ctx.user?.isAdmin === !0), p = w(() => !i.value && (r.value === "needs-admin-approval" || r.value === "blocked")), d = w(() => a?.call ? { webApi: c.ctx.webApi, call: (C, A) => a.call(C, A) } : c.ctx.call ? c.ctx : void 0);
|
|
686
|
+
let f = !1, x, P, $ = 0;
|
|
687
|
+
function k(C) {
|
|
688
|
+
const A = i.value;
|
|
689
|
+
if (i.value = Se(C), r.value = C?.state ?? "unknown", clearTimeout(P), C && !i.value) {
|
|
690
|
+
$ = 0;
|
|
691
691
|
return;
|
|
692
692
|
}
|
|
693
|
-
i.value !==
|
|
694
|
-
|
|
695
|
-
}, fa(
|
|
693
|
+
i.value !== A && ($ = 0), P = setTimeout(() => {
|
|
694
|
+
E();
|
|
695
|
+
}, fa($++, i.value));
|
|
696
696
|
}
|
|
697
|
-
async function
|
|
697
|
+
async function E() {
|
|
698
698
|
if (!a) return;
|
|
699
699
|
let C;
|
|
700
700
|
try {
|
|
@@ -702,17 +702,17 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
702
702
|
} catch {
|
|
703
703
|
C = void 0;
|
|
704
704
|
}
|
|
705
|
-
|
|
705
|
+
f || k(C);
|
|
706
706
|
}
|
|
707
707
|
return we(() => {
|
|
708
708
|
a && (a.subscribe?.((C) => {
|
|
709
|
-
!
|
|
709
|
+
!f && !ta(C) && k(C);
|
|
710
710
|
}), x = c.ctx.reopen?.(() => {
|
|
711
|
-
|
|
712
|
-
}),
|
|
711
|
+
E();
|
|
712
|
+
}), E());
|
|
713
713
|
}), ge(() => {
|
|
714
|
-
|
|
715
|
-
}), (C,
|
|
714
|
+
f = !0, clearTimeout(P), x?.();
|
|
715
|
+
}), (C, A) => i.value ? (l(), _("div", fl, [
|
|
716
716
|
m(e(Q), {
|
|
717
717
|
tone: "info",
|
|
718
718
|
role: "status"
|
|
@@ -726,12 +726,12 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
726
726
|
m(e(Q), { tone: "warning" }, {
|
|
727
727
|
default: s(() => [
|
|
728
728
|
S("span", ml, [
|
|
729
|
-
h(o(
|
|
730
|
-
|
|
729
|
+
h(o(v.value ? n.value.noticeAdmin : n.value.noticeUser), 1),
|
|
730
|
+
v.value ? (l(), g(e(I), {
|
|
731
731
|
key: 0,
|
|
732
732
|
variant: "secondary",
|
|
733
733
|
size: "sm",
|
|
734
|
-
onClick:
|
|
734
|
+
onClick: A[0] || (A[0] = (z) => u.value = !0)
|
|
735
735
|
}, {
|
|
736
736
|
default: s(() => [
|
|
737
737
|
h(o(n.value.noticeApprove), 1)
|
|
@@ -742,11 +742,11 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
742
742
|
]),
|
|
743
743
|
_: 1
|
|
744
744
|
}),
|
|
745
|
-
|
|
745
|
+
v.value ? (l(), g(e(Be), {
|
|
746
746
|
key: 0,
|
|
747
|
-
open:
|
|
747
|
+
open: u.value && p.value,
|
|
748
748
|
title: n.value.setupTitle,
|
|
749
|
-
"onUpdate:open":
|
|
749
|
+
"onUpdate:open": A[1] || (A[1] = (z) => u.value = z)
|
|
750
750
|
}, {
|
|
751
751
|
default: s(() => [
|
|
752
752
|
m(Ka, {
|
|
@@ -755,14 +755,14 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
755
755
|
ctx: d.value,
|
|
756
756
|
purpose: t.purpose,
|
|
757
757
|
title: "",
|
|
758
|
-
onConfirmed:
|
|
758
|
+
onConfirmed: E
|
|
759
759
|
}, null, 8, ["locale", "ctx", "purpose"])
|
|
760
760
|
]),
|
|
761
761
|
_: 1
|
|
762
762
|
}, 8, ["open", "title"])) : y("", !0)
|
|
763
763
|
])) : y("", !0);
|
|
764
764
|
}
|
|
765
|
-
}), bl = /* @__PURE__ */ ve(yl, [["__scopeId", "data-v-
|
|
765
|
+
}), bl = /* @__PURE__ */ ve(yl, [["__scopeId", "data-v-34d04da4"]]), gl = {
|
|
766
766
|
key: 0,
|
|
767
767
|
class: "ui-update-notice"
|
|
768
768
|
}, hl = { class: "ui-update-notice-body" }, kl = /* @__PURE__ */ de({
|
|
@@ -772,32 +772,32 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
772
772
|
ctx: {}
|
|
773
773
|
},
|
|
774
774
|
setup(t) {
|
|
775
|
-
const c = t, n = w(() => Ze(c.locale ?? "en")), a = b(!1),
|
|
776
|
-
let i,
|
|
777
|
-
async function
|
|
778
|
-
const
|
|
779
|
-
if (!(!
|
|
780
|
-
|
|
775
|
+
const c = t, n = w(() => Ze(c.locale ?? "en")), a = b(!1), r = new AbortController();
|
|
776
|
+
let i, u = -1 / 0;
|
|
777
|
+
async function v() {
|
|
778
|
+
const f = c.ctx.uiUpdate;
|
|
779
|
+
if (!(!f || a.value || r.signal.aborted)) {
|
|
780
|
+
u = Date.now();
|
|
781
781
|
try {
|
|
782
|
-
await
|
|
782
|
+
await f.check(r.signal) && !r.signal.aborted && (a.value = !0);
|
|
783
783
|
} catch {
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
function p() {
|
|
788
|
-
document.visibilityState !== "hidden" && Date.now() -
|
|
788
|
+
document.visibilityState !== "hidden" && Date.now() - u >= 6e4 && v();
|
|
789
789
|
}
|
|
790
790
|
we(() => {
|
|
791
791
|
c.ctx.uiUpdate && (i = c.ctx.reopen?.(() => {
|
|
792
|
-
|
|
793
|
-
}), document.addEventListener("visibilitychange", p),
|
|
792
|
+
v();
|
|
793
|
+
}), document.addEventListener("visibilitychange", p), v());
|
|
794
794
|
}), ge(() => {
|
|
795
|
-
|
|
795
|
+
r.abort(), i?.(), document.removeEventListener("visibilitychange", p);
|
|
796
796
|
});
|
|
797
797
|
function d() {
|
|
798
798
|
window.location.reload();
|
|
799
799
|
}
|
|
800
|
-
return (
|
|
800
|
+
return (f, x) => a.value ? (l(), _("div", gl, [
|
|
801
801
|
m(e(Q), {
|
|
802
802
|
tone: "info",
|
|
803
803
|
role: "status"
|
|
@@ -853,23 +853,23 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
853
853
|
emits: ["update:modelValue", "brand"],
|
|
854
854
|
setup(t, { emit: c }) {
|
|
855
855
|
const n = t, a = c;
|
|
856
|
-
function
|
|
856
|
+
function r(N) {
|
|
857
857
|
a("brand", N);
|
|
858
|
-
const le =
|
|
858
|
+
const le = v.value[0];
|
|
859
859
|
!N.defaultPrevented && le && a("update:modelValue", le.id);
|
|
860
860
|
}
|
|
861
|
-
const i = w(() => Ze(n.locale)),
|
|
861
|
+
const i = w(() => Ze(n.locale)), u = w(() => n.pageSurface), v = w(() => Dt(n.pages, i.value)), p = w(() => Nt(v.value)), d = w(() => v.value.find((N) => N.id === n.modelValue)), f = w(() => d.value && n.loading ? { ...d.value, fill: !0 } : d.value), x = w(() => f.value?.title ?? i.value[n.modelValue] ?? i.value.status), P = Ge("scroller"), $ = w(() => n.pages.some((N) => typeof N != "string"));
|
|
862
862
|
qe(() => n.modelValue, () => {
|
|
863
|
-
|
|
863
|
+
$.value && !n.keepScroll && P.value && (P.value.$el.scrollTop = 0);
|
|
864
864
|
}, { flush: "post" });
|
|
865
|
-
const
|
|
865
|
+
const k = Ia(), E = w(() => n.denied === !0 ? {} : n.denied || void 0), C = w(() => na(E.value, n.locale, n.brandName ?? n.ctx?.displayName)), A = w(() => n.ctx !== void 0 && Ea(n.ctx)), z = w(() => A.value ? n.ctx : void 0), ae = (N, { slots: le }) => le.default?.(), F = w(() => n.ctx !== void 0 && !A.value);
|
|
866
866
|
function G() {
|
|
867
867
|
n.ctx?.host?.activateWindow?.();
|
|
868
868
|
}
|
|
869
869
|
const X = Ge("layout"), B = b({ brand: !1, user: !1 });
|
|
870
|
-
qe([
|
|
870
|
+
qe([A, X], (N, le, O) => {
|
|
871
871
|
const Z = X.value?.$el;
|
|
872
|
-
if (!
|
|
872
|
+
if (!A.value || !Z) {
|
|
873
873
|
B.value = { brand: !1, user: !1 };
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
@@ -891,7 +891,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
891
891
|
const N = z.value?.host;
|
|
892
892
|
return typeof N?.signOut == "function" && N.platform().host === "dsm";
|
|
893
893
|
});
|
|
894
|
-
function
|
|
894
|
+
function T() {
|
|
895
895
|
z.value?.host?.signOut?.();
|
|
896
896
|
}
|
|
897
897
|
Oe(Ha, Ge("page-actions")), Oe(Ga, Ge("page-info")), Oe(Xa, w(() => n.locale));
|
|
@@ -906,26 +906,26 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
906
906
|
const Z = new MutationObserver(O);
|
|
907
907
|
Z.observe(le, { childList: !0, subtree: !0, characterData: !0 }), N(() => Z.disconnect());
|
|
908
908
|
}, { flush: "post" }), ha((N) => {
|
|
909
|
-
|
|
909
|
+
A.value && N(yt());
|
|
910
910
|
}), (N, le) => (l(), g(Xe(t.appRoot ? e(bt) : ae), ea(ka(t.appRoot ? { modalScope: "app", dialogBounds: F.value ? "viewport" : "app", style: "height: 100%;", onActivate: G } : {})), {
|
|
911
911
|
default: s(() => [
|
|
912
912
|
(l(), g(Xe(t.appRoot ? e(gt) : ae), ea(ka(t.appRoot ? { locale: e(Ta)(t.locale) } : {})), {
|
|
913
913
|
default: s(() => [
|
|
914
|
-
|
|
914
|
+
E.value ? (l(), g(e(_a), {
|
|
915
915
|
key: 0,
|
|
916
916
|
class: "app-denied",
|
|
917
917
|
width: t.pageWidth,
|
|
918
|
-
surface:
|
|
918
|
+
surface: u.value
|
|
919
919
|
}, {
|
|
920
920
|
default: s(() => [
|
|
921
|
-
|
|
921
|
+
E.value.header !== !1 ? (l(), g(e(wa), {
|
|
922
922
|
key: 0,
|
|
923
|
-
title:
|
|
923
|
+
title: E.value.title ?? C.value?.title ?? i.value.deniedTitle
|
|
924
924
|
}, null, 8, ["title"])) : y("", !0),
|
|
925
925
|
he(N.$slots, "denied", {}, () => [
|
|
926
926
|
m(e(Q), { tone: "danger" }, {
|
|
927
927
|
default: s(() => [
|
|
928
|
-
S("span", wl, o(
|
|
928
|
+
S("span", wl, o(E.value.message ?? C.value?.message ?? i.value.deniedMessage), 1)
|
|
929
929
|
]),
|
|
930
930
|
_: 1
|
|
931
931
|
})
|
|
@@ -936,14 +936,14 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
936
936
|
key: 1,
|
|
937
937
|
ref_key: "layout",
|
|
938
938
|
ref: X,
|
|
939
|
-
class: De(["app-shell", { "app-shell-fill":
|
|
939
|
+
class: De(["app-shell", { "app-shell-fill": f.value?.fill, "app-shell-portal-brand": B.value.brand }]),
|
|
940
940
|
"min-height": "0",
|
|
941
|
-
"wide-layout": t.wideLayout ?? (
|
|
941
|
+
"wide-layout": t.wideLayout ?? (A.value ? "web" : "window"),
|
|
942
942
|
"sidebar-storage-key": t.sidebarStorageKey,
|
|
943
943
|
navigation: t.navigation,
|
|
944
944
|
"brand-name": t.brandName ?? t.ctx?.displayName,
|
|
945
945
|
"brand-icon": t.brandIcon ?? t.ctx?.appIcon,
|
|
946
|
-
onBrand:
|
|
946
|
+
onBrand: r
|
|
947
947
|
}, sa({
|
|
948
948
|
sidebar: s(() => [
|
|
949
949
|
m(e(kt), {
|
|
@@ -955,16 +955,16 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
955
955
|
default: s(() => [
|
|
956
956
|
m(e(_a), {
|
|
957
957
|
ref_key: "scroller",
|
|
958
|
-
ref:
|
|
959
|
-
class: De(["app-page", { "app-page-fill":
|
|
958
|
+
ref: P,
|
|
959
|
+
class: De(["app-page", { "app-page-fill": f.value?.fill }]),
|
|
960
960
|
width: t.pageWidth,
|
|
961
|
-
surface:
|
|
961
|
+
surface: u.value
|
|
962
962
|
}, {
|
|
963
963
|
default: s(() => [
|
|
964
|
-
|
|
964
|
+
f.value?.header !== !1 ? (l(), g(e(wa), {
|
|
965
965
|
key: 0,
|
|
966
966
|
title: x.value,
|
|
967
|
-
description:
|
|
967
|
+
description: f.value?.description ?? t.description
|
|
968
968
|
}, {
|
|
969
969
|
meta: s(() => [
|
|
970
970
|
S("span", Cl, null, 512),
|
|
@@ -986,7 +986,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
986
986
|
ctx: t.ctx,
|
|
987
987
|
locale: t.locale
|
|
988
988
|
}, null, 8, ["ctx", "locale"])) : y("", !0),
|
|
989
|
-
e(qa)(
|
|
989
|
+
e(qa)(k.notices?.({ page: t.modelValue })) ? (l(), _("div", {
|
|
990
990
|
key: 3,
|
|
991
991
|
ref: "notices",
|
|
992
992
|
class: "app-notices",
|
|
@@ -999,8 +999,8 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
999
999
|
key: 0,
|
|
1000
1000
|
text: i.value.loading
|
|
1001
1001
|
}, null, 8, ["text"])) : (l(), _(j, { key: 1 }, [
|
|
1002
|
-
|
|
1003
|
-
key:
|
|
1002
|
+
f.value?.component ? (l(), g(Xe(f.value.component), {
|
|
1003
|
+
key: f.value.id
|
|
1004
1004
|
})) : y("", !0),
|
|
1005
1005
|
he(N.$slots, "default", { page: t.modelValue }, void 0, !0)
|
|
1006
1006
|
], 64))
|
|
@@ -1011,7 +1011,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1011
1011
|
]),
|
|
1012
1012
|
_: 2
|
|
1013
1013
|
}, [
|
|
1014
|
-
|
|
1014
|
+
k["sidebar-footer"] || K.value ? {
|
|
1015
1015
|
name: "sidebar-footer",
|
|
1016
1016
|
fn: s(() => [
|
|
1017
1017
|
he(N.$slots, "sidebar-footer", {}, () => [
|
|
@@ -1025,7 +1025,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1025
1025
|
class: "app-shell-sign-out",
|
|
1026
1026
|
variant: "ghost",
|
|
1027
1027
|
label: i.value.signOut,
|
|
1028
|
-
onClick:
|
|
1028
|
+
onClick: T
|
|
1029
1029
|
}, {
|
|
1030
1030
|
default: s(() => [
|
|
1031
1031
|
m(e(ft), {
|
|
@@ -1040,7 +1040,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1040
1040
|
]),
|
|
1041
1041
|
key: "0"
|
|
1042
1042
|
} : void 0,
|
|
1043
|
-
|
|
1043
|
+
k.toolbar ? {
|
|
1044
1044
|
name: "toolbar",
|
|
1045
1045
|
fn: s(() => [
|
|
1046
1046
|
he(N.$slots, "toolbar", { page: t.modelValue }, void 0, !0)
|
|
@@ -1059,7 +1059,7 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1059
1059
|
__name: "PageActions",
|
|
1060
1060
|
setup(t) {
|
|
1061
1061
|
const c = Te(Ha, null), n = w(() => c?.value ?? null);
|
|
1062
|
-
return (a,
|
|
1062
|
+
return (a, r) => n.value ? (l(), g(Da, {
|
|
1063
1063
|
key: 0,
|
|
1064
1064
|
to: n.value
|
|
1065
1065
|
}, [
|
|
@@ -1078,15 +1078,15 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1078
1078
|
align: { default: "start" }
|
|
1079
1079
|
},
|
|
1080
1080
|
setup(t) {
|
|
1081
|
-
const c = t, n = Ia(), a = w(() => (c.notes ?? []).filter(Boolean)),
|
|
1081
|
+
const c = t, n = Ia(), a = w(() => (c.notes ?? []).filter(Boolean)), r = c.inline ? null : Te(Ga, null), i = w(() => r?.value ?? null), u = Te(Xa, null), v = w(() => {
|
|
1082
1082
|
if (c.label) return c.label;
|
|
1083
|
-
const p = c.locale ??
|
|
1083
|
+
const p = c.locale ?? u?.value ?? "en";
|
|
1084
1084
|
return n.default ? Ze(p).notes : Je(Ze(p).notesCount, { count: a.value.length }, p);
|
|
1085
1085
|
});
|
|
1086
|
-
return (p, d) => (a.value.length || n.default) && (!e(
|
|
1086
|
+
return (p, d) => (a.value.length || n.default) && (!e(r) || i.value) ? (l(), g(Da, {
|
|
1087
1087
|
key: 0,
|
|
1088
1088
|
to: i.value ?? "body",
|
|
1089
|
-
disabled: !e(
|
|
1089
|
+
disabled: !e(r)
|
|
1090
1090
|
}, [
|
|
1091
1091
|
m(e(wt), ya(p.$attrs, {
|
|
1092
1092
|
class: "page-info",
|
|
@@ -1094,12 +1094,12 @@ const Ft = ["aria-label"], Ot = { class: "executor-upgrade-title" }, qt = { key:
|
|
|
1094
1094
|
"trigger-action": "click",
|
|
1095
1095
|
side: t.side,
|
|
1096
1096
|
align: t.align,
|
|
1097
|
-
"aria-label":
|
|
1097
|
+
"aria-label": v.value
|
|
1098
1098
|
}), {
|
|
1099
1099
|
default: s(() => [
|
|
1100
1100
|
he(p.$slots, "default", {}, () => [
|
|
1101
1101
|
S("ul", Tl, [
|
|
1102
|
-
(l(!0), _(j, null, pe(a.value, (
|
|
1102
|
+
(l(!0), _(j, null, pe(a.value, (f) => (l(), _("li", { key: f }, o(f), 1))), 128))
|
|
1103
1103
|
])
|
|
1104
1104
|
], !0)
|
|
1105
1105
|
]),
|
|
@@ -1138,30 +1138,30 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1138
1138
|
},
|
|
1139
1139
|
emits: ["selected"],
|
|
1140
1140
|
setup(t, { emit: c }) {
|
|
1141
|
-
const n = t, a = c,
|
|
1141
|
+
const n = t, a = c, r = w(() => Ae(n.locale)), i = zt(), { busy: u, error: v } = i, p = b([]), d = b([]), f = b([]), x = b(), P = b(), $ = b(), k = b([]), E = b(), C = b({ key: "name", direction: "asc" }), A = b(0), z = b([]), ae = b(!1);
|
|
1142
1142
|
let F = new AbortController();
|
|
1143
1143
|
async function G() {
|
|
1144
1144
|
const L = x.value;
|
|
1145
1145
|
!L || L.isDir || !n.provider.download || await i.run(async (V) => (await n.provider.info(L.path, V), await n.provider.download(L.path), !0));
|
|
1146
1146
|
}
|
|
1147
1147
|
async function X() {
|
|
1148
|
-
const L =
|
|
1148
|
+
const L = f.value.at(-1)?.path, V = z.value[0];
|
|
1149
1149
|
if (!L || !V || !n.provider.upload) return;
|
|
1150
|
-
ae.value = !1, await i.run(async (te) => (await n.provider.upload(L, V, te), !0)) && (z.value = [], await H(
|
|
1150
|
+
ae.value = !1, await i.run(async (te) => (await n.provider.upload(L, V, te), !0)) && (z.value = [], await H(f.value), ae.value = !0);
|
|
1151
1151
|
}
|
|
1152
1152
|
const B = w(() => [
|
|
1153
|
-
{ key: "name", label:
|
|
1154
|
-
{ key: "kind", label:
|
|
1155
|
-
{ key: "bytes", label:
|
|
1153
|
+
{ key: "name", label: r.value.nameColumn, sortable: !0 },
|
|
1154
|
+
{ key: "kind", label: r.value.kindColumn },
|
|
1155
|
+
{ key: "bytes", label: r.value.sizeColumn, align: "right", sortable: !0 }
|
|
1156
1156
|
]), K = it((L, { attrs: V }) => ut(ua, { ...V, kind: "folder" }));
|
|
1157
1157
|
function D(L) {
|
|
1158
1158
|
return { id: L.path, label: L.name, icon: K, data: L };
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function T(L) {
|
|
1161
1161
|
x.value = L, a("selected", L?.path);
|
|
1162
1162
|
}
|
|
1163
1163
|
function M(L) {
|
|
1164
|
-
|
|
1164
|
+
P.value = L.path, T(n.mode === "folder" ? L.isDir ? L : f.value.at(-1) : L.isDir ? void 0 : L);
|
|
1165
1165
|
}
|
|
1166
1166
|
function se(L) {
|
|
1167
1167
|
L.isDir ? Ce(L) : M(L);
|
|
@@ -1196,69 +1196,69 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1196
1196
|
if (V !== ie || !fe) return;
|
|
1197
1197
|
d.value = Z(d.value, te.id, fe);
|
|
1198
1198
|
}
|
|
1199
|
-
|
|
1199
|
+
k.value.includes(te.id) || (k.value = [...k.value, te.id]);
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
E.value = L.at(-1)?.path;
|
|
1202
1202
|
}
|
|
1203
1203
|
async function J(L) {
|
|
1204
|
-
const V =
|
|
1204
|
+
const V = A.value, q = F.signal;
|
|
1205
1205
|
try {
|
|
1206
1206
|
const te = [];
|
|
1207
1207
|
let fe = 0;
|
|
1208
1208
|
for (; fe !== void 0; ) {
|
|
1209
1209
|
const R = await n.provider.list(L.id, { offset: fe, sortBy: "name", sortDirection: "ASC" }, q);
|
|
1210
|
-
if (q.aborted || V !==
|
|
1210
|
+
if (q.aborted || V !== A.value) return;
|
|
1211
1211
|
te.push(...R.entries.filter((Y) => Y.isDir).map(D)), fe = R.nextOffset;
|
|
1212
1212
|
}
|
|
1213
1213
|
return te;
|
|
1214
1214
|
} catch (te) {
|
|
1215
|
-
!q.aborted && V ===
|
|
1215
|
+
!q.aborted && V === A.value && (v.value = te, T());
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
async function H(L, V = !1) {
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1222
|
-
const q = V ?
|
|
1223
|
-
|
|
1220
|
+
if (u.value) return;
|
|
1221
|
+
T(), P.value = void 0, p.value = V ? p.value : [], $.value = V ? $.value : void 0;
|
|
1222
|
+
const q = V ? $.value ?? 0 : 0, te = L.at(-1)?.path;
|
|
1223
|
+
f.value = L;
|
|
1224
1224
|
const fe = await i.run((R) => te ? n.provider.list(te, { offset: q, sortBy: C.value.key, sortDirection: C.value.direction === "asc" ? "ASC" : "DESC" }, R) : n.provider.shares(q, R));
|
|
1225
|
-
fe && (p.value = V ? [...p.value, ...fe.entries] : fe.entries,
|
|
1225
|
+
fe && (p.value = V ? [...p.value, ...fe.entries] : fe.entries, $.value = fe.nextOffset, te ? n.mode === "folder" && !V && T(L.at(-1)) : d.value = p.value.filter((R) => R.isDir).map(D), V || ce(L));
|
|
1226
1226
|
}
|
|
1227
|
-
const W = w(() => [{ id: "", display:
|
|
1227
|
+
const W = w(() => [{ id: "", display: r.value.roots }, ...f.value.map((L) => ({ id: L.path, display: L.name }))]);
|
|
1228
1228
|
function ye(L) {
|
|
1229
1229
|
const V = W.value.findIndex((q) => q.id === L.id);
|
|
1230
|
-
V <
|
|
1230
|
+
V < f.value.length && ue(f.value.slice(0, V));
|
|
1231
1231
|
}
|
|
1232
1232
|
function Ce(L) {
|
|
1233
|
-
ue([...
|
|
1233
|
+
ue([...f.value, L]);
|
|
1234
1234
|
}
|
|
1235
1235
|
const $e = b([[]]), ee = b(0);
|
|
1236
1236
|
function ue(L) {
|
|
1237
|
-
|
|
1237
|
+
u.value || (L.at(-1)?.path !== f.value.at(-1)?.path && ($e.value = [...$e.value.slice(0, ee.value + 1), L], ee.value++), H(L));
|
|
1238
1238
|
}
|
|
1239
1239
|
function oe(L) {
|
|
1240
|
-
|
|
1240
|
+
u.value || (ee.value += L, H($e.value[ee.value]));
|
|
1241
1241
|
}
|
|
1242
1242
|
function ke(L) {
|
|
1243
|
-
C.value = { key: L?.key === "bytes" ? "size" : "name", direction: L?.direction ?? "asc" }, H(
|
|
1243
|
+
C.value = { key: L?.key === "bytes" ? "size" : "name", direction: L?.direction ?? "asc" }, H(f.value);
|
|
1244
1244
|
}
|
|
1245
1245
|
function Ee() {
|
|
1246
|
-
|
|
1246
|
+
u.value || (A.value++, F.abort(), F = new AbortController(), d.value = [], k.value = [], E.value = void 0, $e.value = [[]], ee.value = 0, H([]));
|
|
1247
1247
|
}
|
|
1248
1248
|
return we(() => {
|
|
1249
1249
|
H([]);
|
|
1250
1250
|
}), ge(() => {
|
|
1251
|
-
|
|
1251
|
+
A.value++, F.abort();
|
|
1252
1252
|
}), (L, V) => (l(), _("section", {
|
|
1253
1253
|
class: "file-browser",
|
|
1254
|
-
"aria-busy": e(
|
|
1255
|
-
"aria-label":
|
|
1254
|
+
"aria-busy": e(u),
|
|
1255
|
+
"aria-label": r.value.title
|
|
1256
1256
|
}, [
|
|
1257
1257
|
S("div", Rl, [
|
|
1258
1258
|
m(e(Qe), {
|
|
1259
|
-
label:
|
|
1259
|
+
label: r.value.back,
|
|
1260
1260
|
size: "sm",
|
|
1261
|
-
disabled: e(
|
|
1261
|
+
disabled: e(u) || ee.value === 0,
|
|
1262
1262
|
onClick: V[0] || (V[0] = (q) => oe(-1))
|
|
1263
1263
|
}, {
|
|
1264
1264
|
default: s(() => [
|
|
@@ -1270,9 +1270,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1270
1270
|
_: 1
|
|
1271
1271
|
}, 8, ["label", "disabled"]),
|
|
1272
1272
|
m(e(Qe), {
|
|
1273
|
-
label:
|
|
1273
|
+
label: r.value.forward,
|
|
1274
1274
|
size: "sm",
|
|
1275
|
-
disabled: e(
|
|
1275
|
+
disabled: e(u) || ee.value === $e.value.length - 1,
|
|
1276
1276
|
onClick: V[1] || (V[1] = (q) => oe(1))
|
|
1277
1277
|
}, {
|
|
1278
1278
|
default: s(() => [
|
|
@@ -1284,9 +1284,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1284
1284
|
_: 1
|
|
1285
1285
|
}, 8, ["label", "disabled"]),
|
|
1286
1286
|
m(e(Qe), {
|
|
1287
|
-
label:
|
|
1287
|
+
label: r.value.refresh,
|
|
1288
1288
|
size: "sm",
|
|
1289
|
-
disabled: e(
|
|
1289
|
+
disabled: e(u),
|
|
1290
1290
|
onClick: Ee
|
|
1291
1291
|
}, {
|
|
1292
1292
|
default: s(() => [
|
|
@@ -1299,103 +1299,103 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1299
1299
|
}, 8, ["label", "disabled"]),
|
|
1300
1300
|
S("nav", {
|
|
1301
1301
|
class: "file-path",
|
|
1302
|
-
"aria-label":
|
|
1302
|
+
"aria-label": r.value.location
|
|
1303
1303
|
}, [
|
|
1304
1304
|
m(e(xt), {
|
|
1305
1305
|
items: W.value,
|
|
1306
|
-
"collapsed-label":
|
|
1306
|
+
"collapsed-label": r.value.fullPath,
|
|
1307
1307
|
onClickItem: ye
|
|
1308
1308
|
}, null, 8, ["items", "collapsed-label"])
|
|
1309
1309
|
], 8, Ul)
|
|
1310
1310
|
]),
|
|
1311
|
-
t.transfers && t.provider.upload &&
|
|
1311
|
+
t.transfers && t.provider.upload && f.value.length ? (l(), _("div", Il, [
|
|
1312
1312
|
m(e(Ct), {
|
|
1313
1313
|
modelValue: z.value,
|
|
1314
1314
|
"onUpdate:modelValue": V[2] || (V[2] = (q) => z.value = q),
|
|
1315
1315
|
variant: "compact",
|
|
1316
|
-
disabled: e(
|
|
1316
|
+
disabled: e(u),
|
|
1317
1317
|
"max-files": 1,
|
|
1318
1318
|
"max-size": 16 * 1024 ** 3,
|
|
1319
|
-
title:
|
|
1320
|
-
onRejected: V[3] || (V[3] = (q) =>
|
|
1319
|
+
title: r.value.upload,
|
|
1320
|
+
onRejected: V[3] || (V[3] = (q) => v.value = { code: "upload_size_required" })
|
|
1321
1321
|
}, null, 8, ["modelValue", "disabled", "title"]),
|
|
1322
1322
|
m(e(I), {
|
|
1323
1323
|
variant: "primary",
|
|
1324
|
-
disabled: e(
|
|
1324
|
+
disabled: e(u) || !z.value.length,
|
|
1325
1325
|
onClick: X
|
|
1326
1326
|
}, {
|
|
1327
1327
|
default: s(() => [
|
|
1328
|
-
h(o(
|
|
1328
|
+
h(o(r.value.upload), 1)
|
|
1329
1329
|
]),
|
|
1330
1330
|
_: 1
|
|
1331
1331
|
}, 8, ["disabled"])
|
|
1332
1332
|
])) : y("", !0),
|
|
1333
|
-
ae.value ? (l(), _("p", Dl, o(
|
|
1334
|
-
t.transfers && t.provider.download && x.value && !x.value.isDir && !e(
|
|
1333
|
+
ae.value ? (l(), _("p", Dl, o(r.value.uploaded), 1)) : y("", !0),
|
|
1334
|
+
t.transfers && t.provider.download && x.value && !x.value.isDir && !e(v) ? (l(), g(e(I), {
|
|
1335
1335
|
key: 2,
|
|
1336
1336
|
variant: "secondary",
|
|
1337
|
-
disabled: e(
|
|
1337
|
+
disabled: e(u),
|
|
1338
1338
|
onClick: G
|
|
1339
1339
|
}, {
|
|
1340
1340
|
default: s(() => [
|
|
1341
|
-
h(o(
|
|
1341
|
+
h(o(r.value.download), 1)
|
|
1342
1342
|
]),
|
|
1343
1343
|
_: 1
|
|
1344
1344
|
}, 8, ["disabled"])) : y("", !0),
|
|
1345
|
-
e(
|
|
1345
|
+
e(v) ? (l(), g(e(Q), {
|
|
1346
1346
|
key: 3,
|
|
1347
1347
|
tone: "danger"
|
|
1348
1348
|
}, {
|
|
1349
1349
|
default: s(() => [
|
|
1350
|
-
S("span", Nl, o(e(Aa)(e(
|
|
1350
|
+
S("span", Nl, o(e(Aa)(e(v), r.value, t.locale, t.name)), 1)
|
|
1351
1351
|
]),
|
|
1352
1352
|
_: 1
|
|
1353
1353
|
})) : y("", !0),
|
|
1354
|
-
e(
|
|
1354
|
+
e(u) ? (l(), _("p", Ll, o(r.value.loading), 1)) : y("", !0),
|
|
1355
1355
|
S("div", Vl, [
|
|
1356
1356
|
S("aside", {
|
|
1357
1357
|
class: "file-tree",
|
|
1358
|
-
"aria-label":
|
|
1358
|
+
"aria-label": r.value.roots
|
|
1359
1359
|
}, [
|
|
1360
1360
|
d.value.length ? (l(), g(e($t), {
|
|
1361
|
-
key:
|
|
1361
|
+
key: A.value,
|
|
1362
1362
|
"selection-style": "background",
|
|
1363
|
-
modelValue:
|
|
1364
|
-
"onUpdate:modelValue": V[4] || (V[4] = (q) =>
|
|
1363
|
+
modelValue: E.value,
|
|
1364
|
+
"onUpdate:modelValue": V[4] || (V[4] = (q) => E.value = q),
|
|
1365
1365
|
nodes: d.value,
|
|
1366
1366
|
"onUpdate:nodes": V[5] || (V[5] = (q) => d.value = q),
|
|
1367
|
-
expanded:
|
|
1368
|
-
"onUpdate:expanded": V[6] || (V[6] = (q) =>
|
|
1367
|
+
expanded: k.value,
|
|
1368
|
+
"onUpdate:expanded": V[6] || (V[6] = (q) => k.value = q),
|
|
1369
1369
|
"load-children": J,
|
|
1370
|
-
"expand-label": (q, te) => e(Je)(te ?
|
|
1370
|
+
"expand-label": (q, te) => e(Je)(te ? r.value.collapse : r.value.expand, { name: q.label }),
|
|
1371
1371
|
onSelect: V[7] || (V[7] = (q) => ue(le(d.value, q.id) ?? [q.data]))
|
|
1372
1372
|
}, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : y("", !0)
|
|
1373
1373
|
], 8, Bl),
|
|
1374
1374
|
S("div", Fl, [
|
|
1375
|
-
e(
|
|
1375
|
+
e(v) ? y("", !0) : (l(), g(e(St), {
|
|
1376
1376
|
key: 0,
|
|
1377
1377
|
columns: B.value,
|
|
1378
|
-
rows: p.value.map((q) => ({ ...q, kind: q.isDir ?
|
|
1378
|
+
rows: p.value.map((q) => ({ ...q, kind: q.isDir ? r.value.directoryKind : r.value.fileKind })),
|
|
1379
1379
|
"row-key": "path",
|
|
1380
1380
|
footer: !1,
|
|
1381
1381
|
resizable: !1,
|
|
1382
1382
|
"local-sort": !1,
|
|
1383
1383
|
"local-pagination": !1,
|
|
1384
|
-
loading: e(
|
|
1385
|
-
"loading-text":
|
|
1384
|
+
loading: e(u),
|
|
1385
|
+
"loading-text": r.value.loading,
|
|
1386
1386
|
sort: { key: C.value.key === "size" ? "bytes" : C.value.key, direction: C.value.direction },
|
|
1387
|
-
labels: { empty:
|
|
1387
|
+
labels: { empty: r.value.emptyFolder },
|
|
1388
1388
|
"single-select": "",
|
|
1389
|
-
"selected-keys":
|
|
1389
|
+
"selected-keys": P.value ? [P.value] : [],
|
|
1390
1390
|
"onUpdate:sort": ke,
|
|
1391
1391
|
"onUpdate:selectedKeys": V[8] || (V[8] = (q) => {
|
|
1392
|
-
e(
|
|
1392
|
+
e(u) || M(N(q[0]));
|
|
1393
1393
|
}),
|
|
1394
1394
|
onRowActivate: V[9] || (V[9] = (q) => {
|
|
1395
|
-
e(
|
|
1395
|
+
e(u) || se(N(q.path));
|
|
1396
1396
|
}),
|
|
1397
1397
|
onRowDblclick: V[10] || (V[10] = (q) => {
|
|
1398
|
-
e(
|
|
1398
|
+
e(u) || se(N(q.path));
|
|
1399
1399
|
})
|
|
1400
1400
|
}, {
|
|
1401
1401
|
"cell-name": s(({ row: q }) => [
|
|
@@ -1413,7 +1413,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1413
1413
|
kind: "folder",
|
|
1414
1414
|
size: [40, 40]
|
|
1415
1415
|
}),
|
|
1416
|
-
S("span", null, o(
|
|
1416
|
+
S("span", null, o(r.value.emptyFolder), 1)
|
|
1417
1417
|
])
|
|
1418
1418
|
]),
|
|
1419
1419
|
"cell-bytes": s(({ row: q }) => [
|
|
@@ -1421,20 +1421,20 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1421
1421
|
]),
|
|
1422
1422
|
_: 1
|
|
1423
1423
|
}, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels", "selected-keys"])),
|
|
1424
|
-
|
|
1424
|
+
$.value !== void 0 && !e(v) ? (l(), g(e(I), {
|
|
1425
1425
|
key: 1,
|
|
1426
1426
|
variant: "secondary",
|
|
1427
|
-
disabled: e(
|
|
1428
|
-
onClick: V[11] || (V[11] = (q) => H(
|
|
1427
|
+
disabled: e(u),
|
|
1428
|
+
onClick: V[11] || (V[11] = (q) => H(f.value, !0))
|
|
1429
1429
|
}, {
|
|
1430
1430
|
default: s(() => [
|
|
1431
|
-
h(o(
|
|
1431
|
+
h(o(r.value.loadMore), 1)
|
|
1432
1432
|
]),
|
|
1433
1433
|
_: 1
|
|
1434
1434
|
}, 8, ["disabled"])) : y("", !0)
|
|
1435
1435
|
])
|
|
1436
1436
|
]),
|
|
1437
|
-
x.value && !e(
|
|
1437
|
+
x.value && !e(v) ? (l(), _("p", Kl, o(e(Je)(r.value.selected, { name: x.value.path })), 1)) : y("", !0)
|
|
1438
1438
|
], 8, zl));
|
|
1439
1439
|
}
|
|
1440
1440
|
}), Ja = /* @__PURE__ */ ve(Hl, [["__scopeId", "data-v-8133f935"]]), Gl = {
|
|
@@ -1455,62 +1455,62 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1455
1455
|
},
|
|
1456
1456
|
emits: ["update:open", "selected", "authorized", "refused"],
|
|
1457
1457
|
setup(t, { emit: c }) {
|
|
1458
|
-
const n = t, a = c,
|
|
1459
|
-
let d = 0,
|
|
1458
|
+
const n = t, a = c, r = b(), i = w(() => Ae(n.locale)), u = w(() => pa(n.locale)), v = b(!1), p = b();
|
|
1459
|
+
let d = 0, f = !1;
|
|
1460
1460
|
qe(() => n.open, () => {
|
|
1461
|
-
d++,
|
|
1461
|
+
d++, r.value = void 0, p.value = void 0;
|
|
1462
1462
|
}), ge(() => {
|
|
1463
|
-
|
|
1463
|
+
f = !0, d++;
|
|
1464
1464
|
});
|
|
1465
1465
|
function x() {
|
|
1466
|
-
|
|
1466
|
+
v.value || (r.value = void 0, a("update:open", !1));
|
|
1467
1467
|
}
|
|
1468
|
-
async function
|
|
1469
|
-
const
|
|
1470
|
-
if (!(
|
|
1471
|
-
if (
|
|
1472
|
-
a("selected",
|
|
1468
|
+
async function P() {
|
|
1469
|
+
const $ = r.value, k = n.destination, E = d;
|
|
1470
|
+
if (!(!$ || v.value || !n.open || f || k && n.mode !== "folder")) {
|
|
1471
|
+
if (!k) {
|
|
1472
|
+
a("selected", $), x();
|
|
1473
1473
|
return;
|
|
1474
1474
|
}
|
|
1475
|
-
|
|
1475
|
+
v.value = !0, p.value = void 0;
|
|
1476
1476
|
try {
|
|
1477
|
-
const C = await
|
|
1478
|
-
if (
|
|
1479
|
-
if (!C || typeof C.id != "string" || !C.id || typeof C.username != "string" || !C.username || C.path !==
|
|
1480
|
-
a("authorized", C),
|
|
1477
|
+
const C = await k.selectDestination({ key: k.key, path: $ });
|
|
1478
|
+
if (f || E !== d) return;
|
|
1479
|
+
if (!C || typeof C.id != "string" || !C.id || typeof C.username != "string" || !C.username || C.path !== $ || C.key !== k.key || C.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
|
|
1480
|
+
a("authorized", C), v.value = !1, x();
|
|
1481
1481
|
} catch (C) {
|
|
1482
|
-
if (
|
|
1482
|
+
if (f || E !== d) return;
|
|
1483
1483
|
if (C?.code === "APP_DENIED") {
|
|
1484
|
-
|
|
1484
|
+
v.value = !1, a("refused", C), x();
|
|
1485
1485
|
return;
|
|
1486
1486
|
}
|
|
1487
1487
|
p.value = C;
|
|
1488
1488
|
} finally {
|
|
1489
|
-
|
|
1489
|
+
f || (v.value = !1);
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
|
-
return (k
|
|
1493
|
+
return ($, k) => (l(), g(e(Be), {
|
|
1494
1494
|
open: t.open,
|
|
1495
1495
|
title: t.title ?? (t.mode === "folder" ? i.value.choose : i.value.chooseFile),
|
|
1496
1496
|
description: t.description ?? i.value.ownPermissions,
|
|
1497
1497
|
"close-label": i.value.close,
|
|
1498
|
-
"show-close": !
|
|
1498
|
+
"show-close": !v.value,
|
|
1499
1499
|
width: "800px",
|
|
1500
|
-
onEscapeKeyDown:
|
|
1501
|
-
|
|
1500
|
+
onEscapeKeyDown: k[1] || (k[1] = (E) => {
|
|
1501
|
+
v.value && E.preventDefault();
|
|
1502
1502
|
}),
|
|
1503
|
-
onInteractOutside:
|
|
1504
|
-
|
|
1503
|
+
onInteractOutside: k[2] || (k[2] = (E) => {
|
|
1504
|
+
v.value && E.preventDefault();
|
|
1505
1505
|
}),
|
|
1506
|
-
"onUpdate:open":
|
|
1507
|
-
|
|
1506
|
+
"onUpdate:open": k[3] || (k[3] = (E) => {
|
|
1507
|
+
E || x();
|
|
1508
1508
|
})
|
|
1509
1509
|
}, {
|
|
1510
1510
|
footer: s(() => [
|
|
1511
1511
|
m(e(I), {
|
|
1512
1512
|
variant: "secondary",
|
|
1513
|
-
disabled:
|
|
1513
|
+
disabled: v.value,
|
|
1514
1514
|
onClick: x
|
|
1515
1515
|
}, {
|
|
1516
1516
|
default: s(() => [
|
|
@@ -1520,8 +1520,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1520
1520
|
}, 8, ["disabled"]),
|
|
1521
1521
|
m(e(I), {
|
|
1522
1522
|
variant: "primary",
|
|
1523
|
-
disabled: !
|
|
1524
|
-
onClick:
|
|
1523
|
+
disabled: !r.value || v.value || !!t.destination && t.mode !== "folder",
|
|
1524
|
+
onClick: P
|
|
1525
1525
|
}, {
|
|
1526
1526
|
default: s(() => [
|
|
1527
1527
|
h(o(i.value.confirm), 1)
|
|
@@ -1530,7 +1530,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1530
1530
|
}, 8, ["disabled"])
|
|
1531
1531
|
]),
|
|
1532
1532
|
default: s(() => [
|
|
1533
|
-
t.destination ? (l(), _("p", Gl, o(
|
|
1533
|
+
t.destination ? (l(), _("p", Gl, o(u.value.selection), 1)) : y("", !0),
|
|
1534
1534
|
p.value ? (l(), g(e(Q), {
|
|
1535
1535
|
key: 1,
|
|
1536
1536
|
tone: "danger",
|
|
@@ -1538,14 +1538,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1538
1538
|
class: "save-message"
|
|
1539
1539
|
}, {
|
|
1540
1540
|
default: s(() => [
|
|
1541
|
-
h(o(t.errorText?.(p.value) ?? e(je)(p.value,
|
|
1541
|
+
h(o(t.errorText?.(p.value) ?? e(je)(p.value, u.value, "select", t.locale, t.name)), 1)
|
|
1542
1542
|
]),
|
|
1543
1543
|
_: 1
|
|
1544
1544
|
})) : y("", !0),
|
|
1545
1545
|
S("div", {
|
|
1546
1546
|
class: "nas-picker-content",
|
|
1547
|
-
"aria-busy":
|
|
1548
|
-
inert:
|
|
1547
|
+
"aria-busy": v.value,
|
|
1548
|
+
inert: v.value
|
|
1549
1549
|
}, [
|
|
1550
1550
|
t.open ? (l(), g(Ja, {
|
|
1551
1551
|
key: 0,
|
|
@@ -1553,7 +1553,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1553
1553
|
locale: t.locale,
|
|
1554
1554
|
name: t.name,
|
|
1555
1555
|
mode: t.mode,
|
|
1556
|
-
onSelected:
|
|
1556
|
+
onSelected: k[0] || (k[0] = (E) => r.value = E)
|
|
1557
1557
|
}, null, 8, ["provider", "locale", "name", "mode"])) : y("", !0)
|
|
1558
1558
|
], 8, Xl)
|
|
1559
1559
|
]),
|
|
@@ -1570,26 +1570,26 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1570
1570
|
ctx: {}
|
|
1571
1571
|
},
|
|
1572
1572
|
setup(t) {
|
|
1573
|
-
const c = t, n = b(), a = b(),
|
|
1574
|
-
let
|
|
1575
|
-
async function
|
|
1576
|
-
if (!
|
|
1577
|
-
n.value = void 0,
|
|
1573
|
+
const c = t, n = b(), a = b(), r = b(!1), i = b("folder"), u = b(!1), v = b(""), p = b(0), d = za(c.ctx);
|
|
1574
|
+
let f = !1, x;
|
|
1575
|
+
async function P() {
|
|
1576
|
+
if (!f) {
|
|
1577
|
+
n.value = void 0, r.value = !1, v.value = "", u.value = !1, p.value++;
|
|
1578
1578
|
try {
|
|
1579
|
-
await c.ctx.call("nas.session.status"),
|
|
1580
|
-
} catch (
|
|
1581
|
-
if (
|
|
1582
|
-
a.value = Se(
|
|
1579
|
+
await c.ctx.call("nas.session.status"), f || (a.value = void 0, r.value = !0);
|
|
1580
|
+
} catch ($) {
|
|
1581
|
+
if (f) return;
|
|
1582
|
+
a.value = Se($), !a.value && $?.code !== "unknown_method" && (n.value = $);
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
return He(() => a.value,
|
|
1586
|
+
return He(() => a.value, P), we(() => {
|
|
1587
1587
|
x = c.ctx.reopen(() => {
|
|
1588
|
-
|
|
1589
|
-
}),
|
|
1588
|
+
P();
|
|
1589
|
+
}), P();
|
|
1590
1590
|
}), ge(() => {
|
|
1591
|
-
|
|
1592
|
-
}), (k
|
|
1591
|
+
f = !0, x?.(), d.dispose();
|
|
1592
|
+
}), ($, k) => (l(), _(j, null, [
|
|
1593
1593
|
a.value ? (l(), g(e(Q), {
|
|
1594
1594
|
key: 0,
|
|
1595
1595
|
tone: "info",
|
|
@@ -1608,7 +1608,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1608
1608
|
S("span", Wl, o(e(Aa)(n.value, e(Ae)(t.ctx.locale), t.ctx.locale, t.ctx.displayName)), 1),
|
|
1609
1609
|
m(e(I), {
|
|
1610
1610
|
variant: "secondary",
|
|
1611
|
-
onClick:
|
|
1611
|
+
onClick: P
|
|
1612
1612
|
}, {
|
|
1613
1613
|
default: s(() => [
|
|
1614
1614
|
h(o(e(Ae)(t.ctx.locale).refresh), 1)
|
|
@@ -1618,7 +1618,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1618
1618
|
]),
|
|
1619
1619
|
_: 1
|
|
1620
1620
|
})) : y("", !0),
|
|
1621
|
-
|
|
1621
|
+
r.value ? (l(), g(e(_e), {
|
|
1622
1622
|
key: 2,
|
|
1623
1623
|
title: e(Ae)(t.ctx.locale).title,
|
|
1624
1624
|
description: e(Ae)(t.ctx.locale).ownPermissions,
|
|
@@ -1628,8 +1628,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1628
1628
|
S("div", Yl, [
|
|
1629
1629
|
m(e(I), {
|
|
1630
1630
|
variant: "secondary",
|
|
1631
|
-
onClick:
|
|
1632
|
-
i.value = "folder",
|
|
1631
|
+
onClick: k[0] || (k[0] = (E) => {
|
|
1632
|
+
i.value = "folder", u.value = !0;
|
|
1633
1633
|
})
|
|
1634
1634
|
}, {
|
|
1635
1635
|
default: s(() => [
|
|
@@ -1639,8 +1639,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1639
1639
|
}),
|
|
1640
1640
|
m(e(I), {
|
|
1641
1641
|
variant: "secondary",
|
|
1642
|
-
onClick:
|
|
1643
|
-
i.value = "file",
|
|
1642
|
+
onClick: k[1] || (k[1] = (E) => {
|
|
1643
|
+
i.value = "file", u.value = !0;
|
|
1644
1644
|
})
|
|
1645
1645
|
}, {
|
|
1646
1646
|
default: s(() => [
|
|
@@ -1649,8 +1649,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1649
1649
|
_: 1
|
|
1650
1650
|
})
|
|
1651
1651
|
]),
|
|
1652
|
-
|
|
1653
|
-
m(e(Le), { path:
|
|
1652
|
+
v.value ? (l(), _("p", Ql, [
|
|
1653
|
+
m(e(Le), { path: v.value }, null, 8, ["path"])
|
|
1654
1654
|
])) : y("", !0),
|
|
1655
1655
|
(l(), g(Ja, {
|
|
1656
1656
|
key: p.value,
|
|
@@ -1664,9 +1664,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1664
1664
|
locale: t.ctx.locale,
|
|
1665
1665
|
name: t.ctx.displayName,
|
|
1666
1666
|
mode: i.value,
|
|
1667
|
-
open:
|
|
1668
|
-
"onUpdate:open":
|
|
1669
|
-
onSelected:
|
|
1667
|
+
open: u.value,
|
|
1668
|
+
"onUpdate:open": k[2] || (k[2] = (E) => u.value = E),
|
|
1669
|
+
onSelected: k[3] || (k[3] = (E) => v.value = E)
|
|
1670
1670
|
}, null, 8, ["provider", "locale", "name", "mode", "open"])
|
|
1671
1671
|
]),
|
|
1672
1672
|
_: 1
|
|
@@ -1679,43 +1679,43 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1679
1679
|
portal: {}
|
|
1680
1680
|
},
|
|
1681
1681
|
setup(t) {
|
|
1682
|
-
const c = t, n = Oa(), a = c.portal.messages,
|
|
1683
|
-
let x = !1,
|
|
1684
|
-
function
|
|
1685
|
-
if (!
|
|
1682
|
+
const c = t, n = Oa(), a = c.portal.messages, r = b(), i = b(""), u = b(!1), v = b(""), p = b(!0), d = b(!1), f = b(ra.get(c.portal));
|
|
1683
|
+
let x = !1, P = !1;
|
|
1684
|
+
function $(D) {
|
|
1685
|
+
if (!P && (r.value = D, i.value = D.alias || D.defaultAlias, D.url))
|
|
1686
1686
|
try {
|
|
1687
|
-
const
|
|
1688
|
-
x ||=
|
|
1687
|
+
const T = new URL(D.url);
|
|
1688
|
+
x ||= T.origin === window.location.origin && window.location.pathname.startsWith(T.pathname);
|
|
1689
1689
|
} catch {
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
const
|
|
1693
|
-
|
|
1694
|
-
const
|
|
1695
|
-
async function
|
|
1696
|
-
if (
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1692
|
+
const k = c.portal.lastStatus?.();
|
|
1693
|
+
k && $(k);
|
|
1694
|
+
const E = 5e3, C = /* @__PURE__ */ Symbol("late");
|
|
1695
|
+
async function A(D) {
|
|
1696
|
+
if (u.value) return;
|
|
1697
|
+
u.value = !0, v.value = "";
|
|
1698
|
+
const T = D();
|
|
1699
1699
|
try {
|
|
1700
|
-
const M = await Promise.race([
|
|
1700
|
+
const M = await Promise.race([T, new Promise((se) => setTimeout(() => se(C), E))]);
|
|
1701
1701
|
if (M !== C) {
|
|
1702
|
-
|
|
1702
|
+
$(M);
|
|
1703
1703
|
return;
|
|
1704
1704
|
}
|
|
1705
|
-
|
|
1705
|
+
$(await c.portal.status());
|
|
1706
1706
|
try {
|
|
1707
|
-
await
|
|
1707
|
+
await T;
|
|
1708
1708
|
} finally {
|
|
1709
|
-
|
|
1709
|
+
$(await c.portal.status());
|
|
1710
1710
|
}
|
|
1711
1711
|
} catch (M) {
|
|
1712
|
-
|
|
1712
|
+
P || (v.value = a[M?.code || ""] || a.portal_unavailable);
|
|
1713
1713
|
} finally {
|
|
1714
|
-
|
|
1714
|
+
P || (u.value = !1);
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
const z = w(() => !!
|
|
1718
|
-
const D =
|
|
1717
|
+
const z = w(() => !!r.value?.canManage && !!r.value.entry && r.value.entry !== "registered"), ae = w(() => {
|
|
1718
|
+
const D = r.value;
|
|
1719
1719
|
if (D) {
|
|
1720
1720
|
if (z.value) return D.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
|
|
1721
1721
|
if (D.state !== "active")
|
|
@@ -1724,34 +1724,34 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1724
1724
|
}), F = a.link?.replace(/\s*[::]\s*$/, "");
|
|
1725
1725
|
async function G() {
|
|
1726
1726
|
const D = await c.portal.register();
|
|
1727
|
-
return D.canManage && D.entry === "registered" && D.state === "inactive" ? (
|
|
1727
|
+
return D.canManage && D.entry === "registered" && D.state === "inactive" ? ($(D), c.portal.apply(D.alias || D.defaultAlias)) : D;
|
|
1728
1728
|
}
|
|
1729
1729
|
function X() {
|
|
1730
|
-
!
|
|
1730
|
+
!u.value && !f.value && c.portal.status().then($, () => {
|
|
1731
1731
|
}).finally(() => {
|
|
1732
|
-
|
|
1732
|
+
P || (p.value = !1);
|
|
1733
1733
|
});
|
|
1734
1734
|
}
|
|
1735
1735
|
function B() {
|
|
1736
|
-
x ? d.value = !0 :
|
|
1736
|
+
x ? d.value = !0 : A(() => c.portal.unregister());
|
|
1737
1737
|
}
|
|
1738
1738
|
async function K() {
|
|
1739
|
-
if (d.value = !1, !
|
|
1740
|
-
|
|
1739
|
+
if (d.value = !1, !u.value) {
|
|
1740
|
+
u.value = !0, f.value = "removalUnconfirmed", ra.set(c.portal, f.value);
|
|
1741
1741
|
try {
|
|
1742
|
-
await c.portal.unregister(),
|
|
1742
|
+
await c.portal.unregister(), f.value = "removedFromPage", ra.set(c.portal, f.value);
|
|
1743
1743
|
} catch {
|
|
1744
1744
|
} finally {
|
|
1745
|
-
|
|
1745
|
+
P || (u.value = !1);
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
1749
|
return we(() => {
|
|
1750
1750
|
n.subscribe?.(X), X();
|
|
1751
1751
|
}), ge(() => {
|
|
1752
|
-
|
|
1753
|
-
}), (D,
|
|
1754
|
-
|
|
1752
|
+
P = !0;
|
|
1753
|
+
}), (D, T) => (l(), _(j, null, [
|
|
1754
|
+
f.value ? (l(), g(e(_e), {
|
|
1755
1755
|
key: 0,
|
|
1756
1756
|
title: e(a).title,
|
|
1757
1757
|
collapsible: !1
|
|
@@ -1759,7 +1759,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1759
1759
|
default: s(() => [
|
|
1760
1760
|
m(e(Q), { tone: "info" }, {
|
|
1761
1761
|
default: s(() => [
|
|
1762
|
-
S("span", jl, o(e(a)[
|
|
1762
|
+
S("span", jl, o(e(a)[f.value]), 1)
|
|
1763
1763
|
]),
|
|
1764
1764
|
_: 1
|
|
1765
1765
|
}),
|
|
@@ -1774,35 +1774,35 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1774
1774
|
})
|
|
1775
1775
|
]),
|
|
1776
1776
|
_: 1
|
|
1777
|
-
}, 8, ["title"])) :
|
|
1777
|
+
}, 8, ["title"])) : r.value || p.value ? (l(), g(e(_e), {
|
|
1778
1778
|
key: 1,
|
|
1779
1779
|
title: e(a).title,
|
|
1780
1780
|
description: ae.value,
|
|
1781
1781
|
collapsible: !1,
|
|
1782
|
-
"aria-busy":
|
|
1782
|
+
"aria-busy": u.value || !r.value
|
|
1783
1783
|
}, sa({
|
|
1784
1784
|
default: s(() => [
|
|
1785
|
-
|
|
1786
|
-
|
|
1785
|
+
r.value ? (l(), _(j, { key: 1 }, [
|
|
1786
|
+
r.value.state === "active" ? (l(), g(e(xe), {
|
|
1787
1787
|
key: 0,
|
|
1788
1788
|
label: e(F)
|
|
1789
1789
|
}, {
|
|
1790
1790
|
default: s(() => [
|
|
1791
1791
|
m(e(ca), {
|
|
1792
|
-
href:
|
|
1792
|
+
href: r.value.url,
|
|
1793
1793
|
external: ""
|
|
1794
1794
|
}, {
|
|
1795
1795
|
default: s(() => [
|
|
1796
|
-
h(o(
|
|
1796
|
+
h(o(r.value.url), 1)
|
|
1797
1797
|
]),
|
|
1798
1798
|
_: 1
|
|
1799
1799
|
}, 8, ["href"])
|
|
1800
1800
|
]),
|
|
1801
1801
|
_: 1
|
|
1802
1802
|
}, 8, ["label"])) : y("", !0),
|
|
1803
|
-
|
|
1803
|
+
r.value.canManage && !z.value ? (l(), g(e(Ke), {
|
|
1804
1804
|
key: 1,
|
|
1805
|
-
onSubmit:
|
|
1805
|
+
onSubmit: T[1] || (T[1] = Me((M) => A(() => t.portal.apply(i.value)), ["prevent"]))
|
|
1806
1806
|
}, {
|
|
1807
1807
|
default: s(() => [
|
|
1808
1808
|
m(e(xe), {
|
|
@@ -1812,11 +1812,11 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1812
1812
|
m(e(ze), {
|
|
1813
1813
|
id: "portal-alias",
|
|
1814
1814
|
modelValue: i.value,
|
|
1815
|
-
"onUpdate:modelValue":
|
|
1815
|
+
"onUpdate:modelValue": T[0] || (T[0] = (M) => i.value = M),
|
|
1816
1816
|
"aria-label": e(a).alias,
|
|
1817
1817
|
maxlength: "64",
|
|
1818
1818
|
autocomplete: "off",
|
|
1819
|
-
disabled:
|
|
1819
|
+
disabled: u.value
|
|
1820
1820
|
}, null, 8, ["modelValue", "aria-label", "disabled"])
|
|
1821
1821
|
]),
|
|
1822
1822
|
_: 1
|
|
@@ -1831,7 +1831,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1831
1831
|
m(e(I), {
|
|
1832
1832
|
type: "submit",
|
|
1833
1833
|
variant: "primary",
|
|
1834
|
-
disabled:
|
|
1834
|
+
disabled: u.value
|
|
1835
1835
|
}, {
|
|
1836
1836
|
default: s(() => [
|
|
1837
1837
|
h(o(e(a).apply), 1)
|
|
@@ -1847,12 +1847,12 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1847
1847
|
]),
|
|
1848
1848
|
_: 1
|
|
1849
1849
|
})) : y("", !0),
|
|
1850
|
-
|
|
1850
|
+
v.value ? (l(), g(e(Q), {
|
|
1851
1851
|
key: 2,
|
|
1852
1852
|
tone: "danger"
|
|
1853
1853
|
}, {
|
|
1854
1854
|
default: s(() => [
|
|
1855
|
-
S("span", en, o(
|
|
1855
|
+
S("span", en, o(v.value), 1)
|
|
1856
1856
|
]),
|
|
1857
1857
|
_: 1
|
|
1858
1858
|
})) : y("", !0)
|
|
@@ -1872,14 +1872,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1872
1872
|
]),
|
|
1873
1873
|
_: 2
|
|
1874
1874
|
}, [
|
|
1875
|
-
|
|
1875
|
+
r.value && z.value ? {
|
|
1876
1876
|
name: "footer",
|
|
1877
1877
|
fn: s(() => [
|
|
1878
|
-
|
|
1878
|
+
r.value.entry === "unregistered" ? (l(), g(e(I), {
|
|
1879
1879
|
key: 0,
|
|
1880
1880
|
variant: "primary",
|
|
1881
|
-
disabled:
|
|
1882
|
-
onClick:
|
|
1881
|
+
disabled: u.value,
|
|
1882
|
+
onClick: T[2] || (T[2] = (M) => A(G))
|
|
1883
1883
|
}, {
|
|
1884
1884
|
default: s(() => [
|
|
1885
1885
|
h(o(e(a).register), 1)
|
|
@@ -1888,7 +1888,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1888
1888
|
}, 8, ["disabled"])) : (l(), g(e(I), {
|
|
1889
1889
|
key: 1,
|
|
1890
1890
|
variant: "primary",
|
|
1891
|
-
disabled:
|
|
1891
|
+
disabled: u.value,
|
|
1892
1892
|
onClick: B
|
|
1893
1893
|
}, {
|
|
1894
1894
|
default: s(() => [
|
|
@@ -1898,14 +1898,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1898
1898
|
}, 8, ["disabled"]))
|
|
1899
1899
|
]),
|
|
1900
1900
|
key: "0"
|
|
1901
|
-
} :
|
|
1901
|
+
} : r.value?.canManage ? {
|
|
1902
1902
|
name: "footer",
|
|
1903
1903
|
fn: s(() => [
|
|
1904
|
-
|
|
1904
|
+
r.value.state === "active" ? (l(), g(e(I), {
|
|
1905
1905
|
key: 0,
|
|
1906
1906
|
variant: "secondary",
|
|
1907
|
-
disabled:
|
|
1908
|
-
onClick:
|
|
1907
|
+
disabled: u.value,
|
|
1908
|
+
onClick: T[3] || (T[3] = (M) => A(() => t.portal.disable()))
|
|
1909
1909
|
}, {
|
|
1910
1910
|
default: s(() => [
|
|
1911
1911
|
h(o(e(a).disable), 1)
|
|
@@ -1914,17 +1914,17 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1914
1914
|
}, 8, ["disabled"])) : y("", !0),
|
|
1915
1915
|
m(e(I), {
|
|
1916
1916
|
variant: "secondary",
|
|
1917
|
-
onClick:
|
|
1917
|
+
onClick: T[4] || (T[4] = (M) => t.portal.openControlPanel())
|
|
1918
1918
|
}, {
|
|
1919
1919
|
default: s(() => [
|
|
1920
1920
|
h(o(e(a).advanced), 1)
|
|
1921
1921
|
]),
|
|
1922
1922
|
_: 1
|
|
1923
1923
|
}),
|
|
1924
|
-
|
|
1924
|
+
r.value.entry ? (l(), g(e(I), {
|
|
1925
1925
|
key: 1,
|
|
1926
1926
|
variant: "secondary",
|
|
1927
|
-
disabled:
|
|
1927
|
+
disabled: u.value,
|
|
1928
1928
|
onClick: B
|
|
1929
1929
|
}, {
|
|
1930
1930
|
default: s(() => [
|
|
@@ -1934,12 +1934,12 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1934
1934
|
}, 8, ["disabled"])) : y("", !0)
|
|
1935
1935
|
]),
|
|
1936
1936
|
key: "1"
|
|
1937
|
-
} :
|
|
1937
|
+
} : r.value && r.value.controlPanel ? {
|
|
1938
1938
|
name: "footer",
|
|
1939
1939
|
fn: s(() => [
|
|
1940
1940
|
m(e(I), {
|
|
1941
1941
|
variant: "secondary",
|
|
1942
|
-
onClick:
|
|
1942
|
+
onClick: T[5] || (T[5] = (M) => t.portal.openControlPanel())
|
|
1943
1943
|
}, {
|
|
1944
1944
|
default: s(() => [
|
|
1945
1945
|
h(o(e(a).controlPanel), 1)
|
|
@@ -1952,7 +1952,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1952
1952
|
]), 1032, ["title", "description", "aria-busy"])) : y("", !0),
|
|
1953
1953
|
m(e(Be), {
|
|
1954
1954
|
open: d.value,
|
|
1955
|
-
"onUpdate:open":
|
|
1955
|
+
"onUpdate:open": T[7] || (T[7] = (M) => d.value = M),
|
|
1956
1956
|
title: e(a).unregister,
|
|
1957
1957
|
description: e(a).removeFromPage,
|
|
1958
1958
|
"close-label": e(a).cancel
|
|
@@ -1960,7 +1960,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1960
1960
|
footer: s(() => [
|
|
1961
1961
|
m(e(I), {
|
|
1962
1962
|
variant: "secondary",
|
|
1963
|
-
onClick:
|
|
1963
|
+
onClick: T[6] || (T[6] = (M) => d.value = !1)
|
|
1964
1964
|
}, {
|
|
1965
1965
|
default: s(() => [
|
|
1966
1966
|
h(o(e(a).cancel), 1)
|
|
@@ -1969,7 +1969,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1969
1969
|
}),
|
|
1970
1970
|
m(e(I), {
|
|
1971
1971
|
variant: "danger",
|
|
1972
|
-
disabled:
|
|
1972
|
+
disabled: u.value,
|
|
1973
1973
|
onClick: K
|
|
1974
1974
|
}, {
|
|
1975
1975
|
default: s(() => [
|
|
@@ -1989,35 +1989,35 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
1989
1989
|
locale: {}
|
|
1990
1990
|
},
|
|
1991
1991
|
setup(t) {
|
|
1992
|
-
const c = t, n = c.shared.messages, a = b(),
|
|
1993
|
-
let
|
|
1994
|
-
const p = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, d = (z) => ({ account: a.value?.account ?? "", folder: z.name, access: n[z.required] ?? z.required }),
|
|
1995
|
-
function
|
|
1996
|
-
|
|
1992
|
+
const c = t, n = c.shared.messages, a = b(), r = b(!1), i = b(""), u = b("");
|
|
1993
|
+
let v = !1;
|
|
1994
|
+
const p = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, d = (z) => ({ account: a.value?.account ?? "", folder: z.name, access: n[z.required] ?? z.required }), f = (z, ae) => Je(z, ae, c.locale), x = w(() => a.value?.folders.filter((z) => z.state !== "ready") ?? []), P = ma(c.locale ?? "en"), $ = w(() => c.shared.canGrant());
|
|
1995
|
+
function k(z) {
|
|
1996
|
+
v || (a.value = z, r.value = !1);
|
|
1997
1997
|
}
|
|
1998
|
-
async function
|
|
1998
|
+
async function E() {
|
|
1999
1999
|
try {
|
|
2000
|
-
|
|
2000
|
+
k(await c.shared.status());
|
|
2001
2001
|
} catch {
|
|
2002
|
-
!
|
|
2002
|
+
!v && !a.value && (r.value = !0);
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
2005
|
async function C(z) {
|
|
2006
2006
|
if (!i.value) {
|
|
2007
|
-
i.value = z.key,
|
|
2007
|
+
i.value = z.key, u.value = "";
|
|
2008
2008
|
try {
|
|
2009
|
-
|
|
2009
|
+
k(await c.shared.grant(z.key));
|
|
2010
2010
|
} catch (ae) {
|
|
2011
|
-
|
|
2011
|
+
v || (u.value = n[ae?.code || ""] || n.shared_folder_unavailable);
|
|
2012
2012
|
} finally {
|
|
2013
|
-
|
|
2013
|
+
v || (i.value = "");
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
|
-
const
|
|
2018
|
-
return
|
|
2019
|
-
|
|
2020
|
-
}), (z, ae) => !a.value && !
|
|
2017
|
+
const A = c.shared.lastStatus?.();
|
|
2018
|
+
return A && (a.value = A), we(E), ge(() => {
|
|
2019
|
+
v = !0;
|
|
2020
|
+
}), (z, ae) => !a.value && !r.value ? (l(), g(e(_e), {
|
|
2021
2021
|
key: 0,
|
|
2022
2022
|
title: e(n).title,
|
|
2023
2023
|
collapsible: !1,
|
|
@@ -2061,9 +2061,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2061
2061
|
]),
|
|
2062
2062
|
_: 2
|
|
2063
2063
|
}, 1032, ["tone", "data-shared-folder-state"]),
|
|
2064
|
-
S("span", null, o(e(n).required) + o(e(
|
|
2065
|
-
S("span", null, o(e(n).granted) + o(e(
|
|
2066
|
-
F.state === "pending" &&
|
|
2064
|
+
S("span", null, o(e(n).required) + o(e(P)) + o(e(n)[F.required]), 1),
|
|
2065
|
+
S("span", null, o(e(n).granted) + o(e(P)) + o(e(n)[F.granted]), 1),
|
|
2066
|
+
F.state === "pending" && $.value ? (l(), g(e(I), {
|
|
2067
2067
|
key: 0,
|
|
2068
2068
|
variant: "primary",
|
|
2069
2069
|
disabled: !!i.value,
|
|
@@ -2088,22 +2088,22 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2088
2088
|
default: s(() => [
|
|
2089
2089
|
S("span", ln, [
|
|
2090
2090
|
F.state === "pending" ? (l(), _(j, { key: 0 }, [
|
|
2091
|
-
h(o(e(Pa)([e(n).pendingNote,
|
|
2091
|
+
h(o(e(Pa)([e(n).pendingNote, !$.value && f(e(n).askAdmin, d(F)), f(e(n).steps, d(F))], t.locale ?? "en")), 1)
|
|
2092
2092
|
], 64)) : F.state === "missing" ? (l(), _(j, { key: 1 }, [
|
|
2093
|
-
h(o(
|
|
2093
|
+
h(o(f(e(n).missingHint, d(F))), 1)
|
|
2094
2094
|
], 64)) : (l(), _(j, { key: 2 }, [
|
|
2095
|
-
h(o(
|
|
2095
|
+
h(o(f(e(n).ambiguousHint, d(F))), 1)
|
|
2096
2096
|
], 64))
|
|
2097
2097
|
])
|
|
2098
2098
|
]),
|
|
2099
2099
|
_: 2
|
|
2100
2100
|
}, 1024))), 128)),
|
|
2101
|
-
|
|
2101
|
+
u.value ? (l(), g(e(Q), {
|
|
2102
2102
|
key: 0,
|
|
2103
2103
|
tone: "danger"
|
|
2104
2104
|
}, {
|
|
2105
2105
|
default: s(() => [
|
|
2106
|
-
S("span", nn, o(
|
|
2106
|
+
S("span", nn, o(u.value), 1)
|
|
2107
2107
|
]),
|
|
2108
2108
|
_: 1
|
|
2109
2109
|
})) : y("", !0)
|
|
@@ -2137,32 +2137,32 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2137
2137
|
permission: {}
|
|
2138
2138
|
},
|
|
2139
2139
|
setup(t) {
|
|
2140
|
-
const c = t, n = b(!1), a = rt([]),
|
|
2141
|
-
let
|
|
2140
|
+
const c = t, n = b(!1), a = rt([]), r = b(!1), i = b(!1);
|
|
2141
|
+
let u = !1, v;
|
|
2142
2142
|
we(() => {
|
|
2143
|
-
|
|
2143
|
+
v = c.permission.subscribe((d) => {
|
|
2144
2144
|
a.value = d, n.value = d.length > 0;
|
|
2145
2145
|
}), c.permission.check().catch(() => {
|
|
2146
2146
|
});
|
|
2147
2147
|
}), ge(() => {
|
|
2148
|
-
|
|
2148
|
+
u = !0, v?.();
|
|
2149
2149
|
});
|
|
2150
2150
|
async function p() {
|
|
2151
|
-
if (!
|
|
2152
|
-
|
|
2151
|
+
if (!r.value) {
|
|
2152
|
+
r.value = !0, i.value = !1;
|
|
2153
2153
|
try {
|
|
2154
2154
|
await c.permission.retry();
|
|
2155
2155
|
} catch {
|
|
2156
|
-
|
|
2156
|
+
u || (i.value = !0);
|
|
2157
2157
|
} finally {
|
|
2158
|
-
|
|
2158
|
+
u || (r.value = !1);
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
2162
|
-
return (d,
|
|
2162
|
+
return (d, f) => n.value ? (l(), g(e(Be), {
|
|
2163
2163
|
key: 0,
|
|
2164
2164
|
open: n.value,
|
|
2165
|
-
"onUpdate:open":
|
|
2165
|
+
"onUpdate:open": f[2] || (f[2] = (x) => n.value = x),
|
|
2166
2166
|
title: t.permission.messages.pending,
|
|
2167
2167
|
description: t.permission.messages.pendingNote,
|
|
2168
2168
|
"close-label": t.permission.messages.dismiss
|
|
@@ -2170,7 +2170,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2170
2170
|
footer: s(() => [
|
|
2171
2171
|
m(e(I), {
|
|
2172
2172
|
variant: "secondary",
|
|
2173
|
-
onClick:
|
|
2173
|
+
onClick: f[0] || (f[0] = (x) => t.permission.openControlPanel())
|
|
2174
2174
|
}, {
|
|
2175
2175
|
default: s(() => [
|
|
2176
2176
|
h(o(t.permission.messages.openControlPanel), 1)
|
|
@@ -2179,7 +2179,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2179
2179
|
}),
|
|
2180
2180
|
m(e(I), {
|
|
2181
2181
|
variant: "secondary",
|
|
2182
|
-
onClick:
|
|
2182
|
+
onClick: f[1] || (f[1] = (x) => n.value = !1)
|
|
2183
2183
|
}, {
|
|
2184
2184
|
default: s(() => [
|
|
2185
2185
|
h(o(t.permission.messages.dismiss), 1)
|
|
@@ -2188,7 +2188,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2188
2188
|
}),
|
|
2189
2189
|
m(e(I), {
|
|
2190
2190
|
variant: "primary",
|
|
2191
|
-
disabled:
|
|
2191
|
+
disabled: r.value,
|
|
2192
2192
|
onClick: p
|
|
2193
2193
|
}, {
|
|
2194
2194
|
default: s(() => [
|
|
@@ -2218,45 +2218,45 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2218
2218
|
locale: {}
|
|
2219
2219
|
},
|
|
2220
2220
|
setup(t) {
|
|
2221
|
-
const c = t, n = w(() => Ra(c.locale)), a = b(""),
|
|
2221
|
+
const c = t, n = w(() => Ra(c.locale)), a = b(""), r = b(""), i = b(""), u = b(!1), v = b(!1), p = b(""), d = b(), f = w(() => window.location.protocol === "https:");
|
|
2222
2222
|
let x = !1;
|
|
2223
|
-
function
|
|
2224
|
-
const
|
|
2225
|
-
return c.session.denied.value?.message || n.value.errors[
|
|
2223
|
+
function P(C) {
|
|
2224
|
+
const A = C?.code;
|
|
2225
|
+
return c.session.denied.value?.message || n.value.errors[A || ""] || n.value.errors.failed;
|
|
2226
2226
|
}
|
|
2227
|
-
async function
|
|
2228
|
-
if (!(
|
|
2229
|
-
|
|
2227
|
+
async function $() {
|
|
2228
|
+
if (!(v.value || !f.value || !a.value || !r.value || u.value && !i.value)) {
|
|
2229
|
+
v.value = !0, p.value = "";
|
|
2230
2230
|
try {
|
|
2231
|
-
await c.session.login(a.value,
|
|
2231
|
+
await c.session.login(a.value, r.value, i.value), r.value = "", i.value = "";
|
|
2232
2232
|
} catch (C) {
|
|
2233
2233
|
if (x) return;
|
|
2234
|
-
i.value = "", C?.code === "otp_required" ?
|
|
2234
|
+
i.value = "", C?.code === "otp_required" ? u.value = !0 : (p.value = P(C), r.value = "", u.value = !1);
|
|
2235
2235
|
} finally {
|
|
2236
|
-
x || (
|
|
2236
|
+
x || (v.value = !1, u.value && (await dt(), x || d.value?.querySelector("input")?.focus()));
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
|
-
async function
|
|
2241
|
-
if (!
|
|
2242
|
-
|
|
2240
|
+
async function k() {
|
|
2241
|
+
if (!v.value) {
|
|
2242
|
+
v.value = !0, p.value = "";
|
|
2243
2243
|
try {
|
|
2244
2244
|
await c.session.bootstrap();
|
|
2245
2245
|
} catch (C) {
|
|
2246
|
-
x || (p.value =
|
|
2246
|
+
x || (p.value = P(C));
|
|
2247
2247
|
} finally {
|
|
2248
|
-
x || (
|
|
2248
|
+
x || (v.value = !1);
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2253
|
-
|
|
2252
|
+
function E() {
|
|
2253
|
+
r.value = "", i.value = "", u.value = !1, p.value = "";
|
|
2254
2254
|
}
|
|
2255
2255
|
return Na(() => {
|
|
2256
|
-
x = !0,
|
|
2257
|
-
}), (C,
|
|
2256
|
+
x = !0, r.value = "", i.value = "";
|
|
2257
|
+
}), (C, A) => (l(), _("main", {
|
|
2258
2258
|
class: "identity-login",
|
|
2259
|
-
"aria-busy":
|
|
2259
|
+
"aria-busy": v.value
|
|
2260
2260
|
}, [
|
|
2261
2261
|
m(e(_e), {
|
|
2262
2262
|
title: n.value.title,
|
|
@@ -2264,7 +2264,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2264
2264
|
collapsible: !1
|
|
2265
2265
|
}, {
|
|
2266
2266
|
default: s(() => [
|
|
2267
|
-
|
|
2267
|
+
f.value ? y("", !0) : (l(), g(e(Q), {
|
|
2268
2268
|
key: 0,
|
|
2269
2269
|
tone: "warning",
|
|
2270
2270
|
title: n.value.httpsTitle
|
|
@@ -2295,7 +2295,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2295
2295
|
}, 8, ["title"])) : y("", !0),
|
|
2296
2296
|
t.session.denied.value ? y("", !0) : (l(), g(e(Ke), {
|
|
2297
2297
|
key: 4,
|
|
2298
|
-
onSubmit: Me(
|
|
2298
|
+
onSubmit: Me($, ["prevent"])
|
|
2299
2299
|
}, {
|
|
2300
2300
|
default: s(() => [
|
|
2301
2301
|
m(e(Pe), {
|
|
@@ -2304,14 +2304,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2304
2304
|
default: s(() => [
|
|
2305
2305
|
m(e(ze), {
|
|
2306
2306
|
modelValue: a.value,
|
|
2307
|
-
"onUpdate:modelValue":
|
|
2307
|
+
"onUpdate:modelValue": A[0] || (A[0] = (z) => a.value = z),
|
|
2308
2308
|
autocomplete: "username",
|
|
2309
|
-
disabled:
|
|
2309
|
+
disabled: v.value || u.value || !f.value
|
|
2310
2310
|
}, null, 8, ["modelValue", "disabled"])
|
|
2311
2311
|
]),
|
|
2312
2312
|
_: 1
|
|
2313
2313
|
}, 8, ["label"]),
|
|
2314
|
-
|
|
2314
|
+
u.value ? (l(), _(j, { key: 1 }, [
|
|
2315
2315
|
S("p", pn, o(n.value.otpPrompt), 1),
|
|
2316
2316
|
S("div", {
|
|
2317
2317
|
ref_key: "otpField",
|
|
@@ -2323,10 +2323,10 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2323
2323
|
default: s(() => [
|
|
2324
2324
|
m(e(ze), {
|
|
2325
2325
|
modelValue: i.value,
|
|
2326
|
-
"onUpdate:modelValue":
|
|
2326
|
+
"onUpdate:modelValue": A[2] || (A[2] = (z) => i.value = z),
|
|
2327
2327
|
inputmode: "numeric",
|
|
2328
2328
|
autocomplete: "one-time-code",
|
|
2329
|
-
disabled:
|
|
2329
|
+
disabled: v.value
|
|
2330
2330
|
}, null, 8, ["modelValue", "disabled"])
|
|
2331
2331
|
]),
|
|
2332
2332
|
_: 1
|
|
@@ -2338,11 +2338,11 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2338
2338
|
}, {
|
|
2339
2339
|
default: s(() => [
|
|
2340
2340
|
m(e(ze), {
|
|
2341
|
-
modelValue:
|
|
2342
|
-
"onUpdate:modelValue":
|
|
2341
|
+
modelValue: r.value,
|
|
2342
|
+
"onUpdate:modelValue": A[1] || (A[1] = (z) => r.value = z),
|
|
2343
2343
|
type: "password",
|
|
2344
2344
|
autocomplete: "current-password",
|
|
2345
|
-
disabled:
|
|
2345
|
+
disabled: v.value || !f.value
|
|
2346
2346
|
}, null, 8, ["modelValue", "disabled"])
|
|
2347
2347
|
]),
|
|
2348
2348
|
_: 1
|
|
@@ -2352,18 +2352,18 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2352
2352
|
m(e(I), {
|
|
2353
2353
|
type: "submit",
|
|
2354
2354
|
variant: "primary",
|
|
2355
|
-
disabled:
|
|
2355
|
+
disabled: v.value || !f.value || !a.value || !r.value || u.value && !i.value
|
|
2356
2356
|
}, {
|
|
2357
2357
|
default: s(() => [
|
|
2358
|
-
h(o(
|
|
2358
|
+
h(o(v.value ? n.value.signingIn : u.value ? n.value.verify : n.value.signIn), 1)
|
|
2359
2359
|
]),
|
|
2360
2360
|
_: 1
|
|
2361
2361
|
}, 8, ["disabled"]),
|
|
2362
|
-
|
|
2362
|
+
u.value ? (l(), g(e(I), {
|
|
2363
2363
|
key: 0,
|
|
2364
2364
|
variant: "secondary",
|
|
2365
|
-
disabled:
|
|
2366
|
-
onClick:
|
|
2365
|
+
disabled: v.value,
|
|
2366
|
+
onClick: E
|
|
2367
2367
|
}, {
|
|
2368
2368
|
default: s(() => [
|
|
2369
2369
|
h(o(n.value.otherAccount), 1)
|
|
@@ -2372,8 +2372,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2372
2372
|
}, 8, ["disabled"])) : (l(), g(e(I), {
|
|
2373
2373
|
key: 1,
|
|
2374
2374
|
variant: "secondary",
|
|
2375
|
-
disabled:
|
|
2376
|
-
onClick:
|
|
2375
|
+
disabled: v.value || !f.value,
|
|
2376
|
+
onClick: k
|
|
2377
2377
|
}, {
|
|
2378
2378
|
default: s(() => [
|
|
2379
2379
|
h(o(n.value.continueDSM), 1)
|
|
@@ -2429,35 +2429,35 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2429
2429
|
ctx: {}
|
|
2430
2430
|
},
|
|
2431
2431
|
setup(t, { expose: c }) {
|
|
2432
|
-
const n = t, a = w(() => Za(n.ctx.locale)),
|
|
2433
|
-
let D,
|
|
2432
|
+
const n = t, a = w(() => Za(n.ctx.locale)), r = (R, Y) => Je(R, Y, n.ctx.locale), i = b(), u = b([]), v = b(), p = b(!1), d = b(!1), f = b([]), x = b(), P = b(!1), $ = b("3600"), k = b(), E = b(), C = b(), A = b(!1), z = b(), ae = w(() => !i.value && !v.value && !p.value && !z.value), F = b(!1), G = b(), X = b(""), B = b(""), K = ja(n.ctx);
|
|
2433
|
+
let D, T = !1;
|
|
2434
2434
|
const M = (R) => !["queued", "running"].includes(R.state), se = (R) => M(R) && R.state !== "paused", N = (R) => R.state === "running" && R.pauseRequested, le = (R) => N(R) ? a.value.pausing : a.value[`state_${R.state}`], O = (R) => N(R) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[R.state];
|
|
2435
2435
|
async function Z(R, Y, U = !1) {
|
|
2436
2436
|
try {
|
|
2437
2437
|
return await n.ctx.call(R, Y);
|
|
2438
2438
|
} catch (me) {
|
|
2439
|
-
if (
|
|
2440
|
-
me?.code === "unsupported" ? (p.value = !0,
|
|
2439
|
+
if (T || U && (z.value = Se(me))) return;
|
|
2440
|
+
me?.code === "unsupported" ? (p.value = !0, u.value = [], f.value = [], x.value = void 0, k.value = void 0, E.value = void 0, i.value = void 0, C.value = void 0, G.value = void 0, X.value && URL.revokeObjectURL(X.value), X.value = "") : T || (v.value = me);
|
|
2441
2441
|
return;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
2444
|
async function ie() {
|
|
2445
|
-
if (!(
|
|
2446
|
-
|
|
2445
|
+
if (!(T || A.value)) {
|
|
2446
|
+
A.value = !0;
|
|
2447
2447
|
try {
|
|
2448
2448
|
const R = await Z("bg.status", void 0, !0);
|
|
2449
|
-
if (!R ||
|
|
2449
|
+
if (!R || T) return;
|
|
2450
2450
|
if (z.value = void 0, !R.limits || typeof R.admin != "boolean") {
|
|
2451
|
-
|
|
2451
|
+
v.value = { code: "unavailable" };
|
|
2452
2452
|
return;
|
|
2453
2453
|
}
|
|
2454
2454
|
p.value = !1, i.value = R;
|
|
2455
2455
|
const Y = await Z("bg.jobs.list", void 0, !0);
|
|
2456
|
-
Y && !
|
|
2456
|
+
Y && !T && (u.value = Y.jobs ?? []);
|
|
2457
2457
|
const U = await Z("bg.schedules.list", void 0, !0);
|
|
2458
|
-
U && !
|
|
2458
|
+
U && !T && (f.value = U.schedules ?? []), !T && u.value.every(M) && f.value.every((me) => !me.enabled) && D && (clearInterval(D), D = void 0);
|
|
2459
2459
|
} finally {
|
|
2460
|
-
|
|
2460
|
+
A.value = !1;
|
|
2461
2461
|
}
|
|
2462
2462
|
}
|
|
2463
2463
|
}
|
|
@@ -2468,11 +2468,11 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2468
2468
|
}
|
|
2469
2469
|
async function J(R) {
|
|
2470
2470
|
if (!d.value) {
|
|
2471
|
-
d.value = !0,
|
|
2471
|
+
d.value = !0, v.value = void 0;
|
|
2472
2472
|
try {
|
|
2473
|
-
await R(), await ie(), (
|
|
2473
|
+
await R(), await ie(), (f.value.some((Y) => Y.enabled) || u.value.some((Y) => !M(Y))) && ce();
|
|
2474
2474
|
} finally {
|
|
2475
|
-
|
|
2475
|
+
T || (d.value = !1);
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
@@ -2480,16 +2480,16 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2480
2480
|
if (!C.value) return;
|
|
2481
2481
|
await Z("bg.jobs.purge", { owner: C.value }) && (C.value = void 0);
|
|
2482
2482
|
}), W = w(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), ye = (R) => {
|
|
2483
|
-
x.value = R,
|
|
2483
|
+
x.value = R, P.value = !1, $.value = "3600";
|
|
2484
2484
|
}, Ce = () => J(async () => {
|
|
2485
|
-
if (!x.value || !
|
|
2486
|
-
await Z("bg.schedules.create", { key: da(), jobId: x.value.id, intervalSeconds: Number(
|
|
2485
|
+
if (!x.value || !P.value) return;
|
|
2486
|
+
await Z("bg.schedules.create", { key: da(), jobId: x.value.id, intervalSeconds: Number($.value), consent: !0 }) && (x.value = void 0);
|
|
2487
2487
|
}), $e = (R) => J(() => Z("bg.schedules.disable", { id: R })), ee = () => J(async () => {
|
|
2488
|
-
if (
|
|
2489
|
-
await Z("bg.schedules.delete", { id:
|
|
2488
|
+
if (!k.value) return;
|
|
2489
|
+
await Z("bg.schedules.delete", { id: k.value.id }) && (k.value = void 0);
|
|
2490
2490
|
}), ue = () => J(async () => {
|
|
2491
|
-
if (!
|
|
2492
|
-
await Z("bg.schedules.enable", { id:
|
|
2491
|
+
if (!E.value) return;
|
|
2492
|
+
await Z("bg.schedules.enable", { id: E.value.id, consent: !0 }) && (E.value = void 0);
|
|
2493
2493
|
}), oe = (R) => {
|
|
2494
2494
|
const Y = new Date(R);
|
|
2495
2495
|
return Number.isFinite(Y.getTime()) ? Y.toLocaleString() : a.value.unknownTime;
|
|
@@ -2502,16 +2502,16 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2502
2502
|
});
|
|
2503
2503
|
async function fe(R) {
|
|
2504
2504
|
const Y = await Z("bg.jobs.result", { id: R.id });
|
|
2505
|
-
!Y ||
|
|
2505
|
+
!Y || T || (X.value && URL.revokeObjectURL(X.value), X.value = URL.createObjectURL(new Blob([JSON.stringify(Y.result, null, 2)], { type: "application/json" })), B.value = `${R.name || R.id}.sha256.json`);
|
|
2506
2506
|
}
|
|
2507
2507
|
return He(() => z.value, ie), c({ refresh: ie }), we(() => {
|
|
2508
2508
|
ie().then(() => {
|
|
2509
|
-
(
|
|
2509
|
+
(f.value.some((R) => R.enabled) || u.value.some((R) => !M(R))) && ce();
|
|
2510
2510
|
});
|
|
2511
2511
|
}), ge(() => {
|
|
2512
|
-
|
|
2512
|
+
T = !0, K.dispose(), D && clearInterval(D), X.value && URL.revokeObjectURL(X.value);
|
|
2513
2513
|
}), (R, Y) => (l(), g(e(_e), {
|
|
2514
|
-
"aria-busy": d.value ||
|
|
2514
|
+
"aria-busy": d.value || A.value || ae.value,
|
|
2515
2515
|
title: a.value.title,
|
|
2516
2516
|
description: p.value ? void 0 : a.value.help,
|
|
2517
2517
|
collapsible: !1,
|
|
@@ -2537,13 +2537,13 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2537
2537
|
]),
|
|
2538
2538
|
_: 1
|
|
2539
2539
|
})) : y("", !0),
|
|
2540
|
-
|
|
2540
|
+
v.value ? (l(), g(e(Q), {
|
|
2541
2541
|
key: 1,
|
|
2542
2542
|
tone: "danger",
|
|
2543
2543
|
role: "alert"
|
|
2544
2544
|
}, {
|
|
2545
2545
|
default: s(() => [
|
|
2546
|
-
h(o(e(et)(
|
|
2546
|
+
h(o(e(et)(v.value, a.value, t.ctx.locale, t.ctx.displayName)), 1)
|
|
2547
2547
|
]),
|
|
2548
2548
|
_: 1
|
|
2549
2549
|
})) : y("", !0),
|
|
@@ -2579,10 +2579,10 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2579
2579
|
])
|
|
2580
2580
|
], 64)) : y("", !0),
|
|
2581
2581
|
i.value ? (l(), _(j, { key: 3 }, [
|
|
2582
|
-
S("p", bn, o(i.value.worker?.alive ?
|
|
2583
|
-
S("p", gn, o(
|
|
2582
|
+
S("p", bn, o(i.value.worker?.alive ? r(a.value.workerRunning, { user: i.value.worker.username }) : a.value.workerStopped), 1),
|
|
2583
|
+
S("p", gn, o(r(a.value.limits, { size: i.value.limits.maxInputBytes / 1024, queue: i.value.limits.maxQueued, seconds: i.value.limits.jobTimeoutSeconds })), 1),
|
|
2584
2584
|
S("p", hn, o(i.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
|
|
2585
|
-
S("p", kn, o(
|
|
2585
|
+
S("p", kn, o(r(a.value.ownerLimits, { jobs: i.value.limits.maxOwnerPending, size: i.value.limits.maxOwnerBytes / 1024 })), 1),
|
|
2586
2586
|
S("div", _n, [
|
|
2587
2587
|
m(e(I), {
|
|
2588
2588
|
variant: "secondary",
|
|
@@ -2606,7 +2606,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2606
2606
|
}, 8, ["disabled"])
|
|
2607
2607
|
]),
|
|
2608
2608
|
G.value ? (l(), _("p", wn, [
|
|
2609
|
-
h(o(
|
|
2609
|
+
h(o(r(a.value.chosen, { path: "" }).trim()) + " ", 1),
|
|
2610
2610
|
m(e(Le), {
|
|
2611
2611
|
path: `${G.value.folder}/${G.value.relative}`
|
|
2612
2612
|
}, null, 8, ["path"])
|
|
@@ -2627,7 +2627,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2627
2627
|
tone: "warning"
|
|
2628
2628
|
}, {
|
|
2629
2629
|
default: s(() => [
|
|
2630
|
-
S("p", null, o(
|
|
2630
|
+
S("p", null, o(r(a.value.purgeConfirm, { user: C.value.user, uid: C.value.uid })), 1),
|
|
2631
2631
|
S("div", xn, [
|
|
2632
2632
|
m(e(I), {
|
|
2633
2633
|
variant: "secondary",
|
|
@@ -2653,8 +2653,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2653
2653
|
]),
|
|
2654
2654
|
_: 1
|
|
2655
2655
|
})) : y("", !0),
|
|
2656
|
-
|
|
2657
|
-
(l(!0), _(j, null, pe(
|
|
2656
|
+
u.value.length ? (l(), _("div", $n, [
|
|
2657
|
+
(l(!0), _(j, null, pe(u.value, (U) => (l(), g(e(xa), {
|
|
2658
2658
|
key: U.id,
|
|
2659
2659
|
title: U.name,
|
|
2660
2660
|
"layout-type": "compact",
|
|
@@ -2674,15 +2674,15 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2674
2674
|
]),
|
|
2675
2675
|
default: s(() => [
|
|
2676
2676
|
S("div", Sn, [
|
|
2677
|
-
U.progress?.total ? (l(), _("span", Pn, o(
|
|
2678
|
-
U.progress?.totalBytes ? (l(), _("span", En, o(
|
|
2677
|
+
U.progress?.total ? (l(), _("span", Pn, o(r(a.value.progressItems, { done: U.progress.done, count: U.progress.total })), 1)) : y("", !0),
|
|
2678
|
+
U.progress?.totalBytes ? (l(), _("span", En, o(r(a.value.progressBytes, { done: e(va)(U.progress.bytes, t.ctx.locale), total: e(va)(U.progress.totalBytes, t.ctx.locale) })), 1)) : y("", !0),
|
|
2679
2679
|
U.progress?.item ? (l(), _("span", Tn, [
|
|
2680
|
-
h(o(
|
|
2680
|
+
h(o(r(a.value.progressItem, { item: "" }).trim()) + " ", 1),
|
|
2681
2681
|
m(e(Le), {
|
|
2682
2682
|
path: U.progress.item
|
|
2683
2683
|
}, null, 8, ["path"])
|
|
2684
2684
|
])) : y("", !0),
|
|
2685
|
-
i.value.admin && U.submitter ? (l(), _("span", An, o(
|
|
2685
|
+
i.value.admin && U.submitter ? (l(), _("span", An, o(r(a.value.owner, { user: U.submitter.user, uid: U.submitter.uid })), 1)) : y("", !0),
|
|
2686
2686
|
U.scheduleId ? (l(), _("span", zn, o(a.value.scheduledJob), 1)) : y("", !0),
|
|
2687
2687
|
S("div", Rn, [
|
|
2688
2688
|
i.value.admin && U.submitter ? (l(), g(e(I), {
|
|
@@ -2771,14 +2771,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2771
2771
|
onSubmit: Me(Ce, ["prevent"])
|
|
2772
2772
|
}, {
|
|
2773
2773
|
default: s(() => [
|
|
2774
|
-
S("p", null, o(
|
|
2774
|
+
S("p", null, o(r(a.value.scheduleSource, { name: x.value.name })), 1),
|
|
2775
2775
|
m(e(Pe), {
|
|
2776
2776
|
label: a.value.interval
|
|
2777
2777
|
}, {
|
|
2778
2778
|
default: s(() => [
|
|
2779
2779
|
m(e(ba), {
|
|
2780
|
-
modelValue:
|
|
2781
|
-
"onUpdate:modelValue": Y[3] || (Y[3] = (U) =>
|
|
2780
|
+
modelValue: $.value,
|
|
2781
|
+
"onUpdate:modelValue": Y[3] || (Y[3] = (U) => $.value = U),
|
|
2782
2782
|
"data-schedule-interval": "",
|
|
2783
2783
|
options: W.value,
|
|
2784
2784
|
disabled: d.value
|
|
@@ -2787,8 +2787,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2787
2787
|
_: 1
|
|
2788
2788
|
}, 8, ["label"]),
|
|
2789
2789
|
m(e(Pt), {
|
|
2790
|
-
modelValue:
|
|
2791
|
-
"onUpdate:modelValue": Y[4] || (Y[4] = (U) =>
|
|
2790
|
+
modelValue: P.value,
|
|
2791
|
+
"onUpdate:modelValue": Y[4] || (Y[4] = (U) => P.value = U),
|
|
2792
2792
|
"data-schedule-consent": "",
|
|
2793
2793
|
disabled: d.value,
|
|
2794
2794
|
label: a.value.scheduleConsent
|
|
@@ -2798,7 +2798,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2798
2798
|
m(e(I), {
|
|
2799
2799
|
type: "submit",
|
|
2800
2800
|
variant: "primary",
|
|
2801
|
-
disabled: d.value || !
|
|
2801
|
+
disabled: d.value || !P.value
|
|
2802
2802
|
}, {
|
|
2803
2803
|
default: s(() => [
|
|
2804
2804
|
h(o(a.value.createSchedule), 1)
|
|
@@ -2822,8 +2822,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2822
2822
|
]),
|
|
2823
2823
|
_: 1
|
|
2824
2824
|
})) : y("", !0),
|
|
2825
|
-
|
|
2826
|
-
(l(!0), _(j, null, pe(
|
|
2825
|
+
f.value.length ? (l(), _("div", In, [
|
|
2826
|
+
(l(!0), _(j, null, pe(f.value, (U) => (l(), g(e(xa), {
|
|
2827
2827
|
key: U.id,
|
|
2828
2828
|
title: U.name,
|
|
2829
2829
|
"layout-type": "compact",
|
|
@@ -2842,9 +2842,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2842
2842
|
]),
|
|
2843
2843
|
default: s(() => [
|
|
2844
2844
|
S("div", Dn, [
|
|
2845
|
-
i.value.admin ? (l(), _("span", Nn, o(
|
|
2846
|
-
U.enabled ? (l(), _("span", Ln, o(
|
|
2847
|
-
S("span", Vn, o(
|
|
2845
|
+
i.value.admin ? (l(), _("span", Nn, o(r(a.value.owner, { user: U.owner.user, uid: U.owner.uid })), 1)) : y("", !0),
|
|
2846
|
+
U.enabled ? (l(), _("span", Ln, o(r(a.value.nextRun, { time: oe(U.nextAt) })), 1)) : y("", !0),
|
|
2847
|
+
S("span", Vn, o(r(a.value.missedRuns, { count: U.missed })), 1),
|
|
2848
2848
|
U.reason === "worker-changed" ? (l(), g(e(Q), {
|
|
2849
2849
|
key: 2,
|
|
2850
2850
|
tone: "warning"
|
|
@@ -2877,7 +2877,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2877
2877
|
key: 1,
|
|
2878
2878
|
variant: "secondary",
|
|
2879
2879
|
disabled: d.value,
|
|
2880
|
-
onClick: (me) =>
|
|
2880
|
+
onClick: (me) => E.value = U
|
|
2881
2881
|
}, {
|
|
2882
2882
|
default: s(() => [
|
|
2883
2883
|
h(o(a.value.enableSchedule), 1)
|
|
@@ -2887,7 +2887,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2887
2887
|
m(e(I), {
|
|
2888
2888
|
variant: "secondary",
|
|
2889
2889
|
disabled: d.value,
|
|
2890
|
-
onClick: (me) =>
|
|
2890
|
+
onClick: (me) => k.value = U
|
|
2891
2891
|
}, {
|
|
2892
2892
|
default: s(() => [
|
|
2893
2893
|
h(o(a.value.deleteSchedule), 1)
|
|
@@ -2900,12 +2900,12 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2900
2900
|
_: 2
|
|
2901
2901
|
}, 1032, ["title", "data-schedule-id"]))), 128))
|
|
2902
2902
|
])) : (l(), _("p", Un, o(a.value.noSchedules), 1)),
|
|
2903
|
-
|
|
2903
|
+
k.value ? (l(), g(e(Q), {
|
|
2904
2904
|
key: 3,
|
|
2905
2905
|
tone: "warning"
|
|
2906
2906
|
}, {
|
|
2907
2907
|
default: s(() => [
|
|
2908
|
-
S("p", null, o(
|
|
2908
|
+
S("p", null, o(r(a.value.deleteScheduleConsent, { name: k.value.name })), 1),
|
|
2909
2909
|
S("div", Fn, [
|
|
2910
2910
|
m(e(I), {
|
|
2911
2911
|
variant: "danger",
|
|
@@ -2920,7 +2920,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2920
2920
|
m(e(I), {
|
|
2921
2921
|
variant: "secondary",
|
|
2922
2922
|
disabled: d.value,
|
|
2923
|
-
onClick: Y[6] || (Y[6] = (U) =>
|
|
2923
|
+
onClick: Y[6] || (Y[6] = (U) => k.value = void 0)
|
|
2924
2924
|
}, {
|
|
2925
2925
|
default: s(() => [
|
|
2926
2926
|
h(o(a.value.cancel), 1)
|
|
@@ -2931,12 +2931,12 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2931
2931
|
]),
|
|
2932
2932
|
_: 1
|
|
2933
2933
|
})) : y("", !0),
|
|
2934
|
-
|
|
2934
|
+
E.value ? (l(), g(e(Q), {
|
|
2935
2935
|
key: 4,
|
|
2936
2936
|
tone: "warning"
|
|
2937
2937
|
}, {
|
|
2938
2938
|
default: s(() => [
|
|
2939
|
-
S("p", null, o(
|
|
2939
|
+
S("p", null, o(r(a.value.enableScheduleConsent, { name: E.value.name })), 1),
|
|
2940
2940
|
S("div", On, [
|
|
2941
2941
|
m(e(I), {
|
|
2942
2942
|
variant: "primary",
|
|
@@ -2951,7 +2951,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2951
2951
|
m(e(I), {
|
|
2952
2952
|
variant: "secondary",
|
|
2953
2953
|
disabled: d.value,
|
|
2954
|
-
onClick: Y[7] || (Y[7] = (U) =>
|
|
2954
|
+
onClick: Y[7] || (Y[7] = (U) => E.value = void 0)
|
|
2955
2955
|
}, {
|
|
2956
2956
|
default: s(() => [
|
|
2957
2957
|
h(o(a.value.cancel), 1)
|
|
@@ -2997,71 +2997,72 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
2997
2997
|
preload: { type: Boolean }
|
|
2998
2998
|
},
|
|
2999
2999
|
setup(t) {
|
|
3000
|
-
const c = t, n = Te(Ye, void 0), a = w(() => Re(c.locale)),
|
|
3000
|
+
const c = t, n = Te(Ye, void 0), a = w(() => n?.call ? { webApi: c.ctx?.webApi, call: (k, E) => n.call(k, E) } : c.ctx?.call ? c.ctx : void 0), r = w(() => Re(c.locale)), i = b("checking"), u = b(), v = w(() => {
|
|
3001
3001
|
const k = c.ctx;
|
|
3002
3002
|
return (k?.fullPage ?? (k?.host ? Ea({ host: k.host }) : !1)) && k?.displayName ? k : void 0;
|
|
3003
3003
|
});
|
|
3004
|
-
function
|
|
3005
|
-
|
|
3004
|
+
function p(k) {
|
|
3005
|
+
u.value = k, i.value = k.state;
|
|
3006
3006
|
}
|
|
3007
|
-
let
|
|
3008
|
-
async function
|
|
3007
|
+
let d = !1, f;
|
|
3008
|
+
async function x() {
|
|
3009
3009
|
try {
|
|
3010
3010
|
const k = await n.status();
|
|
3011
|
-
|
|
3011
|
+
d || p(k);
|
|
3012
3012
|
} catch {
|
|
3013
|
-
|
|
3013
|
+
d || (u.value = void 0, i.value = "blocked");
|
|
3014
3014
|
}
|
|
3015
3015
|
}
|
|
3016
|
-
const
|
|
3017
|
-
return Oe(Fa, w(() =>
|
|
3016
|
+
const P = w(() => Se(u.value)), $ = w(() => !!c.preload && !!n && (i.value === "ready" || i.value === "checking"));
|
|
3017
|
+
return Oe(Fa, w(() => $.value && i.value === "checking")), He(() => P.value, x), we(() => {
|
|
3018
3018
|
n && (n.subscribe?.((k) => {
|
|
3019
|
-
!
|
|
3020
|
-
}),
|
|
3021
|
-
|
|
3022
|
-
}),
|
|
3019
|
+
!d && !ta(k) && p(k);
|
|
3020
|
+
}), f = c.ctx?.reopen(() => {
|
|
3021
|
+
x();
|
|
3022
|
+
}), x());
|
|
3023
3023
|
}), ge(() => {
|
|
3024
|
-
|
|
3025
|
-
}), (k,
|
|
3026
|
-
|
|
3024
|
+
d = !0, f?.();
|
|
3025
|
+
}), (k, E) => (l(), _(j, null, [
|
|
3026
|
+
$.value ? (l(), _("div", {
|
|
3027
3027
|
key: 0,
|
|
3028
|
-
class: De(["executor-pages", { "executor-preloading":
|
|
3029
|
-
inert:
|
|
3030
|
-
"aria-hidden":
|
|
3028
|
+
class: De(["executor-pages", { "executor-preloading": i.value === "checking" }]),
|
|
3029
|
+
inert: i.value === "checking" || void 0,
|
|
3030
|
+
"aria-hidden": i.value === "checking" ? "true" : void 0
|
|
3031
3031
|
}, [
|
|
3032
3032
|
he(k.$slots, "default", {}, void 0, !0)
|
|
3033
|
-
], 10, Mn)) : !e(n) ||
|
|
3034
|
-
e(n) &&
|
|
3033
|
+
], 10, Mn)) : !e(n) || i.value === "ready" ? he(k.$slots, "default", {}, void 0, !0, 1) : y("", !0),
|
|
3034
|
+
e(n) && i.value === "checking" ? (l(), g(e(Ba), {
|
|
3035
3035
|
key: 2,
|
|
3036
|
-
text:
|
|
3037
|
-
}, null, 8, ["text"])) : e(n) &&
|
|
3038
|
-
|
|
3039
|
-
|
|
3036
|
+
text: r.value.loading
|
|
3037
|
+
}, null, 8, ["text"])) : e(n) && i.value !== "ready" ? (l(), _("div", Kn, [
|
|
3038
|
+
v.value ? (l(), _("header", Hn, [
|
|
3039
|
+
v.value.appIcon ? (l(), _("img", {
|
|
3040
3040
|
key: 0,
|
|
3041
|
-
src:
|
|
3041
|
+
src: v.value.appIcon,
|
|
3042
3042
|
alt: ""
|
|
3043
3043
|
}, null, 8, Gn)) : y("", !0),
|
|
3044
|
-
S("span", null, o(
|
|
3044
|
+
S("span", null, o(v.value.displayName), 1)
|
|
3045
3045
|
])) : y("", !0),
|
|
3046
|
-
|
|
3046
|
+
P.value ? (l(), g(e(Q), {
|
|
3047
3047
|
key: 1,
|
|
3048
3048
|
tone: "info",
|
|
3049
3049
|
role: "status"
|
|
3050
3050
|
}, {
|
|
3051
3051
|
default: s(() => [
|
|
3052
|
-
h(o(e(Ve)(
|
|
3052
|
+
h(o(e(Ve)(P.value, t.locale)), 1)
|
|
3053
3053
|
]),
|
|
3054
3054
|
_: 1
|
|
3055
3055
|
})) : t.admin ? (l(), g(Ka, {
|
|
3056
3056
|
key: 2,
|
|
3057
3057
|
admin: !0,
|
|
3058
3058
|
locale: t.locale,
|
|
3059
|
-
|
|
3059
|
+
ctx: a.value,
|
|
3060
|
+
initial: u.value,
|
|
3060
3061
|
purpose: t.purpose,
|
|
3061
3062
|
title: "",
|
|
3062
3063
|
layout: "page",
|
|
3063
|
-
onConfirmed:
|
|
3064
|
-
}, null, 8, ["locale", "initial", "purpose"])) :
|
|
3064
|
+
onConfirmed: x
|
|
3065
|
+
}, null, 8, ["locale", "ctx", "initial", "purpose"])) : i.value === "needs-admin-approval" ? (l(), g(la, {
|
|
3065
3066
|
key: 3,
|
|
3066
3067
|
admin: !1,
|
|
3067
3068
|
locale: t.locale,
|
|
@@ -3072,14 +3073,14 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3072
3073
|
tone: "info"
|
|
3073
3074
|
}, {
|
|
3074
3075
|
default: s(() => [
|
|
3075
|
-
h(o(
|
|
3076
|
+
h(o(r.value.executorBlocked), 1)
|
|
3076
3077
|
]),
|
|
3077
3078
|
_: 1
|
|
3078
3079
|
}))
|
|
3079
3080
|
])) : y("", !0)
|
|
3080
3081
|
], 64));
|
|
3081
3082
|
}
|
|
3082
|
-
}), Ks = /* @__PURE__ */ ve(Xn, [["__scopeId", "data-v-
|
|
3083
|
+
}), Ks = /* @__PURE__ */ ve(Xn, [["__scopeId", "data-v-13cbe4c2"]]), Jn = {
|
|
3083
3084
|
key: 2,
|
|
3084
3085
|
role: "status"
|
|
3085
3086
|
}, Wn = {
|
|
@@ -3107,28 +3108,28 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3107
3108
|
ctx: {}
|
|
3108
3109
|
},
|
|
3109
3110
|
setup(t, { expose: c }) {
|
|
3110
|
-
const n = t, a = w(() => Re(n.ctx.locale)),
|
|
3111
|
-
let C = !1,
|
|
3111
|
+
const n = t, a = w(() => Re(n.ctx.locale)), r = w(() => ma(n.ctx.locale)), i = za(n.ctx), u = b(), v = b([]), p = b([]), d = b(!1), f = b(), x = b(""), P = b(!1), $ = b(""), k = b(""), E = b("");
|
|
3112
|
+
let C = !1, A, z;
|
|
3112
3113
|
const ae = b();
|
|
3113
|
-
qe([
|
|
3114
|
+
qe([k, $, E], () => {
|
|
3114
3115
|
z = void 0;
|
|
3115
3116
|
}, { flush: "sync" });
|
|
3116
|
-
const F = (J) => ["queued", "running", "waiting_executor"].includes(J.state), G = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, X = w(() => p.value.some((J) => J.state === "waiting_executor")), B = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], K = w(() => X.value && B.includes(
|
|
3117
|
+
const F = (J) => ["queued", "running", "waiting_executor"].includes(J.state), G = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, X = w(() => p.value.some((J) => J.state === "waiting_executor")), B = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], K = w(() => X.value && B.includes(f.value?.code ?? "")), D = w(() => !u.value && !f.value && !ae.value), T = w(() => u.value && u.value.state !== "ready" && !(X.value && u.value.state === "needs-admin-approval" && B.includes(u.value.reason ?? "")));
|
|
3117
3118
|
async function M() {
|
|
3118
3119
|
if (C) return;
|
|
3119
3120
|
const [J, H, W] = await Promise.allSettled([n.ctx.call("delegate.status"), n.ctx.call("delegate.list"), n.ctx.call("delegate.jobs.list")]);
|
|
3120
3121
|
if (C) return;
|
|
3121
|
-
J.status === "fulfilled" && (
|
|
3122
|
+
J.status === "fulfilled" && (u.value = J.value), H.status === "fulfilled" && (v.value = (H.value.delegations ?? []).filter((Ce) => !Ce.revoked)), W.status === "fulfilled" && (p.value = W.value.jobs ?? []);
|
|
3122
3123
|
const ye = [J, H, W].find((Ce) => Ce.status === "rejected");
|
|
3123
3124
|
if (ae.value = ye && Se(ye.reason), ye && !ae.value) throw ye.reason;
|
|
3124
3125
|
}
|
|
3125
3126
|
async function se(J) {
|
|
3126
3127
|
if (!(d.value || C)) {
|
|
3127
|
-
d.value = !0,
|
|
3128
|
+
d.value = !0, f.value = void 0;
|
|
3128
3129
|
try {
|
|
3129
3130
|
await J();
|
|
3130
3131
|
} catch (H) {
|
|
3131
|
-
C || (
|
|
3132
|
+
C || (f.value = H);
|
|
3132
3133
|
} finally {
|
|
3133
3134
|
C || (d.value = !1);
|
|
3134
3135
|
}
|
|
@@ -3141,18 +3142,18 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3141
3142
|
}), O = (J) => se(async () => {
|
|
3142
3143
|
const H = await n.ctx.call("delegate.jobs.cancel", { id: J });
|
|
3143
3144
|
C || (x.value = H.revocation_pending ? a.value.pending : ""), await M();
|
|
3144
|
-
}), Z = w(() =>
|
|
3145
|
-
Z.value && (await n.ctx.call("delegate.jobs.submit", { key: z ?? (z = da()), url:
|
|
3145
|
+
}), Z = w(() => u.value?.state === "ready" && !!$.value && !!k.value && !!E.value), ie = () => se(async () => {
|
|
3146
|
+
Z.value && (await n.ctx.call("delegate.jobs.submit", { key: z ?? (z = da()), url: k.value, dest: $.value, name: E.value }), C || (k.value = "", E.value = "", $.value = ""), await M());
|
|
3146
3147
|
}), ce = (J) => {
|
|
3147
3148
|
const H = new Date(J);
|
|
3148
3149
|
return Number.isNaN(H.getTime()) ? "—" : H.toLocaleString(n.ctx.locale);
|
|
3149
3150
|
};
|
|
3150
3151
|
return c({ refresh: N }), we(() => {
|
|
3151
|
-
N(),
|
|
3152
|
+
N(), A = setInterval(() => {
|
|
3152
3153
|
p.value.some(F) && N();
|
|
3153
3154
|
}, 3e3);
|
|
3154
3155
|
}), ge(() => {
|
|
3155
|
-
C = !0,
|
|
3156
|
+
C = !0, A && clearInterval(A), i.dispose();
|
|
3156
3157
|
}), (J, H) => (l(), g(e(_e), {
|
|
3157
3158
|
title: a.value.title,
|
|
3158
3159
|
description: a.value.help,
|
|
@@ -3161,13 +3162,13 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3161
3162
|
class: "delegate-panel"
|
|
3162
3163
|
}, {
|
|
3163
3164
|
default: s(() => [
|
|
3164
|
-
|
|
3165
|
+
f.value && !K.value ? (l(), g(e(Q), {
|
|
3165
3166
|
key: 0,
|
|
3166
3167
|
tone: "danger",
|
|
3167
3168
|
role: "alert"
|
|
3168
3169
|
}, {
|
|
3169
3170
|
default: s(() => [
|
|
3170
|
-
h(o(e(at)(
|
|
3171
|
+
h(o(e(at)(f.value, t.ctx.locale) ?? e(tt)(f.value, a.value, t.ctx.locale, t.ctx.displayName)), 1)
|
|
3171
3172
|
]),
|
|
3172
3173
|
_: 1
|
|
3173
3174
|
})) : y("", !0),
|
|
@@ -3182,7 +3183,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3182
3183
|
_: 1
|
|
3183
3184
|
})) : y("", !0),
|
|
3184
3185
|
x.value ? (l(), _("p", Jn, o(x.value), 1)) : y("", !0),
|
|
3185
|
-
|
|
3186
|
+
T.value ? (l(), _("p", Wn, o(u.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : y("", !0),
|
|
3186
3187
|
m(e(Ke), {
|
|
3187
3188
|
direction: "vertical",
|
|
3188
3189
|
onSubmit: Me(ie, ["prevent"])
|
|
@@ -3195,10 +3196,10 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3195
3196
|
default: s(() => [
|
|
3196
3197
|
m(e(ze), {
|
|
3197
3198
|
id: "delegate-url",
|
|
3198
|
-
modelValue:
|
|
3199
|
-
"onUpdate:modelValue": H[0] || (H[0] = (W) =>
|
|
3199
|
+
modelValue: k.value,
|
|
3200
|
+
"onUpdate:modelValue": H[0] || (H[0] = (W) => k.value = W),
|
|
3200
3201
|
type: "url",
|
|
3201
|
-
disabled: d.value ||
|
|
3202
|
+
disabled: d.value || u.value?.state !== "ready"
|
|
3202
3203
|
}, null, 8, ["modelValue", "disabled"])
|
|
3203
3204
|
]),
|
|
3204
3205
|
_: 1
|
|
@@ -3210,26 +3211,26 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3210
3211
|
default: s(() => [
|
|
3211
3212
|
m(e(ze), {
|
|
3212
3213
|
id: "delegate-name",
|
|
3213
|
-
modelValue:
|
|
3214
|
-
"onUpdate:modelValue": H[1] || (H[1] = (W) =>
|
|
3214
|
+
modelValue: E.value,
|
|
3215
|
+
"onUpdate:modelValue": H[1] || (H[1] = (W) => E.value = W),
|
|
3215
3216
|
"data-file-name": "",
|
|
3216
|
-
disabled: d.value ||
|
|
3217
|
+
disabled: d.value || u.value?.state !== "ready"
|
|
3217
3218
|
}, null, 8, ["modelValue", "disabled"])
|
|
3218
3219
|
]),
|
|
3219
3220
|
_: 1
|
|
3220
3221
|
}, 8, ["label"]),
|
|
3221
3222
|
S("p", null, o(a.value.size), 1),
|
|
3222
|
-
|
|
3223
|
-
h(o(a.value.destination) + o(
|
|
3224
|
-
m(e(Le), { path:
|
|
3223
|
+
$.value ? (l(), _("p", Yn, [
|
|
3224
|
+
h(o(a.value.destination) + o(r.value), 1),
|
|
3225
|
+
m(e(Le), { path: $.value }, null, 8, ["path"])
|
|
3225
3226
|
])) : y("", !0),
|
|
3226
3227
|
m(e(oa), null, {
|
|
3227
3228
|
default: s(() => [
|
|
3228
3229
|
m(e(I), {
|
|
3229
3230
|
type: "button",
|
|
3230
3231
|
variant: "secondary",
|
|
3231
|
-
disabled: d.value ||
|
|
3232
|
-
onClick: H[2] || (H[2] = (W) =>
|
|
3232
|
+
disabled: d.value || u.value?.state !== "ready",
|
|
3233
|
+
onClick: H[2] || (H[2] = (W) => P.value = !0)
|
|
3233
3234
|
}, {
|
|
3234
3235
|
default: s(() => [
|
|
3235
3236
|
h(o(a.value.choose), 1)
|
|
@@ -3253,13 +3254,13 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3253
3254
|
_: 1
|
|
3254
3255
|
}),
|
|
3255
3256
|
m(ia, {
|
|
3256
|
-
open:
|
|
3257
|
-
"onUpdate:open": H[3] || (H[3] = (W) =>
|
|
3257
|
+
open: P.value,
|
|
3258
|
+
"onUpdate:open": H[3] || (H[3] = (W) => P.value = W),
|
|
3258
3259
|
locale: t.ctx.locale,
|
|
3259
3260
|
name: t.ctx.displayName,
|
|
3260
3261
|
provider: e(i),
|
|
3261
3262
|
mode: "folder",
|
|
3262
|
-
onSelected: H[4] || (H[4] = (W) =>
|
|
3263
|
+
onSelected: H[4] || (H[4] = (W) => $.value = W)
|
|
3263
3264
|
}, null, 8, ["open", "locale", "name", "provider"]),
|
|
3264
3265
|
m(e(_e), {
|
|
3265
3266
|
title: a.value.downloads,
|
|
@@ -3272,7 +3273,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3272
3273
|
width: "12rem",
|
|
3273
3274
|
height: "20px"
|
|
3274
3275
|
})
|
|
3275
|
-
])) : !p.value.length && !
|
|
3276
|
+
])) : !p.value.length && !f.value ? (l(), _("p", Zn, o(a.value.noJobs), 1)) : (l(), _("div", jn, [
|
|
3276
3277
|
(l(!0), _(j, null, pe(p.value, (W) => (l(), g(e(Ca), {
|
|
3277
3278
|
key: W.id,
|
|
3278
3279
|
title: W.name,
|
|
@@ -3324,8 +3325,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3324
3325
|
width: "12rem",
|
|
3325
3326
|
height: "20px"
|
|
3326
3327
|
})
|
|
3327
|
-
])) : !
|
|
3328
|
-
(l(!0), _(j, null, pe(
|
|
3328
|
+
])) : !v.value.length && !f.value ? (l(), _("p", as, o(a.value.noDelegations), 1)) : (l(), _("div", ts, [
|
|
3329
|
+
(l(!0), _(j, null, pe(v.value, (W) => (l(), g(e(Ca), {
|
|
3329
3330
|
key: W.delegation_id
|
|
3330
3331
|
}, {
|
|
3331
3332
|
title: s(() => [
|
|
@@ -3334,7 +3335,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3334
3335
|
}, null, 8, ["path"])
|
|
3335
3336
|
]),
|
|
3336
3337
|
description: s(() => [
|
|
3337
|
-
h(o(a.value.expires) + o(
|
|
3338
|
+
h(o(a.value.expires) + o(r.value) + o(ce(W.expires_at)), 1)
|
|
3338
3339
|
]),
|
|
3339
3340
|
actions: s(() => [
|
|
3340
3341
|
m(e(I), {
|
|
@@ -3383,13 +3384,13 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3383
3384
|
},
|
|
3384
3385
|
emits: ["authorized", "confirmed", "destinations"],
|
|
3385
3386
|
setup(t, { expose: c, emit: n }) {
|
|
3386
|
-
const a = t,
|
|
3387
|
+
const a = t, r = n, i = w(() => pa(a.locale)), u = w(() => Re(a.locale)), v = Te(Ye, void 0), p = w(() => a.ctx ?? (v?.call ? { call: v.call.bind(v) } : void 0)), d = Ma({ get admin() {
|
|
3387
3388
|
return a.admin;
|
|
3388
3389
|
}, get locale() {
|
|
3389
3390
|
return a.locale;
|
|
3390
3391
|
}, get ctx() {
|
|
3391
3392
|
return p.value;
|
|
3392
|
-
} }, ee), { password:
|
|
3393
|
+
} }, ee), { password: f, busy: x, confirming: P, failure: $, passwordError: k, scope: E, chosen: C, options: A, dynamic: z, canConfirm: ae } = d, F = b(), G = b([]), X = b(!1), B = b(!1), K = b(), D = b(!1), T = b(!1), M = b(!1), se = b(""), N = b(), le = w(() => N.value ?? (X.value ? Se(d.status.value) : void 0));
|
|
3393
3394
|
let O = !1;
|
|
3394
3395
|
async function Z() {
|
|
3395
3396
|
let re;
|
|
@@ -3402,7 +3403,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3402
3403
|
return;
|
|
3403
3404
|
}
|
|
3404
3405
|
const be = await Promise.all((a.picker?.keys ?? []).map((ne) => a.sdk.destination(ne)));
|
|
3405
|
-
O || (N.value = void 0, X.value = !1, F.value = re, G.value = be,
|
|
3406
|
+
O || (N.value = void 0, X.value = !1, F.value = re, G.value = be, r("destinations", be));
|
|
3406
3407
|
}
|
|
3407
3408
|
async function ie(re) {
|
|
3408
3409
|
if (!(O || B.value)) {
|
|
@@ -3419,7 +3420,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3419
3420
|
const ce = () => ie(Z), J = () => Promise.all([ce(), a.admin ? d.refresh() : void 0]).then(() => {
|
|
3420
3421
|
});
|
|
3421
3422
|
function H(re) {
|
|
3422
|
-
|
|
3423
|
+
r("authorized", re), ce();
|
|
3423
3424
|
}
|
|
3424
3425
|
function W(re) {
|
|
3425
3426
|
O || (K.value = re, D.value = !0);
|
|
@@ -3436,7 +3437,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3436
3437
|
async function ee() {
|
|
3437
3438
|
await ie(async () => {
|
|
3438
3439
|
if (O) return;
|
|
3439
|
-
const re = await a.sdk.status(), be =
|
|
3440
|
+
const re = await a.sdk.status(), be = E.value?.selection;
|
|
3440
3441
|
if (!O) {
|
|
3441
3442
|
if (z.value) {
|
|
3442
3443
|
const ne = re.selection;
|
|
@@ -3452,22 +3453,22 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3452
3453
|
}
|
|
3453
3454
|
if (!Ie?.id || !Ie.username || Ie.path !== ne.root || Ie.key !== ga || Ie.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
|
|
3454
3455
|
if (O) return;
|
|
3455
|
-
|
|
3456
|
+
r("authorized", Ie);
|
|
3456
3457
|
}
|
|
3457
3458
|
}
|
|
3458
|
-
O || (
|
|
3459
|
+
O || (T.value = !1, r("confirmed"), await Z());
|
|
3459
3460
|
}
|
|
3460
3461
|
});
|
|
3461
3462
|
}
|
|
3462
3463
|
function ue(re) {
|
|
3463
|
-
se.value = re, a.admin && z.value ?
|
|
3464
|
+
se.value = re, a.admin && z.value ? T.value = !0 : M.value = !0;
|
|
3464
3465
|
}
|
|
3465
3466
|
const oe = w(() => F.value?.selection), ke = w(() => !F.value && !X.value && !K.value && !le.value), Ee = w(() => X.value && (!a.admin || d.status.value?.state !== "blocked") || F.value?.scopeMode === "install-selected" && !oe.value), L = w(() => a.admin && X.value && d.status.value?.state === "blocked" && !d.status.value.retry), V = w(() => !!F.value && !Ee.value && !F.value.disabled), q = w(() => a.admin && (Ee.value || X.value && !!d.status.value?.retry)), te = w(() => a.picker ? oe.value ? lt(a.picker.provider, oe.value.root) : F.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider : void 0), fe = (re) => a.picker?.labels?.[re] ?? i.value.folder, R = w(() => {
|
|
3466
|
-
const re =
|
|
3467
|
-
return !re || "confirm" in re ? "" : re.code === "session_ended" ?
|
|
3468
|
-
}), Y = w(() => a.admin && Ee.value && !
|
|
3467
|
+
const re = $.value;
|
|
3468
|
+
return !re || "confirm" in re ? "" : re.code === "session_ended" ? u.value.session : d.explain(re) ?? u.value.setupError;
|
|
3469
|
+
}), Y = w(() => a.admin && Ee.value && !T.value), U = w(() => x.value || B.value || d.error.value || !ae.value);
|
|
3469
3470
|
function me() {
|
|
3470
|
-
|
|
3471
|
+
T.value = !1, f.value = "", $.value = void 0, C.value = E.value?.selection?.scope ?? "";
|
|
3471
3472
|
}
|
|
3472
3473
|
return He(() => le.value, () => Promise.all([ce(), a.admin ? d.refresh() : void 0])), c({ refresh: J }), we(() => {
|
|
3473
3474
|
ce();
|
|
@@ -3475,7 +3476,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3475
3476
|
O = !0;
|
|
3476
3477
|
}), (re, be) => (l(), g(e(_e), {
|
|
3477
3478
|
title: t.title ?? i.value.title,
|
|
3478
|
-
description: Ee.value && !
|
|
3479
|
+
description: Ee.value && !T.value ? void 0 : i.value.help,
|
|
3479
3480
|
collapsible: !1,
|
|
3480
3481
|
"aria-busy": B.value || e(x) || ke.value,
|
|
3481
3482
|
class: "background-save-settings"
|
|
@@ -3534,7 +3535,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3534
3535
|
}, {
|
|
3535
3536
|
default: s(() => [
|
|
3536
3537
|
S("span", os, [
|
|
3537
|
-
h(o(
|
|
3538
|
+
h(o(u.value.setupError), 1),
|
|
3538
3539
|
m(e(I), {
|
|
3539
3540
|
variant: "secondary",
|
|
3540
3541
|
size: "sm",
|
|
@@ -3557,7 +3558,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3557
3558
|
}, {
|
|
3558
3559
|
default: s(() => [
|
|
3559
3560
|
h(o(R.value), 1),
|
|
3560
|
-
e(
|
|
3561
|
+
e($) && "reason" in e($) && e($).reason ? (l(), _("span", is, o(e($).reason), 1)) : y("", !0)
|
|
3561
3562
|
]),
|
|
3562
3563
|
_: 1
|
|
3563
3564
|
})) : y("", !0),
|
|
@@ -3566,7 +3567,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3566
3567
|
tone: "warning"
|
|
3567
3568
|
}, {
|
|
3568
3569
|
default: s(() => [
|
|
3569
|
-
h(o(e(d).explain(e(d).status.value) ??
|
|
3570
|
+
h(o(e(d).explain(e(d).status.value) ?? u.value.blocked), 1),
|
|
3570
3571
|
e(d).status.value?.reason ? (l(), _("span", us, o(e(d).status.value.reason), 1)) : y("", !0)
|
|
3571
3572
|
]),
|
|
3572
3573
|
_: 1
|
|
@@ -3608,7 +3609,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3608
3609
|
]),
|
|
3609
3610
|
_: 1
|
|
3610
3611
|
})) : y("", !0),
|
|
3611
|
-
q.value ||
|
|
3612
|
+
q.value || T.value ? (l(), g(Xe(Y.value ? la : "div"), ea(ya({ key: 7 }, Y.value ? { admin: !0, locale: t.locale, files: !0, status: e(d).status.value } : {})), {
|
|
3612
3613
|
default: s(() => [
|
|
3613
3614
|
m(e(Ke), {
|
|
3614
3615
|
direction: "vertical",
|
|
@@ -3616,7 +3617,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3616
3617
|
onSubmit: Me(e(d).submit, ["prevent"])
|
|
3617
3618
|
}, {
|
|
3618
3619
|
default: s(() => [
|
|
3619
|
-
|
|
3620
|
+
T.value ? (l(), _("p", ds, o(i.value.changeHelp), 1)) : y("", !0),
|
|
3620
3621
|
e(z) ? (l(), g(e(Pe), {
|
|
3621
3622
|
key: 1,
|
|
3622
3623
|
label: i.value.folder,
|
|
@@ -3628,7 +3629,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3628
3629
|
id: "save-scope",
|
|
3629
3630
|
modelValue: e(C),
|
|
3630
3631
|
"onUpdate:modelValue": be[0] || (be[0] = (ne) => aa(C) ? C.value = ne : null),
|
|
3631
|
-
options: e(
|
|
3632
|
+
options: e(A),
|
|
3632
3633
|
disabled: e(x)
|
|
3633
3634
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
3634
3635
|
]),
|
|
@@ -3636,9 +3637,9 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3636
3637
|
}, 8, ["label", "description"])) : y("", !0),
|
|
3637
3638
|
m(e(Pe), {
|
|
3638
3639
|
label: i.value.password,
|
|
3639
|
-
description: e(
|
|
3640
|
-
help: e(
|
|
3641
|
-
"validate-status": e(
|
|
3640
|
+
description: e(P) ? u.value.confirmingHelp : Y.value ? u.value.passwordNote : void 0,
|
|
3641
|
+
help: e(k),
|
|
3642
|
+
"validate-status": e(k) ? "error" : void 0,
|
|
3642
3643
|
"validate-message-display-mode": "text"
|
|
3643
3644
|
}, {
|
|
3644
3645
|
after: s(({ classes: ne }) => [
|
|
@@ -3646,15 +3647,15 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3646
3647
|
class: De(ne.afterItem),
|
|
3647
3648
|
type: "submit",
|
|
3648
3649
|
variant: "primary",
|
|
3649
|
-
loading: e(
|
|
3650
|
+
loading: e(P),
|
|
3650
3651
|
disabled: U.value
|
|
3651
3652
|
}, {
|
|
3652
3653
|
default: s(() => [
|
|
3653
|
-
h(o(
|
|
3654
|
+
h(o(T.value ? i.value.confirmChange : i.value.approve), 1)
|
|
3654
3655
|
]),
|
|
3655
3656
|
_: 1
|
|
3656
3657
|
}, 8, ["class", "loading", "disabled"]),
|
|
3657
|
-
|
|
3658
|
+
T.value ? (l(), g(e(I), {
|
|
3658
3659
|
key: 0,
|
|
3659
3660
|
class: De(ne.afterItem),
|
|
3660
3661
|
type: "button",
|
|
@@ -3671,11 +3672,11 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3671
3672
|
default: s(() => [
|
|
3672
3673
|
m(e(ze), {
|
|
3673
3674
|
id: "save-password",
|
|
3674
|
-
modelValue: e(
|
|
3675
|
-
"onUpdate:modelValue": be[1] || (be[1] = (ne) => aa(
|
|
3675
|
+
modelValue: e(f),
|
|
3676
|
+
"onUpdate:modelValue": be[1] || (be[1] = (ne) => aa(f) ? f.value = ne : null),
|
|
3676
3677
|
type: "password",
|
|
3677
3678
|
autocomplete: "current-password",
|
|
3678
|
-
invalid: !!e(
|
|
3679
|
+
invalid: !!e(k),
|
|
3679
3680
|
disabled: e(x)
|
|
3680
3681
|
}, null, 8, ["modelValue", "invalid", "disabled"])
|
|
3681
3682
|
]),
|
|
@@ -3687,7 +3688,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3687
3688
|
]),
|
|
3688
3689
|
_: 1
|
|
3689
3690
|
}, 16)) : y("", !0),
|
|
3690
|
-
V.value && !
|
|
3691
|
+
V.value && !T.value && !q.value ? (l(!0), _(j, { key: 8 }, pe(G.value, (ne) => (l(), g(e(xe), {
|
|
3691
3692
|
key: ne.key,
|
|
3692
3693
|
label: fe(ne.key),
|
|
3693
3694
|
"field-width": "full",
|
|
@@ -3745,7 +3746,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3745
3746
|
_: 3
|
|
3746
3747
|
}, 8, ["title", "description", "aria-busy"]));
|
|
3747
3748
|
}
|
|
3748
|
-
}), ps = /* @__PURE__ */ ve(fs, [["__scopeId", "data-v-
|
|
3749
|
+
}), ps = /* @__PURE__ */ ve(fs, [["__scopeId", "data-v-0b2bb832"]]), ms = { class: "background-save-panel" }, ys = {
|
|
3749
3750
|
key: 1,
|
|
3750
3751
|
class: "save-example"
|
|
3751
3752
|
}, bs = { class: "save-help" }, gs = { class: "save-actions" }, hs = /* @__PURE__ */ de({
|
|
@@ -3762,21 +3763,21 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3762
3763
|
},
|
|
3763
3764
|
emits: ["authorized"],
|
|
3764
3765
|
setup(t, { expose: c, emit: n }) {
|
|
3765
|
-
const a = t,
|
|
3766
|
-
async function
|
|
3767
|
-
if (
|
|
3768
|
-
|
|
3769
|
-
const
|
|
3766
|
+
const a = t, r = n, i = w(() => pa(a.locale)), u = w(() => ma(a.locale)), v = b([]), p = b(), d = () => (x.value = void 0, p.value?.refresh() ?? Promise.resolve()), f = b(!1), x = b();
|
|
3767
|
+
async function P(k) {
|
|
3768
|
+
if (f.value) return;
|
|
3769
|
+
f.value = !0, x.value = void 0;
|
|
3770
|
+
const E = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (C) => C.toString(16).padStart(2, "0")).join("");
|
|
3770
3771
|
try {
|
|
3771
|
-
await a.sdk.exportExample({ key:
|
|
3772
|
+
await a.sdk.exportExample({ key: k, job_id: E });
|
|
3772
3773
|
} catch (C) {
|
|
3773
3774
|
x.value = C;
|
|
3774
3775
|
} finally {
|
|
3775
|
-
|
|
3776
|
+
f.value = !1;
|
|
3776
3777
|
}
|
|
3777
3778
|
}
|
|
3778
|
-
const
|
|
3779
|
-
return c({ refresh: d }), (
|
|
3779
|
+
const $ = (k) => a.picker?.labels?.[k] ? `${i.value.example}${u.value}${a.picker.labels[k]}` : i.value.example;
|
|
3780
|
+
return c({ refresh: d }), (k, E) => (l(), _("div", ms, [
|
|
3780
3781
|
m(ps, {
|
|
3781
3782
|
ref_key: "settings",
|
|
3782
3783
|
ref: p,
|
|
@@ -3787,8 +3788,8 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3787
3788
|
picker: t.picker,
|
|
3788
3789
|
ctx: t.ctx,
|
|
3789
3790
|
"picker-error-text": t.pickerErrorText,
|
|
3790
|
-
onAuthorized:
|
|
3791
|
-
onDestinations:
|
|
3791
|
+
onAuthorized: E[0] || (E[0] = (C) => r("authorized", C)),
|
|
3792
|
+
onDestinations: E[1] || (E[1] = (C) => v.value = C.filter((A) => A.status === "active"))
|
|
3792
3793
|
}, {
|
|
3793
3794
|
default: s(() => [
|
|
3794
3795
|
x.value ? (l(), g(e(Q), {
|
|
@@ -3801,17 +3802,17 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3801
3802
|
]),
|
|
3802
3803
|
_: 1
|
|
3803
3804
|
})) : y("", !0),
|
|
3804
|
-
t.sampleSave &&
|
|
3805
|
+
t.sampleSave && v.value.length ? (l(), _("div", ys, [
|
|
3805
3806
|
S("p", bs, o(i.value.exampleHelp), 1),
|
|
3806
3807
|
S("div", gs, [
|
|
3807
|
-
(l(!0), _(j, null, pe(
|
|
3808
|
+
(l(!0), _(j, null, pe(v.value, (C) => (l(), g(e(I), {
|
|
3808
3809
|
key: C.key,
|
|
3809
3810
|
variant: "secondary",
|
|
3810
|
-
disabled:
|
|
3811
|
-
onClick: (
|
|
3811
|
+
disabled: f.value,
|
|
3812
|
+
onClick: (A) => P(C.key)
|
|
3812
3813
|
}, {
|
|
3813
3814
|
default: s(() => [
|
|
3814
|
-
h(o(
|
|
3815
|
+
h(o($(C.key)), 1)
|
|
3815
3816
|
]),
|
|
3816
3817
|
_: 2
|
|
3817
3818
|
}, 1032, ["disabled", "onClick"]))), 128))
|
|
@@ -3822,7 +3823,7 @@ const zl = ["aria-busy", "aria-label"], Rl = { class: "file-toolbar file-locatio
|
|
|
3822
3823
|
}, 8, ["sdk", "admin", "locale", "title", "picker", "ctx", "picker-error-text"])
|
|
3823
3824
|
]));
|
|
3824
3825
|
}
|
|
3825
|
-
}), Gs = /* @__PURE__ */ ve(hs, [["__scopeId", "data-v-
|
|
3826
|
+
}), Gs = /* @__PURE__ */ ve(hs, [["__scopeId", "data-v-a03004f1"]]);
|
|
3826
3827
|
function ks(t) {
|
|
3827
3828
|
const { code: c, message: n } = t ?? {};
|
|
3828
3829
|
return !!Fe(t) || typeof c == "string" && ["APP_DENIED", "PERMISSION_DENIED", "cross_origin", "origin_required"].includes(c) || c === "bad_response" && /HTTP 40[13]\b/.test(String(n));
|
|
@@ -3841,9 +3842,9 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3841
3842
|
},
|
|
3842
3843
|
emits: ["ready"],
|
|
3843
3844
|
setup(t, { emit: c }) {
|
|
3844
|
-
const n = t, a = c,
|
|
3845
|
-
let
|
|
3846
|
-
const
|
|
3845
|
+
const n = t, a = c, r = b(), i = b(), u = b(!1), v = b(!1), p = b(!1), d = Et();
|
|
3846
|
+
let f = [], x = !1, P = 0, $ = !1, k, E = 0, C;
|
|
3847
|
+
const A = w(() => Ua(n.ctx.locale, n.name ?? n.ctx.displayName ?? "")), z = w(() => r.value || i.value), ae = w(() => z.value?.state === "authorization_required"), F = w(() => ["helper_untrusted", "cli_untrusted"].includes(z.value?.reason || "")), G = w(() => ae.value && !F.value), X = w(() => z.value?.state === "unavailable" ? Se(z.value) : void 0), B = w(() => X.value ?? { credential_not_ready: "credential", access_denied: "denied", check_failed: "config" }[z.value?.reason ?? ""] ?? "unavailable"), K = w(() => na({ code: z.value?.reason }, n.ctx.locale, n.name ?? n.ctx.displayName)), D = w(() => K.value?.title ?? (z.value ? ae.value ? A.value("title") : z.value.state === "ready" ? A.value("ready") : z.value.state === "not_admin" ? A.value("not_admin.title") : z.value.state === "session_expired" ? A.value("session_expired.title") : A.value(B.value + ".title") : A.value("checking"))), T = w(() => K.value?.message ?? (ae.value ? A.value("purpose") : z.value?.state === "not_admin" ? A.value("not_admin.body") : z.value?.state === "session_expired" ? A.value("session_expired.body") : z.value?.state === "unavailable" ? A.value(B.value + ".body") : A.value("purpose"))), M = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], se = w(() => M.includes(z.value?.reason || "") ? z.value.reason : "unknown"), N = w(() => F.value ? "next.reinstall" : se.value === "grant_missing" ? "next.install" : se.value === "upgrade_reapproval" || se.value === "grant_incompatible" ? "next.update" : "next.repair");
|
|
3847
3848
|
function le(ee) {
|
|
3848
3849
|
if (!ee || ee.command !== "authorization" || ee.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(ee.state) || ee.reason === "upgrade_reapproval" && ee.state !== "authorization_required") throw Error("invalid status");
|
|
3849
3850
|
return ee;
|
|
@@ -3855,9 +3856,9 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3855
3856
|
}
|
|
3856
3857
|
let ie;
|
|
3857
3858
|
function ce() {
|
|
3858
|
-
clearTimeout(
|
|
3859
|
-
|
|
3860
|
-
}, fa(
|
|
3859
|
+
clearTimeout(k), X.value !== ie && (ie = X.value, E = 0), X.value && (k = setTimeout(() => {
|
|
3860
|
+
u.value ? $ = !0 : W("status");
|
|
3861
|
+
}, fa(E++, X.value)));
|
|
3861
3862
|
}
|
|
3862
3863
|
const J = [1e3, 3e3];
|
|
3863
3864
|
async function H(ee) {
|
|
@@ -3873,35 +3874,35 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3873
3874
|
}
|
|
3874
3875
|
}
|
|
3875
3876
|
async function W(ee) {
|
|
3876
|
-
if (
|
|
3877
|
-
const ue = ++
|
|
3878
|
-
i.value = ee === "request" &&
|
|
3877
|
+
if (u.value || x) return;
|
|
3878
|
+
const ue = ++P;
|
|
3879
|
+
i.value = ee === "request" && r.value?.state === "authorization_required" ? r.value : void 0, u.value = !0, v.value = !1, r.value = void 0;
|
|
3879
3880
|
try {
|
|
3880
3881
|
const oe = await H(ee);
|
|
3881
|
-
if (x || ue !==
|
|
3882
|
-
|
|
3882
|
+
if (x || ue !== P) return;
|
|
3883
|
+
r.value = oe, p.value = oe.state !== "ready", oe.state === "ready" && ye(!0), oe.state === "ready" && a("ready");
|
|
3883
3884
|
} catch (oe) {
|
|
3884
|
-
!x && ue ===
|
|
3885
|
+
!x && ue === P && (r.value = oe.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : i.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: Z(oe) }, v.value = !K.value && B.value === "unavailable", p.value = !0);
|
|
3885
3886
|
} finally {
|
|
3886
|
-
!x && ue ===
|
|
3887
|
+
!x && ue === P && (u.value = !1, i.value = void 0, $ ? ($ = !1, W("status")) : ce());
|
|
3887
3888
|
}
|
|
3888
3889
|
}
|
|
3889
3890
|
function ye(ee) {
|
|
3890
|
-
const ue =
|
|
3891
|
-
|
|
3891
|
+
const ue = f;
|
|
3892
|
+
f = [], ue.forEach((oe) => oe(ee));
|
|
3892
3893
|
}
|
|
3893
3894
|
function Ce(ee) {
|
|
3894
3895
|
p.value = ee, ee || ye(!1);
|
|
3895
3896
|
}
|
|
3896
3897
|
function $e() {
|
|
3897
|
-
return
|
|
3898
|
+
return r.value?.state === "ready" ? Promise.resolve(!0) : (u.value || (p.value = !0), new Promise((ee) => f.push(ee)));
|
|
3898
3899
|
}
|
|
3899
|
-
return Oe(Wa, { state: w(() =>
|
|
3900
|
+
return Oe(Wa, { state: w(() => r.value?.state ?? "checking"), requireAuthorization: $e, text: A, busy: u, canManage: () => !!n.ctx.authorization?.canManage?.(), revoke: () => W("revoke") }), we(() => {
|
|
3900
3901
|
C = n.ctx.reopen(() => {
|
|
3901
|
-
|
|
3902
|
+
u.value ? $ = !0 : W("status");
|
|
3902
3903
|
}), W("status");
|
|
3903
3904
|
}), Na(() => {
|
|
3904
|
-
x = !0,
|
|
3905
|
+
x = !0, P++, clearTimeout(k), ye(!1), typeof C == "function" && C();
|
|
3905
3906
|
}), (ee, ue) => (l(), _(j, null, [
|
|
3906
3907
|
S("div", ws, [
|
|
3907
3908
|
he(ee.$slots, "default", {}, void 0, !0)
|
|
@@ -3915,23 +3916,23 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3915
3916
|
G.value ? (l(), g(e(I), {
|
|
3916
3917
|
key: 0,
|
|
3917
3918
|
variant: "primary",
|
|
3918
|
-
loading:
|
|
3919
|
-
disabled:
|
|
3919
|
+
loading: u.value,
|
|
3920
|
+
disabled: u.value,
|
|
3920
3921
|
onClick: ue[0] || (ue[0] = (oe) => W("request"))
|
|
3921
3922
|
}, {
|
|
3922
3923
|
default: s(() => [
|
|
3923
|
-
h(o(
|
|
3924
|
+
h(o(u.value ? A.value("authorizing") : A.value("authorize")), 1)
|
|
3924
3925
|
]),
|
|
3925
3926
|
_: 1
|
|
3926
3927
|
}, 8, ["loading", "disabled"])) : (l(), g(e(I), {
|
|
3927
3928
|
key: 1,
|
|
3928
3929
|
variant: "primary",
|
|
3929
|
-
loading:
|
|
3930
|
-
disabled:
|
|
3930
|
+
loading: u.value,
|
|
3931
|
+
disabled: u.value,
|
|
3931
3932
|
onClick: ue[1] || (ue[1] = (oe) => W("status"))
|
|
3932
3933
|
}, {
|
|
3933
3934
|
default: s(() => [
|
|
3934
|
-
h(o(
|
|
3935
|
+
h(o(u.value ? A.value("checking") : A.value("retry")), 1)
|
|
3935
3936
|
]),
|
|
3936
3937
|
_: 1
|
|
3937
3938
|
}, 8, ["loading", "disabled"]))
|
|
@@ -3939,28 +3940,28 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3939
3940
|
default: s(() => [
|
|
3940
3941
|
S("div", {
|
|
3941
3942
|
class: "authorization-view",
|
|
3942
|
-
"aria-busy":
|
|
3943
|
-
"data-authorization-state":
|
|
3943
|
+
"aria-busy": u.value,
|
|
3944
|
+
"data-authorization-state": r.value?.state || "checking"
|
|
3944
3945
|
}, [
|
|
3945
|
-
S("p", Cs, o(
|
|
3946
|
+
S("p", Cs, o(T.value), 1),
|
|
3946
3947
|
ae.value ? (l(), g(e(Q), {
|
|
3947
3948
|
key: 0,
|
|
3948
3949
|
class: "authorization-status",
|
|
3949
3950
|
tone: ["grant_missing", "upgrade_reapproval"].includes(se.value) ? "info" : "warning",
|
|
3950
|
-
title:
|
|
3951
|
+
title: A.value("reason." + se.value)
|
|
3951
3952
|
}, {
|
|
3952
3953
|
default: s(() => [
|
|
3953
|
-
h(o(
|
|
3954
|
+
h(o(A.value(N.value)), 1)
|
|
3954
3955
|
]),
|
|
3955
3956
|
_: 1
|
|
3956
3957
|
}, 8, ["tone", "title"])) : y("", !0),
|
|
3957
|
-
|
|
3958
|
+
v.value ? (l(), g(e(Q), {
|
|
3958
3959
|
key: 1,
|
|
3959
3960
|
class: "authorization-failed",
|
|
3960
3961
|
tone: "warning"
|
|
3961
3962
|
}, {
|
|
3962
3963
|
default: s(() => [
|
|
3963
|
-
h(o(
|
|
3964
|
+
h(o(A.value("failed")), 1)
|
|
3964
3965
|
]),
|
|
3965
3966
|
_: 1
|
|
3966
3967
|
})) : y("", !0)
|
|
@@ -3976,8 +3977,8 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
3976
3977
|
}, Es = { class: "authorization-revoke-body" }, Ts = /* @__PURE__ */ de({
|
|
3977
3978
|
__name: "AuthorizationSettings",
|
|
3978
3979
|
setup(t) {
|
|
3979
|
-
const { state: c, requireAuthorization: n, text: a, busy:
|
|
3980
|
-
return (d,
|
|
3980
|
+
const { state: c, requireAuthorization: n, text: a, busy: r, canManage: i, revoke: u } = _s(), v = b(!1), p = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
|
|
3981
|
+
return (d, f) => (l(), _(j, null, [
|
|
3981
3982
|
m(e(_e), {
|
|
3982
3983
|
title: e(a)("settings.title"),
|
|
3983
3984
|
collapsible: !1
|
|
@@ -4001,8 +4002,8 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4001
4002
|
e(c) === "ready" && e(i)() ? (l(), g(e(I), {
|
|
4002
4003
|
key: 0,
|
|
4003
4004
|
variant: "secondary",
|
|
4004
|
-
disabled: e(
|
|
4005
|
-
onClick:
|
|
4005
|
+
disabled: e(r),
|
|
4006
|
+
onClick: f[0] || (f[0] = (x) => v.value = !0)
|
|
4006
4007
|
}, {
|
|
4007
4008
|
default: s(() => [
|
|
4008
4009
|
h(o(e(a)("revoke")), 1)
|
|
@@ -4011,7 +4012,7 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4011
4012
|
}, 8, ["disabled"])) : e(c) !== "ready" && e(c) !== "checking" ? (l(), g(e(I), {
|
|
4012
4013
|
key: 1,
|
|
4013
4014
|
variant: "secondary",
|
|
4014
|
-
onClick:
|
|
4015
|
+
onClick: f[1] || (f[1] = (x) => e(n)())
|
|
4015
4016
|
}, {
|
|
4016
4017
|
default: s(() => [
|
|
4017
4018
|
h(o(e(a)("settings.details")), 1)
|
|
@@ -4026,14 +4027,14 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4026
4027
|
_: 1
|
|
4027
4028
|
}, 8, ["title"]),
|
|
4028
4029
|
m(e(Be), {
|
|
4029
|
-
open:
|
|
4030
|
-
"onUpdate:open":
|
|
4030
|
+
open: v.value,
|
|
4031
|
+
"onUpdate:open": f[4] || (f[4] = (x) => v.value = x),
|
|
4031
4032
|
title: e(a)("revoke.title")
|
|
4032
4033
|
}, {
|
|
4033
4034
|
footer: s(() => [
|
|
4034
4035
|
m(e(I), {
|
|
4035
4036
|
variant: "secondary",
|
|
4036
|
-
onClick:
|
|
4037
|
+
onClick: f[2] || (f[2] = (x) => v.value = !1)
|
|
4037
4038
|
}, {
|
|
4038
4039
|
default: s(() => [
|
|
4039
4040
|
h(o(e(a)("cancel")), 1)
|
|
@@ -4042,9 +4043,9 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4042
4043
|
}),
|
|
4043
4044
|
m(e(I), {
|
|
4044
4045
|
variant: "danger",
|
|
4045
|
-
disabled: e(
|
|
4046
|
-
onClick:
|
|
4047
|
-
|
|
4046
|
+
disabled: e(r),
|
|
4047
|
+
onClick: f[3] || (f[3] = (x) => {
|
|
4048
|
+
v.value = !1, e(u)();
|
|
4048
4049
|
})
|
|
4049
4050
|
}, {
|
|
4050
4051
|
default: s(() => [
|
|
@@ -4069,51 +4070,51 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4069
4070
|
messages: {}
|
|
4070
4071
|
},
|
|
4071
4072
|
setup(t) {
|
|
4072
|
-
const c = t, n = b(), a = b(!1),
|
|
4073
|
+
const c = t, n = b(), a = b(!1), r = b(!1), i = w(() => {
|
|
4073
4074
|
if (c.messages) return c.messages;
|
|
4074
|
-
const
|
|
4075
|
+
const $ = Ra(c.locale ?? "en"), k = Ua(c.locale ?? "en", c.ctx.displayName ?? "");
|
|
4075
4076
|
return {
|
|
4076
|
-
title:
|
|
4077
|
-
session:
|
|
4078
|
-
unavailable:
|
|
4079
|
-
retry:
|
|
4080
|
-
dismiss:
|
|
4077
|
+
title: $.failedTitle,
|
|
4078
|
+
session: $.errors.session_required,
|
|
4079
|
+
unavailable: $.errors.auth_unavailable,
|
|
4080
|
+
retry: k("retry"),
|
|
4081
|
+
dismiss: k("cancel")
|
|
4081
4082
|
};
|
|
4082
|
-
}),
|
|
4083
|
-
n.value =
|
|
4083
|
+
}), u = w(() => na(n.value, c.locale ?? "en", c.ctx.displayName)), v = w(() => u.value?.message ?? (n.value?.code === "session_required" ? i.value.session : i.value.unavailable)), p = nt({ call: (...$) => c.ctx.call(...$) }, c.mode, ($) => {
|
|
4084
|
+
n.value = $, a.value = $ !== void 0;
|
|
4084
4085
|
});
|
|
4085
|
-
let d,
|
|
4086
|
+
let d, f = !1;
|
|
4086
4087
|
async function x() {
|
|
4087
|
-
|
|
4088
|
+
r.value = !0;
|
|
4088
4089
|
try {
|
|
4089
4090
|
await p.check();
|
|
4090
4091
|
} finally {
|
|
4091
|
-
|
|
4092
|
+
f || (r.value = !1);
|
|
4092
4093
|
}
|
|
4093
4094
|
}
|
|
4094
|
-
function
|
|
4095
|
+
function P() {
|
|
4095
4096
|
document.visibilityState !== "hidden" && p.check();
|
|
4096
4097
|
}
|
|
4097
4098
|
return we(() => {
|
|
4098
4099
|
d = c.ctx.reopen?.(() => {
|
|
4099
4100
|
p.check();
|
|
4100
|
-
}), document.addEventListener("visibilitychange",
|
|
4101
|
+
}), document.addEventListener("visibilitychange", P), p.check();
|
|
4101
4102
|
}), ge(() => {
|
|
4102
|
-
|
|
4103
|
-
}), (k
|
|
4104
|
-
he(
|
|
4103
|
+
f = !0, p.dispose(), d?.(), document.removeEventListener("visibilitychange", P);
|
|
4104
|
+
}), ($, k) => (l(), _(j, null, [
|
|
4105
|
+
he($.$slots, "default"),
|
|
4105
4106
|
n.value && a.value ? (l(), g(e(Be), {
|
|
4106
4107
|
key: 0,
|
|
4107
4108
|
open: a.value,
|
|
4108
|
-
"onUpdate:open":
|
|
4109
|
-
title:
|
|
4110
|
-
description:
|
|
4109
|
+
"onUpdate:open": k[1] || (k[1] = (E) => a.value = E),
|
|
4110
|
+
title: u.value?.title ?? i.value.title,
|
|
4111
|
+
description: v.value,
|
|
4111
4112
|
"close-label": i.value.dismiss
|
|
4112
4113
|
}, {
|
|
4113
4114
|
footer: s(() => [
|
|
4114
4115
|
m(e(I), {
|
|
4115
4116
|
variant: "secondary",
|
|
4116
|
-
onClick:
|
|
4117
|
+
onClick: k[0] || (k[0] = (E) => a.value = !1)
|
|
4117
4118
|
}, {
|
|
4118
4119
|
default: s(() => [
|
|
4119
4120
|
h(o(i.value.dismiss), 1)
|
|
@@ -4122,7 +4123,7 @@ const ws = { class: "authorization-content" }, xs = ["aria-busy", "data-authoriz
|
|
|
4122
4123
|
}),
|
|
4123
4124
|
m(e(I), {
|
|
4124
4125
|
variant: "primary",
|
|
4125
|
-
disabled:
|
|
4126
|
+
disabled: r.value,
|
|
4126
4127
|
onClick: x
|
|
4127
4128
|
}, {
|
|
4128
4129
|
default: s(() => [
|