vuefinder 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -22
- package/dist/style.css +1 -1
- package/dist/vuefinder.cjs +2 -2
- package/dist/vuefinder.js +1192 -1142
- package/package.json +1 -1
package/dist/vuefinder.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var Ce = Object.defineProperty;
|
|
2
2
|
var Se = (p, e, s) => e in p ? Ce(p, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : p[e] = s;
|
|
3
3
|
var fe = (p, e, s) => (Se(p, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
-
import { reactive as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { reactive as ie, watch as de, ref as b, computed as ee, inject as F, openBlock as n, createElementBlock as m, unref as a, createCommentVNode as S, normalizeClass as B, createElementVNode as t, createTextVNode as V, toDisplayString as v, customRef as Me, withModifiers as Y, Fragment as U, renderList as I, withDirectives as q, withKeys as Q, isRef as _e, vModelText as Z, nextTick as ce, createVNode as H, TransitionGroup as Ee, withCtx as j, onMounted as P, onUpdated as De, onBeforeUnmount as ke, vShow as re, normalizeStyle as be, vModelSelect as pe, provide as je, Transition as Ae, createBlock as T, resolveDynamicComponent as Le, renderSlot as le, onUnmounted as Te, vModelCheckbox as Fe } from "vue";
|
|
5
|
+
import Ve from "mitt";
|
|
6
|
+
import Oe from "dragselect";
|
|
7
|
+
import Ne from "vanilla-lazyload";
|
|
8
8
|
import "cropperjs/dist/cropper.css";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import ze from "cropperjs";
|
|
10
|
+
import Be from "@uppy/core";
|
|
11
|
+
import Ue from "@uppy/xhr-upload";
|
|
12
12
|
import "microtip/microtip.css";
|
|
13
13
|
var ge;
|
|
14
|
-
const
|
|
15
|
-
class
|
|
14
|
+
const me = (ge = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : ge.getAttribute("content");
|
|
15
|
+
class He {
|
|
16
16
|
/** @param {RequestConfig} config */
|
|
17
17
|
constructor(e) {
|
|
18
18
|
/** @type {RequestConfig} */
|
|
@@ -35,30 +35,30 @@ class Be {
|
|
|
35
35
|
*/
|
|
36
36
|
transformRequestParams(e) {
|
|
37
37
|
const s = this.config, r = {};
|
|
38
|
-
|
|
39
|
-
const
|
|
38
|
+
me != null && me !== "" && (r[s.xsrfHeaderName] = me);
|
|
39
|
+
const o = Object.assign({}, s.headers, r, e.headers), i = Object.assign({}, s.params, e.params), u = e.body, d = s.baseUrl + e.url, l = e.method;
|
|
40
40
|
let c;
|
|
41
|
-
l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([
|
|
42
|
-
c.append(
|
|
41
|
+
l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([_, $]) => {
|
|
42
|
+
c.append(_, $);
|
|
43
43
|
})) : (c = { ...u }, s.body != null && Object.assign(c, this.config.body)));
|
|
44
|
-
const
|
|
45
|
-
url:
|
|
44
|
+
const g = {
|
|
45
|
+
url: d,
|
|
46
46
|
method: l,
|
|
47
|
-
headers:
|
|
48
|
-
params:
|
|
47
|
+
headers: o,
|
|
48
|
+
params: i,
|
|
49
49
|
body: c
|
|
50
50
|
};
|
|
51
51
|
if (s.transformRequest != null) {
|
|
52
|
-
const
|
|
53
|
-
url:
|
|
52
|
+
const _ = s.transformRequest({
|
|
53
|
+
url: d,
|
|
54
54
|
method: l,
|
|
55
|
-
headers:
|
|
56
|
-
params:
|
|
55
|
+
headers: o,
|
|
56
|
+
params: i,
|
|
57
57
|
body: c
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
_.url != null && (g.url = _.url), _.method != null && (g.method = _.method), _.params != null && (g.params = _.params ?? {}), _.headers != null && (g.headers = _.headers ?? {}), _.body != null && (g.body = _.body);
|
|
60
60
|
}
|
|
61
|
-
return
|
|
61
|
+
return g;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Get download url
|
|
@@ -110,16 +110,16 @@ class Be {
|
|
|
110
110
|
* @throws {Record<String,?String>|null} resp json error
|
|
111
111
|
*/
|
|
112
112
|
async send(e) {
|
|
113
|
-
const s = this.transformRequestParams(e), r = e.responseType || "json",
|
|
113
|
+
const s = this.transformRequestParams(e), r = e.responseType || "json", o = {
|
|
114
114
|
method: e.method,
|
|
115
115
|
headers: s.headers,
|
|
116
116
|
signal: e.abortSignal
|
|
117
|
-
},
|
|
117
|
+
}, i = s.url + "?" + new URLSearchParams(s.params);
|
|
118
118
|
if (s.method !== "get" && s.body != null) {
|
|
119
|
-
let
|
|
120
|
-
s.body instanceof FormData ?
|
|
119
|
+
let d;
|
|
120
|
+
s.body instanceof FormData ? d = e.body : (d = JSON.stringify(s.body), o.headers["Content-Type"] = "application/json"), o.body = d;
|
|
121
121
|
}
|
|
122
|
-
const u = await fetch(
|
|
122
|
+
const u = await fetch(i, o);
|
|
123
123
|
if (u.ok)
|
|
124
124
|
return await u[r]();
|
|
125
125
|
throw await u.json();
|
|
@@ -133,46 +133,46 @@ function Re(p) {
|
|
|
133
133
|
body: {},
|
|
134
134
|
xsrfHeaderName: "X-CSRF-Token"
|
|
135
135
|
};
|
|
136
|
-
return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new
|
|
136
|
+
return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new He(e);
|
|
137
137
|
}
|
|
138
138
|
function qe(p) {
|
|
139
139
|
let e = localStorage.getItem(p + "_storage");
|
|
140
|
-
const s =
|
|
141
|
-
|
|
140
|
+
const s = ie(JSON.parse(e ?? "{}"));
|
|
141
|
+
de(s, r);
|
|
142
142
|
function r() {
|
|
143
143
|
Object.keys(s).length ? localStorage.setItem(p + "_storage", JSON.stringify(s)) : localStorage.removeItem(p + "_storage");
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function o(l, c) {
|
|
146
146
|
s[l] = c;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function i(l) {
|
|
149
149
|
delete s[l];
|
|
150
150
|
}
|
|
151
151
|
function u() {
|
|
152
|
-
Object.keys(s).map((l) =>
|
|
152
|
+
Object.keys(s).map((l) => i(l));
|
|
153
153
|
}
|
|
154
|
-
return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore:
|
|
154
|
+
return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: o, removeStore: i, clearStore: u };
|
|
155
155
|
}
|
|
156
156
|
async function Ie(p, e) {
|
|
157
|
-
|
|
158
|
-
return typeof
|
|
157
|
+
const s = e[p];
|
|
158
|
+
return typeof s == "function" ? (await s()).default : s;
|
|
159
159
|
}
|
|
160
160
|
function Pe(p, e, s, r) {
|
|
161
|
-
const { getStore:
|
|
162
|
-
Ie(
|
|
163
|
-
u.value = y,
|
|
161
|
+
const { getStore: o, setStore: i } = p, u = b({}), d = b(o("locale", e)), l = (_, $ = e) => {
|
|
162
|
+
Ie(_, r).then((y) => {
|
|
163
|
+
u.value = y, i("locale", _), d.value = _, i("translations", y), Object.values(r).length > 1 && (s.emit("vf-toast-push", { label: "The language is set to " + _ }), s.emit("vf-language-saved"));
|
|
164
164
|
}).catch((y) => {
|
|
165
165
|
$ ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l($, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
|
-
|
|
169
|
-
const c = (
|
|
170
|
-
function
|
|
171
|
-
return u.value.hasOwnProperty(
|
|
168
|
+
!o("locale") && !r.length ? l(e) : u.value = o("translations");
|
|
169
|
+
const c = (_, ...$) => $.length ? c(_ = _.replace("%s", $.shift()), ...$) : _;
|
|
170
|
+
function g(_, ...$) {
|
|
171
|
+
return u.value && u.value.hasOwnProperty(_) ? c(u.value[_], ...$) : c(_, ...$);
|
|
172
172
|
}
|
|
173
|
-
return { t:
|
|
173
|
+
return { t: g, changeLocale: l, locale: d };
|
|
174
174
|
}
|
|
175
|
-
const
|
|
175
|
+
const N = {
|
|
176
176
|
EDIT: "edit",
|
|
177
177
|
NEW_FILE: "newfile",
|
|
178
178
|
NEW_FOLDER: "newfolder",
|
|
@@ -183,14 +183,15 @@ const z = {
|
|
|
183
183
|
RENAME: "rename",
|
|
184
184
|
UPLOAD: "upload",
|
|
185
185
|
DELETE: "delete",
|
|
186
|
+
FULL_SCREEN: "fullscreen",
|
|
186
187
|
DOWNLOAD: "download",
|
|
187
188
|
LANGUAGE: "language"
|
|
188
|
-
},
|
|
189
|
-
function ye(p, e, s, r,
|
|
190
|
-
return (e = Math, s = e.log, r = 1024,
|
|
189
|
+
}, We = Object.values(N), Ge = "2.2.0";
|
|
190
|
+
function ye(p, e, s, r, o) {
|
|
191
|
+
return (e = Math, s = e.log, r = 1024, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "iB" : "B");
|
|
191
192
|
}
|
|
192
|
-
function xe(p, e, s, r,
|
|
193
|
-
return (e = Math, s = e.log, r = 1e3,
|
|
193
|
+
function xe(p, e, s, r, o) {
|
|
194
|
+
return (e = Math, s = e.log, r = 1e3, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "B" : "B");
|
|
194
195
|
}
|
|
195
196
|
function Ye(p) {
|
|
196
197
|
const e = { k: 1, m: 2, g: 3, t: 4 }, r = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(p);
|
|
@@ -202,12 +203,12 @@ const J = {
|
|
|
202
203
|
DARK: "dark"
|
|
203
204
|
};
|
|
204
205
|
function Ke(p, e) {
|
|
205
|
-
const s =
|
|
206
|
+
const s = b(J.SYSTEM), r = b(J.LIGHT);
|
|
206
207
|
s.value = p.getStore("theme", e ?? J.SYSTEM);
|
|
207
|
-
const
|
|
208
|
+
const o = window.matchMedia("(prefers-color-scheme: dark)"), i = (u) => {
|
|
208
209
|
s.value === J.DARK || s.value === J.SYSTEM && u.matches ? r.value = J.DARK : r.value = J.LIGHT;
|
|
209
210
|
};
|
|
210
|
-
return
|
|
211
|
+
return i(o), o.addEventListener("change", i), {
|
|
211
212
|
/**
|
|
212
213
|
* @type {import('vue').Ref<Theme>}
|
|
213
214
|
*/
|
|
@@ -220,16 +221,15 @@ function Ke(p, e) {
|
|
|
220
221
|
* @param {Theme} value
|
|
221
222
|
*/
|
|
222
223
|
set(u) {
|
|
223
|
-
s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"),
|
|
224
|
+
s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"), i(o);
|
|
224
225
|
}
|
|
225
226
|
};
|
|
226
227
|
}
|
|
227
228
|
const Je = (p, e) => {
|
|
228
|
-
const s = qe(p.id), r =
|
|
229
|
-
|
|
230
|
-
return Object.values(e).length || (l = l.filter((c) => c !== z.LANGUAGE)), le({
|
|
229
|
+
const s = qe(p.id), r = Ve(), o = s.getStore("metricUnits", !1), i = Ke(s, p.theme), u = e.i18n, d = p.locale ?? e.locale, l = ee(() => Pe(s, d, r, u)), c = (_) => Array.isArray(_) ? _ : We, g = p.persist ? s.getStore("path", p.path) : p.path;
|
|
230
|
+
return ie({
|
|
231
231
|
// app version
|
|
232
|
-
version:
|
|
232
|
+
version: Ge,
|
|
233
233
|
// root element
|
|
234
234
|
root: null,
|
|
235
235
|
// app id
|
|
@@ -237,25 +237,27 @@ const Je = (p, e) => {
|
|
|
237
237
|
// Event Bus
|
|
238
238
|
emitter: r,
|
|
239
239
|
// active features
|
|
240
|
-
features:
|
|
240
|
+
features: c(p.features),
|
|
241
241
|
// http object
|
|
242
242
|
requester: Re(p.request),
|
|
243
243
|
// theme state
|
|
244
|
-
theme:
|
|
244
|
+
theme: i,
|
|
245
245
|
// view state
|
|
246
246
|
view: s.getStore("viewport", "grid"),
|
|
247
247
|
// fullscreen state
|
|
248
|
-
|
|
248
|
+
fullScreen: s.getStore("full-screen", p.fullScreen),
|
|
249
|
+
// selectButton state
|
|
250
|
+
selectButton: p.selectButton,
|
|
249
251
|
// unit state - for example: GB or GiB
|
|
250
|
-
metricUnits:
|
|
252
|
+
metricUnits: o,
|
|
251
253
|
// human readable file sizes
|
|
252
|
-
filesize:
|
|
254
|
+
filesize: o ? xe : ye,
|
|
253
255
|
// max file size
|
|
254
256
|
maxFileSize: p.maxFileSize,
|
|
255
257
|
// loading state
|
|
256
258
|
loading: !1,
|
|
257
259
|
// default locale
|
|
258
|
-
i18n:
|
|
260
|
+
i18n: l,
|
|
259
261
|
// modal state
|
|
260
262
|
modal: {
|
|
261
263
|
active: !1,
|
|
@@ -264,10 +266,16 @@ const Je = (p, e) => {
|
|
|
264
266
|
},
|
|
265
267
|
// main storage adapter
|
|
266
268
|
adapter: s.getStore("adapter"),
|
|
269
|
+
// main storage adapter
|
|
270
|
+
path: g,
|
|
271
|
+
// persist state
|
|
272
|
+
persist: p.persist,
|
|
267
273
|
// storage
|
|
268
274
|
storage: s,
|
|
269
275
|
// fetched items
|
|
270
|
-
data: { adapter: s.getStore("adapter"), storages: [], dirname:
|
|
276
|
+
data: { adapter: s.getStore("adapter"), storages: [], dirname: g, files: [] },
|
|
277
|
+
// selected items
|
|
278
|
+
selectedItems: []
|
|
271
279
|
});
|
|
272
280
|
}, Xe = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Qe = {
|
|
273
281
|
key: 0,
|
|
@@ -287,7 +295,7 @@ const Je = (p, e) => {
|
|
|
287
295
|
})
|
|
288
296
|
], -1), tt = [
|
|
289
297
|
et
|
|
290
|
-
], st = ["aria-label"],
|
|
298
|
+
], st = ["aria-label"], at = /* @__PURE__ */ t("svg", {
|
|
291
299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
292
300
|
class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
|
|
293
301
|
fill: "none",
|
|
@@ -300,8 +308,8 @@ const Je = (p, e) => {
|
|
|
300
308
|
"stroke-linejoin": "round",
|
|
301
309
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
|
302
310
|
})
|
|
303
|
-
], -1),
|
|
304
|
-
|
|
311
|
+
], -1), ot = [
|
|
312
|
+
at
|
|
305
313
|
], rt = ["aria-label"], nt = /* @__PURE__ */ t("path", {
|
|
306
314
|
"stroke-linecap": "round",
|
|
307
315
|
"stroke-linejoin": "round",
|
|
@@ -381,7 +389,7 @@ const Je = (p, e) => {
|
|
|
381
389
|
"stroke-linecap": "round",
|
|
382
390
|
"stroke-linejoin": "round",
|
|
383
391
|
d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
384
|
-
},
|
|
392
|
+
}, Lt = ["aria-label"], Tt = {
|
|
385
393
|
key: 0,
|
|
386
394
|
"stroke-linecap": "round",
|
|
387
395
|
"stroke-linejoin": "round",
|
|
@@ -391,193 +399,194 @@ const Je = (p, e) => {
|
|
|
391
399
|
"stroke-linecap": "round",
|
|
392
400
|
"stroke-linejoin": "round",
|
|
393
401
|
d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"
|
|
394
|
-
},
|
|
402
|
+
}, Vt = {
|
|
395
403
|
name: "VFToolbar"
|
|
396
|
-
},
|
|
404
|
+
}, Ot = /* @__PURE__ */ Object.assign(Vt, {
|
|
397
405
|
setup(p) {
|
|
398
|
-
const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n,
|
|
406
|
+
const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, o = b([]), i = b("");
|
|
399
407
|
e.emitter.on("vf-search-query", ({ newQuery: l }) => {
|
|
400
|
-
|
|
408
|
+
i.value = l;
|
|
401
409
|
});
|
|
402
410
|
const u = () => {
|
|
403
|
-
e.
|
|
411
|
+
e.fullScreen = !e.fullScreen, s("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle");
|
|
404
412
|
};
|
|
405
413
|
e.emitter.on("vf-nodes-selected", (l) => {
|
|
406
|
-
|
|
414
|
+
o.value = l;
|
|
407
415
|
});
|
|
408
|
-
const
|
|
416
|
+
const d = () => {
|
|
409
417
|
e.view = e.view === "list" ? "grid" : "list", s("viewport", e.view);
|
|
410
418
|
};
|
|
411
|
-
return (l, c) => (n(),
|
|
412
|
-
|
|
419
|
+
return (l, c) => (n(), m("div", Xe, [
|
|
420
|
+
i.value.length ? (n(), m("div", bt, [
|
|
413
421
|
t("div", yt, [
|
|
414
|
-
|
|
415
|
-
t("span", xt,
|
|
422
|
+
V(v(a(r)("Search results for")) + " ", 1),
|
|
423
|
+
t("span", xt, v(i.value), 1)
|
|
416
424
|
]),
|
|
417
|
-
|
|
418
|
-
])) : (n(),
|
|
419
|
-
|
|
425
|
+
a(e).loading ? (n(), m("svg", wt, St)) : S("", !0)
|
|
426
|
+
])) : (n(), m("div", Qe, [
|
|
427
|
+
a(e).features.includes(a(N).NEW_FOLDER) ? (n(), m("div", {
|
|
420
428
|
key: 0,
|
|
421
429
|
class: "mx-1.5",
|
|
422
|
-
"aria-label":
|
|
430
|
+
"aria-label": a(r)("New Folder"),
|
|
423
431
|
"data-microtip-position": "bottom-right",
|
|
424
432
|
role: "tooltip",
|
|
425
|
-
onClick: c[0] || (c[0] = (
|
|
426
|
-
}, tt, 8, Ze)) :
|
|
427
|
-
|
|
433
|
+
onClick: c[0] || (c[0] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-folder", items: o.value }))
|
|
434
|
+
}, tt, 8, Ze)) : S("", !0),
|
|
435
|
+
a(e).features.includes(a(N).NEW_FILE) ? (n(), m("div", {
|
|
428
436
|
key: 1,
|
|
429
437
|
class: "mx-1.5",
|
|
430
|
-
"aria-label":
|
|
438
|
+
"aria-label": a(r)("New File"),
|
|
431
439
|
"data-microtip-position": "bottom",
|
|
432
440
|
role: "tooltip",
|
|
433
|
-
onClick: c[1] || (c[1] = (
|
|
434
|
-
},
|
|
435
|
-
|
|
441
|
+
onClick: c[1] || (c[1] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-file", items: o.value }))
|
|
442
|
+
}, ot, 8, st)) : S("", !0),
|
|
443
|
+
a(e).features.includes(a(N).RENAME) ? (n(), m("div", {
|
|
436
444
|
key: 2,
|
|
437
445
|
class: "mx-1.5",
|
|
438
|
-
"aria-label":
|
|
446
|
+
"aria-label": a(r)("Rename"),
|
|
439
447
|
"data-microtip-position": "bottom",
|
|
440
448
|
role: "tooltip",
|
|
441
|
-
onClick: c[2] || (c[2] = (
|
|
449
|
+
onClick: c[2] || (c[2] = (g) => o.value.length != 1 || a(e).emitter.emit("vf-modal-show", { type: "rename", items: o.value }))
|
|
442
450
|
}, [
|
|
443
|
-
(n(),
|
|
451
|
+
(n(), m("svg", {
|
|
444
452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
445
|
-
class:
|
|
453
|
+
class: B([o.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
|
|
446
454
|
fill: "none",
|
|
447
455
|
viewBox: "0 0 24 24",
|
|
448
456
|
stroke: "none",
|
|
449
457
|
"stroke-width": "1.5"
|
|
450
458
|
}, lt, 2))
|
|
451
|
-
], 8, rt)) :
|
|
452
|
-
|
|
459
|
+
], 8, rt)) : S("", !0),
|
|
460
|
+
a(e).features.includes(a(N).DELETE) ? (n(), m("div", {
|
|
453
461
|
key: 3,
|
|
454
462
|
class: "mx-1.5",
|
|
455
|
-
"aria-label":
|
|
463
|
+
"aria-label": a(r)("Delete"),
|
|
456
464
|
"data-microtip-position": "bottom",
|
|
457
465
|
role: "tooltip",
|
|
458
|
-
onClick: c[3] || (c[3] = (
|
|
466
|
+
onClick: c[3] || (c[3] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "delete", items: o.value }))
|
|
459
467
|
}, [
|
|
460
|
-
(n(),
|
|
468
|
+
(n(), m("svg", {
|
|
461
469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
462
|
-
class:
|
|
470
|
+
class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
|
|
463
471
|
fill: "none",
|
|
464
472
|
viewBox: "0 0 24 24",
|
|
465
473
|
stroke: "none",
|
|
466
474
|
"stroke-width": "1.5"
|
|
467
475
|
}, ct, 2))
|
|
468
|
-
], 8, it)) :
|
|
469
|
-
|
|
476
|
+
], 8, it)) : S("", !0),
|
|
477
|
+
a(e).features.includes(a(N).UPLOAD) ? (n(), m("div", {
|
|
470
478
|
key: 4,
|
|
471
479
|
class: "mx-1.5",
|
|
472
|
-
"aria-label":
|
|
480
|
+
"aria-label": a(r)("Upload"),
|
|
473
481
|
"data-microtip-position": "bottom",
|
|
474
482
|
role: "tooltip",
|
|
475
|
-
onClick: c[4] || (c[4] = (
|
|
476
|
-
}, vt, 8, ut)) :
|
|
477
|
-
|
|
483
|
+
onClick: c[4] || (c[4] = (g) => a(e).emitter.emit("vf-modal-show", { type: "upload", items: o.value }))
|
|
484
|
+
}, vt, 8, ut)) : S("", !0),
|
|
485
|
+
a(e).features.includes(a(N).UNARCHIVE) && o.value.length == 1 && o.value[0].mime_type == "application/zip" ? (n(), m("div", {
|
|
478
486
|
key: 5,
|
|
479
487
|
class: "mx-1.5",
|
|
480
|
-
"aria-label":
|
|
488
|
+
"aria-label": a(r)("Unarchive"),
|
|
481
489
|
"data-microtip-position": "bottom",
|
|
482
490
|
role: "tooltip",
|
|
483
|
-
onClick: c[5] || (c[5] = (
|
|
491
|
+
onClick: c[5] || (c[5] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "unarchive", items: o.value }))
|
|
484
492
|
}, [
|
|
485
|
-
(n(),
|
|
493
|
+
(n(), m("svg", {
|
|
486
494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
487
|
-
class:
|
|
495
|
+
class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
|
|
488
496
|
fill: "none",
|
|
489
497
|
viewBox: "0 0 24 24",
|
|
490
498
|
stroke: "none",
|
|
491
499
|
"stroke-width": "1.5"
|
|
492
500
|
}, ft, 2))
|
|
493
|
-
], 8, pt)) :
|
|
494
|
-
|
|
501
|
+
], 8, pt)) : S("", !0),
|
|
502
|
+
a(e).features.includes(a(N).ARCHIVE) ? (n(), m("div", {
|
|
495
503
|
key: 6,
|
|
496
504
|
class: "mx-1.5",
|
|
497
|
-
"aria-label":
|
|
505
|
+
"aria-label": a(r)("Archive"),
|
|
498
506
|
"data-microtip-position": "bottom",
|
|
499
507
|
role: "tooltip",
|
|
500
|
-
onClick: c[6] || (c[6] = (
|
|
508
|
+
onClick: c[6] || (c[6] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "archive", items: o.value }))
|
|
501
509
|
}, [
|
|
502
|
-
(n(),
|
|
510
|
+
(n(), m("svg", {
|
|
503
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
504
|
-
class:
|
|
512
|
+
class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
|
|
505
513
|
fill: "none",
|
|
506
514
|
viewBox: "0 0 24 24",
|
|
507
515
|
stroke: "none",
|
|
508
516
|
"stroke-width": "1.5"
|
|
509
517
|
}, kt, 2))
|
|
510
|
-
], 8, gt)) :
|
|
518
|
+
], 8, gt)) : S("", !0)
|
|
511
519
|
])),
|
|
512
520
|
t("div", Mt, [
|
|
513
|
-
|
|
521
|
+
a(e).features.includes(a(N).FULL_SCREEN) ? (n(), m("div", {
|
|
522
|
+
key: 0,
|
|
514
523
|
class: "mx-1.5",
|
|
515
|
-
"aria-label":
|
|
524
|
+
"aria-label": a(r)("Toggle Full Screen"),
|
|
516
525
|
"data-microtip-position": "bottom-left",
|
|
517
526
|
role: "tooltip",
|
|
518
527
|
onClick: u
|
|
519
528
|
}, [
|
|
520
|
-
(n(),
|
|
521
|
-
|
|
529
|
+
(n(), m("svg", Dt, [
|
|
530
|
+
a(e).fullScreen ? (n(), m("path", jt)) : (n(), m("path", At))
|
|
522
531
|
]))
|
|
523
|
-
], 8, Et),
|
|
532
|
+
], 8, Et)) : S("", !0),
|
|
524
533
|
t("div", {
|
|
525
534
|
class: "mx-1.5",
|
|
526
|
-
"aria-label":
|
|
535
|
+
"aria-label": a(r)("Change View"),
|
|
527
536
|
"data-microtip-position": "bottom-left",
|
|
528
537
|
role: "tooltip",
|
|
529
|
-
onClick: c[7] || (c[7] = (
|
|
538
|
+
onClick: c[7] || (c[7] = (g) => i.value.length || d())
|
|
530
539
|
}, [
|
|
531
|
-
(n(),
|
|
540
|
+
(n(), m("svg", {
|
|
532
541
|
xmlns: "http://www.w3.org/2000/svg",
|
|
533
|
-
class:
|
|
542
|
+
class: B([i.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
|
|
534
543
|
fill: "none",
|
|
535
544
|
viewBox: "0 0 24 24",
|
|
536
545
|
stroke: "none",
|
|
537
546
|
"stroke-width": "1.5"
|
|
538
547
|
}, [
|
|
539
|
-
|
|
540
|
-
|
|
548
|
+
a(e).view === "grid" ? (n(), m("path", Tt)) : S("", !0),
|
|
549
|
+
a(e).view === "list" ? (n(), m("path", Ft)) : S("", !0)
|
|
541
550
|
], 2))
|
|
542
|
-
], 8,
|
|
551
|
+
], 8, Lt)
|
|
543
552
|
])
|
|
544
553
|
]));
|
|
545
554
|
}
|
|
546
|
-
}),
|
|
555
|
+
}), Nt = (p, e = 0, s = !1) => {
|
|
547
556
|
let r;
|
|
548
|
-
return (...
|
|
549
|
-
s && !r && p(...
|
|
550
|
-
p(...
|
|
557
|
+
return (...o) => {
|
|
558
|
+
s && !r && p(...o), clearTimeout(r), r = setTimeout(() => {
|
|
559
|
+
p(...o);
|
|
551
560
|
}, e);
|
|
552
561
|
};
|
|
553
|
-
},
|
|
554
|
-
const r =
|
|
555
|
-
return Me((
|
|
562
|
+
}, zt = (p, e, s) => {
|
|
563
|
+
const r = b(p);
|
|
564
|
+
return Me((o, i) => ({
|
|
556
565
|
get() {
|
|
557
|
-
return
|
|
566
|
+
return o(), r.value;
|
|
558
567
|
},
|
|
559
|
-
set:
|
|
568
|
+
set: Nt(
|
|
560
569
|
(u) => {
|
|
561
|
-
r.value = u,
|
|
570
|
+
r.value = u, i();
|
|
562
571
|
},
|
|
563
572
|
e,
|
|
564
573
|
s
|
|
565
574
|
)
|
|
566
575
|
}));
|
|
567
|
-
},
|
|
576
|
+
}, Bt = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm" }, Ut = ["aria-label"], Ht = /* @__PURE__ */ t("path", {
|
|
568
577
|
"fill-rule": "evenodd",
|
|
569
578
|
d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",
|
|
570
579
|
"clip-rule": "evenodd"
|
|
571
580
|
}, null, -1), Rt = [
|
|
572
|
-
|
|
581
|
+
Ht
|
|
573
582
|
], qt = ["aria-label"], It = /* @__PURE__ */ t("path", { d: "M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z" }, null, -1), Pt = [
|
|
574
583
|
It
|
|
575
|
-
],
|
|
584
|
+
], Wt = ["aria-label"], Gt = /* @__PURE__ */ t("path", {
|
|
576
585
|
"stroke-linecap": "round",
|
|
577
586
|
"stroke-linejoin": "round",
|
|
578
587
|
d: "M6 18L18 6M6 6l12 12"
|
|
579
588
|
}, null, -1), Yt = [
|
|
580
|
-
|
|
589
|
+
Gt
|
|
581
590
|
], Kt = /* @__PURE__ */ t("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), Jt = [
|
|
582
591
|
Kt
|
|
583
592
|
], Xt = { class: "flex leading-6" }, Qt = /* @__PURE__ */ t("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), Zt = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], es = {
|
|
@@ -597,10 +606,10 @@ const Je = (p, e) => {
|
|
|
597
606
|
class: "opacity-75",
|
|
598
607
|
fill: "currentColor",
|
|
599
608
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
600
|
-
}, null, -1),
|
|
609
|
+
}, null, -1), as = [
|
|
601
610
|
ts,
|
|
602
611
|
ss
|
|
603
|
-
],
|
|
612
|
+
], os = {
|
|
604
613
|
key: 3,
|
|
605
614
|
class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"
|
|
606
615
|
}, rs = /* @__PURE__ */ t("div", null, [
|
|
@@ -626,76 +635,76 @@ const Je = (p, e) => {
|
|
|
626
635
|
name: "VFBreadcrumb"
|
|
627
636
|
}, cs = /* @__PURE__ */ Object.assign(ds, {
|
|
628
637
|
setup(p) {
|
|
629
|
-
const e =
|
|
630
|
-
|
|
631
|
-
let
|
|
632
|
-
e.value =
|
|
633
|
-
|
|
638
|
+
const e = b(null), s = b([]), r = b(!1), o = b(null), i = F("ServiceContainer"), { t: u } = i.i18n;
|
|
639
|
+
i.emitter.on("vf-explorer-update", () => {
|
|
640
|
+
let C = [], k = [];
|
|
641
|
+
e.value = i.data.dirname ?? i.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(i.adapter + "://", "").split("/").forEach(function(f) {
|
|
642
|
+
C.push(f), C.join("/") != "" && k.push({
|
|
634
643
|
basename: f,
|
|
635
644
|
name: f,
|
|
636
|
-
path:
|
|
645
|
+
path: i.adapter + "://" + C.join("/"),
|
|
637
646
|
type: "dir"
|
|
638
647
|
});
|
|
639
|
-
}),
|
|
648
|
+
}), k.length > 4 && (k = k.slice(-5), k[0].name = ".."), s.value = k;
|
|
640
649
|
});
|
|
641
|
-
const
|
|
650
|
+
const d = () => {
|
|
642
651
|
r.value = !1, c.value = "";
|
|
643
652
|
};
|
|
644
|
-
|
|
645
|
-
|
|
653
|
+
i.emitter.on("vf-search-exit", () => {
|
|
654
|
+
d();
|
|
646
655
|
});
|
|
647
656
|
const l = () => {
|
|
648
|
-
|
|
649
|
-
}, c =
|
|
650
|
-
|
|
651
|
-
|
|
657
|
+
i.features.includes(N.SEARCH) && (r.value = !0, ce(() => o.value.focus()));
|
|
658
|
+
}, c = zt("", 400);
|
|
659
|
+
de(c, (C) => {
|
|
660
|
+
i.emitter.emit("vf-toast-clear"), i.emitter.emit("vf-search-query", { newQuery: C });
|
|
652
661
|
});
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
let f = JSON.parse(
|
|
656
|
-
if (f.find((
|
|
662
|
+
const g = () => s.value.length && !r.value, _ = (C, k = null) => {
|
|
663
|
+
C.preventDefault(), y(C), k ?? (k = s.value.length - 2);
|
|
664
|
+
let f = JSON.parse(C.dataTransfer.getData("items"));
|
|
665
|
+
if (f.find((O) => O.storage !== i.adapter)) {
|
|
657
666
|
alert("Moving items between different storages is not supported yet.");
|
|
658
667
|
return;
|
|
659
668
|
}
|
|
660
|
-
|
|
669
|
+
i.emitter.emit("vf-modal-show", {
|
|
661
670
|
type: "move",
|
|
662
|
-
items: { from: f, to: s.value[
|
|
671
|
+
items: { from: f, to: s.value[k] ?? { path: i.adapter + "://" } }
|
|
663
672
|
});
|
|
664
|
-
}, $ = (
|
|
665
|
-
|
|
666
|
-
}, y = (
|
|
667
|
-
|
|
668
|
-
},
|
|
669
|
-
c.value == "" &&
|
|
673
|
+
}, $ = (C) => {
|
|
674
|
+
C.preventDefault(), g() ? (C.dataTransfer.dropEffect = "copy", C.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : (C.dataTransfer.dropEffect = "none", C.dataTransfer.effectAllowed = "none");
|
|
675
|
+
}, y = (C) => {
|
|
676
|
+
C.preventDefault(), C.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), g() && C.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
|
|
677
|
+
}, M = () => {
|
|
678
|
+
c.value == "" && d();
|
|
670
679
|
};
|
|
671
|
-
return (
|
|
680
|
+
return (C, k) => (n(), m("div", Bt, [
|
|
672
681
|
t("span", {
|
|
673
|
-
"aria-label":
|
|
682
|
+
"aria-label": a(u)("Go up a directory"),
|
|
674
683
|
"data-microtip-position": "bottom-right",
|
|
675
684
|
role: "tooltip"
|
|
676
685
|
}, [
|
|
677
|
-
(n(),
|
|
678
|
-
onDragover:
|
|
679
|
-
onDragleave:
|
|
680
|
-
onDrop:
|
|
681
|
-
onClick:
|
|
682
|
-
var
|
|
683
|
-
return !
|
|
686
|
+
(n(), m("svg", {
|
|
687
|
+
onDragover: k[0] || (k[0] = (f) => $(f)),
|
|
688
|
+
onDragleave: k[1] || (k[1] = (f) => y(f)),
|
|
689
|
+
onDrop: k[2] || (k[2] = (f) => _(f)),
|
|
690
|
+
onClick: k[3] || (k[3] = (f) => {
|
|
691
|
+
var O;
|
|
692
|
+
return !g() || a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: ((O = s.value[s.value.length - 2]) == null ? void 0 : O.path) ?? a(i).adapter + "://" } });
|
|
684
693
|
}),
|
|
685
|
-
class:
|
|
694
|
+
class: B(["h-6 w-6 p-0.5 rounded", g() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
|
|
686
695
|
xmlns: "http://www.w3.org/2000/svg",
|
|
687
696
|
viewBox: "0 0 20 20",
|
|
688
697
|
fill: "currentColor"
|
|
689
698
|
}, Rt, 34))
|
|
690
|
-
], 8,
|
|
691
|
-
|
|
699
|
+
], 8, Ut),
|
|
700
|
+
a(i).loading ? (n(), m("span", {
|
|
692
701
|
key: 1,
|
|
693
|
-
"aria-label":
|
|
702
|
+
"aria-label": a(u)("Cancel"),
|
|
694
703
|
"data-microtip-position": "bottom-right",
|
|
695
704
|
role: "tooltip"
|
|
696
705
|
}, [
|
|
697
|
-
(n(),
|
|
698
|
-
onClick:
|
|
706
|
+
(n(), m("svg", {
|
|
707
|
+
onClick: k[5] || (k[5] = (f) => a(i).emitter.emit("vf-fetch-abort")),
|
|
699
708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
700
709
|
fill: "none",
|
|
701
710
|
viewBox: "0 0 24 24",
|
|
@@ -703,15 +712,15 @@ const Je = (p, e) => {
|
|
|
703
712
|
stroke: "currentColor",
|
|
704
713
|
class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer"
|
|
705
714
|
}, Yt))
|
|
706
|
-
], 8,
|
|
715
|
+
], 8, Wt)) : (n(), m("span", {
|
|
707
716
|
key: 0,
|
|
708
|
-
"aria-label":
|
|
717
|
+
"aria-label": a(u)("Refresh"),
|
|
709
718
|
"data-microtip-position": "bottom-right",
|
|
710
719
|
role: "tooltip"
|
|
711
720
|
}, [
|
|
712
|
-
(n(),
|
|
713
|
-
onClick:
|
|
714
|
-
|
|
721
|
+
(n(), m("svg", {
|
|
722
|
+
onClick: k[4] || (k[4] = (f) => {
|
|
723
|
+
a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: a(i).data.dirname } });
|
|
715
724
|
}),
|
|
716
725
|
class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",
|
|
717
726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -719,58 +728,58 @@ const Je = (p, e) => {
|
|
|
719
728
|
fill: "currentColor"
|
|
720
729
|
}, Pt))
|
|
721
730
|
], 8, qt)),
|
|
722
|
-
r.value ? (n(),
|
|
731
|
+
r.value ? (n(), m("div", os, [
|
|
723
732
|
rs,
|
|
724
733
|
q(t("input", {
|
|
725
734
|
ref_key: "searchInput",
|
|
726
|
-
ref:
|
|
727
|
-
onKeydown: Q(
|
|
728
|
-
onBlur:
|
|
729
|
-
"onUpdate:modelValue":
|
|
730
|
-
placeholder:
|
|
735
|
+
ref: o,
|
|
736
|
+
onKeydown: Q(d, ["esc"]),
|
|
737
|
+
onBlur: M,
|
|
738
|
+
"onUpdate:modelValue": k[10] || (k[10] = (f) => _e(c) ? c.value = f : null),
|
|
739
|
+
placeholder: a(u)("Search anything.."),
|
|
731
740
|
class: "w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",
|
|
732
741
|
type: "text"
|
|
733
742
|
}, null, 40, ns), [
|
|
734
|
-
[Z,
|
|
743
|
+
[Z, a(c)]
|
|
735
744
|
]),
|
|
736
|
-
(n(),
|
|
745
|
+
(n(), m("svg", {
|
|
737
746
|
class: "w-6 h-6 cursor-pointer",
|
|
738
|
-
onClick:
|
|
747
|
+
onClick: d,
|
|
739
748
|
xmlns: "http://www.w3.org/2000/svg",
|
|
740
749
|
fill: "none",
|
|
741
750
|
viewBox: "0 0 24 24",
|
|
742
751
|
"stroke-width": "1.5",
|
|
743
752
|
stroke: "currentColor"
|
|
744
753
|
}, is))
|
|
745
|
-
])) : (n(),
|
|
754
|
+
])) : (n(), m("div", {
|
|
746
755
|
key: 2,
|
|
747
756
|
class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
|
|
748
757
|
onClick: Y(l, ["self"])
|
|
749
758
|
}, [
|
|
750
|
-
(n(),
|
|
751
|
-
onDragover:
|
|
752
|
-
onDragleave:
|
|
753
|
-
onDrop:
|
|
754
|
-
onClick:
|
|
759
|
+
(n(), m("svg", {
|
|
760
|
+
onDragover: k[6] || (k[6] = (f) => $(f)),
|
|
761
|
+
onDragleave: k[7] || (k[7] = (f) => y(f)),
|
|
762
|
+
onDrop: k[8] || (k[8] = (f) => _(f, -1)),
|
|
763
|
+
onClick: k[9] || (k[9] = (f) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter } })),
|
|
755
764
|
class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",
|
|
756
765
|
xmlns: "http://www.w3.org/2000/svg",
|
|
757
766
|
viewBox: "0 0 20 20",
|
|
758
767
|
fill: "currentColor"
|
|
759
768
|
}, Jt, 32)),
|
|
760
769
|
t("div", Xt, [
|
|
761
|
-
(n(!0),
|
|
770
|
+
(n(!0), m(U, null, I(s.value, (f, O) => (n(), m("div", { key: O }, [
|
|
762
771
|
Qt,
|
|
763
772
|
t("span", {
|
|
764
|
-
onDragover: (R) =>
|
|
765
|
-
onDragleave: (R) =>
|
|
766
|
-
onDrop: (R) =>
|
|
773
|
+
onDragover: (R) => O === s.value.length - 1 || $(R),
|
|
774
|
+
onDragleave: (R) => O === s.value.length - 1 || y(R),
|
|
775
|
+
onDrop: (R) => O === s.value.length - 1 || _(R, O),
|
|
767
776
|
class: "px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",
|
|
768
777
|
title: f.basename,
|
|
769
|
-
onClick: (R) =>
|
|
770
|
-
},
|
|
778
|
+
onClick: (R) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: f.path } })
|
|
779
|
+
}, v(f.name), 41, Zt)
|
|
771
780
|
]))), 128))
|
|
772
781
|
]),
|
|
773
|
-
|
|
782
|
+
a(i).loading ? (n(), m("svg", es, as)) : S("", !0)
|
|
774
783
|
]))
|
|
775
784
|
]));
|
|
776
785
|
}
|
|
@@ -800,45 +809,45 @@ const Je = (p, e) => {
|
|
|
800
809
|
hs
|
|
801
810
|
], gs = {
|
|
802
811
|
name: "VFSortIcon"
|
|
803
|
-
},
|
|
812
|
+
}, ne = /* @__PURE__ */ Object.assign(gs, {
|
|
804
813
|
props: { direction: String },
|
|
805
814
|
setup(p) {
|
|
806
|
-
return (e, s) => (n(),
|
|
807
|
-
p.direction === "down" ? (n(),
|
|
808
|
-
p.direction === "up" ? (n(),
|
|
815
|
+
return (e, s) => (n(), m("div", null, [
|
|
816
|
+
p.direction === "down" ? (n(), m("svg", us, vs)) : S("", !0),
|
|
817
|
+
p.direction === "up" ? (n(), m("svg", ps, fs)) : S("", !0)
|
|
809
818
|
]));
|
|
810
819
|
}
|
|
811
820
|
}), _s = ["onClick"], ks = {
|
|
812
821
|
name: "VFToast.vue"
|
|
813
822
|
}, bs = /* @__PURE__ */ Object.assign(ks, {
|
|
814
823
|
setup(p) {
|
|
815
|
-
const e = F("ServiceContainer"), { getStore: s } = e.storage, r =
|
|
816
|
-
|
|
817
|
-
},
|
|
818
|
-
let c =
|
|
824
|
+
const e = F("ServiceContainer"), { getStore: s } = e.storage, r = b(s("full-screen", !1)), o = b([]), i = (l) => l === "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", u = (l) => {
|
|
825
|
+
o.value.splice(l, 1);
|
|
826
|
+
}, d = (l) => {
|
|
827
|
+
let c = o.value.findIndex((g) => g.id === l);
|
|
819
828
|
c !== -1 && u(c);
|
|
820
829
|
};
|
|
821
830
|
return e.emitter.on("vf-toast-clear", () => {
|
|
822
|
-
|
|
831
|
+
o.value = [];
|
|
823
832
|
}), e.emitter.on("vf-toast-push", (l) => {
|
|
824
833
|
let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
|
|
825
|
-
l.id = c,
|
|
826
|
-
|
|
834
|
+
l.id = c, o.value.push(l), setTimeout(() => {
|
|
835
|
+
d(c);
|
|
827
836
|
}, 5e3);
|
|
828
|
-
}), (l, c) => (n(),
|
|
829
|
-
class:
|
|
837
|
+
}), (l, c) => (n(), m("div", {
|
|
838
|
+
class: B([r.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
|
|
830
839
|
}, [
|
|
831
|
-
|
|
840
|
+
H(Ee, {
|
|
832
841
|
name: "vf-toast-item",
|
|
833
842
|
"leave-active-class": "transition-all duration-1000",
|
|
834
843
|
"leave-to-class": "opacity-0"
|
|
835
844
|
}, {
|
|
836
845
|
default: j(() => [
|
|
837
|
-
(n(!0),
|
|
838
|
-
onClick: ($) => u(
|
|
839
|
-
key:
|
|
840
|
-
class:
|
|
841
|
-
},
|
|
846
|
+
(n(!0), m(U, null, I(o.value, (g, _) => (n(), m("div", {
|
|
847
|
+
onClick: ($) => u(_),
|
|
848
|
+
key: g,
|
|
849
|
+
class: B([i(g.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])
|
|
850
|
+
}, v(g.label), 11, _s))), 128))
|
|
842
851
|
]),
|
|
843
852
|
_: 1
|
|
844
853
|
})
|
|
@@ -846,7 +855,7 @@ const Je = (p, e) => {
|
|
|
846
855
|
}
|
|
847
856
|
});
|
|
848
857
|
function he(p, e = 14) {
|
|
849
|
-
let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{
|
|
858
|
+
let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e + 1},})([\\w\\W]{8,}))`;
|
|
850
859
|
return p.replace(new RegExp(s), "$2..$4");
|
|
851
860
|
}
|
|
852
861
|
const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
@@ -879,7 +888,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
879
888
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
880
889
|
}, null, -1), As = [
|
|
881
890
|
js
|
|
882
|
-
],
|
|
891
|
+
], Ls = {
|
|
883
892
|
key: 1,
|
|
884
893
|
xmlns: "http://www.w3.org/2000/svg",
|
|
885
894
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -887,13 +896,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
887
896
|
viewBox: "0 0 24 24",
|
|
888
897
|
stroke: "currentColor",
|
|
889
898
|
"stroke-width": "1"
|
|
890
|
-
},
|
|
899
|
+
}, Ts = /* @__PURE__ */ t("path", {
|
|
891
900
|
"stroke-linecap": "round",
|
|
892
901
|
"stroke-linejoin": "round",
|
|
893
902
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
894
903
|
}, null, -1), Fs = [
|
|
895
|
-
|
|
896
|
-
],
|
|
904
|
+
Ts
|
|
905
|
+
], Vs = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Os = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ns = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], zs = { class: "grid grid-cols-12 items-center" }, Bs = { class: "flex col-span-7 items-center" }, Us = {
|
|
897
906
|
key: 0,
|
|
898
907
|
xmlns: "http://www.w3.org/2000/svg",
|
|
899
908
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -901,12 +910,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
901
910
|
viewBox: "0 0 24 24",
|
|
902
911
|
stroke: "currentColor",
|
|
903
912
|
"stroke-width": "1"
|
|
904
|
-
},
|
|
913
|
+
}, Hs = /* @__PURE__ */ t("path", {
|
|
905
914
|
"stroke-linecap": "round",
|
|
906
915
|
"stroke-linejoin": "round",
|
|
907
916
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
908
917
|
}, null, -1), Rs = [
|
|
909
|
-
|
|
918
|
+
Hs
|
|
910
919
|
], qs = {
|
|
911
920
|
key: 1,
|
|
912
921
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -921,7 +930,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
921
930
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
922
931
|
}, null, -1), Ps = [
|
|
923
932
|
Is
|
|
924
|
-
],
|
|
933
|
+
], Ws = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Gs = { class: "col-span-2 text-center" }, Ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ks = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Js = { class: "relative" }, Xs = {
|
|
925
934
|
key: 0,
|
|
926
935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
927
936
|
class: "h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -935,7 +944,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
935
944
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
936
945
|
}, null, -1), Zs = [
|
|
937
946
|
Qs
|
|
938
|
-
],
|
|
947
|
+
], ea = ["data-src", "alt"], ta = {
|
|
939
948
|
key: 2,
|
|
940
949
|
xmlns: "http://www.w3.org/2000/svg",
|
|
941
950
|
class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
|
|
@@ -943,278 +952,278 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
943
952
|
viewBox: "0 0 24 24",
|
|
944
953
|
stroke: "currentColor",
|
|
945
954
|
"stroke-width": "1"
|
|
946
|
-
},
|
|
955
|
+
}, sa = /* @__PURE__ */ t("path", {
|
|
947
956
|
"stroke-linecap": "round",
|
|
948
957
|
"stroke-linejoin": "round",
|
|
949
958
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
950
|
-
}, null, -1),
|
|
951
|
-
|
|
952
|
-
],
|
|
959
|
+
}, null, -1), aa = [
|
|
960
|
+
sa
|
|
961
|
+
], oa = {
|
|
953
962
|
key: 3,
|
|
954
963
|
class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
|
|
955
|
-
},
|
|
964
|
+
}, ra = { class: "break-all" }, na = {
|
|
956
965
|
name: "VFExplorer"
|
|
957
|
-
},
|
|
966
|
+
}, la = /* @__PURE__ */ Object.assign(na, {
|
|
958
967
|
setup(p) {
|
|
959
968
|
const e = F("ServiceContainer"), { t: s } = e.i18n;
|
|
960
969
|
e.storage;
|
|
961
|
-
const r = (
|
|
962
|
-
let
|
|
970
|
+
const r = (w) => w == null ? void 0 : w.substring(0, 3), o = b(null), i = b(null), u = b(0), d = b(null), l = Math.floor(Math.random() * 2 ** 32), c = b("");
|
|
971
|
+
let g;
|
|
963
972
|
e.emitter.on("vf-fullscreen-toggle", () => {
|
|
964
|
-
|
|
965
|
-
}), e.emitter.on("vf-search-query", ({ newQuery:
|
|
966
|
-
c.value =
|
|
973
|
+
o.value.style.height = null;
|
|
974
|
+
}), e.emitter.on("vf-search-query", ({ newQuery: w }) => {
|
|
975
|
+
c.value = w, w ? e.emitter.emit("vf-fetch", {
|
|
967
976
|
params: {
|
|
968
977
|
q: "search",
|
|
969
978
|
adapter: e.data.adapter,
|
|
970
979
|
path: e.data.dirname,
|
|
971
|
-
filter:
|
|
980
|
+
filter: w
|
|
972
981
|
},
|
|
973
982
|
onSuccess: (D) => {
|
|
974
983
|
D.files.length || e.emitter.emit("vf-toast-push", { label: s("No search result found.") });
|
|
975
984
|
}
|
|
976
985
|
}) : e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
|
|
977
986
|
});
|
|
978
|
-
let
|
|
987
|
+
let _ = null;
|
|
979
988
|
const $ = () => {
|
|
980
|
-
|
|
981
|
-
}, y =
|
|
982
|
-
|
|
983
|
-
},
|
|
984
|
-
|
|
989
|
+
_ && clearTimeout(_);
|
|
990
|
+
}, y = b(!0), M = (w) => {
|
|
991
|
+
w.touches.length > 1 && (y.value ? (d.value.stop(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: off") })) : (d.value.start(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: on") }), e.emitter.emit("vf-explorer-update")), y.value = !y.value);
|
|
992
|
+
}, C = (w) => {
|
|
993
|
+
_ = setTimeout(() => {
|
|
985
994
|
const D = new MouseEvent("contextmenu", {
|
|
986
995
|
bubbles: !0,
|
|
987
996
|
cancelable: !1,
|
|
988
997
|
view: window,
|
|
989
998
|
button: 2,
|
|
990
999
|
buttons: 0,
|
|
991
|
-
clientX:
|
|
992
|
-
clientY:
|
|
1000
|
+
clientX: w.target.getBoundingClientRect().x,
|
|
1001
|
+
clientY: w.target.getBoundingClientRect().y
|
|
993
1002
|
});
|
|
994
|
-
|
|
1003
|
+
w.target.dispatchEvent(D);
|
|
995
1004
|
}, 500);
|
|
996
|
-
},
|
|
997
|
-
|
|
998
|
-
}, f =
|
|
1005
|
+
}, k = (w) => {
|
|
1006
|
+
w.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: w.path } })) : e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: w });
|
|
1007
|
+
}, f = ie({ active: !1, column: "", order: "" }), O = (w = !0) => {
|
|
999
1008
|
let D = [...e.data.files], h = f.column, A = f.order == "asc" ? 1 : -1;
|
|
1000
|
-
if (!
|
|
1009
|
+
if (!w)
|
|
1001
1010
|
return D;
|
|
1002
|
-
const
|
|
1003
|
-
return f.active && (D = D.slice().sort((
|
|
1004
|
-
}, R = (
|
|
1005
|
-
f.active && f.column ==
|
|
1006
|
-
}, K = () =>
|
|
1007
|
-
if (
|
|
1008
|
-
return
|
|
1009
|
-
|
|
1010
|
-
},
|
|
1011
|
-
|
|
1012
|
-
let h = JSON.parse(
|
|
1011
|
+
const x = (E, L) => typeof E == "string" && typeof L == "string" ? E.toLowerCase().localeCompare(L.toLowerCase()) : E < L ? -1 : E > L ? 1 : 0;
|
|
1012
|
+
return f.active && (D = D.slice().sort((E, L) => x(E[h], L[h]) * A)), D;
|
|
1013
|
+
}, R = (w) => {
|
|
1014
|
+
f.active && f.column == w ? (f.active = f.order == "asc", f.column = w, f.order = "desc") : (f.active = !0, f.column = w, f.order = "asc");
|
|
1015
|
+
}, K = () => d.value.getSelection().map((w) => JSON.parse(w.dataset.item)), te = (w, D) => {
|
|
1016
|
+
if (w.altKey || w.ctrlKey || w.metaKey)
|
|
1017
|
+
return w.preventDefault(), !1;
|
|
1018
|
+
w.dataTransfer.setDragImage(i.value, 0, 15), w.dataTransfer.effectAllowed = "all", w.dataTransfer.dropEffect = "copy", w.dataTransfer.setData("items", JSON.stringify(K()));
|
|
1019
|
+
}, se = (w, D) => {
|
|
1020
|
+
w.preventDefault();
|
|
1021
|
+
let h = JSON.parse(w.dataTransfer.getData("items"));
|
|
1013
1022
|
if (h.find((A) => A.storage !== e.adapter)) {
|
|
1014
1023
|
alert("Moving items between different storages is not supported yet.");
|
|
1015
1024
|
return;
|
|
1016
1025
|
}
|
|
1017
1026
|
e.emitter.emit("vf-modal-show", { type: "move", items: { from: h, to: D } });
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1027
|
+
}, ae = (w, D) => {
|
|
1028
|
+
w.preventDefault(), !D || D.type !== "dir" || d.value.getSelection().find((h) => h == w.currentTarget) ? (w.dataTransfer.dropEffect = "none", w.dataTransfer.effectAllowed = "none") : w.dataTransfer.dropEffect = "copy";
|
|
1020
1029
|
}, oe = () => {
|
|
1021
|
-
|
|
1022
|
-
area:
|
|
1030
|
+
d.value = new Oe({
|
|
1031
|
+
area: o.value,
|
|
1023
1032
|
keyboardDrag: !1,
|
|
1024
1033
|
selectedClass: "vf-explorer-selected",
|
|
1025
1034
|
selectorClass: "vf-explorer-selector"
|
|
1026
|
-
}), e.emitter.on("vf-explorer-update", () =>
|
|
1027
|
-
|
|
1035
|
+
}), e.emitter.on("vf-explorer-update", () => ce(() => {
|
|
1036
|
+
d.value.clearSelection(), d.value.setSettings({
|
|
1028
1037
|
selectables: document.getElementsByClassName("vf-item-" + l)
|
|
1029
1038
|
});
|
|
1030
|
-
})),
|
|
1039
|
+
})), d.value.subscribe("predragstart", ({ event: w, isDragging: D }) => {
|
|
1031
1040
|
if (D)
|
|
1032
|
-
u.value =
|
|
1041
|
+
u.value = d.value.getSelection().length, d.value.break();
|
|
1033
1042
|
else {
|
|
1034
|
-
const h =
|
|
1035
|
-
h < 15 && A < 15 && (
|
|
1043
|
+
const h = w.target.offsetWidth - w.offsetX, A = w.target.offsetHeight - w.offsetY;
|
|
1044
|
+
h < 15 && A < 15 && (d.value.clearSelection(), d.value.break());
|
|
1036
1045
|
}
|
|
1037
|
-
}),
|
|
1038
|
-
|
|
1039
|
-
}),
|
|
1040
|
-
e.emitter.emit("vf-nodes-selected", K()), u.value =
|
|
1046
|
+
}), d.value.subscribe("predragmove", ({ isDragging: w }) => {
|
|
1047
|
+
w && d.value.break();
|
|
1048
|
+
}), d.value.subscribe("callback", ({ items: w, event: D, isDragging: h }) => {
|
|
1049
|
+
e.emitter.emit("vf-nodes-selected", K()), u.value = d.value.getSelection().length;
|
|
1041
1050
|
});
|
|
1042
1051
|
};
|
|
1043
1052
|
return P(() => {
|
|
1044
|
-
|
|
1053
|
+
g = new Ne(o.value), oe();
|
|
1045
1054
|
}), De(() => {
|
|
1046
|
-
|
|
1055
|
+
d.value.Area.reset(), d.value.SelectorArea.updatePos(), g.update();
|
|
1047
1056
|
}), P(() => {
|
|
1048
|
-
|
|
1057
|
+
de(() => e.view, () => e.emitter.emit("vf-explorer-update"));
|
|
1049
1058
|
}), ke(() => {
|
|
1050
|
-
|
|
1051
|
-
}), (
|
|
1052
|
-
|
|
1059
|
+
g.destroy();
|
|
1060
|
+
}), (w, D) => (n(), m("div", ys, [
|
|
1061
|
+
a(e).view == "list" || c.value.length ? (n(), m("div", xs, [
|
|
1053
1062
|
t("div", {
|
|
1054
1063
|
onClick: D[0] || (D[0] = (h) => R("basename")),
|
|
1055
1064
|
class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"
|
|
1056
1065
|
}, [
|
|
1057
|
-
|
|
1058
|
-
q(
|
|
1066
|
+
V(v(a(s)("Name")) + " ", 1),
|
|
1067
|
+
q(H(ne, {
|
|
1059
1068
|
direction: f.order == "asc" ? "down" : "up"
|
|
1060
1069
|
}, null, 8, ["direction"]), [
|
|
1061
|
-
[
|
|
1070
|
+
[re, f.active && f.column == "basename"]
|
|
1062
1071
|
])
|
|
1063
1072
|
]),
|
|
1064
|
-
c.value.length ?
|
|
1073
|
+
c.value.length ? S("", !0) : (n(), m("div", {
|
|
1065
1074
|
key: 0,
|
|
1066
1075
|
onClick: D[1] || (D[1] = (h) => R("file_size")),
|
|
1067
1076
|
class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"
|
|
1068
1077
|
}, [
|
|
1069
|
-
|
|
1070
|
-
q(
|
|
1078
|
+
V(v(a(s)("Size")) + " ", 1),
|
|
1079
|
+
q(H(ne, {
|
|
1071
1080
|
direction: f.order == "asc" ? "down" : "up"
|
|
1072
1081
|
}, null, 8, ["direction"]), [
|
|
1073
|
-
[
|
|
1082
|
+
[re, f.active && f.column == "file_size"]
|
|
1074
1083
|
])
|
|
1075
1084
|
])),
|
|
1076
|
-
c.value.length ?
|
|
1085
|
+
c.value.length ? S("", !0) : (n(), m("div", {
|
|
1077
1086
|
key: 1,
|
|
1078
1087
|
onClick: D[2] || (D[2] = (h) => R("last_modified")),
|
|
1079
1088
|
class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"
|
|
1080
1089
|
}, [
|
|
1081
|
-
|
|
1082
|
-
q(
|
|
1090
|
+
V(v(a(s)("Date")) + " ", 1),
|
|
1091
|
+
q(H(ne, {
|
|
1083
1092
|
direction: f.order == "asc" ? "down" : "up"
|
|
1084
1093
|
}, null, 8, ["direction"]), [
|
|
1085
|
-
[
|
|
1094
|
+
[re, f.active && f.column == "last_modified"]
|
|
1086
1095
|
])
|
|
1087
1096
|
])),
|
|
1088
|
-
c.value.length ? (n(),
|
|
1097
|
+
c.value.length ? (n(), m("div", {
|
|
1089
1098
|
key: 2,
|
|
1090
1099
|
onClick: D[3] || (D[3] = (h) => R("path")),
|
|
1091
1100
|
class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"
|
|
1092
1101
|
}, [
|
|
1093
|
-
|
|
1094
|
-
q(
|
|
1102
|
+
V(v(a(s)("Filepath")) + " ", 1),
|
|
1103
|
+
q(H(ne, {
|
|
1095
1104
|
direction: f.order == "asc" ? "down" : "up"
|
|
1096
1105
|
}, null, 8, ["direction"]), [
|
|
1097
|
-
[
|
|
1106
|
+
[re, f.active && f.column == "path"]
|
|
1098
1107
|
])
|
|
1099
|
-
])) :
|
|
1100
|
-
])) :
|
|
1108
|
+
])) : S("", !0)
|
|
1109
|
+
])) : S("", !0),
|
|
1101
1110
|
t("div", ws, [
|
|
1102
1111
|
t("div", {
|
|
1103
1112
|
ref_key: "dragImage",
|
|
1104
|
-
ref:
|
|
1113
|
+
ref: i,
|
|
1105
1114
|
class: "absolute -z-50 -top-96"
|
|
1106
1115
|
}, [
|
|
1107
1116
|
$s,
|
|
1108
|
-
t("div", Cs,
|
|
1117
|
+
t("div", Cs, v(u.value), 1)
|
|
1109
1118
|
], 512)
|
|
1110
1119
|
]),
|
|
1111
1120
|
t("div", {
|
|
1112
|
-
onTouchstart:
|
|
1113
|
-
onContextmenu: D[10] || (D[10] = Y((h) =>
|
|
1114
|
-
class:
|
|
1121
|
+
onTouchstart: M,
|
|
1122
|
+
onContextmenu: D[10] || (D[10] = Y((h) => a(e).emitter.emit("vf-contextmenu-show", { event: h, area: o.value, items: K() }), ["self", "prevent"])),
|
|
1123
|
+
class: B([a(e).fullScreen ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
|
|
1115
1124
|
ref_key: "selectorArea",
|
|
1116
|
-
ref:
|
|
1125
|
+
ref: o
|
|
1117
1126
|
}, [
|
|
1118
|
-
c.value.length ? (n(!0),
|
|
1119
|
-
onDblclick: (
|
|
1120
|
-
onTouchstart: D[4] || (D[4] = (
|
|
1121
|
-
onTouchend: D[5] || (D[5] = (
|
|
1122
|
-
onContextmenu: Y((
|
|
1123
|
-
class:
|
|
1127
|
+
c.value.length ? (n(!0), m(U, { key: 0 }, I(O(), (h, A) => (n(), m("div", {
|
|
1128
|
+
onDblclick: (x) => k(h),
|
|
1129
|
+
onTouchstart: D[4] || (D[4] = (x) => C(x)),
|
|
1130
|
+
onTouchend: D[5] || (D[5] = (x) => $()),
|
|
1131
|
+
onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
|
|
1132
|
+
class: B(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
1124
1133
|
"data-type": h.type,
|
|
1125
1134
|
"data-item": JSON.stringify(h),
|
|
1126
1135
|
"data-index": A
|
|
1127
1136
|
}, [
|
|
1128
1137
|
t("div", Ms, [
|
|
1129
1138
|
t("div", Es, [
|
|
1130
|
-
h.type === "dir" ? (n(),
|
|
1131
|
-
t("span",
|
|
1139
|
+
h.type === "dir" ? (n(), m("svg", Ds, As)) : (n(), m("svg", Ls, Fs)),
|
|
1140
|
+
t("span", Vs, v(h.basename), 1)
|
|
1132
1141
|
]),
|
|
1133
|
-
t("div",
|
|
1142
|
+
t("div", Os, v(h.path), 1)
|
|
1134
1143
|
])
|
|
1135
|
-
], 42, Ss))), 256)) :
|
|
1136
|
-
|
|
1144
|
+
], 42, Ss))), 256)) : S("", !0),
|
|
1145
|
+
a(e).view === "list" && !c.value.length ? (n(!0), m(U, { key: 1 }, I(O(), (h, A) => (n(), m("div", {
|
|
1137
1146
|
draggable: "true",
|
|
1138
|
-
onDblclick: (
|
|
1139
|
-
onTouchstart: D[6] || (D[6] = (
|
|
1140
|
-
onTouchend: D[7] || (D[7] = (
|
|
1141
|
-
onContextmenu: Y((
|
|
1142
|
-
onDragstart: (
|
|
1143
|
-
onDragover: (
|
|
1144
|
-
onDrop: (
|
|
1145
|
-
class:
|
|
1147
|
+
onDblclick: (x) => k(h),
|
|
1148
|
+
onTouchstart: D[6] || (D[6] = (x) => C(x)),
|
|
1149
|
+
onTouchend: D[7] || (D[7] = (x) => $()),
|
|
1150
|
+
onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
|
|
1151
|
+
onDragstart: (x) => te(x),
|
|
1152
|
+
onDragover: (x) => ae(x, h),
|
|
1153
|
+
onDrop: (x) => se(x, h),
|
|
1154
|
+
class: B(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
1146
1155
|
"data-type": h.type,
|
|
1147
1156
|
"data-item": JSON.stringify(h),
|
|
1148
1157
|
"data-index": A
|
|
1149
1158
|
}, [
|
|
1150
|
-
t("div",
|
|
1151
|
-
t("div",
|
|
1152
|
-
h.type === "dir" ? (n(),
|
|
1153
|
-
t("span",
|
|
1159
|
+
t("div", zs, [
|
|
1160
|
+
t("div", Bs, [
|
|
1161
|
+
h.type === "dir" ? (n(), m("svg", Us, Rs)) : (n(), m("svg", qs, Ps)),
|
|
1162
|
+
t("span", Ws, v(h.basename), 1)
|
|
1154
1163
|
]),
|
|
1155
|
-
t("div",
|
|
1156
|
-
t("div", Ys,
|
|
1164
|
+
t("div", Gs, v(h.file_size ? a(e).filesize(h.file_size) : ""), 1),
|
|
1165
|
+
t("div", Ys, v(a(we)(h.last_modified)), 1)
|
|
1157
1166
|
])
|
|
1158
|
-
], 42,
|
|
1159
|
-
|
|
1167
|
+
], 42, Ns))), 256)) : S("", !0),
|
|
1168
|
+
a(e).view === "grid" && !c.value.length ? (n(!0), m(U, { key: 2 }, I(O(!1), (h, A) => (n(), m("div", {
|
|
1160
1169
|
draggable: "true",
|
|
1161
|
-
onDblclick: (
|
|
1162
|
-
onTouchstart: D[8] || (D[8] = (
|
|
1163
|
-
onTouchend: D[9] || (D[9] = (
|
|
1164
|
-
onContextmenu: Y((
|
|
1165
|
-
onDragstart: (
|
|
1166
|
-
onDragover: (
|
|
1167
|
-
onDrop: (
|
|
1168
|
-
class:
|
|
1170
|
+
onDblclick: (x) => k(h),
|
|
1171
|
+
onTouchstart: D[8] || (D[8] = (x) => C(x)),
|
|
1172
|
+
onTouchend: D[9] || (D[9] = (x) => $()),
|
|
1173
|
+
onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
|
|
1174
|
+
onDragstart: (x) => te(x),
|
|
1175
|
+
onDragover: (x) => ae(x, h),
|
|
1176
|
+
onDrop: (x) => se(x, h),
|
|
1177
|
+
class: B(["vf-item-" + a(l), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
|
|
1169
1178
|
"data-type": h.type,
|
|
1170
1179
|
"data-item": JSON.stringify(h),
|
|
1171
1180
|
"data-index": A
|
|
1172
1181
|
}, [
|
|
1173
1182
|
t("div", null, [
|
|
1174
1183
|
t("div", Js, [
|
|
1175
|
-
h.type === "dir" ? (n(),
|
|
1184
|
+
h.type === "dir" ? (n(), m("svg", Xs, Zs)) : (h.mime_type ?? "").startsWith("image") ? (n(), m("img", {
|
|
1176
1185
|
key: 1,
|
|
1177
1186
|
class: "lazy h-10 md:h-12 m-auto",
|
|
1178
|
-
"data-src":
|
|
1187
|
+
"data-src": a(e).requester.getPreviewUrl(a(e).adapter, h),
|
|
1179
1188
|
alt: h.basename
|
|
1180
|
-
}, null, 8,
|
|
1181
|
-
!(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(),
|
|
1189
|
+
}, null, 8, ea)) : (n(), m("svg", ta, aa)),
|
|
1190
|
+
!(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(), m("div", oa, v(r(h.extension)), 1)) : S("", !0)
|
|
1182
1191
|
]),
|
|
1183
|
-
t("span",
|
|
1192
|
+
t("span", ra, v(a(he)(h.basename)), 1)
|
|
1184
1193
|
])
|
|
1185
|
-
], 42, Ks))), 256)) :
|
|
1194
|
+
], 42, Ks))), 256)) : S("", !0)
|
|
1186
1195
|
], 34),
|
|
1187
|
-
|
|
1196
|
+
H(bs)
|
|
1188
1197
|
]));
|
|
1189
1198
|
}
|
|
1190
|
-
}),
|
|
1199
|
+
}), ia = ["onClick"], da = ["href", "download"], ca = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ua = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ma = {
|
|
1191
1200
|
name: "VFContextMenu"
|
|
1192
|
-
},
|
|
1201
|
+
}, va = /* @__PURE__ */ Object.assign(ma, {
|
|
1193
1202
|
setup(p) {
|
|
1194
|
-
const e = F("ServiceContainer"), { t: s } = e.i18n, r =
|
|
1203
|
+
const e = F("ServiceContainer"), { t: s } = e.i18n, r = b(null), o = b([]), i = b(""), u = ie({
|
|
1195
1204
|
active: !1,
|
|
1196
1205
|
items: [],
|
|
1197
1206
|
positions: {
|
|
1198
1207
|
left: 0,
|
|
1199
1208
|
top: 0
|
|
1200
1209
|
}
|
|
1201
|
-
}),
|
|
1202
|
-
e.emitter.on("vf-context-selected", (
|
|
1203
|
-
|
|
1210
|
+
}), d = ee(() => u.items.filter((_) => _.key == null || e.features.includes(_.key)));
|
|
1211
|
+
e.emitter.on("vf-context-selected", (_) => {
|
|
1212
|
+
o.value = _;
|
|
1204
1213
|
});
|
|
1205
1214
|
const l = {
|
|
1206
1215
|
newfolder: {
|
|
1207
|
-
key:
|
|
1216
|
+
key: N.NEW_FOLDER,
|
|
1208
1217
|
title: () => s("New Folder"),
|
|
1209
1218
|
action: () => {
|
|
1210
1219
|
e.emitter.emit("vf-modal-show", { type: "new-folder" });
|
|
1211
1220
|
}
|
|
1212
1221
|
},
|
|
1213
1222
|
delete: {
|
|
1214
|
-
key:
|
|
1223
|
+
key: N.DELETE,
|
|
1215
1224
|
title: () => s("Delete"),
|
|
1216
1225
|
action: () => {
|
|
1217
|
-
e.emitter.emit("vf-modal-show", { type: "delete", items:
|
|
1226
|
+
e.emitter.emit("vf-modal-show", { type: "delete", items: o });
|
|
1218
1227
|
}
|
|
1219
1228
|
},
|
|
1220
1229
|
refresh: {
|
|
@@ -1224,109 +1233,109 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1224
1233
|
}
|
|
1225
1234
|
},
|
|
1226
1235
|
preview: {
|
|
1227
|
-
key:
|
|
1236
|
+
key: N.PREVIEW,
|
|
1228
1237
|
title: () => s("Preview"),
|
|
1229
1238
|
action: () => {
|
|
1230
|
-
e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item:
|
|
1239
|
+
e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: o.value[0] });
|
|
1231
1240
|
}
|
|
1232
1241
|
},
|
|
1233
1242
|
open: {
|
|
1234
1243
|
title: () => s("Open"),
|
|
1235
1244
|
action: () => {
|
|
1236
|
-
e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path:
|
|
1245
|
+
e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].path } });
|
|
1237
1246
|
}
|
|
1238
1247
|
},
|
|
1239
1248
|
openDir: {
|
|
1240
1249
|
title: () => s("Open containing folder"),
|
|
1241
1250
|
action: () => {
|
|
1242
|
-
e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path:
|
|
1251
|
+
e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].dir } });
|
|
1243
1252
|
}
|
|
1244
1253
|
},
|
|
1245
1254
|
download: {
|
|
1246
|
-
key:
|
|
1247
|
-
link:
|
|
1255
|
+
key: N.DOWNLOAD,
|
|
1256
|
+
link: ee(() => e.requester.getDownloadUrl(e.data.adapter, o.value[0])),
|
|
1248
1257
|
title: () => s("Download"),
|
|
1249
1258
|
action: () => {
|
|
1250
|
-
const
|
|
1251
|
-
e.emitter.emit("vf-download",
|
|
1259
|
+
const _ = e.requester.getDownloadUrl(e.data.adapter, o.value[0]);
|
|
1260
|
+
e.emitter.emit("vf-download", _);
|
|
1252
1261
|
}
|
|
1253
1262
|
},
|
|
1254
1263
|
archive: {
|
|
1255
|
-
key:
|
|
1264
|
+
key: N.ARCHIVE,
|
|
1256
1265
|
title: () => s("Archive"),
|
|
1257
1266
|
action: () => {
|
|
1258
|
-
e.emitter.emit("vf-modal-show", { type: "archive", items:
|
|
1267
|
+
e.emitter.emit("vf-modal-show", { type: "archive", items: o });
|
|
1259
1268
|
}
|
|
1260
1269
|
},
|
|
1261
1270
|
unarchive: {
|
|
1262
|
-
key:
|
|
1271
|
+
key: N.UNARCHIVE,
|
|
1263
1272
|
title: () => s("Unarchive"),
|
|
1264
1273
|
action: () => {
|
|
1265
|
-
e.emitter.emit("vf-modal-show", { type: "unarchive", items:
|
|
1274
|
+
e.emitter.emit("vf-modal-show", { type: "unarchive", items: o });
|
|
1266
1275
|
}
|
|
1267
1276
|
},
|
|
1268
1277
|
rename: {
|
|
1269
|
-
key:
|
|
1278
|
+
key: N.RENAME,
|
|
1270
1279
|
title: () => s("Rename"),
|
|
1271
1280
|
action: () => {
|
|
1272
|
-
e.emitter.emit("vf-modal-show", { type: "rename", items:
|
|
1281
|
+
e.emitter.emit("vf-modal-show", { type: "rename", items: o });
|
|
1273
1282
|
}
|
|
1274
1283
|
}
|
|
1275
|
-
}, c = (
|
|
1276
|
-
e.emitter.emit("vf-contextmenu-hide"),
|
|
1284
|
+
}, c = (_) => {
|
|
1285
|
+
e.emitter.emit("vf-contextmenu-hide"), _.action();
|
|
1277
1286
|
};
|
|
1278
|
-
e.emitter.on("vf-search-query", ({ newQuery:
|
|
1279
|
-
|
|
1280
|
-
}), e.emitter.on("vf-contextmenu-show", ({ event:
|
|
1281
|
-
if (u.items = [],
|
|
1282
|
-
if (
|
|
1283
|
-
u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [
|
|
1287
|
+
e.emitter.on("vf-search-query", ({ newQuery: _ }) => {
|
|
1288
|
+
i.value = _;
|
|
1289
|
+
}), e.emitter.on("vf-contextmenu-show", ({ event: _, area: $, items: y, target: M = null }) => {
|
|
1290
|
+
if (u.items = [], i.value)
|
|
1291
|
+
if (M)
|
|
1292
|
+
u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [M]);
|
|
1284
1293
|
else
|
|
1285
1294
|
return;
|
|
1286
1295
|
else
|
|
1287
|
-
!
|
|
1288
|
-
|
|
1296
|
+
!M && !i.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : y.length > 1 && y.some((C) => C.path === M.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", y)) : (M.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), M.mime_type == "application/zip" ? u.items.push(l.unarchive) : u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", [M]));
|
|
1297
|
+
g(_, $);
|
|
1289
1298
|
}), e.emitter.on("vf-contextmenu-hide", () => {
|
|
1290
1299
|
u.active = !1;
|
|
1291
1300
|
});
|
|
1292
|
-
const
|
|
1293
|
-
u.active = !0,
|
|
1294
|
-
const y = e.root.getBoundingClientRect(),
|
|
1295
|
-
let
|
|
1296
|
-
|
|
1297
|
-
left:
|
|
1298
|
-
top:
|
|
1301
|
+
const g = (_, $) => {
|
|
1302
|
+
u.active = !0, ce(() => {
|
|
1303
|
+
const y = e.root.getBoundingClientRect(), M = $.getBoundingClientRect();
|
|
1304
|
+
let C = _.pageX - y.left, k = _.pageY - y.top, f = r.value.offsetHeight, O = r.value.offsetWidth;
|
|
1305
|
+
C = M.right - _.pageX + window.scrollX < O ? C - O : C, k = M.bottom - _.pageY + window.scrollY < f ? k - f : k, u.positions = {
|
|
1306
|
+
left: C + "px",
|
|
1307
|
+
top: k + "px"
|
|
1299
1308
|
};
|
|
1300
1309
|
});
|
|
1301
1310
|
};
|
|
1302
|
-
return (
|
|
1311
|
+
return (_, $) => u.active ? (n(), m("ul", {
|
|
1303
1312
|
key: 0,
|
|
1304
1313
|
class: "z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",
|
|
1305
1314
|
ref_key: "contextmenu",
|
|
1306
1315
|
ref: r,
|
|
1307
1316
|
style: be(u.positions)
|
|
1308
1317
|
}, [
|
|
1309
|
-
(n(!0),
|
|
1318
|
+
(n(!0), m(U, null, I(d.value, (y) => (n(), m("li", {
|
|
1310
1319
|
class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
|
|
1311
1320
|
key: y.title,
|
|
1312
|
-
onClick: (
|
|
1321
|
+
onClick: (M) => c(y)
|
|
1313
1322
|
}, [
|
|
1314
|
-
y.link ? (n(),
|
|
1323
|
+
y.link ? (n(), m("a", {
|
|
1315
1324
|
key: 0,
|
|
1316
1325
|
target: "_blank",
|
|
1317
1326
|
href: y.link,
|
|
1318
1327
|
download: y.link
|
|
1319
1328
|
}, [
|
|
1320
|
-
|
|
1321
|
-
t("span", null,
|
|
1322
|
-
], 8,
|
|
1323
|
-
|
|
1324
|
-
t("span", null,
|
|
1329
|
+
ca,
|
|
1330
|
+
t("span", null, v(y.title()), 1)
|
|
1331
|
+
], 8, da)) : (n(), m(U, { key: 1 }, [
|
|
1332
|
+
ua,
|
|
1333
|
+
t("span", null, v(y.title()), 1)
|
|
1325
1334
|
], 64))
|
|
1326
|
-
], 8,
|
|
1327
|
-
], 4)) :
|
|
1335
|
+
], 8, ia))), 128))
|
|
1336
|
+
], 4)) : S("", !0);
|
|
1328
1337
|
}
|
|
1329
|
-
}),
|
|
1338
|
+
}), pa = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, ha = { class: "flex leading-5 items-center" }, fa = ["aria-label"], ga = /* @__PURE__ */ t("svg", {
|
|
1330
1339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1331
1340
|
class: "h-5 w-5",
|
|
1332
1341
|
fill: "none",
|
|
@@ -1339,9 +1348,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1339
1348
|
"stroke-linejoin": "round",
|
|
1340
1349
|
d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
|
|
1341
1350
|
})
|
|
1342
|
-
], -1),
|
|
1343
|
-
|
|
1344
|
-
],
|
|
1351
|
+
], -1), _a = [
|
|
1352
|
+
ga
|
|
1353
|
+
], ka = ["value"], ba = { class: "ml-3" }, ya = { key: 0 }, xa = { class: "ml-1" }, wa = { class: "flex leading-5 items-center justify-end" }, $a = ["disabled"], Ca = ["aria-label"], Sa = /* @__PURE__ */ t("svg", {
|
|
1345
1354
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1346
1355
|
class: "h-5 w-5 stroke-slate-500 cursor-pointer",
|
|
1347
1356
|
fill: "none",
|
|
@@ -1354,57 +1363,68 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1354
1363
|
"stroke-linejoin": "round",
|
|
1355
1364
|
d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1356
1365
|
})
|
|
1357
|
-
], -1),
|
|
1358
|
-
|
|
1359
|
-
],
|
|
1366
|
+
], -1), Ma = [
|
|
1367
|
+
Sa
|
|
1368
|
+
], Ea = {
|
|
1360
1369
|
name: "VFStatusbar"
|
|
1361
|
-
},
|
|
1370
|
+
}, Da = /* @__PURE__ */ Object.assign(Ea, {
|
|
1362
1371
|
setup(p) {
|
|
1363
|
-
const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage,
|
|
1372
|
+
const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, o = b(0), i = () => {
|
|
1364
1373
|
e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.adapter } }), r("adapter", e.adapter);
|
|
1365
1374
|
};
|
|
1366
|
-
e.emitter.on("vf-nodes-selected", (
|
|
1367
|
-
|
|
1375
|
+
e.emitter.on("vf-nodes-selected", (l) => {
|
|
1376
|
+
o.value = l.length;
|
|
1377
|
+
});
|
|
1378
|
+
const u = b("");
|
|
1379
|
+
e.emitter.on("vf-search-query", ({ newQuery: l }) => {
|
|
1380
|
+
u.value = l;
|
|
1368
1381
|
});
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
})
|
|
1373
|
-
|
|
1382
|
+
const d = ee(() => {
|
|
1383
|
+
const l = e.selectButton.multiple ? e.selectedItems.length > 0 : e.selectedItems.length === 1;
|
|
1384
|
+
return e.selectButton.active && l;
|
|
1385
|
+
});
|
|
1386
|
+
return (l, c) => (n(), m("div", pa, [
|
|
1387
|
+
t("div", ha, [
|
|
1374
1388
|
t("div", {
|
|
1375
1389
|
class: "mx-2",
|
|
1376
|
-
"aria-label":
|
|
1390
|
+
"aria-label": a(s)("Storage"),
|
|
1377
1391
|
"data-microtip-position": "top-right",
|
|
1378
1392
|
role: "tooltip"
|
|
1379
|
-
},
|
|
1393
|
+
}, _a, 8, fa),
|
|
1380
1394
|
q(t("select", {
|
|
1381
|
-
"onUpdate:modelValue":
|
|
1382
|
-
onChange:
|
|
1395
|
+
"onUpdate:modelValue": c[0] || (c[0] = (g) => a(e).adapter = g),
|
|
1396
|
+
onChange: i,
|
|
1383
1397
|
class: "py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"
|
|
1384
1398
|
}, [
|
|
1385
|
-
(n(!0),
|
|
1399
|
+
(n(!0), m(U, null, I(a(e).data.storages, (g) => (n(), m("option", { value: g }, v(g), 9, ka))), 256))
|
|
1386
1400
|
], 544), [
|
|
1387
|
-
[pe,
|
|
1401
|
+
[pe, a(e).adapter]
|
|
1388
1402
|
]),
|
|
1389
|
-
t("div",
|
|
1390
|
-
u.value.length ? (n(),
|
|
1391
|
-
t("span",
|
|
1403
|
+
t("div", ba, [
|
|
1404
|
+
u.value.length ? (n(), m("span", ya, v(a(e).data.files.length) + " items found. ", 1)) : S("", !0),
|
|
1405
|
+
t("span", xa, v(o.value > 0 ? a(s)("%s item(s) selected.", o.value) : ""), 1)
|
|
1392
1406
|
])
|
|
1393
1407
|
]),
|
|
1394
|
-
t("div",
|
|
1408
|
+
t("div", wa, [
|
|
1409
|
+
a(e).selectButton.active ? (n(), m("button", {
|
|
1410
|
+
key: 0,
|
|
1411
|
+
class: B(["vf-btn py-0 vf-btn-primary", { disabled: !d.value }]),
|
|
1412
|
+
disabled: !d.value,
|
|
1413
|
+
onClick: c[1] || (c[1] = (g) => a(e).selectButton.click(a(e).selectedItems, g))
|
|
1414
|
+
}, v(a(s)("Select")), 11, $a)) : S("", !0),
|
|
1395
1415
|
t("span", {
|
|
1396
1416
|
class: "mr-1",
|
|
1397
|
-
"aria-label":
|
|
1417
|
+
"aria-label": a(s)("About"),
|
|
1398
1418
|
"data-microtip-position": "top-left",
|
|
1399
1419
|
role: "tooltip",
|
|
1400
|
-
onClick:
|
|
1401
|
-
},
|
|
1420
|
+
onClick: c[2] || (c[2] = (g) => a(e).emitter.emit("vf-modal-show", { type: "about" }))
|
|
1421
|
+
}, Ma, 8, Ca)
|
|
1402
1422
|
])
|
|
1403
1423
|
]));
|
|
1404
1424
|
}
|
|
1405
|
-
}),
|
|
1425
|
+
}), ja = {
|
|
1406
1426
|
name: "VueFinder"
|
|
1407
|
-
},
|
|
1427
|
+
}, Aa = /* @__PURE__ */ Object.assign(ja, {
|
|
1408
1428
|
props: {
|
|
1409
1429
|
id: {
|
|
1410
1430
|
type: String,
|
|
@@ -1414,6 +1434,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1414
1434
|
type: [String, Object],
|
|
1415
1435
|
required: !0
|
|
1416
1436
|
},
|
|
1437
|
+
persist: {
|
|
1438
|
+
type: Boolean,
|
|
1439
|
+
default: !1
|
|
1440
|
+
},
|
|
1441
|
+
path: {
|
|
1442
|
+
type: String,
|
|
1443
|
+
default: "."
|
|
1444
|
+
},
|
|
1417
1445
|
features: {
|
|
1418
1446
|
type: [Array, Boolean],
|
|
1419
1447
|
default: !0
|
|
@@ -1428,7 +1456,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1428
1456
|
},
|
|
1429
1457
|
locale: {
|
|
1430
1458
|
type: String,
|
|
1431
|
-
default:
|
|
1459
|
+
default: null
|
|
1432
1460
|
},
|
|
1433
1461
|
maxHeight: {
|
|
1434
1462
|
type: String,
|
|
@@ -1437,109 +1465,129 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1437
1465
|
maxFileSize: {
|
|
1438
1466
|
type: String,
|
|
1439
1467
|
default: "10mb"
|
|
1468
|
+
},
|
|
1469
|
+
fullScreen: {
|
|
1470
|
+
type: Boolean,
|
|
1471
|
+
default: !1
|
|
1472
|
+
},
|
|
1473
|
+
selectButton: {
|
|
1474
|
+
type: Object,
|
|
1475
|
+
default(p) {
|
|
1476
|
+
return {
|
|
1477
|
+
active: !1,
|
|
1478
|
+
multiple: !1,
|
|
1479
|
+
click: (e) => {
|
|
1480
|
+
},
|
|
1481
|
+
...p
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1440
1484
|
}
|
|
1441
1485
|
},
|
|
1442
1486
|
emits: ["select"],
|
|
1443
1487
|
setup(p, { emit: e }) {
|
|
1444
|
-
const s = e,
|
|
1445
|
-
je("ServiceContainer",
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
}),
|
|
1450
|
-
|
|
1488
|
+
const s = e, o = Je(p, F("VueFinderOptions"));
|
|
1489
|
+
je("ServiceContainer", o);
|
|
1490
|
+
const { setStore: i } = o.storage, u = b(null);
|
|
1491
|
+
o.root = u, o.i18n, o.emitter.on("vf-modal-close", () => {
|
|
1492
|
+
o.modal.active = !1;
|
|
1493
|
+
}), o.emitter.on("vf-modal-show", (c) => {
|
|
1494
|
+
o.modal.active = !0, o.modal.type = c.type, o.modal.data = c;
|
|
1451
1495
|
});
|
|
1452
|
-
const
|
|
1453
|
-
Object.assign(
|
|
1496
|
+
const d = (c) => {
|
|
1497
|
+
Object.assign(o.data, c), o.emitter.emit("vf-nodes-selected", {}), o.emitter.emit("vf-explorer-update");
|
|
1454
1498
|
};
|
|
1455
|
-
|
|
1456
|
-
s("select",
|
|
1499
|
+
o.emitter.on("vf-nodes-selected", (c) => {
|
|
1500
|
+
o.selectedItems = c, s("select", c);
|
|
1457
1501
|
});
|
|
1458
|
-
let
|
|
1459
|
-
return
|
|
1460
|
-
|
|
1461
|
-
}),
|
|
1462
|
-
["index", "search"].includes(
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1502
|
+
let l;
|
|
1503
|
+
return o.emitter.on("vf-fetch-abort", () => {
|
|
1504
|
+
l.abort(), o.loading = !1;
|
|
1505
|
+
}), o.emitter.on("vf-fetch", ({ params: c, body: g = null, onSuccess: _ = null, onError: $ = null, noCloseModal: y = !1 }) => {
|
|
1506
|
+
["index", "search"].includes(c.q) && (l && l.abort(), o.loading = !0), l = new AbortController();
|
|
1507
|
+
const M = l.signal;
|
|
1508
|
+
o.requester.send({
|
|
1465
1509
|
url: "",
|
|
1466
|
-
method:
|
|
1467
|
-
params:
|
|
1468
|
-
body:
|
|
1469
|
-
abortSignal:
|
|
1510
|
+
method: c.m || "get",
|
|
1511
|
+
params: c,
|
|
1512
|
+
body: g,
|
|
1513
|
+
abortSignal: M
|
|
1470
1514
|
}).then((C) => {
|
|
1471
|
-
|
|
1515
|
+
o.adapter = C.adapter, o.persist && (o.path = C.dirname, i("path", o.path)), ["index", "search"].includes(c.q) && (o.loading = !1), y || o.emitter.emit("vf-modal-close"), d(C), _ && _(C);
|
|
1472
1516
|
}).catch((C) => {
|
|
1473
|
-
console.error(C),
|
|
1517
|
+
console.error(C), $ && $(C);
|
|
1474
1518
|
});
|
|
1475
|
-
}),
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1519
|
+
}), o.emitter.on("vf-download", (c) => {
|
|
1520
|
+
const g = document.createElement("a");
|
|
1521
|
+
g.style.display = "none", g.target = "_blank", g.href = c, g.download = c, o.root.appendChild(g), g.click(), g.remove();
|
|
1478
1522
|
}), P(() => {
|
|
1479
|
-
|
|
1480
|
-
|
|
1523
|
+
let c = {};
|
|
1524
|
+
o.path.includes("://") && (c = {
|
|
1525
|
+
adapter: o.path.split("://")[0],
|
|
1526
|
+
path: o.path
|
|
1527
|
+
}), o.emitter.emit("vf-fetch", { params: { q: "index", adapter: o.adapter, ...c } });
|
|
1528
|
+
}), (c, g) => (n(), m("div", {
|
|
1481
1529
|
class: "vuefinder",
|
|
1482
1530
|
ref_key: "root",
|
|
1483
|
-
ref:
|
|
1531
|
+
ref: u
|
|
1484
1532
|
}, [
|
|
1485
1533
|
t("div", {
|
|
1486
|
-
class:
|
|
1534
|
+
class: B(a(o).theme.actualValue === "dark" ? "dark" : "")
|
|
1487
1535
|
}, [
|
|
1488
1536
|
t("div", {
|
|
1489
|
-
class:
|
|
1490
|
-
style: be(o
|
|
1491
|
-
onMousedown:
|
|
1492
|
-
onTouchstart:
|
|
1537
|
+
class: B([a(o).fullScreen ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
|
|
1538
|
+
style: be(a(o).fullScreen ? "" : "max-height: " + p.maxHeight),
|
|
1539
|
+
onMousedown: g[0] || (g[0] = (_) => a(o).emitter.emit("vf-contextmenu-hide")),
|
|
1540
|
+
onTouchstart: g[1] || (g[1] = (_) => a(o).emitter.emit("vf-contextmenu-hide"))
|
|
1493
1541
|
}, [
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1542
|
+
H(Ot),
|
|
1543
|
+
H(cs),
|
|
1544
|
+
H(la),
|
|
1545
|
+
H(Da)
|
|
1498
1546
|
], 38),
|
|
1499
|
-
|
|
1547
|
+
H(Ae, { name: "fade" }, {
|
|
1500
1548
|
default: j(() => [
|
|
1501
|
-
o
|
|
1549
|
+
a(o).modal.active ? (n(), T(Le("v-f-modal-" + a(o).modal.type), { key: 0 })) : S("", !0)
|
|
1502
1550
|
]),
|
|
1503
1551
|
_: 1
|
|
1504
1552
|
}),
|
|
1505
|
-
|
|
1553
|
+
H(va)
|
|
1506
1554
|
], 2)
|
|
1507
1555
|
], 512));
|
|
1508
1556
|
}
|
|
1509
|
-
}),
|
|
1557
|
+
}), La = /* @__PURE__ */ t("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Ta = { class: "fixed z-10 inset-0 overflow-hidden" }, Fa = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, Va = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Oa = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, W = {
|
|
1510
1558
|
__name: "ModalLayout",
|
|
1511
1559
|
setup(p) {
|
|
1512
1560
|
const e = F("ServiceContainer");
|
|
1513
1561
|
return P(() => {
|
|
1514
1562
|
const s = document.querySelector(".v-f-modal input");
|
|
1515
1563
|
s && s.focus();
|
|
1516
|
-
}), (s, r) => (n(),
|
|
1564
|
+
}), (s, r) => (n(), m("div", {
|
|
1517
1565
|
class: "v-f-modal relative z-30",
|
|
1518
1566
|
"aria-labelledby": "modal-title",
|
|
1519
1567
|
role: "dialog",
|
|
1520
1568
|
"aria-modal": "true",
|
|
1521
|
-
onKeyup: r[1] || (r[1] = Q((
|
|
1569
|
+
onKeyup: r[1] || (r[1] = Q((o) => a(e).emitter.emit("vf-modal-close"), ["esc"])),
|
|
1522
1570
|
tabindex: "0"
|
|
1523
1571
|
}, [
|
|
1524
|
-
|
|
1525
|
-
t("div",
|
|
1572
|
+
La,
|
|
1573
|
+
t("div", Ta, [
|
|
1526
1574
|
t("div", {
|
|
1527
1575
|
class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
|
|
1528
|
-
onMousedown: r[0] || (r[0] = Y((
|
|
1576
|
+
onMousedown: r[0] || (r[0] = Y((o) => a(e).emitter.emit("vf-modal-close"), ["self"]))
|
|
1529
1577
|
}, [
|
|
1530
|
-
t("div",
|
|
1531
|
-
t("div",
|
|
1532
|
-
|
|
1578
|
+
t("div", Fa, [
|
|
1579
|
+
t("div", Va, [
|
|
1580
|
+
le(s.$slots, "default")
|
|
1533
1581
|
]),
|
|
1534
|
-
t("div",
|
|
1535
|
-
|
|
1582
|
+
t("div", Oa, [
|
|
1583
|
+
le(s.$slots, "buttons")
|
|
1536
1584
|
])
|
|
1537
1585
|
])
|
|
1538
1586
|
], 32)
|
|
1539
1587
|
])
|
|
1540
1588
|
], 32));
|
|
1541
1589
|
}
|
|
1542
|
-
},
|
|
1590
|
+
}, Na = ["aria-label"], za = /* @__PURE__ */ t("svg", {
|
|
1543
1591
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1544
1592
|
fill: "none",
|
|
1545
1593
|
viewBox: "0 0 24 24",
|
|
@@ -1552,11 +1600,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1552
1600
|
"stroke-linejoin": "round",
|
|
1553
1601
|
d: "M6 18L18 6M6 6l12 12"
|
|
1554
1602
|
})
|
|
1555
|
-
], -1),
|
|
1556
|
-
|
|
1557
|
-
],
|
|
1603
|
+
], -1), Ba = [
|
|
1604
|
+
za
|
|
1605
|
+
], Ua = {
|
|
1558
1606
|
name: "Message"
|
|
1559
|
-
},
|
|
1607
|
+
}, G = /* @__PURE__ */ Object.assign(Ua, {
|
|
1560
1608
|
props: {
|
|
1561
1609
|
error: {
|
|
1562
1610
|
type: Boolean,
|
|
@@ -1566,30 +1614,30 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1566
1614
|
emits: ["hidden"],
|
|
1567
1615
|
setup(p, { emit: e }) {
|
|
1568
1616
|
var c;
|
|
1569
|
-
const s = e, r = F("ServiceContainer"), { t:
|
|
1570
|
-
|
|
1617
|
+
const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = b(!1), u = b(null), d = b((c = u.value) == null ? void 0 : c.strMessage);
|
|
1618
|
+
de(d, () => i.value = !1);
|
|
1571
1619
|
const l = () => {
|
|
1572
|
-
s("hidden"),
|
|
1620
|
+
s("hidden"), i.value = !0;
|
|
1573
1621
|
};
|
|
1574
|
-
return (
|
|
1575
|
-
|
|
1622
|
+
return (g, _) => (n(), m("div", null, [
|
|
1623
|
+
i.value ? S("", !0) : (n(), m("div", {
|
|
1576
1624
|
key: 0,
|
|
1577
1625
|
ref_key: "strMessage",
|
|
1578
1626
|
ref: u,
|
|
1579
|
-
class:
|
|
1627
|
+
class: B(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", p.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
|
|
1580
1628
|
}, [
|
|
1581
|
-
|
|
1629
|
+
le(g.$slots, "default"),
|
|
1582
1630
|
t("div", {
|
|
1583
1631
|
class: "ml-auto cursor-pointer",
|
|
1584
1632
|
onClick: l,
|
|
1585
|
-
"aria-label": o
|
|
1633
|
+
"aria-label": a(o)("Close"),
|
|
1586
1634
|
"data-microtip-position": "top-left",
|
|
1587
1635
|
role: "tooltip"
|
|
1588
|
-
},
|
|
1636
|
+
}, Ba, 8, Na)
|
|
1589
1637
|
], 2))
|
|
1590
1638
|
]));
|
|
1591
1639
|
}
|
|
1592
|
-
}),
|
|
1640
|
+
}), Ha = { class: "sm:flex sm:items-start" }, Ra = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
1593
1641
|
/* @__PURE__ */ t("svg", {
|
|
1594
1642
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1595
1643
|
class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
|
|
@@ -1604,13 +1652,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1604
1652
|
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
1605
1653
|
})
|
|
1606
1654
|
])
|
|
1607
|
-
], -1),
|
|
1655
|
+
], -1), qa = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ia = {
|
|
1608
1656
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1609
1657
|
id: "modal-title"
|
|
1610
|
-
},
|
|
1658
|
+
}, Pa = { class: "mt-2" }, Wa = { class: "text-sm text-gray-500" }, Ga = {
|
|
1611
1659
|
class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
|
|
1612
1660
|
style: { "max-height": "200px" }
|
|
1613
|
-
},
|
|
1661
|
+
}, Ya = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ka = {
|
|
1614
1662
|
key: 0,
|
|
1615
1663
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1616
1664
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -1618,13 +1666,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1618
1666
|
viewBox: "0 0 24 24",
|
|
1619
1667
|
stroke: "currentColor",
|
|
1620
1668
|
"stroke-width": "1"
|
|
1621
|
-
},
|
|
1669
|
+
}, Ja = /* @__PURE__ */ t("path", {
|
|
1622
1670
|
"stroke-linecap": "round",
|
|
1623
1671
|
"stroke-linejoin": "round",
|
|
1624
1672
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
1625
|
-
}, null, -1),
|
|
1626
|
-
|
|
1627
|
-
],
|
|
1673
|
+
}, null, -1), Xa = [
|
|
1674
|
+
Ja
|
|
1675
|
+
], Qa = {
|
|
1628
1676
|
key: 1,
|
|
1629
1677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1630
1678
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -1632,19 +1680,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1632
1680
|
viewBox: "0 0 24 24",
|
|
1633
1681
|
stroke: "currentColor",
|
|
1634
1682
|
"stroke-width": "1"
|
|
1635
|
-
},
|
|
1683
|
+
}, Za = /* @__PURE__ */ t("path", {
|
|
1636
1684
|
"stroke-linecap": "round",
|
|
1637
1685
|
"stroke-linejoin": "round",
|
|
1638
1686
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
1639
|
-
}, null, -1),
|
|
1640
|
-
|
|
1641
|
-
],
|
|
1687
|
+
}, null, -1), eo = [
|
|
1688
|
+
Za
|
|
1689
|
+
], to = { class: "ml-1.5" }, so = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, ao = {
|
|
1642
1690
|
name: "VFModalDelete"
|
|
1643
|
-
},
|
|
1691
|
+
}, oo = /* @__PURE__ */ Object.assign(ao, {
|
|
1644
1692
|
setup(p) {
|
|
1645
1693
|
const e = F("ServiceContainer");
|
|
1646
1694
|
e.storage;
|
|
1647
|
-
const { t: s } = e.i18n, r =
|
|
1695
|
+
const { t: s } = e.i18n, r = b(e.modal.data.items), o = b(""), i = () => {
|
|
1648
1696
|
r.value.length && e.emitter.emit("vf-fetch", {
|
|
1649
1697
|
params: {
|
|
1650
1698
|
q: "delete",
|
|
@@ -1653,53 +1701,53 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1653
1701
|
path: e.data.dirname
|
|
1654
1702
|
},
|
|
1655
1703
|
body: {
|
|
1656
|
-
items: r.value.map(({ path: u, type:
|
|
1704
|
+
items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d }))
|
|
1657
1705
|
},
|
|
1658
1706
|
onSuccess: () => {
|
|
1659
1707
|
e.emitter.emit("vf-toast-push", { label: s("Files deleted.") });
|
|
1660
1708
|
},
|
|
1661
1709
|
onError: (u) => {
|
|
1662
|
-
|
|
1710
|
+
o.value = s(u.message);
|
|
1663
1711
|
}
|
|
1664
1712
|
});
|
|
1665
1713
|
};
|
|
1666
|
-
return (u,
|
|
1714
|
+
return (u, d) => (n(), T(W, null, {
|
|
1667
1715
|
buttons: j(() => [
|
|
1668
1716
|
t("button", {
|
|
1669
1717
|
type: "button",
|
|
1670
|
-
onClick:
|
|
1718
|
+
onClick: i,
|
|
1671
1719
|
class: "vf-btn vf-btn-danger"
|
|
1672
|
-
},
|
|
1720
|
+
}, v(a(s)("Yes, Delete!")), 1),
|
|
1673
1721
|
t("button", {
|
|
1674
1722
|
type: "button",
|
|
1675
|
-
onClick:
|
|
1723
|
+
onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
|
|
1676
1724
|
class: "vf-btn vf-btn-secondary"
|
|
1677
|
-
},
|
|
1678
|
-
t("div",
|
|
1725
|
+
}, v(a(s)("Cancel")), 1),
|
|
1726
|
+
t("div", so, v(a(s)("This action cannot be undone.")), 1)
|
|
1679
1727
|
]),
|
|
1680
1728
|
default: j(() => [
|
|
1681
|
-
t("div",
|
|
1682
|
-
|
|
1683
|
-
t("div",
|
|
1684
|
-
t("h3",
|
|
1685
|
-
t("div",
|
|
1686
|
-
t("p",
|
|
1687
|
-
t("div",
|
|
1688
|
-
(n(!0),
|
|
1689
|
-
l.type === "dir" ? (n(),
|
|
1690
|
-
t("span",
|
|
1729
|
+
t("div", Ha, [
|
|
1730
|
+
Ra,
|
|
1731
|
+
t("div", qa, [
|
|
1732
|
+
t("h3", Ia, v(a(s)("Delete files")), 1),
|
|
1733
|
+
t("div", Pa, [
|
|
1734
|
+
t("p", Wa, v(a(s)("Are you sure you want to delete these files?")), 1),
|
|
1735
|
+
t("div", Ga, [
|
|
1736
|
+
(n(!0), m(U, null, I(r.value, (l) => (n(), m("p", Ya, [
|
|
1737
|
+
l.type === "dir" ? (n(), m("svg", Ka, Xa)) : (n(), m("svg", Qa, eo)),
|
|
1738
|
+
t("span", to, v(l.basename), 1)
|
|
1691
1739
|
]))), 256))
|
|
1692
1740
|
]),
|
|
1693
|
-
|
|
1741
|
+
o.value.length ? (n(), T(G, {
|
|
1694
1742
|
key: 0,
|
|
1695
|
-
onHidden:
|
|
1743
|
+
onHidden: d[0] || (d[0] = (l) => o.value = ""),
|
|
1696
1744
|
error: ""
|
|
1697
1745
|
}, {
|
|
1698
1746
|
default: j(() => [
|
|
1699
|
-
|
|
1747
|
+
V(v(o.value), 1)
|
|
1700
1748
|
]),
|
|
1701
1749
|
_: 1
|
|
1702
|
-
})) :
|
|
1750
|
+
})) : S("", !0)
|
|
1703
1751
|
])
|
|
1704
1752
|
])
|
|
1705
1753
|
])
|
|
@@ -1707,7 +1755,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1707
1755
|
_: 1
|
|
1708
1756
|
}));
|
|
1709
1757
|
}
|
|
1710
|
-
}),
|
|
1758
|
+
}), ro = { class: "sm:flex sm:items-start" }, no = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
1711
1759
|
/* @__PURE__ */ t("svg", {
|
|
1712
1760
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1713
1761
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1722,31 +1770,31 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1722
1770
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1723
1771
|
})
|
|
1724
1772
|
])
|
|
1725
|
-
], -1),
|
|
1773
|
+
], -1), lo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, io = {
|
|
1726
1774
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1727
1775
|
id: "modal-title"
|
|
1728
|
-
},
|
|
1776
|
+
}, co = { class: "mt-2" }, uo = { class: "text-sm text-gray-500" }, mo = {
|
|
1729
1777
|
name: "VFModalMessage"
|
|
1730
|
-
},
|
|
1778
|
+
}, vo = /* @__PURE__ */ Object.assign(mo, {
|
|
1731
1779
|
setup(p) {
|
|
1732
1780
|
const e = F("ServiceContainer"), { t: s } = e.i18n;
|
|
1733
|
-
return (r,
|
|
1781
|
+
return (r, o) => (n(), T(W, null, {
|
|
1734
1782
|
buttons: j(() => [
|
|
1735
1783
|
t("button", {
|
|
1736
1784
|
type: "button",
|
|
1737
|
-
onClick:
|
|
1785
|
+
onClick: o[0] || (o[0] = (i) => a(e).emitter.emit("vf-modal-close")),
|
|
1738
1786
|
class: "vf-btn vf-btn-secondary"
|
|
1739
|
-
},
|
|
1787
|
+
}, v(a(s)("Close")), 1)
|
|
1740
1788
|
]),
|
|
1741
1789
|
default: j(() => {
|
|
1742
|
-
var
|
|
1790
|
+
var i, u;
|
|
1743
1791
|
return [
|
|
1744
|
-
t("div",
|
|
1745
|
-
|
|
1746
|
-
t("div",
|
|
1747
|
-
t("h3",
|
|
1748
|
-
t("div",
|
|
1749
|
-
t("p",
|
|
1792
|
+
t("div", ro, [
|
|
1793
|
+
no,
|
|
1794
|
+
t("div", lo, [
|
|
1795
|
+
t("h3", io, v(((i = a(e).modal.data) == null ? void 0 : i.title) ?? "Title"), 1),
|
|
1796
|
+
t("div", co, [
|
|
1797
|
+
t("p", uo, v(((u = a(e).modal.data) == null ? void 0 : u.message) ?? "Message"), 1)
|
|
1750
1798
|
])
|
|
1751
1799
|
])
|
|
1752
1800
|
])
|
|
@@ -1755,7 +1803,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1755
1803
|
_: 1
|
|
1756
1804
|
}));
|
|
1757
1805
|
}
|
|
1758
|
-
}),
|
|
1806
|
+
}), po = { class: "sm:flex sm:items-start" }, ho = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
1759
1807
|
/* @__PURE__ */ t("svg", {
|
|
1760
1808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1761
1809
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1770,16 +1818,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1770
1818
|
d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"
|
|
1771
1819
|
})
|
|
1772
1820
|
])
|
|
1773
|
-
], -1),
|
|
1821
|
+
], -1), fo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, go = {
|
|
1774
1822
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1775
1823
|
id: "modal-title"
|
|
1776
|
-
},
|
|
1824
|
+
}, _o = { class: "mt-2" }, ko = { class: "text-sm text-gray-500" }, bo = ["placeholder"], yo = {
|
|
1777
1825
|
name: "VFModalNewFolder"
|
|
1778
|
-
},
|
|
1826
|
+
}, xo = /* @__PURE__ */ Object.assign(yo, {
|
|
1779
1827
|
setup(p) {
|
|
1780
1828
|
const e = F("ServiceContainer");
|
|
1781
1829
|
e.storage;
|
|
1782
|
-
const { t: s } = e.i18n, r =
|
|
1830
|
+
const { t: s } = e.i18n, r = b(""), o = b(""), i = () => {
|
|
1783
1831
|
r.value != "" && e.emitter.emit("vf-fetch", {
|
|
1784
1832
|
params: {
|
|
1785
1833
|
q: "newfolder",
|
|
@@ -1794,49 +1842,49 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1794
1842
|
e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
|
|
1795
1843
|
},
|
|
1796
1844
|
onError: (u) => {
|
|
1797
|
-
|
|
1845
|
+
o.value = s(u.message);
|
|
1798
1846
|
}
|
|
1799
1847
|
});
|
|
1800
1848
|
};
|
|
1801
|
-
return (u,
|
|
1849
|
+
return (u, d) => (n(), T(W, null, {
|
|
1802
1850
|
buttons: j(() => [
|
|
1803
1851
|
t("button", {
|
|
1804
1852
|
type: "button",
|
|
1805
|
-
onClick:
|
|
1853
|
+
onClick: i,
|
|
1806
1854
|
class: "vf-btn vf-btn-primary"
|
|
1807
|
-
},
|
|
1855
|
+
}, v(a(s)("Create")), 1),
|
|
1808
1856
|
t("button", {
|
|
1809
1857
|
type: "button",
|
|
1810
|
-
onClick:
|
|
1858
|
+
onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
|
|
1811
1859
|
class: "vf-btn vf-btn-secondary"
|
|
1812
|
-
},
|
|
1860
|
+
}, v(a(s)("Cancel")), 1)
|
|
1813
1861
|
]),
|
|
1814
1862
|
default: j(() => [
|
|
1815
|
-
t("div",
|
|
1816
|
-
|
|
1817
|
-
t("div",
|
|
1818
|
-
t("h3",
|
|
1819
|
-
t("div",
|
|
1820
|
-
t("p",
|
|
1863
|
+
t("div", po, [
|
|
1864
|
+
ho,
|
|
1865
|
+
t("div", fo, [
|
|
1866
|
+
t("h3", go, v(a(s)("New Folder")), 1),
|
|
1867
|
+
t("div", _o, [
|
|
1868
|
+
t("p", ko, v(a(s)("Create a new folder")), 1),
|
|
1821
1869
|
q(t("input", {
|
|
1822
|
-
"onUpdate:modelValue":
|
|
1823
|
-
onKeyup: Q(
|
|
1870
|
+
"onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
|
|
1871
|
+
onKeyup: Q(i, ["enter"]),
|
|
1824
1872
|
class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
1825
|
-
placeholder:
|
|
1873
|
+
placeholder: a(s)("Folder Name"),
|
|
1826
1874
|
type: "text"
|
|
1827
|
-
}, null, 40,
|
|
1875
|
+
}, null, 40, bo), [
|
|
1828
1876
|
[Z, r.value]
|
|
1829
1877
|
]),
|
|
1830
|
-
|
|
1878
|
+
o.value.length ? (n(), T(G, {
|
|
1831
1879
|
key: 0,
|
|
1832
|
-
onHidden:
|
|
1880
|
+
onHidden: d[1] || (d[1] = (l) => o.value = ""),
|
|
1833
1881
|
error: ""
|
|
1834
1882
|
}, {
|
|
1835
1883
|
default: j(() => [
|
|
1836
|
-
|
|
1884
|
+
V(v(o.value), 1)
|
|
1837
1885
|
]),
|
|
1838
1886
|
_: 1
|
|
1839
|
-
})) :
|
|
1887
|
+
})) : S("", !0)
|
|
1840
1888
|
])
|
|
1841
1889
|
])
|
|
1842
1890
|
])
|
|
@@ -1844,7 +1892,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1844
1892
|
_: 1
|
|
1845
1893
|
}));
|
|
1846
1894
|
}
|
|
1847
|
-
}),
|
|
1895
|
+
}), wo = { class: "sm:flex sm:items-start" }, $o = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
1848
1896
|
/* @__PURE__ */ t("svg", {
|
|
1849
1897
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1850
1898
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1859,16 +1907,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1859
1907
|
d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
1860
1908
|
})
|
|
1861
1909
|
])
|
|
1862
|
-
], -1),
|
|
1910
|
+
], -1), Co = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, So = {
|
|
1863
1911
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1864
1912
|
id: "modal-title"
|
|
1865
|
-
},
|
|
1913
|
+
}, Mo = { class: "mt-2" }, Eo = { class: "text-sm text-gray-500" }, Do = ["placeholder"], jo = {
|
|
1866
1914
|
name: "VFModalNewFile"
|
|
1867
|
-
},
|
|
1915
|
+
}, Ao = /* @__PURE__ */ Object.assign(jo, {
|
|
1868
1916
|
setup(p) {
|
|
1869
1917
|
const e = F("ServiceContainer");
|
|
1870
1918
|
e.storage;
|
|
1871
|
-
const { t: s } = e.i18n, r =
|
|
1919
|
+
const { t: s } = e.i18n, r = b(""), o = b(""), i = () => {
|
|
1872
1920
|
r.value != "" && e.emitter.emit("vf-fetch", {
|
|
1873
1921
|
params: {
|
|
1874
1922
|
q: "newfile",
|
|
@@ -1883,49 +1931,49 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1883
1931
|
e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
|
|
1884
1932
|
},
|
|
1885
1933
|
onError: (u) => {
|
|
1886
|
-
|
|
1934
|
+
o.value = s(u.message);
|
|
1887
1935
|
}
|
|
1888
1936
|
});
|
|
1889
1937
|
};
|
|
1890
|
-
return (u,
|
|
1938
|
+
return (u, d) => (n(), T(W, null, {
|
|
1891
1939
|
buttons: j(() => [
|
|
1892
1940
|
t("button", {
|
|
1893
1941
|
type: "button",
|
|
1894
|
-
onClick:
|
|
1942
|
+
onClick: i,
|
|
1895
1943
|
class: "vf-btn vf-btn-primary"
|
|
1896
|
-
},
|
|
1944
|
+
}, v(a(s)("Create")), 1),
|
|
1897
1945
|
t("button", {
|
|
1898
1946
|
type: "button",
|
|
1899
|
-
onClick:
|
|
1947
|
+
onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
|
|
1900
1948
|
class: "vf-btn vf-btn-secondary"
|
|
1901
|
-
},
|
|
1949
|
+
}, v(a(s)("Cancel")), 1)
|
|
1902
1950
|
]),
|
|
1903
1951
|
default: j(() => [
|
|
1904
|
-
t("div",
|
|
1905
|
-
|
|
1906
|
-
t("div",
|
|
1907
|
-
t("h3",
|
|
1908
|
-
t("div",
|
|
1909
|
-
t("p",
|
|
1952
|
+
t("div", wo, [
|
|
1953
|
+
$o,
|
|
1954
|
+
t("div", Co, [
|
|
1955
|
+
t("h3", So, v(a(s)("New File")), 1),
|
|
1956
|
+
t("div", Mo, [
|
|
1957
|
+
t("p", Eo, v(a(s)("Create a new file")), 1),
|
|
1910
1958
|
q(t("input", {
|
|
1911
|
-
"onUpdate:modelValue":
|
|
1912
|
-
onKeyup: Q(
|
|
1959
|
+
"onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
|
|
1960
|
+
onKeyup: Q(i, ["enter"]),
|
|
1913
1961
|
class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
1914
|
-
placeholder:
|
|
1962
|
+
placeholder: a(s)("File Name"),
|
|
1915
1963
|
type: "text"
|
|
1916
|
-
}, null, 40,
|
|
1964
|
+
}, null, 40, Do), [
|
|
1917
1965
|
[Z, r.value]
|
|
1918
1966
|
]),
|
|
1919
|
-
|
|
1967
|
+
o.value.length ? (n(), T(G, {
|
|
1920
1968
|
key: 0,
|
|
1921
|
-
onHidden:
|
|
1969
|
+
onHidden: d[1] || (d[1] = (l) => o.value = ""),
|
|
1922
1970
|
error: ""
|
|
1923
1971
|
}, {
|
|
1924
1972
|
default: j(() => [
|
|
1925
|
-
|
|
1973
|
+
V(v(o.value), 1)
|
|
1926
1974
|
]),
|
|
1927
1975
|
_: 1
|
|
1928
|
-
})) :
|
|
1976
|
+
})) : S("", !0)
|
|
1929
1977
|
])
|
|
1930
1978
|
])
|
|
1931
1979
|
])
|
|
@@ -1933,14 +1981,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1933
1981
|
_: 1
|
|
1934
1982
|
}));
|
|
1935
1983
|
}
|
|
1936
|
-
}),
|
|
1984
|
+
}), Lo = { class: "flex" }, To = ["aria-label"], Fo = { class: "ml-auto mb-2" }, Vo = {
|
|
1937
1985
|
key: 0,
|
|
1938
1986
|
class: "p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"
|
|
1939
|
-
},
|
|
1987
|
+
}, Oo = { key: 1 }, No = {
|
|
1940
1988
|
__name: "Text",
|
|
1941
1989
|
emits: ["success"],
|
|
1942
1990
|
setup(p, { emit: e }) {
|
|
1943
|
-
const s = e, r =
|
|
1991
|
+
const s = e, r = b(""), o = b(""), i = b(null), u = b(!1), d = b(""), l = b(!1), c = F("ServiceContainer"), { t: g } = c.i18n;
|
|
1944
1992
|
P(() => {
|
|
1945
1993
|
c.requester.send({
|
|
1946
1994
|
url: "",
|
|
@@ -1951,12 +1999,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1951
1999
|
r.value = y, s("success");
|
|
1952
2000
|
});
|
|
1953
2001
|
});
|
|
1954
|
-
const
|
|
1955
|
-
u.value = !u.value,
|
|
1956
|
-
|
|
2002
|
+
const _ = () => {
|
|
2003
|
+
u.value = !u.value, o.value = r.value, u.value == !0 && ce(() => {
|
|
2004
|
+
i.value.focus();
|
|
1957
2005
|
});
|
|
1958
2006
|
}, $ = () => {
|
|
1959
|
-
|
|
2007
|
+
d.value = "", l.value = !1, c.requester.send({
|
|
1960
2008
|
url: "",
|
|
1961
2009
|
method: "post",
|
|
1962
2010
|
params: {
|
|
@@ -1965,75 +2013,75 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1965
2013
|
path: c.modal.data.item.path
|
|
1966
2014
|
},
|
|
1967
2015
|
body: {
|
|
1968
|
-
content:
|
|
2016
|
+
content: o.value
|
|
1969
2017
|
},
|
|
1970
2018
|
responseType: "text"
|
|
1971
2019
|
}).then((y) => {
|
|
1972
|
-
|
|
2020
|
+
d.value = g("Updated."), r.value = y, s("success"), u.value = !u.value;
|
|
1973
2021
|
}).catch((y) => {
|
|
1974
|
-
|
|
2022
|
+
d.value = g(y.message), l.value = !0;
|
|
1975
2023
|
});
|
|
1976
2024
|
};
|
|
1977
|
-
return (y,
|
|
1978
|
-
t("div",
|
|
2025
|
+
return (y, M) => (n(), m(U, null, [
|
|
2026
|
+
t("div", Lo, [
|
|
1979
2027
|
t("div", {
|
|
1980
2028
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1981
2029
|
id: "modal-title",
|
|
1982
|
-
"aria-label":
|
|
2030
|
+
"aria-label": a(c).modal.data.item.path,
|
|
1983
2031
|
"data-microtip-position": "bottom-right",
|
|
1984
2032
|
role: "tooltip"
|
|
1985
|
-
},
|
|
1986
|
-
t("div",
|
|
1987
|
-
u.value ? (n(),
|
|
2033
|
+
}, v(a(c).modal.data.item.basename), 9, To),
|
|
2034
|
+
t("div", Fo, [
|
|
2035
|
+
u.value ? (n(), m("button", {
|
|
1988
2036
|
key: 0,
|
|
1989
2037
|
onClick: $,
|
|
1990
2038
|
class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
|
|
1991
|
-
},
|
|
1992
|
-
|
|
2039
|
+
}, v(a(g)("Save")), 1)) : S("", !0),
|
|
2040
|
+
a(c).features.includes(a(N).EDIT) ? (n(), m("button", {
|
|
1993
2041
|
key: 1,
|
|
1994
2042
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
1995
|
-
onClick:
|
|
1996
|
-
},
|
|
2043
|
+
onClick: M[0] || (M[0] = (C) => _())
|
|
2044
|
+
}, v(u.value ? a(g)("Cancel") : a(g)("Edit")), 1)) : S("", !0)
|
|
1997
2045
|
])
|
|
1998
2046
|
]),
|
|
1999
2047
|
t("div", null, [
|
|
2000
|
-
u.value ? (n(),
|
|
2048
|
+
u.value ? (n(), m("div", Oo, [
|
|
2001
2049
|
q(t("textarea", {
|
|
2002
2050
|
ref_key: "editInput",
|
|
2003
|
-
ref:
|
|
2004
|
-
"onUpdate:modelValue":
|
|
2051
|
+
ref: i,
|
|
2052
|
+
"onUpdate:modelValue": M[1] || (M[1] = (C) => o.value = C),
|
|
2005
2053
|
class: "w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",
|
|
2006
2054
|
name: "text",
|
|
2007
2055
|
id: "",
|
|
2008
2056
|
cols: "30",
|
|
2009
2057
|
rows: "10"
|
|
2010
2058
|
}, null, 512), [
|
|
2011
|
-
[Z,
|
|
2059
|
+
[Z, o.value]
|
|
2012
2060
|
])
|
|
2013
|
-
])) : (n(),
|
|
2014
|
-
|
|
2061
|
+
])) : (n(), m("pre", Vo, v(r.value), 1)),
|
|
2062
|
+
d.value.length ? (n(), T(G, {
|
|
2015
2063
|
key: 2,
|
|
2016
|
-
onHidden:
|
|
2064
|
+
onHidden: M[2] || (M[2] = (C) => d.value = ""),
|
|
2017
2065
|
error: l.value
|
|
2018
2066
|
}, {
|
|
2019
2067
|
default: j(() => [
|
|
2020
|
-
|
|
2068
|
+
V(v(d.value), 1)
|
|
2021
2069
|
]),
|
|
2022
2070
|
_: 1
|
|
2023
|
-
}, 8, ["error"])) :
|
|
2071
|
+
}, 8, ["error"])) : S("", !0)
|
|
2024
2072
|
])
|
|
2025
2073
|
], 64));
|
|
2026
2074
|
}
|
|
2027
|
-
},
|
|
2075
|
+
}, zo = { class: "flex" }, Bo = ["aria-label"], Uo = { class: "ml-auto mb-2" }, Ho = { class: "w-full flex justify-center" }, Ro = ["src"], qo = {
|
|
2028
2076
|
__name: "Image",
|
|
2029
2077
|
emits: ["success"],
|
|
2030
2078
|
setup(p, { emit: e }) {
|
|
2031
|
-
const s = e, r = F("ServiceContainer"), { t:
|
|
2032
|
-
|
|
2079
|
+
const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = b(null), u = b(null), d = b(!1), l = b(""), c = b(!1), g = () => {
|
|
2080
|
+
d.value = !d.value, d.value ? u.value = new ze(i.value, {
|
|
2033
2081
|
crop($) {
|
|
2034
2082
|
}
|
|
2035
2083
|
}) : u.value.destroy();
|
|
2036
|
-
},
|
|
2084
|
+
}, _ = () => {
|
|
2037
2085
|
u.value.getCroppedCanvas({
|
|
2038
2086
|
width: 795,
|
|
2039
2087
|
height: 341
|
|
@@ -2050,181 +2098,181 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2050
2098
|
path: r.modal.data.item.path
|
|
2051
2099
|
},
|
|
2052
2100
|
body: y
|
|
2053
|
-
}).then((
|
|
2054
|
-
l.value =
|
|
2055
|
-
}).catch((
|
|
2056
|
-
l.value =
|
|
2101
|
+
}).then((M) => {
|
|
2102
|
+
l.value = o("Updated."), i.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), g(), s("success");
|
|
2103
|
+
}).catch((M) => {
|
|
2104
|
+
l.value = o(M.message), c.value = !0;
|
|
2057
2105
|
});
|
|
2058
2106
|
}
|
|
2059
2107
|
);
|
|
2060
2108
|
};
|
|
2061
2109
|
return P(() => {
|
|
2062
2110
|
s("success");
|
|
2063
|
-
}), ($, y) => (n(),
|
|
2064
|
-
t("div",
|
|
2111
|
+
}), ($, y) => (n(), m(U, null, [
|
|
2112
|
+
t("div", zo, [
|
|
2065
2113
|
t("h3", {
|
|
2066
2114
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2067
2115
|
id: "modal-title",
|
|
2068
|
-
"aria-label":
|
|
2116
|
+
"aria-label": a(r).modal.data.item.path,
|
|
2069
2117
|
"data-microtip-position": "bottom-right",
|
|
2070
2118
|
role: "tooltip"
|
|
2071
|
-
},
|
|
2072
|
-
t("div",
|
|
2073
|
-
|
|
2119
|
+
}, v(a(r).modal.data.item.basename), 9, Bo),
|
|
2120
|
+
t("div", Uo, [
|
|
2121
|
+
d.value ? (n(), m("button", {
|
|
2074
2122
|
key: 0,
|
|
2075
|
-
onClick:
|
|
2123
|
+
onClick: _,
|
|
2076
2124
|
class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
|
|
2077
|
-
},
|
|
2078
|
-
|
|
2125
|
+
}, v(a(o)("Crop")), 1)) : S("", !0),
|
|
2126
|
+
a(r).features.includes(a(N).EDIT) ? (n(), m("button", {
|
|
2079
2127
|
key: 1,
|
|
2080
2128
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
2081
|
-
onClick: y[0] || (y[0] = (
|
|
2082
|
-
},
|
|
2129
|
+
onClick: y[0] || (y[0] = (M) => g())
|
|
2130
|
+
}, v(d.value ? a(o)("Cancel") : a(o)("Edit")), 1)) : S("", !0)
|
|
2083
2131
|
])
|
|
2084
2132
|
]),
|
|
2085
|
-
t("div",
|
|
2133
|
+
t("div", Ho, [
|
|
2086
2134
|
t("img", {
|
|
2087
2135
|
ref_key: "image",
|
|
2088
|
-
ref:
|
|
2136
|
+
ref: i,
|
|
2089
2137
|
class: "max-w-[50vh] max-h-[50vh]",
|
|
2090
|
-
src:
|
|
2138
|
+
src: a(r).requester.getPreviewUrl(a(r).modal.data.adapter, a(r).modal.data.item),
|
|
2091
2139
|
alt: ""
|
|
2092
|
-
}, null, 8,
|
|
2140
|
+
}, null, 8, Ro)
|
|
2093
2141
|
]),
|
|
2094
|
-
l.value.length ? (n(),
|
|
2142
|
+
l.value.length ? (n(), T(G, {
|
|
2095
2143
|
key: 0,
|
|
2096
|
-
onHidden: y[1] || (y[1] = (
|
|
2144
|
+
onHidden: y[1] || (y[1] = (M) => l.value = ""),
|
|
2097
2145
|
error: c.value
|
|
2098
2146
|
}, {
|
|
2099
2147
|
default: j(() => [
|
|
2100
|
-
|
|
2148
|
+
V(v(l.value), 1)
|
|
2101
2149
|
]),
|
|
2102
2150
|
_: 1
|
|
2103
|
-
}, 8, ["error"])) :
|
|
2151
|
+
}, 8, ["error"])) : S("", !0)
|
|
2104
2152
|
], 64));
|
|
2105
2153
|
}
|
|
2106
|
-
},
|
|
2154
|
+
}, Io = { class: "flex" }, Po = ["aria-label"], Wo = /* @__PURE__ */ t("div", null, null, -1), Go = {
|
|
2107
2155
|
__name: "Default",
|
|
2108
2156
|
emits: ["success"],
|
|
2109
2157
|
setup(p, { emit: e }) {
|
|
2110
2158
|
const s = F("ServiceContainer"), r = e;
|
|
2111
2159
|
return P(() => {
|
|
2112
2160
|
r("success");
|
|
2113
|
-
}), (
|
|
2114
|
-
t("div",
|
|
2161
|
+
}), (o, i) => (n(), m(U, null, [
|
|
2162
|
+
t("div", Io, [
|
|
2115
2163
|
t("h3", {
|
|
2116
2164
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2117
2165
|
id: "modal-title",
|
|
2118
|
-
"aria-label":
|
|
2166
|
+
"aria-label": a(s).modal.data.item.path,
|
|
2119
2167
|
"data-microtip-position": "bottom-right",
|
|
2120
2168
|
role: "tooltip"
|
|
2121
|
-
},
|
|
2169
|
+
}, v(a(s).modal.data.item.basename), 9, Po)
|
|
2122
2170
|
]),
|
|
2123
|
-
|
|
2171
|
+
Wo
|
|
2124
2172
|
], 64));
|
|
2125
2173
|
}
|
|
2126
|
-
},
|
|
2174
|
+
}, Yo = ["aria-label"], Ko = {
|
|
2127
2175
|
class: "w-full",
|
|
2128
2176
|
preload: "",
|
|
2129
2177
|
controls: ""
|
|
2130
|
-
},
|
|
2178
|
+
}, Jo = ["src"], Xo = {
|
|
2131
2179
|
__name: "Video",
|
|
2132
2180
|
emits: ["success"],
|
|
2133
2181
|
setup(p, { emit: e }) {
|
|
2134
|
-
const s = F("ServiceContainer"), r = e,
|
|
2182
|
+
const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
|
|
2135
2183
|
return P(() => {
|
|
2136
2184
|
r("success");
|
|
2137
|
-
}), (
|
|
2185
|
+
}), (i, u) => (n(), m("div", null, [
|
|
2138
2186
|
t("h3", {
|
|
2139
2187
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2140
2188
|
id: "modal-title",
|
|
2141
|
-
"aria-label":
|
|
2189
|
+
"aria-label": a(s).modal.data.item.path,
|
|
2142
2190
|
"data-microtip-position": "bottom-right",
|
|
2143
2191
|
role: "tooltip"
|
|
2144
|
-
},
|
|
2192
|
+
}, v(a(s).modal.data.item.basename), 9, Yo),
|
|
2145
2193
|
t("div", null, [
|
|
2146
|
-
t("video",
|
|
2194
|
+
t("video", Ko, [
|
|
2147
2195
|
t("source", {
|
|
2148
|
-
src:
|
|
2196
|
+
src: o(),
|
|
2149
2197
|
type: "video/mp4"
|
|
2150
|
-
}, null, 8,
|
|
2151
|
-
|
|
2198
|
+
}, null, 8, Jo),
|
|
2199
|
+
V(" Your browser does not support the video tag. ")
|
|
2152
2200
|
])
|
|
2153
2201
|
])
|
|
2154
2202
|
]));
|
|
2155
2203
|
}
|
|
2156
|
-
},
|
|
2204
|
+
}, Qo = ["aria-label"], Zo = {
|
|
2157
2205
|
class: "w-full",
|
|
2158
2206
|
controls: ""
|
|
2159
|
-
},
|
|
2207
|
+
}, er = ["src"], tr = {
|
|
2160
2208
|
__name: "Audio",
|
|
2161
2209
|
emits: ["success"],
|
|
2162
2210
|
setup(p, { emit: e }) {
|
|
2163
|
-
const s = e, r = F("ServiceContainer"),
|
|
2211
|
+
const s = e, r = F("ServiceContainer"), o = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item);
|
|
2164
2212
|
return P(() => {
|
|
2165
2213
|
s("success");
|
|
2166
|
-
}), (
|
|
2214
|
+
}), (i, u) => (n(), m(U, null, [
|
|
2167
2215
|
t("h3", {
|
|
2168
2216
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2169
2217
|
id: "modal-title",
|
|
2170
|
-
"aria-label":
|
|
2218
|
+
"aria-label": a(r).modal.data.item.path,
|
|
2171
2219
|
"data-microtip-position": "bottom-right",
|
|
2172
2220
|
role: "tooltip"
|
|
2173
|
-
},
|
|
2221
|
+
}, v(a(r).modal.data.item.basename), 9, Qo),
|
|
2174
2222
|
t("div", null, [
|
|
2175
|
-
t("audio",
|
|
2223
|
+
t("audio", Zo, [
|
|
2176
2224
|
t("source", {
|
|
2177
|
-
src:
|
|
2225
|
+
src: o(),
|
|
2178
2226
|
type: "audio/mpeg"
|
|
2179
|
-
}, null, 8,
|
|
2180
|
-
|
|
2227
|
+
}, null, 8, er),
|
|
2228
|
+
V(" Your browser does not support the audio element. ")
|
|
2181
2229
|
])
|
|
2182
2230
|
])
|
|
2183
2231
|
], 64));
|
|
2184
2232
|
}
|
|
2185
|
-
},
|
|
2186
|
-
/* @__PURE__ */
|
|
2233
|
+
}, sr = ["aria-label"], ar = ["data"], or = ["src"], rr = /* @__PURE__ */ t("p", null, [
|
|
2234
|
+
/* @__PURE__ */ V(" Your browser does not support PDFs. "),
|
|
2187
2235
|
/* @__PURE__ */ t("a", { href: "https://example.com/test.pdf" }, "Download the PDF"),
|
|
2188
|
-
/* @__PURE__ */
|
|
2189
|
-
], -1),
|
|
2190
|
-
|
|
2191
|
-
],
|
|
2236
|
+
/* @__PURE__ */ V(" . ")
|
|
2237
|
+
], -1), nr = [
|
|
2238
|
+
rr
|
|
2239
|
+
], lr = {
|
|
2192
2240
|
__name: "Pdf",
|
|
2193
2241
|
emits: ["success"],
|
|
2194
2242
|
setup(p, { emit: e }) {
|
|
2195
|
-
const s = F("ServiceContainer"), r = e,
|
|
2243
|
+
const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
|
|
2196
2244
|
return P(() => {
|
|
2197
2245
|
r("success");
|
|
2198
|
-
}), (
|
|
2246
|
+
}), (i, u) => (n(), m(U, null, [
|
|
2199
2247
|
t("h3", {
|
|
2200
2248
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2201
2249
|
id: "modal-title",
|
|
2202
|
-
"aria-label":
|
|
2250
|
+
"aria-label": a(s).modal.data.item.path,
|
|
2203
2251
|
"data-microtip-position": "bottom-right",
|
|
2204
2252
|
role: "tooltip"
|
|
2205
|
-
},
|
|
2253
|
+
}, v(a(s).modal.data.item.basename), 9, sr),
|
|
2206
2254
|
t("div", null, [
|
|
2207
2255
|
t("object", {
|
|
2208
2256
|
class: "h-[60vh]",
|
|
2209
|
-
data:
|
|
2257
|
+
data: o(),
|
|
2210
2258
|
type: "application/pdf",
|
|
2211
2259
|
width: "100%",
|
|
2212
2260
|
height: "100%"
|
|
2213
2261
|
}, [
|
|
2214
2262
|
t("iframe", {
|
|
2215
2263
|
class: "border-0",
|
|
2216
|
-
src:
|
|
2264
|
+
src: o(),
|
|
2217
2265
|
width: "100%",
|
|
2218
2266
|
height: "100%"
|
|
2219
|
-
},
|
|
2220
|
-
], 8,
|
|
2267
|
+
}, nr, 8, or)
|
|
2268
|
+
], 8, ar)
|
|
2221
2269
|
])
|
|
2222
2270
|
], 64));
|
|
2223
2271
|
}
|
|
2224
|
-
},
|
|
2272
|
+
}, ir = { class: "sm:flex sm:items-start" }, dr = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, cr = { key: 0 }, ur = { class: "text-gray-700 dark:text-gray-200 text-sm" }, mr = {
|
|
2225
2273
|
key: 0,
|
|
2226
2274
|
class: "flex leading-5"
|
|
2227
|
-
},
|
|
2275
|
+
}, vr = /* @__PURE__ */ t("svg", {
|
|
2228
2276
|
class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
|
|
2229
2277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2230
2278
|
fill: "none",
|
|
@@ -2243,79 +2291,79 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2243
2291
|
fill: "currentColor",
|
|
2244
2292
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
2245
2293
|
})
|
|
2246
|
-
], -1),
|
|
2294
|
+
], -1), pr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, hr = { class: "font-bold" }, fr = { class: "font-bold pl-2" }, gr = {
|
|
2247
2295
|
key: 0,
|
|
2248
|
-
class: "text-xs"
|
|
2249
|
-
},
|
|
2296
|
+
class: "text-xs text-gray-600 dark:text-gray-400"
|
|
2297
|
+
}, _r = ["download", "href"], kr = {
|
|
2250
2298
|
name: "VFModalPreview"
|
|
2251
|
-
},
|
|
2299
|
+
}, br = /* @__PURE__ */ Object.assign(kr, {
|
|
2252
2300
|
setup(p) {
|
|
2253
|
-
const e = F("ServiceContainer"), { t: s } = e.i18n, r =
|
|
2254
|
-
return
|
|
2301
|
+
const e = F("ServiceContainer"), { t: s } = e.i18n, r = b(!1), o = (u) => (e.modal.data.item.mime_type ?? "").startsWith(u), i = e.features.includes(N.PREVIEW);
|
|
2302
|
+
return i || (r.value = !0), (u, d) => (n(), T(W, null, {
|
|
2255
2303
|
buttons: j(() => [
|
|
2256
2304
|
t("button", {
|
|
2257
2305
|
type: "button",
|
|
2258
|
-
onClick:
|
|
2306
|
+
onClick: d[6] || (d[6] = (l) => a(e).emitter.emit("vf-modal-close")),
|
|
2259
2307
|
class: "vf-btn vf-btn-secondary"
|
|
2260
|
-
},
|
|
2261
|
-
|
|
2308
|
+
}, v(a(s)("Close")), 1),
|
|
2309
|
+
a(e).features.includes(a(N).DOWNLOAD) ? (n(), m("a", {
|
|
2262
2310
|
key: 0,
|
|
2263
2311
|
target: "_blank",
|
|
2264
2312
|
class: "vf-btn vf-btn-primary",
|
|
2265
|
-
download:
|
|
2266
|
-
href:
|
|
2267
|
-
},
|
|
2313
|
+
download: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item),
|
|
2314
|
+
href: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item)
|
|
2315
|
+
}, v(a(s)("Download")), 9, _r)) : S("", !0)
|
|
2268
2316
|
]),
|
|
2269
2317
|
default: j(() => [
|
|
2270
|
-
t("div",
|
|
2271
|
-
t("div",
|
|
2272
|
-
|
|
2273
|
-
|
|
2318
|
+
t("div", ir, [
|
|
2319
|
+
t("div", dr, [
|
|
2320
|
+
a(i) ? (n(), m("div", cr, [
|
|
2321
|
+
o("text") ? (n(), T(No, {
|
|
2274
2322
|
key: 0,
|
|
2275
|
-
onSuccess:
|
|
2276
|
-
})) :
|
|
2323
|
+
onSuccess: d[0] || (d[0] = (l) => r.value = !0)
|
|
2324
|
+
})) : o("image") ? (n(), T(qo, {
|
|
2277
2325
|
key: 1,
|
|
2278
|
-
onSuccess:
|
|
2279
|
-
})) :
|
|
2326
|
+
onSuccess: d[1] || (d[1] = (l) => r.value = !0)
|
|
2327
|
+
})) : o("video") ? (n(), T(Xo, {
|
|
2280
2328
|
key: 2,
|
|
2281
|
-
onSuccess:
|
|
2282
|
-
})) :
|
|
2329
|
+
onSuccess: d[2] || (d[2] = (l) => r.value = !0)
|
|
2330
|
+
})) : o("audio") ? (n(), T(tr, {
|
|
2283
2331
|
key: 3,
|
|
2284
|
-
onSuccess:
|
|
2285
|
-
})) :
|
|
2332
|
+
onSuccess: d[3] || (d[3] = (l) => r.value = !0)
|
|
2333
|
+
})) : o("application/pdf") ? (n(), T(lr, {
|
|
2286
2334
|
key: 4,
|
|
2287
|
-
onSuccess:
|
|
2288
|
-
})) : (n(),
|
|
2335
|
+
onSuccess: d[4] || (d[4] = (l) => r.value = !0)
|
|
2336
|
+
})) : (n(), T(Go, {
|
|
2289
2337
|
key: 5,
|
|
2290
|
-
onSuccess:
|
|
2338
|
+
onSuccess: d[5] || (d[5] = (l) => r.value = !0)
|
|
2291
2339
|
}))
|
|
2292
|
-
])) :
|
|
2293
|
-
t("div",
|
|
2294
|
-
r.value === !1 ? (n(),
|
|
2295
|
-
|
|
2296
|
-
t("span", null,
|
|
2297
|
-
])) :
|
|
2340
|
+
])) : S("", !0),
|
|
2341
|
+
t("div", ur, [
|
|
2342
|
+
r.value === !1 ? (n(), m("div", mr, [
|
|
2343
|
+
vr,
|
|
2344
|
+
t("span", null, v(a(s)("Loading")), 1)
|
|
2345
|
+
])) : S("", !0)
|
|
2298
2346
|
])
|
|
2299
2347
|
])
|
|
2300
2348
|
]),
|
|
2301
|
-
t("div",
|
|
2349
|
+
t("div", pr, [
|
|
2302
2350
|
t("div", null, [
|
|
2303
|
-
t("span",
|
|
2304
|
-
|
|
2351
|
+
t("span", hr, v(a(s)("File Size")) + ": ", 1),
|
|
2352
|
+
V(v(a(e).filesize(a(e).modal.data.item.file_size)), 1)
|
|
2305
2353
|
]),
|
|
2306
2354
|
t("div", null, [
|
|
2307
|
-
t("span",
|
|
2308
|
-
|
|
2355
|
+
t("span", fr, v(a(s)("Last Modified")) + ": ", 1),
|
|
2356
|
+
V(" " + v(a(we)(a(e).modal.data.item.last_modified)), 1)
|
|
2309
2357
|
])
|
|
2310
2358
|
]),
|
|
2311
|
-
|
|
2312
|
-
t("span", null,
|
|
2313
|
-
])) :
|
|
2359
|
+
a(e).features.includes(a(N).DOWNLOAD) ? (n(), m("div", gr, [
|
|
2360
|
+
t("span", null, v(a(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1)
|
|
2361
|
+
])) : S("", !0)
|
|
2314
2362
|
]),
|
|
2315
2363
|
_: 1
|
|
2316
2364
|
}));
|
|
2317
2365
|
}
|
|
2318
|
-
}),
|
|
2366
|
+
}), yr = { class: "sm:flex sm:items-start" }, xr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2319
2367
|
/* @__PURE__ */ t("svg", {
|
|
2320
2368
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2321
2369
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2330,10 +2378,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2330
2378
|
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
|
2331
2379
|
})
|
|
2332
2380
|
])
|
|
2333
|
-
], -1),
|
|
2381
|
+
], -1), wr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = {
|
|
2334
2382
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2335
2383
|
id: "modal-title"
|
|
2336
|
-
},
|
|
2384
|
+
}, Cr = { class: "mt-2" }, Sr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mr = {
|
|
2337
2385
|
key: 0,
|
|
2338
2386
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2339
2387
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2341,13 +2389,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2341
2389
|
viewBox: "0 0 24 24",
|
|
2342
2390
|
stroke: "currentColor",
|
|
2343
2391
|
"stroke-width": "1"
|
|
2344
|
-
},
|
|
2392
|
+
}, Er = /* @__PURE__ */ t("path", {
|
|
2345
2393
|
"stroke-linecap": "round",
|
|
2346
2394
|
"stroke-linejoin": "round",
|
|
2347
2395
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2348
|
-
}, null, -1),
|
|
2349
|
-
|
|
2350
|
-
],
|
|
2396
|
+
}, null, -1), Dr = [
|
|
2397
|
+
Er
|
|
2398
|
+
], jr = {
|
|
2351
2399
|
key: 1,
|
|
2352
2400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2353
2401
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2355,20 +2403,20 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2355
2403
|
viewBox: "0 0 24 24",
|
|
2356
2404
|
stroke: "currentColor",
|
|
2357
2405
|
"stroke-width": "1"
|
|
2358
|
-
},
|
|
2406
|
+
}, Ar = /* @__PURE__ */ t("path", {
|
|
2359
2407
|
"stroke-linecap": "round",
|
|
2360
2408
|
"stroke-linejoin": "round",
|
|
2361
2409
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
2362
|
-
}, null, -1),
|
|
2363
|
-
|
|
2364
|
-
], Tr = { class: "ml-1.5" },
|
|
2410
|
+
}, null, -1), Lr = [
|
|
2411
|
+
Ar
|
|
2412
|
+
], Tr = { class: "ml-1.5" }, Fr = {
|
|
2365
2413
|
name: "VFModalRename"
|
|
2366
|
-
},
|
|
2414
|
+
}, Vr = /* @__PURE__ */ Object.assign(Fr, {
|
|
2367
2415
|
setup(p) {
|
|
2368
2416
|
const e = F("ServiceContainer");
|
|
2369
2417
|
e.storage;
|
|
2370
|
-
const { t: s } = e.i18n, r =
|
|
2371
|
-
|
|
2418
|
+
const { t: s } = e.i18n, r = b(e.modal.data.items[0]), o = b(e.modal.data.items[0].basename), i = b(""), u = () => {
|
|
2419
|
+
o.value != "" && e.emitter.emit("vf-fetch", {
|
|
2372
2420
|
params: {
|
|
2373
2421
|
q: "rename",
|
|
2374
2422
|
m: "post",
|
|
@@ -2377,58 +2425,58 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2377
2425
|
},
|
|
2378
2426
|
body: {
|
|
2379
2427
|
item: r.value.path,
|
|
2380
|
-
name:
|
|
2428
|
+
name: o.value
|
|
2381
2429
|
},
|
|
2382
2430
|
onSuccess: () => {
|
|
2383
|
-
e.emitter.emit("vf-toast-push", { label: s("%s is renamed.",
|
|
2431
|
+
e.emitter.emit("vf-toast-push", { label: s("%s is renamed.", o.value) });
|
|
2384
2432
|
},
|
|
2385
|
-
onError: (
|
|
2386
|
-
|
|
2433
|
+
onError: (d) => {
|
|
2434
|
+
i.value = s(d.message);
|
|
2387
2435
|
}
|
|
2388
2436
|
});
|
|
2389
2437
|
};
|
|
2390
|
-
return (
|
|
2438
|
+
return (d, l) => (n(), T(W, null, {
|
|
2391
2439
|
buttons: j(() => [
|
|
2392
2440
|
t("button", {
|
|
2393
2441
|
type: "button",
|
|
2394
2442
|
onClick: u,
|
|
2395
2443
|
class: "vf-btn vf-btn-primary"
|
|
2396
|
-
},
|
|
2444
|
+
}, v(a(s)("Rename")), 1),
|
|
2397
2445
|
t("button", {
|
|
2398
2446
|
type: "button",
|
|
2399
|
-
onClick: l[2] || (l[2] = (c) =>
|
|
2447
|
+
onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
|
|
2400
2448
|
class: "vf-btn vf-btn-secondary"
|
|
2401
|
-
},
|
|
2449
|
+
}, v(a(s)("Cancel")), 1)
|
|
2402
2450
|
]),
|
|
2403
2451
|
default: j(() => [
|
|
2404
|
-
t("div",
|
|
2405
|
-
|
|
2406
|
-
t("div",
|
|
2407
|
-
t("h3",
|
|
2408
|
-
t("div",
|
|
2409
|
-
t("p",
|
|
2410
|
-
r.value.type === "dir" ? (n(),
|
|
2411
|
-
t("span", Tr,
|
|
2452
|
+
t("div", yr, [
|
|
2453
|
+
xr,
|
|
2454
|
+
t("div", wr, [
|
|
2455
|
+
t("h3", $r, v(a(s)("Rename")), 1),
|
|
2456
|
+
t("div", Cr, [
|
|
2457
|
+
t("p", Sr, [
|
|
2458
|
+
r.value.type === "dir" ? (n(), m("svg", Mr, Dr)) : (n(), m("svg", jr, Lr)),
|
|
2459
|
+
t("span", Tr, v(r.value.basename), 1)
|
|
2412
2460
|
]),
|
|
2413
2461
|
q(t("input", {
|
|
2414
|
-
"onUpdate:modelValue": l[0] || (l[0] = (c) =>
|
|
2462
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
|
|
2415
2463
|
onKeyup: Q(u, ["enter"]),
|
|
2416
2464
|
class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
2417
2465
|
placeholder: "Name",
|
|
2418
2466
|
type: "text"
|
|
2419
2467
|
}, null, 544), [
|
|
2420
|
-
[Z,
|
|
2468
|
+
[Z, o.value]
|
|
2421
2469
|
]),
|
|
2422
|
-
|
|
2470
|
+
i.value.length ? (n(), T(G, {
|
|
2423
2471
|
key: 0,
|
|
2424
|
-
onHidden: l[1] || (l[1] = (c) =>
|
|
2472
|
+
onHidden: l[1] || (l[1] = (c) => i.value = ""),
|
|
2425
2473
|
error: ""
|
|
2426
2474
|
}, {
|
|
2427
2475
|
default: j(() => [
|
|
2428
|
-
|
|
2476
|
+
V(v(i.value), 1)
|
|
2429
2477
|
]),
|
|
2430
2478
|
_: 1
|
|
2431
|
-
})) :
|
|
2479
|
+
})) : S("", !0)
|
|
2432
2480
|
])
|
|
2433
2481
|
])
|
|
2434
2482
|
])
|
|
@@ -2436,7 +2484,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2436
2484
|
_: 1
|
|
2437
2485
|
}));
|
|
2438
2486
|
}
|
|
2439
|
-
}),
|
|
2487
|
+
}), Or = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2440
2488
|
/* @__PURE__ */ t("svg", {
|
|
2441
2489
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2442
2490
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2451,19 +2499,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2451
2499
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
2452
2500
|
})
|
|
2453
2501
|
])
|
|
2454
|
-
], -1), zr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" },
|
|
2502
|
+
], -1), zr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Br = {
|
|
2455
2503
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2456
2504
|
id: "modal-title"
|
|
2457
2505
|
}, Ur = { class: "mt-2" }, Hr = {
|
|
2458
2506
|
key: 0,
|
|
2459
2507
|
class: "pointer-events-none"
|
|
2460
|
-
},
|
|
2508
|
+
}, Rr = {
|
|
2461
2509
|
key: 1,
|
|
2462
2510
|
class: "pointer-events-none"
|
|
2463
|
-
},
|
|
2511
|
+
}, qr = ["disabled"], Ir = ["disabled"], Pr = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Wr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Yr = { class: "ml-1 w-full h-fit" }, Kr = { class: "text-left hidden md:block" }, Jr = { class: "text-left md:hidden" }, Xr = {
|
|
2464
2512
|
key: 0,
|
|
2465
2513
|
class: "ml-auto"
|
|
2466
|
-
},
|
|
2514
|
+
}, Qr = ["title", "disabled", "onClick"], Zr = /* @__PURE__ */ t("svg", {
|
|
2467
2515
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2468
2516
|
fill: "none",
|
|
2469
2517
|
viewBox: "0 0 24 24",
|
|
@@ -2476,28 +2524,28 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2476
2524
|
"stroke-linejoin": "round",
|
|
2477
2525
|
d: "M6 18L18 6M6 6l12 12"
|
|
2478
2526
|
})
|
|
2479
|
-
], -1),
|
|
2480
|
-
|
|
2481
|
-
],
|
|
2527
|
+
], -1), en = [
|
|
2528
|
+
Zr
|
|
2529
|
+
], tn = {
|
|
2482
2530
|
key: 0,
|
|
2483
2531
|
class: "py-2"
|
|
2484
|
-
},
|
|
2532
|
+
}, sn = ["disabled"], an = {
|
|
2485
2533
|
name: "VFModalUpload"
|
|
2486
|
-
}, on = /* @__PURE__ */ Object.assign(
|
|
2534
|
+
}, on = /* @__PURE__ */ Object.assign(an, {
|
|
2487
2535
|
setup(p) {
|
|
2488
|
-
const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"),
|
|
2536
|
+
const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), o = {
|
|
2489
2537
|
PENDING: 0,
|
|
2490
2538
|
CANCELED: 1,
|
|
2491
2539
|
UPLOADING: 2,
|
|
2492
2540
|
ERROR: 3,
|
|
2493
2541
|
DONE: 10
|
|
2494
|
-
},
|
|
2495
|
-
let
|
|
2542
|
+
}, i = b({ QUEUE_ENTRY_STATUS: o }), u = b(null), d = b(null), l = b(null), c = b(null), g = b(null), _ = b(null), $ = b([]), y = b(""), M = b(!1), C = b(!1);
|
|
2543
|
+
let k;
|
|
2496
2544
|
function f(h) {
|
|
2497
2545
|
return $.value.findIndex((A) => A.id === h);
|
|
2498
2546
|
}
|
|
2499
|
-
function
|
|
2500
|
-
A = A ?? (h.webkitRelativePath || h.name),
|
|
2547
|
+
function O(h, A = null) {
|
|
2548
|
+
A = A ?? (h.webkitRelativePath || h.name), k.addFile({
|
|
2501
2549
|
name: A,
|
|
2502
2550
|
type: h.type,
|
|
2503
2551
|
data: h,
|
|
@@ -2506,57 +2554,57 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2506
2554
|
}
|
|
2507
2555
|
function R(h) {
|
|
2508
2556
|
switch (h.status) {
|
|
2509
|
-
case
|
|
2557
|
+
case o.DONE:
|
|
2510
2558
|
return "text-green-600";
|
|
2511
|
-
case
|
|
2559
|
+
case o.ERROR:
|
|
2512
2560
|
return "text-red-600";
|
|
2513
|
-
case
|
|
2561
|
+
case o.CANCELED:
|
|
2514
2562
|
return "text-red-600";
|
|
2515
|
-
case
|
|
2563
|
+
case o.PENDING:
|
|
2516
2564
|
default:
|
|
2517
2565
|
return "";
|
|
2518
2566
|
}
|
|
2519
2567
|
}
|
|
2520
2568
|
const K = (h) => {
|
|
2521
2569
|
switch (h.status) {
|
|
2522
|
-
case
|
|
2570
|
+
case o.DONE:
|
|
2523
2571
|
return "✓";
|
|
2524
|
-
case
|
|
2525
|
-
case
|
|
2572
|
+
case o.ERROR:
|
|
2573
|
+
case o.CANCELED:
|
|
2526
2574
|
return "!";
|
|
2527
|
-
case
|
|
2575
|
+
case o.PENDING:
|
|
2528
2576
|
default:
|
|
2529
2577
|
return "...";
|
|
2530
2578
|
}
|
|
2531
2579
|
};
|
|
2532
|
-
function
|
|
2580
|
+
function te() {
|
|
2533
2581
|
c.value.click();
|
|
2534
2582
|
}
|
|
2535
|
-
function
|
|
2536
|
-
if (!
|
|
2537
|
-
if (!$.value.filter((h) => h.status !==
|
|
2583
|
+
function se() {
|
|
2584
|
+
if (!M.value) {
|
|
2585
|
+
if (!$.value.filter((h) => h.status !== o.DONE).length) {
|
|
2538
2586
|
y.value = s("Please select file to upload first.");
|
|
2539
2587
|
return;
|
|
2540
2588
|
}
|
|
2541
|
-
y.value = "",
|
|
2589
|
+
y.value = "", k.retryAll(), k.upload();
|
|
2542
2590
|
}
|
|
2543
2591
|
}
|
|
2544
|
-
function
|
|
2545
|
-
|
|
2546
|
-
h.status !==
|
|
2547
|
-
}),
|
|
2592
|
+
function ae() {
|
|
2593
|
+
k.cancelAll({ reason: "user" }), $.value.forEach((h) => {
|
|
2594
|
+
h.status !== o.DONE && (h.status = o.CANCELED, h.statusName = s("Canceled"));
|
|
2595
|
+
}), M.value = !1;
|
|
2548
2596
|
}
|
|
2549
2597
|
function oe(h) {
|
|
2550
|
-
|
|
2598
|
+
M.value || (k.removeFile(h.id, "removed-by-user"), $.value.splice(f(h.id), 1));
|
|
2551
2599
|
}
|
|
2552
|
-
function
|
|
2553
|
-
if (!
|
|
2554
|
-
if (
|
|
2600
|
+
function w(h) {
|
|
2601
|
+
if (!M.value) {
|
|
2602
|
+
if (k.cancelAll({ reason: "user" }), h) {
|
|
2555
2603
|
const A = [];
|
|
2556
|
-
$.value.forEach((
|
|
2557
|
-
|
|
2558
|
-
}), $.value = [], A.forEach((
|
|
2559
|
-
|
|
2604
|
+
$.value.forEach((x) => {
|
|
2605
|
+
x.status !== o.DONE && A.push(x);
|
|
2606
|
+
}), $.value = [], A.forEach((x) => {
|
|
2607
|
+
O(x.originalFile, x.name);
|
|
2560
2608
|
});
|
|
2561
2609
|
return;
|
|
2562
2610
|
}
|
|
@@ -2567,7 +2615,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2567
2615
|
e.emitter.emit("vf-modal-close");
|
|
2568
2616
|
}
|
|
2569
2617
|
return P(async () => {
|
|
2570
|
-
|
|
2618
|
+
k = new Be({
|
|
2571
2619
|
debug: e.debug,
|
|
2572
2620
|
restrictions: {
|
|
2573
2621
|
maxFileSize: Ye(e.maxFileSize)
|
|
@@ -2575,19 +2623,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2575
2623
|
//allowedFileTypes
|
|
2576
2624
|
},
|
|
2577
2625
|
locale: r,
|
|
2578
|
-
onBeforeFileAdded(
|
|
2579
|
-
if (
|
|
2580
|
-
const X = f(
|
|
2581
|
-
$.value[X].status ===
|
|
2626
|
+
onBeforeFileAdded(E, L) {
|
|
2627
|
+
if (L[E.id] != null) {
|
|
2628
|
+
const X = f(E.id);
|
|
2629
|
+
$.value[X].status === o.PENDING && (y.value = k.i18n("noDuplicates", { fileName: E.name })), $.value = $.value.filter((ue) => ue.id !== E.id);
|
|
2582
2630
|
}
|
|
2583
2631
|
return $.value.push({
|
|
2584
|
-
id:
|
|
2585
|
-
name:
|
|
2586
|
-
size: e.filesize(
|
|
2587
|
-
status:
|
|
2632
|
+
id: E.id,
|
|
2633
|
+
name: E.name,
|
|
2634
|
+
size: e.filesize(E.size),
|
|
2635
|
+
status: o.PENDING,
|
|
2588
2636
|
statusName: s("Pending upload"),
|
|
2589
2637
|
percent: null,
|
|
2590
|
-
originalFile:
|
|
2638
|
+
originalFile: E.data
|
|
2591
2639
|
}), !0;
|
|
2592
2640
|
}
|
|
2593
2641
|
});
|
|
@@ -2597,115 +2645,115 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2597
2645
|
params: { q: "upload", adapter: e.data.adapter, path: e.data.dirname }
|
|
2598
2646
|
});
|
|
2599
2647
|
e.debug && h.body != null && (h.body instanceof FormData || Object.keys(h.body).length > 0) && console.warn(`Cannot set body on upload, make sure request.transformRequest didn't set body when upload.
|
|
2600
|
-
Will ignore for now.`),
|
|
2648
|
+
Will ignore for now.`), k.use(Ue, {
|
|
2601
2649
|
method: h.method,
|
|
2602
2650
|
endpoint: h.url + "?" + new URLSearchParams(h.params),
|
|
2603
2651
|
headers: h.headers,
|
|
2604
2652
|
limit: 5,
|
|
2605
2653
|
timeout: 0,
|
|
2606
|
-
getResponseError(
|
|
2607
|
-
let
|
|
2654
|
+
getResponseError(E, L) {
|
|
2655
|
+
let z;
|
|
2608
2656
|
try {
|
|
2609
|
-
|
|
2657
|
+
z = JSON.parse(E).message;
|
|
2610
2658
|
} catch {
|
|
2611
|
-
|
|
2659
|
+
z = s("Cannot parse server response.");
|
|
2612
2660
|
}
|
|
2613
|
-
return new Error(
|
|
2661
|
+
return new Error(z);
|
|
2614
2662
|
}
|
|
2615
|
-
}),
|
|
2616
|
-
const
|
|
2617
|
-
oe(
|
|
2618
|
-
}),
|
|
2619
|
-
|
|
2620
|
-
|
|
2663
|
+
}), k.on("restriction-failed", (E, L) => {
|
|
2664
|
+
const z = $.value[f(E.id)];
|
|
2665
|
+
oe(z), y.value = L.message;
|
|
2666
|
+
}), k.on("upload", () => {
|
|
2667
|
+
M.value = !0, $.value.forEach((E) => {
|
|
2668
|
+
E.status !== o.DONE && (E.percent = null, E.status = o.UPLOADING, E.statusName = s("Pending upload"));
|
|
2621
2669
|
});
|
|
2622
|
-
}),
|
|
2623
|
-
const
|
|
2624
|
-
$.value[f(
|
|
2625
|
-
}),
|
|
2626
|
-
const
|
|
2627
|
-
|
|
2628
|
-
}),
|
|
2629
|
-
const
|
|
2630
|
-
|
|
2631
|
-
}),
|
|
2632
|
-
y.value =
|
|
2670
|
+
}), k.on("upload-progress", (E, L) => {
|
|
2671
|
+
const z = Math.floor(L.bytesUploaded / L.bytesTotal * 100);
|
|
2672
|
+
$.value[f(E.id)].percent = `${z}%`;
|
|
2673
|
+
}), k.on("upload-success", (E) => {
|
|
2674
|
+
const L = $.value[f(E.id)];
|
|
2675
|
+
L.status = o.DONE, L.statusName = s("Done");
|
|
2676
|
+
}), k.on("upload-error", (E, L) => {
|
|
2677
|
+
const z = $.value[f(E.id)];
|
|
2678
|
+
z.percent = null, z.status = o.ERROR, L.isNetworkError ? z.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : z.statusName = L ? L.message : s("Unknown Error");
|
|
2679
|
+
}), k.on("error", (E) => {
|
|
2680
|
+
y.value = E.message, M.value = !1, e.emitter.emit("vf-fetch", {
|
|
2633
2681
|
params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
|
|
2634
2682
|
noCloseModal: !0
|
|
2635
2683
|
});
|
|
2636
|
-
}),
|
|
2637
|
-
|
|
2684
|
+
}), k.on("complete", () => {
|
|
2685
|
+
M.value = !1, e.emitter.emit("vf-fetch", {
|
|
2638
2686
|
params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
|
|
2639
2687
|
noCloseModal: !0
|
|
2640
2688
|
});
|
|
2641
2689
|
}), c.value.addEventListener("click", () => {
|
|
2642
|
-
|
|
2643
|
-
}),
|
|
2690
|
+
d.value.click();
|
|
2691
|
+
}), g.value.addEventListener("click", () => {
|
|
2644
2692
|
l.value.click();
|
|
2645
|
-
}),
|
|
2646
|
-
|
|
2647
|
-
}),
|
|
2648
|
-
|
|
2693
|
+
}), _.value.addEventListener("dragover", (E) => {
|
|
2694
|
+
E.preventDefault(), C.value = !0;
|
|
2695
|
+
}), _.value.addEventListener("dragleave", (E) => {
|
|
2696
|
+
E.preventDefault(), C.value = !1;
|
|
2649
2697
|
});
|
|
2650
|
-
function A(
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
A(
|
|
2698
|
+
function A(E, L) {
|
|
2699
|
+
L.isFile && L.file((z) => E(L, z)), L.isDirectory && L.createReader().readEntries((z) => {
|
|
2700
|
+
z.forEach((X) => {
|
|
2701
|
+
A(E, X);
|
|
2654
2702
|
});
|
|
2655
2703
|
});
|
|
2656
2704
|
}
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
const
|
|
2660
|
-
[...
|
|
2661
|
-
|
|
2662
|
-
const $e =
|
|
2663
|
-
|
|
2664
|
-
},
|
|
2705
|
+
_.value.addEventListener("drop", (E) => {
|
|
2706
|
+
E.preventDefault(), C.value = !1;
|
|
2707
|
+
const L = /^[/\\](.+)/;
|
|
2708
|
+
[...E.dataTransfer.items].forEach((z) => {
|
|
2709
|
+
z.kind === "file" && A((X, ue) => {
|
|
2710
|
+
const $e = L.exec(X.fullPath);
|
|
2711
|
+
O(ue, $e[1]);
|
|
2712
|
+
}, z.webkitGetAsEntry());
|
|
2665
2713
|
});
|
|
2666
2714
|
});
|
|
2667
|
-
const
|
|
2668
|
-
const
|
|
2669
|
-
for (const
|
|
2670
|
-
|
|
2671
|
-
|
|
2715
|
+
const x = ({ target: E }) => {
|
|
2716
|
+
const L = E.files;
|
|
2717
|
+
for (const z of L)
|
|
2718
|
+
O(z);
|
|
2719
|
+
E.value = "";
|
|
2672
2720
|
};
|
|
2673
|
-
|
|
2721
|
+
d.value.addEventListener("change", x), l.value.addEventListener("change", x);
|
|
2674
2722
|
}), ke(() => {
|
|
2675
|
-
|
|
2676
|
-
}), (h, A) => (n(),
|
|
2723
|
+
k == null || k.close({ reason: "unmount" });
|
|
2724
|
+
}), (h, A) => (n(), T(W, null, {
|
|
2677
2725
|
buttons: j(() => [
|
|
2678
2726
|
t("button", {
|
|
2679
2727
|
type: "button",
|
|
2680
|
-
class:
|
|
2681
|
-
disabled:
|
|
2682
|
-
onClick: Y(
|
|
2683
|
-
},
|
|
2684
|
-
|
|
2728
|
+
class: B(["vf-btn vf-btn-primary", M.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),
|
|
2729
|
+
disabled: M.value,
|
|
2730
|
+
onClick: Y(se, ["prevent"])
|
|
2731
|
+
}, v(a(s)("Upload")), 11, sn),
|
|
2732
|
+
M.value ? (n(), m("button", {
|
|
2685
2733
|
key: 0,
|
|
2686
2734
|
type: "button",
|
|
2687
2735
|
class: "vf-btn vf-btn-secondary",
|
|
2688
|
-
onClick: Y(
|
|
2689
|
-
},
|
|
2736
|
+
onClick: Y(ae, ["prevent"])
|
|
2737
|
+
}, v(a(s)("Cancel")), 1)) : (n(), m("button", {
|
|
2690
2738
|
key: 1,
|
|
2691
2739
|
type: "button",
|
|
2692
2740
|
class: "vf-btn vf-btn-secondary",
|
|
2693
2741
|
onClick: Y(D, ["prevent"])
|
|
2694
|
-
},
|
|
2742
|
+
}, v(a(s)("Close")), 1))
|
|
2695
2743
|
]),
|
|
2696
2744
|
default: j(() => [
|
|
2697
|
-
t("div",
|
|
2698
|
-
|
|
2745
|
+
t("div", Or, [
|
|
2746
|
+
Nr,
|
|
2699
2747
|
t("div", zr, [
|
|
2700
|
-
t("h3",
|
|
2748
|
+
t("h3", Br, v(a(s)("Upload Files")), 1),
|
|
2701
2749
|
t("div", Ur, [
|
|
2702
2750
|
t("div", {
|
|
2703
2751
|
ref_key: "dropArea",
|
|
2704
|
-
ref:
|
|
2752
|
+
ref: _,
|
|
2705
2753
|
class: "flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",
|
|
2706
|
-
onClick:
|
|
2754
|
+
onClick: te
|
|
2707
2755
|
}, [
|
|
2708
|
-
|
|
2756
|
+
C.value ? (n(), m("div", Hr, v(a(s)("Release to drop these files.")), 1)) : (n(), m("div", Rr, v(a(s)("Drag and drop the files/folders to here or click here.")), 1))
|
|
2709
2757
|
], 512),
|
|
2710
2758
|
t("div", {
|
|
2711
2759
|
ref_key: "container",
|
|
@@ -2717,73 +2765,73 @@ Will ignore for now.`), g.use(He, {
|
|
|
2717
2765
|
ref: c,
|
|
2718
2766
|
type: "button",
|
|
2719
2767
|
class: "vf-btn vf-btn-secondary"
|
|
2720
|
-
},
|
|
2768
|
+
}, v(a(s)("Select Files")), 513),
|
|
2721
2769
|
t("button", {
|
|
2722
2770
|
ref_key: "pickFolders",
|
|
2723
|
-
ref:
|
|
2771
|
+
ref: g,
|
|
2724
2772
|
type: "button",
|
|
2725
2773
|
class: "vf-btn vf-btn-secondary"
|
|
2726
|
-
},
|
|
2774
|
+
}, v(a(s)("Select Folders")), 513),
|
|
2727
2775
|
t("button", {
|
|
2728
2776
|
type: "button",
|
|
2729
2777
|
class: "vf-btn vf-btn-secondary",
|
|
2730
|
-
disabled:
|
|
2731
|
-
onClick: A[0] || (A[0] = (
|
|
2732
|
-
},
|
|
2778
|
+
disabled: M.value,
|
|
2779
|
+
onClick: A[0] || (A[0] = (x) => w(!1))
|
|
2780
|
+
}, v(a(s)("Clear all")), 9, qr),
|
|
2733
2781
|
t("button", {
|
|
2734
2782
|
type: "button",
|
|
2735
2783
|
class: "vf-btn vf-btn-secondary",
|
|
2736
|
-
disabled:
|
|
2737
|
-
onClick: A[1] || (A[1] = (
|
|
2738
|
-
},
|
|
2784
|
+
disabled: M.value,
|
|
2785
|
+
onClick: A[1] || (A[1] = (x) => w(!0))
|
|
2786
|
+
}, v(a(s)("Clear only successful")), 9, Ir)
|
|
2739
2787
|
], 512),
|
|
2740
|
-
t("div",
|
|
2741
|
-
(n(!0),
|
|
2788
|
+
t("div", Pr, [
|
|
2789
|
+
(n(!0), m(U, null, I($.value, (x) => (n(), m("div", {
|
|
2742
2790
|
class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
|
|
2743
|
-
key:
|
|
2791
|
+
key: x.id
|
|
2744
2792
|
}, [
|
|
2745
|
-
t("span",
|
|
2793
|
+
t("span", Wr, [
|
|
2746
2794
|
t("span", {
|
|
2747
|
-
class:
|
|
2748
|
-
textContent:
|
|
2795
|
+
class: B(["text-base m-auto", R(x)]),
|
|
2796
|
+
textContent: v(K(x))
|
|
2749
2797
|
}, null, 10, Gr)
|
|
2750
2798
|
]),
|
|
2751
|
-
t("div",
|
|
2752
|
-
t("div",
|
|
2753
|
-
t("div",
|
|
2799
|
+
t("div", Yr, [
|
|
2800
|
+
t("div", Kr, v(a(he)(x.name, 40)) + " (" + v(x.size) + ")", 1),
|
|
2801
|
+
t("div", Jr, v(a(he)(x.name, 16)) + " (" + v(x.size) + ")", 1),
|
|
2754
2802
|
t("div", {
|
|
2755
|
-
class:
|
|
2803
|
+
class: B(["flex break-all text-left", R(x)])
|
|
2756
2804
|
}, [
|
|
2757
|
-
|
|
2758
|
-
|
|
2805
|
+
V(v(x.statusName) + " ", 1),
|
|
2806
|
+
x.status === i.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), m("b", Xr, v(x.percent), 1)) : S("", !0)
|
|
2759
2807
|
], 2)
|
|
2760
2808
|
]),
|
|
2761
2809
|
t("button", {
|
|
2762
2810
|
type: "button",
|
|
2763
|
-
class:
|
|
2764
|
-
title:
|
|
2765
|
-
disabled:
|
|
2766
|
-
onClick: (
|
|
2767
|
-
},
|
|
2811
|
+
class: B(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", M.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
|
|
2812
|
+
title: a(s)("Delete"),
|
|
2813
|
+
disabled: M.value,
|
|
2814
|
+
onClick: (E) => oe(x)
|
|
2815
|
+
}, en, 10, Qr)
|
|
2768
2816
|
]))), 128)),
|
|
2769
|
-
$.value.length ?
|
|
2817
|
+
$.value.length ? S("", !0) : (n(), m("div", tn, v(a(s)("No files selected!")), 1))
|
|
2770
2818
|
]),
|
|
2771
|
-
y.value.length ? (n(),
|
|
2819
|
+
y.value.length ? (n(), T(G, {
|
|
2772
2820
|
key: 0,
|
|
2773
|
-
onHidden: A[2] || (A[2] = (
|
|
2821
|
+
onHidden: A[2] || (A[2] = (x) => y.value = ""),
|
|
2774
2822
|
error: ""
|
|
2775
2823
|
}, {
|
|
2776
2824
|
default: j(() => [
|
|
2777
|
-
|
|
2825
|
+
V(v(y.value), 1)
|
|
2778
2826
|
]),
|
|
2779
2827
|
_: 1
|
|
2780
|
-
})) :
|
|
2828
|
+
})) : S("", !0)
|
|
2781
2829
|
])
|
|
2782
2830
|
])
|
|
2783
2831
|
]),
|
|
2784
2832
|
t("input", {
|
|
2785
2833
|
ref_key: "internalFileInput",
|
|
2786
|
-
ref:
|
|
2834
|
+
ref: d,
|
|
2787
2835
|
type: "file",
|
|
2788
2836
|
multiple: "",
|
|
2789
2837
|
class: "hidden"
|
|
@@ -2800,7 +2848,7 @@ Will ignore for now.`), g.use(He, {
|
|
|
2800
2848
|
_: 1
|
|
2801
2849
|
}));
|
|
2802
2850
|
}
|
|
2803
|
-
}),
|
|
2851
|
+
}), rn = { class: "sm:flex sm:items-start" }, nn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2804
2852
|
/* @__PURE__ */ t("svg", {
|
|
2805
2853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2806
2854
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2815,13 +2863,13 @@ Will ignore for now.`), g.use(He, {
|
|
|
2815
2863
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
2816
2864
|
})
|
|
2817
2865
|
])
|
|
2818
|
-
], -1),
|
|
2866
|
+
], -1), ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, dn = {
|
|
2819
2867
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2820
2868
|
id: "modal-title"
|
|
2821
|
-
},
|
|
2869
|
+
}, cn = { class: "mt-2" }, un = {
|
|
2822
2870
|
class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
|
|
2823
2871
|
style: { "max-height": "200px" }
|
|
2824
|
-
},
|
|
2872
|
+
}, mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vn = {
|
|
2825
2873
|
key: 0,
|
|
2826
2874
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2827
2875
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2829,13 +2877,13 @@ Will ignore for now.`), g.use(He, {
|
|
|
2829
2877
|
viewBox: "0 0 24 24",
|
|
2830
2878
|
stroke: "currentColor",
|
|
2831
2879
|
"stroke-width": "1"
|
|
2832
|
-
},
|
|
2880
|
+
}, pn = /* @__PURE__ */ t("path", {
|
|
2833
2881
|
"stroke-linecap": "round",
|
|
2834
2882
|
"stroke-linejoin": "round",
|
|
2835
2883
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2836
|
-
}, null, -1),
|
|
2837
|
-
|
|
2838
|
-
],
|
|
2884
|
+
}, null, -1), hn = [
|
|
2885
|
+
pn
|
|
2886
|
+
], fn = {
|
|
2839
2887
|
key: 1,
|
|
2840
2888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2841
2889
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2843,20 +2891,20 @@ Will ignore for now.`), g.use(He, {
|
|
|
2843
2891
|
viewBox: "0 0 24 24",
|
|
2844
2892
|
stroke: "currentColor",
|
|
2845
2893
|
"stroke-width": "1"
|
|
2846
|
-
},
|
|
2894
|
+
}, gn = /* @__PURE__ */ t("path", {
|
|
2847
2895
|
"stroke-linecap": "round",
|
|
2848
2896
|
"stroke-linejoin": "round",
|
|
2849
2897
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
2850
|
-
}, null, -1),
|
|
2851
|
-
|
|
2852
|
-
],
|
|
2898
|
+
}, null, -1), _n = [
|
|
2899
|
+
gn
|
|
2900
|
+
], kn = { class: "ml-1.5" }, bn = ["placeholder"], yn = {
|
|
2853
2901
|
name: "VFModalArchive"
|
|
2854
|
-
},
|
|
2902
|
+
}, xn = /* @__PURE__ */ Object.assign(yn, {
|
|
2855
2903
|
setup(p) {
|
|
2856
2904
|
const e = F("ServiceContainer");
|
|
2857
2905
|
e.storage;
|
|
2858
|
-
const { t: s } = e.i18n, r =
|
|
2859
|
-
|
|
2906
|
+
const { t: s } = e.i18n, r = b(""), o = b(""), i = b(e.modal.data.items), u = () => {
|
|
2907
|
+
i.value.length && e.emitter.emit("vf-fetch", {
|
|
2860
2908
|
params: {
|
|
2861
2909
|
q: "archive",
|
|
2862
2910
|
m: "post",
|
|
@@ -2864,61 +2912,61 @@ Will ignore for now.`), g.use(He, {
|
|
|
2864
2912
|
path: e.data.dirname
|
|
2865
2913
|
},
|
|
2866
2914
|
body: {
|
|
2867
|
-
items:
|
|
2915
|
+
items: i.value.map(({ path: d, type: l }) => ({ path: d, type: l })),
|
|
2868
2916
|
name: r.value
|
|
2869
2917
|
},
|
|
2870
2918
|
onSuccess: () => {
|
|
2871
2919
|
e.emitter.emit("vf-toast-push", { label: s("The file(s) archived.") });
|
|
2872
2920
|
},
|
|
2873
|
-
onError: (
|
|
2874
|
-
|
|
2921
|
+
onError: (d) => {
|
|
2922
|
+
o.value = s(d.message);
|
|
2875
2923
|
}
|
|
2876
2924
|
});
|
|
2877
2925
|
};
|
|
2878
|
-
return (
|
|
2926
|
+
return (d, l) => (n(), T(W, null, {
|
|
2879
2927
|
buttons: j(() => [
|
|
2880
2928
|
t("button", {
|
|
2881
2929
|
type: "button",
|
|
2882
2930
|
onClick: u,
|
|
2883
2931
|
class: "vf-btn vf-btn-primary"
|
|
2884
|
-
},
|
|
2932
|
+
}, v(a(s)("Archive")), 1),
|
|
2885
2933
|
t("button", {
|
|
2886
2934
|
type: "button",
|
|
2887
|
-
onClick: l[2] || (l[2] = (c) =>
|
|
2935
|
+
onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
|
|
2888
2936
|
class: "vf-btn vf-btn-secondary"
|
|
2889
|
-
},
|
|
2937
|
+
}, v(a(s)("Cancel")), 1)
|
|
2890
2938
|
]),
|
|
2891
2939
|
default: j(() => [
|
|
2892
|
-
t("div",
|
|
2893
|
-
|
|
2894
|
-
t("div",
|
|
2895
|
-
t("h3",
|
|
2896
|
-
t("div",
|
|
2897
|
-
t("div",
|
|
2898
|
-
(n(!0),
|
|
2899
|
-
c.type === "dir" ? (n(),
|
|
2900
|
-
t("span",
|
|
2940
|
+
t("div", rn, [
|
|
2941
|
+
nn,
|
|
2942
|
+
t("div", ln, [
|
|
2943
|
+
t("h3", dn, v(a(s)("Archive the files")), 1),
|
|
2944
|
+
t("div", cn, [
|
|
2945
|
+
t("div", un, [
|
|
2946
|
+
(n(!0), m(U, null, I(i.value, (c) => (n(), m("p", mn, [
|
|
2947
|
+
c.type === "dir" ? (n(), m("svg", vn, hn)) : (n(), m("svg", fn, _n)),
|
|
2948
|
+
t("span", kn, v(c.basename), 1)
|
|
2901
2949
|
]))), 256))
|
|
2902
2950
|
]),
|
|
2903
2951
|
q(t("input", {
|
|
2904
2952
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => r.value = c),
|
|
2905
2953
|
onKeyup: Q(u, ["enter"]),
|
|
2906
2954
|
class: "my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
|
|
2907
|
-
placeholder:
|
|
2955
|
+
placeholder: a(s)("Archive name. (.zip file will be created)"),
|
|
2908
2956
|
type: "text"
|
|
2909
|
-
}, null, 40,
|
|
2957
|
+
}, null, 40, bn), [
|
|
2910
2958
|
[Z, r.value]
|
|
2911
2959
|
]),
|
|
2912
|
-
|
|
2960
|
+
o.value.length ? (n(), T(G, {
|
|
2913
2961
|
key: 0,
|
|
2914
|
-
onHidden: l[1] || (l[1] = (c) =>
|
|
2962
|
+
onHidden: l[1] || (l[1] = (c) => o.value = ""),
|
|
2915
2963
|
error: ""
|
|
2916
2964
|
}, {
|
|
2917
2965
|
default: j(() => [
|
|
2918
|
-
|
|
2966
|
+
V(v(o.value), 1)
|
|
2919
2967
|
]),
|
|
2920
2968
|
_: 1
|
|
2921
|
-
})) :
|
|
2969
|
+
})) : S("", !0)
|
|
2922
2970
|
])
|
|
2923
2971
|
])
|
|
2924
2972
|
])
|
|
@@ -2926,7 +2974,7 @@ Will ignore for now.`), g.use(He, {
|
|
|
2926
2974
|
_: 1
|
|
2927
2975
|
}));
|
|
2928
2976
|
}
|
|
2929
|
-
}),
|
|
2977
|
+
}), wn = { class: "sm:flex sm:items-start" }, $n = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
2930
2978
|
/* @__PURE__ */ t("svg", {
|
|
2931
2979
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2932
2980
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2941,10 +2989,10 @@ Will ignore for now.`), g.use(He, {
|
|
|
2941
2989
|
d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
|
|
2942
2990
|
})
|
|
2943
2991
|
])
|
|
2944
|
-
], -1),
|
|
2992
|
+
], -1), Cn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Sn = {
|
|
2945
2993
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2946
2994
|
id: "modal-title"
|
|
2947
|
-
},
|
|
2995
|
+
}, Mn = { class: "mt-2" }, En = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Dn = {
|
|
2948
2996
|
key: 0,
|
|
2949
2997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2950
2998
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2952,13 +3000,13 @@ Will ignore for now.`), g.use(He, {
|
|
|
2952
3000
|
viewBox: "0 0 24 24",
|
|
2953
3001
|
stroke: "currentColor",
|
|
2954
3002
|
"stroke-width": "1"
|
|
2955
|
-
},
|
|
3003
|
+
}, jn = /* @__PURE__ */ t("path", {
|
|
2956
3004
|
"stroke-linecap": "round",
|
|
2957
3005
|
"stroke-linejoin": "round",
|
|
2958
3006
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2959
|
-
}, null, -1),
|
|
2960
|
-
|
|
2961
|
-
],
|
|
3007
|
+
}, null, -1), An = [
|
|
3008
|
+
jn
|
|
3009
|
+
], Ln = {
|
|
2962
3010
|
key: 1,
|
|
2963
3011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2964
3012
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2970,17 +3018,17 @@ Will ignore for now.`), g.use(He, {
|
|
|
2970
3018
|
"stroke-linecap": "round",
|
|
2971
3019
|
"stroke-linejoin": "round",
|
|
2972
3020
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
2973
|
-
}, null, -1),
|
|
3021
|
+
}, null, -1), Fn = [
|
|
2974
3022
|
Tn
|
|
2975
|
-
],
|
|
3023
|
+
], Vn = { class: "ml-1.5" }, On = { class: "my-1 text-sm text-gray-500" }, Nn = {
|
|
2976
3024
|
name: "VFModalUnarchive"
|
|
2977
|
-
}, zn = /* @__PURE__ */ Object.assign(
|
|
3025
|
+
}, zn = /* @__PURE__ */ Object.assign(Nn, {
|
|
2978
3026
|
setup(p) {
|
|
2979
3027
|
const e = F("ServiceContainer");
|
|
2980
3028
|
e.storage;
|
|
2981
3029
|
const { t: s } = e.i18n;
|
|
2982
|
-
|
|
2983
|
-
const r =
|
|
3030
|
+
b("");
|
|
3031
|
+
const r = b(e.modal.data.items[0]), o = b(""), i = b([]), u = () => {
|
|
2984
3032
|
e.emitter.emit("vf-fetch", {
|
|
2985
3033
|
params: {
|
|
2986
3034
|
q: "unarchive",
|
|
@@ -2994,45 +3042,45 @@ Will ignore for now.`), g.use(He, {
|
|
|
2994
3042
|
onSuccess: () => {
|
|
2995
3043
|
e.emitter.emit("vf-toast-push", { label: s("The file unarchived.") });
|
|
2996
3044
|
},
|
|
2997
|
-
onError: (
|
|
2998
|
-
|
|
3045
|
+
onError: (d) => {
|
|
3046
|
+
o.value = s(d.message);
|
|
2999
3047
|
}
|
|
3000
3048
|
});
|
|
3001
3049
|
};
|
|
3002
|
-
return (
|
|
3050
|
+
return (d, l) => (n(), T(W, null, {
|
|
3003
3051
|
buttons: j(() => [
|
|
3004
3052
|
t("button", {
|
|
3005
3053
|
type: "button",
|
|
3006
3054
|
onClick: u,
|
|
3007
3055
|
class: "vf-btn vf-btn-primary"
|
|
3008
|
-
},
|
|
3056
|
+
}, v(a(s)("Unarchive")), 1),
|
|
3009
3057
|
t("button", {
|
|
3010
3058
|
type: "button",
|
|
3011
|
-
onClick: l[1] || (l[1] = (c) =>
|
|
3059
|
+
onClick: l[1] || (l[1] = (c) => a(e).emitter.emit("vf-modal-close")),
|
|
3012
3060
|
class: "vf-btn vf-btn-secondary"
|
|
3013
|
-
},
|
|
3061
|
+
}, v(a(s)("Cancel")), 1)
|
|
3014
3062
|
]),
|
|
3015
3063
|
default: j(() => [
|
|
3016
|
-
t("div",
|
|
3017
|
-
|
|
3018
|
-
t("div",
|
|
3019
|
-
t("h3",
|
|
3020
|
-
t("div",
|
|
3021
|
-
(n(!0),
|
|
3022
|
-
c.type === "dir" ? (n(),
|
|
3023
|
-
t("span",
|
|
3064
|
+
t("div", wn, [
|
|
3065
|
+
$n,
|
|
3066
|
+
t("div", Cn, [
|
|
3067
|
+
t("h3", Sn, v(a(s)("Unarchive")), 1),
|
|
3068
|
+
t("div", Mn, [
|
|
3069
|
+
(n(!0), m(U, null, I(i.value, (c) => (n(), m("p", En, [
|
|
3070
|
+
c.type === "dir" ? (n(), m("svg", Dn, An)) : (n(), m("svg", Ln, Fn)),
|
|
3071
|
+
t("span", Vn, v(c.basename), 1)
|
|
3024
3072
|
]))), 256)),
|
|
3025
|
-
t("p",
|
|
3026
|
-
|
|
3073
|
+
t("p", On, v(a(s)("The archive will be unarchived at")) + " (" + v(d.current.dirname) + ")", 1),
|
|
3074
|
+
o.value.length ? (n(), T(G, {
|
|
3027
3075
|
key: 0,
|
|
3028
|
-
onHidden: l[0] || (l[0] = (c) =>
|
|
3076
|
+
onHidden: l[0] || (l[0] = (c) => o.value = ""),
|
|
3029
3077
|
error: ""
|
|
3030
3078
|
}, {
|
|
3031
3079
|
default: j(() => [
|
|
3032
|
-
|
|
3080
|
+
V(v(o.value), 1)
|
|
3033
3081
|
]),
|
|
3034
3082
|
_: 1
|
|
3035
|
-
})) :
|
|
3083
|
+
})) : S("", !0)
|
|
3036
3084
|
])
|
|
3037
3085
|
])
|
|
3038
3086
|
])
|
|
@@ -3040,7 +3088,7 @@ Will ignore for now.`), g.use(He, {
|
|
|
3040
3088
|
_: 1
|
|
3041
3089
|
}));
|
|
3042
3090
|
}
|
|
3043
|
-
}),
|
|
3091
|
+
}), Bn = { class: "sm:flex sm:items-start" }, Un = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
3044
3092
|
/* @__PURE__ */ t("svg", {
|
|
3045
3093
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
3046
3094
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3056,10 +3104,10 @@ Will ignore for now.`), g.use(He, {
|
|
|
3056
3104
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
3057
3105
|
})
|
|
3058
3106
|
])
|
|
3059
|
-
], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" },
|
|
3107
|
+
], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Rn = {
|
|
3060
3108
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
3061
3109
|
id: "modal-title"
|
|
3062
|
-
},
|
|
3110
|
+
}, qn = { class: "text-sm text-gray-500 pb-1" }, In = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, Pn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Wn = {
|
|
3063
3111
|
key: 0,
|
|
3064
3112
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3065
3113
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -3071,9 +3119,9 @@ Will ignore for now.`), g.use(He, {
|
|
|
3071
3119
|
"stroke-linecap": "round",
|
|
3072
3120
|
"stroke-linejoin": "round",
|
|
3073
3121
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
3074
|
-
}, null, -1),
|
|
3122
|
+
}, null, -1), Yn = [
|
|
3075
3123
|
Gn
|
|
3076
|
-
],
|
|
3124
|
+
], Kn = {
|
|
3077
3125
|
key: 1,
|
|
3078
3126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3079
3127
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -3081,13 +3129,13 @@ Will ignore for now.`), g.use(He, {
|
|
|
3081
3129
|
viewBox: "0 0 24 24",
|
|
3082
3130
|
stroke: "currentColor",
|
|
3083
3131
|
"stroke-width": "1"
|
|
3084
|
-
},
|
|
3132
|
+
}, Jn = /* @__PURE__ */ t("path", {
|
|
3085
3133
|
"stroke-linecap": "round",
|
|
3086
3134
|
"stroke-linejoin": "round",
|
|
3087
3135
|
d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
|
|
3088
|
-
}, null, -1),
|
|
3089
|
-
|
|
3090
|
-
],
|
|
3136
|
+
}, null, -1), Xn = [
|
|
3137
|
+
Jn
|
|
3138
|
+
], Qn = { class: "ml-1.5" }, Zn = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, el = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, tl = /* @__PURE__ */ t("svg", {
|
|
3091
3139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3092
3140
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
3093
3141
|
fill: "none",
|
|
@@ -3100,13 +3148,13 @@ Will ignore for now.`), g.use(He, {
|
|
|
3100
3148
|
"stroke-linejoin": "round",
|
|
3101
3149
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
3102
3150
|
})
|
|
3103
|
-
], -1),
|
|
3151
|
+
], -1), sl = { class: "ml-1.5 overflow-auto" }, al = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, ol = {
|
|
3104
3152
|
name: "VFModalMove"
|
|
3105
|
-
},
|
|
3153
|
+
}, rl = /* @__PURE__ */ Object.assign(ol, {
|
|
3106
3154
|
setup(p) {
|
|
3107
3155
|
const e = F("ServiceContainer"), { t: s } = e.i18n;
|
|
3108
3156
|
e.storage;
|
|
3109
|
-
const r =
|
|
3157
|
+
const r = b(e.modal.data.items.from), o = b(""), i = () => {
|
|
3110
3158
|
r.value.length && e.emitter.emit("vf-fetch", {
|
|
3111
3159
|
params: {
|
|
3112
3160
|
q: "move",
|
|
@@ -3115,101 +3163,101 @@ Will ignore for now.`), g.use(He, {
|
|
|
3115
3163
|
path: e.data.dirname
|
|
3116
3164
|
},
|
|
3117
3165
|
body: {
|
|
3118
|
-
items: r.value.map(({ path: u, type:
|
|
3166
|
+
items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d })),
|
|
3119
3167
|
item: e.modal.data.items.to.path
|
|
3120
3168
|
},
|
|
3121
3169
|
onSuccess: () => {
|
|
3122
3170
|
e.emitter.emit("vf-toast-push", { label: s("Files moved.", e.modal.data.items.to.name) });
|
|
3123
3171
|
},
|
|
3124
3172
|
onError: (u) => {
|
|
3125
|
-
|
|
3173
|
+
o.value = s(u.message);
|
|
3126
3174
|
}
|
|
3127
3175
|
});
|
|
3128
3176
|
};
|
|
3129
|
-
return (u,
|
|
3177
|
+
return (u, d) => (n(), T(W, null, {
|
|
3130
3178
|
buttons: j(() => [
|
|
3131
3179
|
t("button", {
|
|
3132
3180
|
type: "button",
|
|
3133
|
-
onClick:
|
|
3181
|
+
onClick: i,
|
|
3134
3182
|
class: "vf-btn vf-btn-primary"
|
|
3135
|
-
},
|
|
3183
|
+
}, v(a(s)("Yes, Move!")), 1),
|
|
3136
3184
|
t("button", {
|
|
3137
3185
|
type: "button",
|
|
3138
|
-
onClick:
|
|
3186
|
+
onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
|
|
3139
3187
|
class: "vf-btn vf-btn-secondary"
|
|
3140
|
-
},
|
|
3141
|
-
t("div",
|
|
3188
|
+
}, v(a(s)("Cancel")), 1),
|
|
3189
|
+
t("div", al, v(a(s)("%s item(s) selected.", r.value.length)), 1)
|
|
3142
3190
|
]),
|
|
3143
3191
|
default: j(() => [
|
|
3144
|
-
t("div",
|
|
3192
|
+
t("div", Bn, [
|
|
3145
3193
|
Un,
|
|
3146
3194
|
t("div", Hn, [
|
|
3147
|
-
t("h3",
|
|
3148
|
-
t("p",
|
|
3149
|
-
t("div",
|
|
3150
|
-
(n(!0),
|
|
3195
|
+
t("h3", Rn, v(a(s)("Move files")), 1),
|
|
3196
|
+
t("p", qn, v(a(s)("Are you sure you want to move these files?")), 1),
|
|
3197
|
+
t("div", In, [
|
|
3198
|
+
(n(!0), m(U, null, I(r.value, (l) => (n(), m("div", Pn, [
|
|
3151
3199
|
t("div", null, [
|
|
3152
|
-
l.type === "dir" ? (n(),
|
|
3200
|
+
l.type === "dir" ? (n(), m("svg", Wn, Yn)) : (n(), m("svg", Kn, Xn))
|
|
3153
3201
|
]),
|
|
3154
|
-
t("div",
|
|
3202
|
+
t("div", Qn, v(l.path), 1)
|
|
3155
3203
|
]))), 256))
|
|
3156
3204
|
]),
|
|
3157
|
-
t("h4",
|
|
3158
|
-
t("p",
|
|
3159
|
-
|
|
3160
|
-
t("span",
|
|
3205
|
+
t("h4", Zn, v(a(s)("Target Directory")), 1),
|
|
3206
|
+
t("p", el, [
|
|
3207
|
+
tl,
|
|
3208
|
+
t("span", sl, v(a(e).modal.data.items.to.path), 1)
|
|
3161
3209
|
]),
|
|
3162
|
-
|
|
3210
|
+
o.value.length ? (n(), T(G, {
|
|
3163
3211
|
key: 0,
|
|
3164
|
-
onHidden:
|
|
3212
|
+
onHidden: d[0] || (d[0] = (l) => o.value = ""),
|
|
3165
3213
|
error: ""
|
|
3166
3214
|
}, {
|
|
3167
3215
|
default: j(() => [
|
|
3168
|
-
|
|
3216
|
+
V(v(o.value), 1)
|
|
3169
3217
|
]),
|
|
3170
3218
|
_: 1
|
|
3171
|
-
})) :
|
|
3219
|
+
})) : S("", !0)
|
|
3172
3220
|
])
|
|
3173
3221
|
])
|
|
3174
3222
|
]),
|
|
3175
3223
|
_: 1
|
|
3176
3224
|
}));
|
|
3177
3225
|
}
|
|
3178
|
-
}),
|
|
3226
|
+
}), nl = (p, e) => {
|
|
3179
3227
|
const s = p.__vccOpts || p;
|
|
3180
|
-
for (const [r,
|
|
3181
|
-
s[r] =
|
|
3228
|
+
for (const [r, o] of e)
|
|
3229
|
+
s[r] = o;
|
|
3182
3230
|
return s;
|
|
3183
|
-
},
|
|
3231
|
+
}, ll = {
|
|
3184
3232
|
props: {
|
|
3185
3233
|
on: { type: String, required: !0 }
|
|
3186
3234
|
},
|
|
3187
3235
|
setup(p, { emit: e, slots: s }) {
|
|
3188
|
-
const r = F("ServiceContainer"),
|
|
3236
|
+
const r = F("ServiceContainer"), o = b(!1), { t: i } = r.i18n;
|
|
3189
3237
|
let u = null;
|
|
3190
|
-
const
|
|
3191
|
-
clearTimeout(u),
|
|
3192
|
-
|
|
3238
|
+
const d = () => {
|
|
3239
|
+
clearTimeout(u), o.value = !0, u = setTimeout(() => {
|
|
3240
|
+
o.value = !1;
|
|
3193
3241
|
}, 2e3);
|
|
3194
3242
|
};
|
|
3195
3243
|
return P(() => {
|
|
3196
|
-
r.emitter.on(p.on,
|
|
3197
|
-
}),
|
|
3244
|
+
r.emitter.on(p.on, d);
|
|
3245
|
+
}), Te(() => {
|
|
3198
3246
|
clearTimeout(u);
|
|
3199
3247
|
}), {
|
|
3200
|
-
shown:
|
|
3201
|
-
t:
|
|
3248
|
+
shown: o,
|
|
3249
|
+
t: i
|
|
3202
3250
|
};
|
|
3203
3251
|
}
|
|
3204
|
-
},
|
|
3205
|
-
function
|
|
3206
|
-
return n(),
|
|
3207
|
-
class:
|
|
3252
|
+
}, il = { key: 1 };
|
|
3253
|
+
function dl(p, e, s, r, o, i) {
|
|
3254
|
+
return n(), m("div", {
|
|
3255
|
+
class: B(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !r.shown }]])
|
|
3208
3256
|
}, [
|
|
3209
|
-
p.$slots.default ?
|
|
3257
|
+
p.$slots.default ? le(p.$slots, "default", { key: 0 }) : (n(), m("span", il, v(r.t("Saved.")), 1))
|
|
3210
3258
|
], 2);
|
|
3211
3259
|
}
|
|
3212
|
-
const
|
|
3260
|
+
const ve = /* @__PURE__ */ nl(ll, [["render", dl]]), cl = { class: "sm:flex sm:items-start" }, ul = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
|
|
3213
3261
|
/* @__PURE__ */ t("svg", {
|
|
3214
3262
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3215
3263
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -3229,34 +3277,34 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
|
|
|
3229
3277
|
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
3230
3278
|
})
|
|
3231
3279
|
])
|
|
3232
|
-
], -1),
|
|
3280
|
+
], -1), ml = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, vl = {
|
|
3233
3281
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
3234
3282
|
id: "modal-title"
|
|
3235
|
-
},
|
|
3283
|
+
}, pl = { class: "mt-2" }, hl = { class: "text-sm text-gray-500" }, fl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, gl = { class: "mt-3 text-left" }, _l = { class: "space-y-2" }, kl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, yl = { class: "flex-1 block text-sm" }, xl = {
|
|
3236
3284
|
for: "metric_unit",
|
|
3237
3285
|
class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
|
|
3238
|
-
},
|
|
3286
|
+
}, wl = { class: "flex relative gap-x-3" }, $l = { class: "h-6 items-center" }, Cl = {
|
|
3239
3287
|
for: "theme",
|
|
3240
3288
|
class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
|
|
3241
|
-
},
|
|
3289
|
+
}, Sl = { class: "flex text-sm" }, Ml = ["label"], El = ["value"], Dl = {
|
|
3242
3290
|
key: 0,
|
|
3243
3291
|
class: "flex relative gap-x-3"
|
|
3244
|
-
},
|
|
3292
|
+
}, jl = { class: "h-6 items-center" }, Al = {
|
|
3245
3293
|
for: "language",
|
|
3246
|
-
class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
|
|
3247
|
-
},
|
|
3294
|
+
class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"
|
|
3295
|
+
}, Ll = { class: "flex text-sm" }, Tl = ["label"], Fl = ["value"], Vl = {
|
|
3248
3296
|
name: "VFModalAbout"
|
|
3249
|
-
},
|
|
3297
|
+
}, Ol = /* @__PURE__ */ Object.assign(Vl, {
|
|
3250
3298
|
setup(p) {
|
|
3251
|
-
const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore:
|
|
3252
|
-
|
|
3299
|
+
const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore: o } = e.storage, { t: i, changeLocale: u, locale: d } = e.i18n;
|
|
3300
|
+
b(""), b("");
|
|
3253
3301
|
const l = async () => {
|
|
3254
|
-
|
|
3255
|
-
}, c = (
|
|
3256
|
-
e.theme.set(
|
|
3257
|
-
},
|
|
3302
|
+
o(), location.reload();
|
|
3303
|
+
}, c = (C) => {
|
|
3304
|
+
e.theme.set(C), e.emitter.emit("vf-theme-saved");
|
|
3305
|
+
}, g = () => {
|
|
3258
3306
|
e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? xe : ye, r("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved");
|
|
3259
|
-
},
|
|
3307
|
+
}, { i18n: _ } = F("VueFinderOptions"), y = Object.fromEntries(
|
|
3260
3308
|
Object.entries({
|
|
3261
3309
|
en: "English",
|
|
3262
3310
|
fr: "French (Français)",
|
|
@@ -3269,126 +3317,126 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
|
|
|
3269
3317
|
tr: "Turkish (Türkçe)",
|
|
3270
3318
|
zhCN: "Simplified Chinese (简体中文)",
|
|
3271
3319
|
zhTW: "Traditional Chinese (繁體中文)"
|
|
3272
|
-
}).filter(([
|
|
3273
|
-
),
|
|
3274
|
-
system:
|
|
3275
|
-
light:
|
|
3276
|
-
dark:
|
|
3277
|
-
};
|
|
3278
|
-
return (
|
|
3320
|
+
}).filter(([C]) => Object.keys(_).includes(C))
|
|
3321
|
+
), M = ee(() => ({
|
|
3322
|
+
system: i("System"),
|
|
3323
|
+
light: i("Light"),
|
|
3324
|
+
dark: i("Dark")
|
|
3325
|
+
}));
|
|
3326
|
+
return (C, k) => (n(), T(W, null, {
|
|
3279
3327
|
buttons: j(() => [
|
|
3280
3328
|
t("button", {
|
|
3281
3329
|
type: "button",
|
|
3282
|
-
onClick:
|
|
3330
|
+
onClick: k[5] || (k[5] = (f) => a(e).emitter.emit("vf-modal-close")),
|
|
3283
3331
|
class: "vf-btn vf-btn-secondary"
|
|
3284
|
-
},
|
|
3332
|
+
}, v(a(i)("Close")), 1)
|
|
3285
3333
|
]),
|
|
3286
3334
|
default: j(() => [
|
|
3287
|
-
t("div",
|
|
3288
|
-
|
|
3289
|
-
t("div",
|
|
3290
|
-
t("h3",
|
|
3291
|
-
t("div",
|
|
3292
|
-
t("p",
|
|
3335
|
+
t("div", cl, [
|
|
3336
|
+
ul,
|
|
3337
|
+
t("div", ml, [
|
|
3338
|
+
t("h3", vl, v(a(i)("About %s", "Vuefinder " + a(e).version)), 1),
|
|
3339
|
+
t("div", pl, [
|
|
3340
|
+
t("p", hl, v(a(i)("Vuefinder is a file manager component for vue 3.")), 1),
|
|
3293
3341
|
t("div", null, [
|
|
3294
|
-
t("h3",
|
|
3342
|
+
t("h3", fl, v(a(i)("Settings")), 1)
|
|
3295
3343
|
]),
|
|
3296
|
-
t("div",
|
|
3344
|
+
t("div", gl, [
|
|
3297
3345
|
t("fieldset", null, [
|
|
3298
|
-
t("div",
|
|
3299
|
-
t("div",
|
|
3300
|
-
t("div",
|
|
3346
|
+
t("div", _l, [
|
|
3347
|
+
t("div", kl, [
|
|
3348
|
+
t("div", bl, [
|
|
3301
3349
|
q(t("input", {
|
|
3302
3350
|
id: "metric_unit",
|
|
3303
3351
|
name: "metric_unit",
|
|
3304
3352
|
type: "checkbox",
|
|
3305
|
-
"onUpdate:modelValue":
|
|
3306
|
-
onClick:
|
|
3353
|
+
"onUpdate:modelValue": k[0] || (k[0] = (f) => a(e).metricUnits = f),
|
|
3354
|
+
onClick: g,
|
|
3307
3355
|
class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
|
|
3308
3356
|
}, null, 512), [
|
|
3309
|
-
[Fe,
|
|
3357
|
+
[Fe, a(e).metricUnits]
|
|
3310
3358
|
])
|
|
3311
3359
|
]),
|
|
3312
|
-
t("div",
|
|
3313
|
-
t("label",
|
|
3314
|
-
|
|
3315
|
-
|
|
3360
|
+
t("div", yl, [
|
|
3361
|
+
t("label", xl, [
|
|
3362
|
+
V(v(a(i)("Use Metric Units")) + " ", 1),
|
|
3363
|
+
H(ve, {
|
|
3316
3364
|
class: "ms-3",
|
|
3317
3365
|
on: "vf-metric-units-saved"
|
|
3318
3366
|
}, {
|
|
3319
3367
|
default: j(() => [
|
|
3320
|
-
|
|
3368
|
+
V(v(a(i)("Saved.")), 1)
|
|
3321
3369
|
]),
|
|
3322
3370
|
_: 1
|
|
3323
3371
|
})
|
|
3324
3372
|
])
|
|
3325
3373
|
])
|
|
3326
3374
|
]),
|
|
3327
|
-
t("div",
|
|
3328
|
-
t("div",
|
|
3329
|
-
t("label",
|
|
3375
|
+
t("div", wl, [
|
|
3376
|
+
t("div", $l, [
|
|
3377
|
+
t("label", Cl, v(a(i)("Theme")), 1)
|
|
3330
3378
|
]),
|
|
3331
|
-
t("div",
|
|
3379
|
+
t("div", Sl, [
|
|
3332
3380
|
q(t("select", {
|
|
3333
3381
|
id: "theme",
|
|
3334
|
-
"onUpdate:modelValue":
|
|
3335
|
-
onChange:
|
|
3382
|
+
"onUpdate:modelValue": k[1] || (k[1] = (f) => a(e).theme.value = f),
|
|
3383
|
+
onChange: k[2] || (k[2] = (f) => c(f.target.value)),
|
|
3336
3384
|
class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
|
|
3337
3385
|
}, [
|
|
3338
3386
|
t("optgroup", {
|
|
3339
|
-
label:
|
|
3387
|
+
label: a(i)("Theme")
|
|
3340
3388
|
}, [
|
|
3341
|
-
(n(),
|
|
3342
|
-
], 8,
|
|
3389
|
+
(n(!0), m(U, null, I(M.value, (f, O) => (n(), m("option", { value: O }, v(f), 9, El))), 256))
|
|
3390
|
+
], 8, Ml)
|
|
3343
3391
|
], 544), [
|
|
3344
|
-
[pe,
|
|
3392
|
+
[pe, a(e).theme.value]
|
|
3345
3393
|
]),
|
|
3346
|
-
|
|
3394
|
+
H(ve, {
|
|
3347
3395
|
class: "ms-3 flex-shrink-0 flex-grow basis-full",
|
|
3348
3396
|
on: "vf-theme-saved"
|
|
3349
3397
|
}, {
|
|
3350
3398
|
default: j(() => [
|
|
3351
|
-
|
|
3399
|
+
V(v(a(i)("Saved.")), 1)
|
|
3352
3400
|
]),
|
|
3353
3401
|
_: 1
|
|
3354
3402
|
})
|
|
3355
3403
|
])
|
|
3356
3404
|
]),
|
|
3357
|
-
|
|
3358
|
-
t("div",
|
|
3359
|
-
t("label",
|
|
3405
|
+
a(e).features.includes(a(N).LANGUAGE) && Object.keys(a(y)).length > 1 ? (n(), m("div", Dl, [
|
|
3406
|
+
t("div", jl, [
|
|
3407
|
+
t("label", Al, v(a(i)("Language")), 1)
|
|
3360
3408
|
]),
|
|
3361
|
-
t("div",
|
|
3409
|
+
t("div", Ll, [
|
|
3362
3410
|
q(t("select", {
|
|
3363
3411
|
id: "language",
|
|
3364
|
-
"onUpdate:modelValue":
|
|
3365
|
-
onChange:
|
|
3366
|
-
class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
|
|
3412
|
+
"onUpdate:modelValue": k[3] || (k[3] = (f) => _e(d) ? d.value = f : null),
|
|
3413
|
+
onChange: k[4] || (k[4] = (f) => a(u)(f.target.value)),
|
|
3414
|
+
class: "flex-shrink-0 w-1/2 sm:w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
|
|
3367
3415
|
}, [
|
|
3368
3416
|
t("optgroup", {
|
|
3369
|
-
label:
|
|
3417
|
+
label: a(i)("Language")
|
|
3370
3418
|
}, [
|
|
3371
|
-
(n(!0),
|
|
3419
|
+
(n(!0), m(U, null, I(a(y), (f, O) => (n(), m("option", { value: O }, v(f), 9, Fl))), 256))
|
|
3372
3420
|
], 8, Tl)
|
|
3373
3421
|
], 544), [
|
|
3374
|
-
[pe,
|
|
3422
|
+
[pe, a(d)]
|
|
3375
3423
|
]),
|
|
3376
|
-
|
|
3424
|
+
H(ve, {
|
|
3377
3425
|
class: "ms-3 flex-shrink-0 flex-grow basis-full",
|
|
3378
3426
|
on: "vf-language-saved"
|
|
3379
3427
|
}, {
|
|
3380
3428
|
default: j(() => [
|
|
3381
|
-
|
|
3429
|
+
V(v(a(i)("Saved.")), 1)
|
|
3382
3430
|
]),
|
|
3383
3431
|
_: 1
|
|
3384
3432
|
})
|
|
3385
3433
|
])
|
|
3386
|
-
])) :
|
|
3434
|
+
])) : S("", !0),
|
|
3387
3435
|
t("button", {
|
|
3388
3436
|
onClick: l,
|
|
3389
3437
|
type: "button",
|
|
3390
3438
|
class: "vf-btn vf-btn-secondary"
|
|
3391
|
-
},
|
|
3439
|
+
}, v(a(i)("Reset Settings")), 1)
|
|
3392
3440
|
])
|
|
3393
3441
|
])
|
|
3394
3442
|
])
|
|
@@ -3399,30 +3447,32 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
|
|
|
3399
3447
|
_: 1
|
|
3400
3448
|
}));
|
|
3401
3449
|
}
|
|
3402
|
-
}),
|
|
3450
|
+
}), Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3403
3451
|
__proto__: null,
|
|
3404
|
-
ModalAbout:
|
|
3405
|
-
ModalArchive:
|
|
3406
|
-
ModalDelete:
|
|
3407
|
-
ModalMessage:
|
|
3408
|
-
ModalMove:
|
|
3409
|
-
ModalNewFile:
|
|
3410
|
-
ModalNewFolder:
|
|
3411
|
-
ModalPreview:
|
|
3412
|
-
ModalRename:
|
|
3452
|
+
ModalAbout: Ol,
|
|
3453
|
+
ModalArchive: xn,
|
|
3454
|
+
ModalDelete: oo,
|
|
3455
|
+
ModalMessage: vo,
|
|
3456
|
+
ModalMove: rl,
|
|
3457
|
+
ModalNewFile: Ao,
|
|
3458
|
+
ModalNewFolder: xo,
|
|
3459
|
+
ModalPreview: br,
|
|
3460
|
+
ModalRename: Vr,
|
|
3413
3461
|
ModalUnarchive: zn,
|
|
3414
3462
|
ModalUpload: on
|
|
3415
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3463
|
+
}, Symbol.toStringTag, { value: "Module" })), Yl = {
|
|
3416
3464
|
/** @param {import('vue').App} app
|
|
3417
3465
|
* @param options
|
|
3418
3466
|
*/
|
|
3419
3467
|
install(p, e = {}) {
|
|
3420
|
-
p.component("VueFinder",
|
|
3421
|
-
for (const
|
|
3422
|
-
p.component(
|
|
3423
|
-
|
|
3468
|
+
p.component("VueFinder", Aa);
|
|
3469
|
+
for (const r of Object.values(Nl))
|
|
3470
|
+
p.component(r.name, r);
|
|
3471
|
+
e.i18n = e.i18n ?? {};
|
|
3472
|
+
let [s] = Object.keys(e.i18n);
|
|
3473
|
+
e.locale = e.locale ?? s ?? "en", p.provide("VueFinderOptions", e);
|
|
3424
3474
|
}
|
|
3425
3475
|
};
|
|
3426
3476
|
export {
|
|
3427
|
-
|
|
3477
|
+
Yl as default
|
|
3428
3478
|
};
|