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