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