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