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