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