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