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