vuefinder 2.2.3 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vuefinder.cjs +1 -1
- package/dist/vuefinder.js +249 -238
- package/package.json +1 -1
package/dist/vuefinder.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 ie, watch as de, ref as k, computed as ee, inject as F, openBlock as n, createElementBlock as m, unref as a, createCommentVNode as M, normalizeClass as z, createElementVNode as t, createTextVNode as V, toDisplayString as v, customRef as Me, withModifiers as Y, Fragment as U, renderList as
|
|
4
|
+
import { reactive as ie, watch as de, ref as k, computed as ee, inject as F, openBlock as n, createElementBlock as m, unref as a, createCommentVNode as M, normalizeClass as z, createElementVNode as t, createTextVNode as V, toDisplayString as v, customRef as Me, withModifiers as Y, Fragment as U, renderList as q, withDirectives as I, withKeys as Q, isRef as _e, vModelText as Z, nextTick as ce, createVNode as H, TransitionGroup as Ee, withCtx as A, 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
5
|
import Oe from "mitt";
|
|
6
6
|
import Ve from "dragselect";
|
|
7
7
|
import Ne from "vanilla-lazyload";
|
|
@@ -38,8 +38,8 @@ class He {
|
|
|
38
38
|
me != null && me !== "" && (r[s.xsrfHeaderName] = me);
|
|
39
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(([_, y]) => {
|
|
42
|
+
c.append(_, y);
|
|
43
43
|
})) : (c = { ...u }, s.body != null && Object.assign(c, this.config.body)));
|
|
44
44
|
const g = {
|
|
45
45
|
url: d,
|
|
@@ -135,7 +135,7 @@ function Re(p) {
|
|
|
135
135
|
};
|
|
136
136
|
return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new He(e);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ie(p) {
|
|
139
139
|
let e = localStorage.getItem(p + "_storage");
|
|
140
140
|
const s = ie(JSON.parse(e ?? "{}"));
|
|
141
141
|
de(s, r);
|
|
@@ -153,22 +153,22 @@ function qe(p) {
|
|
|
153
153
|
}
|
|
154
154
|
return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: o, removeStore: i, clearStore: u };
|
|
155
155
|
}
|
|
156
|
-
async function
|
|
156
|
+
async function qe(p, e) {
|
|
157
157
|
const s = e[p];
|
|
158
158
|
return typeof s == "function" ? (await s()).default : s;
|
|
159
159
|
}
|
|
160
160
|
function Pe(p, e, s, r) {
|
|
161
|
-
const { getStore: o, setStore: i } = p, u = k({}), d = k(o("locale", e)), l = (_,
|
|
162
|
-
|
|
163
|
-
u.value =
|
|
164
|
-
}).catch((
|
|
165
|
-
|
|
161
|
+
const { getStore: o, setStore: i } = p, u = k({}), d = k(o("locale", e)), l = (_, y = e) => {
|
|
162
|
+
qe(_, r).then((x) => {
|
|
163
|
+
u.value = x, i("locale", _), d.value = _, i("translations", x), Object.values(r).length > 1 && (s.emit("vf-toast-push", { label: "The language is set to " + _ }), s.emit("vf-language-saved"));
|
|
164
|
+
}).catch((x) => {
|
|
165
|
+
y ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l(y, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
168
|
!o("locale") && !r.length ? l(e) : u.value = o("translations");
|
|
169
|
-
const c = (_, ...
|
|
170
|
-
function g(_, ...
|
|
171
|
-
return u.value && u.value.hasOwnProperty(_) ? c(u.value[_], ...
|
|
169
|
+
const c = (_, ...y) => y.length ? c(_ = _.replace("%s", y.shift()), ...y) : _;
|
|
170
|
+
function g(_, ...y) {
|
|
171
|
+
return u.value && u.value.hasOwnProperty(_) ? c(u.value[_], ...y) : c(_, ...y);
|
|
172
172
|
}
|
|
173
173
|
return { t: g, changeLocale: l, locale: d };
|
|
174
174
|
}
|
|
@@ -186,7 +186,7 @@ const B = {
|
|
|
186
186
|
FULL_SCREEN: "fullscreen",
|
|
187
187
|
DOWNLOAD: "download",
|
|
188
188
|
LANGUAGE: "language"
|
|
189
|
-
}, We = Object.values(B), Ge = "2.2.
|
|
189
|
+
}, We = Object.values(B), Ge = "2.2.5";
|
|
190
190
|
function ye(p, e, s, r, o) {
|
|
191
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");
|
|
192
192
|
}
|
|
@@ -226,7 +226,7 @@ function Ke(p, e) {
|
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
228
|
const Je = (p, e) => {
|
|
229
|
-
const s =
|
|
229
|
+
const s = Ie(p.id), r = Oe(), 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
230
|
return ie({
|
|
231
231
|
// app version
|
|
232
232
|
version: Ge,
|
|
@@ -579,8 +579,8 @@ const Je = (p, e) => {
|
|
|
579
579
|
"clip-rule": "evenodd"
|
|
580
580
|
}, null, -1), Rt = [
|
|
581
581
|
Ht
|
|
582
|
-
],
|
|
583
|
-
|
|
582
|
+
], It = ["aria-label"], qt = /* @__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 = [
|
|
583
|
+
qt
|
|
584
584
|
], Wt = ["aria-label"], Gt = /* @__PURE__ */ t("path", {
|
|
585
585
|
"stroke-linecap": "round",
|
|
586
586
|
"stroke-linejoin": "round",
|
|
@@ -637,12 +637,12 @@ const Je = (p, e) => {
|
|
|
637
637
|
setup(p) {
|
|
638
638
|
const e = k(null), s = k([]), r = k(!1), o = k(null), i = F("ServiceContainer"), { t: u } = i.i18n;
|
|
639
639
|
i.emitter.on("vf-explorer-update", () => {
|
|
640
|
-
let
|
|
640
|
+
let $ = [], f = [];
|
|
641
641
|
e.value = i.data.dirname ?? i.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(i.adapter + "://", "").split("/").forEach(function(h) {
|
|
642
|
-
|
|
642
|
+
$.push(h), $.join("/") != "" && f.push({
|
|
643
643
|
basename: h,
|
|
644
644
|
name: h,
|
|
645
|
-
path: i.adapter + "://" +
|
|
645
|
+
path: i.adapter + "://" + $.join("/"),
|
|
646
646
|
type: "dir"
|
|
647
647
|
});
|
|
648
648
|
}), f.length > 4 && (f = f.slice(-5), f[0].name = ".."), s.value = f;
|
|
@@ -656,12 +656,12 @@ const Je = (p, e) => {
|
|
|
656
656
|
const l = () => {
|
|
657
657
|
i.features.includes(B.SEARCH) && (r.value = !0, ce(() => o.value.focus()));
|
|
658
658
|
}, c = Bt("", 400);
|
|
659
|
-
de(c, (
|
|
660
|
-
i.emitter.emit("vf-toast-clear"), i.emitter.emit("vf-search-query", { newQuery:
|
|
659
|
+
de(c, ($) => {
|
|
660
|
+
i.emitter.emit("vf-toast-clear"), i.emitter.emit("vf-search-query", { newQuery: $ });
|
|
661
661
|
});
|
|
662
|
-
const g = () => s.value.length && !r.value, _ = (
|
|
663
|
-
|
|
664
|
-
let h = JSON.parse(
|
|
662
|
+
const g = () => s.value.length && !r.value, _ = ($, f = null) => {
|
|
663
|
+
$.preventDefault(), x($), f ?? (f = s.value.length - 2);
|
|
664
|
+
let h = JSON.parse($.dataTransfer.getData("items"));
|
|
665
665
|
if (h.find((N) => N.storage !== i.adapter)) {
|
|
666
666
|
alert("Moving items between different storages is not supported yet.");
|
|
667
667
|
return;
|
|
@@ -670,22 +670,22 @@ const Je = (p, e) => {
|
|
|
670
670
|
type: "move",
|
|
671
671
|
items: { from: h, to: s.value[f] ?? { path: i.adapter + "://" } }
|
|
672
672
|
});
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
673
|
+
}, y = ($) => {
|
|
674
|
+
$.preventDefault(), g() ? ($.dataTransfer.dropEffect = "copy", $.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : ($.dataTransfer.dropEffect = "none", $.dataTransfer.effectAllowed = "none");
|
|
675
|
+
}, x = ($) => {
|
|
676
|
+
$.preventDefault(), $.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), g() && $.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
|
|
677
677
|
}, E = () => {
|
|
678
678
|
c.value == "" && d();
|
|
679
679
|
};
|
|
680
|
-
return (
|
|
680
|
+
return ($, f) => (n(), m("div", zt, [
|
|
681
681
|
t("span", {
|
|
682
682
|
"aria-label": a(u)("Go up a directory"),
|
|
683
683
|
"data-microtip-position": "bottom-right",
|
|
684
684
|
role: "tooltip"
|
|
685
685
|
}, [
|
|
686
686
|
(n(), m("svg", {
|
|
687
|
-
onDragover: f[0] || (f[0] = (h) =>
|
|
688
|
-
onDragleave: f[1] || (f[1] = (h) =>
|
|
687
|
+
onDragover: f[0] || (f[0] = (h) => y(h)),
|
|
688
|
+
onDragleave: f[1] || (f[1] = (h) => x(h)),
|
|
689
689
|
onDrop: f[2] || (f[2] = (h) => _(h)),
|
|
690
690
|
onClick: f[3] || (f[3] = (h) => {
|
|
691
691
|
var N;
|
|
@@ -727,10 +727,10 @@ const Je = (p, e) => {
|
|
|
727
727
|
viewBox: "-40 -40 580 580",
|
|
728
728
|
fill: "currentColor"
|
|
729
729
|
}, Pt))
|
|
730
|
-
], 8,
|
|
730
|
+
], 8, It)),
|
|
731
731
|
r.value ? (n(), m("div", os, [
|
|
732
732
|
rs,
|
|
733
|
-
|
|
733
|
+
I(t("input", {
|
|
734
734
|
ref_key: "searchInput",
|
|
735
735
|
ref: o,
|
|
736
736
|
onKeydown: Q(d, ["esc"]),
|
|
@@ -757,8 +757,8 @@ const Je = (p, e) => {
|
|
|
757
757
|
onClick: Y(l, ["self"])
|
|
758
758
|
}, [
|
|
759
759
|
(n(), m("svg", {
|
|
760
|
-
onDragover: f[6] || (f[6] = (h) =>
|
|
761
|
-
onDragleave: f[7] || (f[7] = (h) =>
|
|
760
|
+
onDragover: f[6] || (f[6] = (h) => y(h)),
|
|
761
|
+
onDragleave: f[7] || (f[7] = (h) => x(h)),
|
|
762
762
|
onDrop: f[8] || (f[8] = (h) => _(h, -1)),
|
|
763
763
|
onClick: f[9] || (f[9] = (h) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter } })),
|
|
764
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",
|
|
@@ -767,11 +767,11 @@ const Je = (p, e) => {
|
|
|
767
767
|
fill: "currentColor"
|
|
768
768
|
}, Jt, 32)),
|
|
769
769
|
t("div", Xt, [
|
|
770
|
-
(n(!0), m(U, null,
|
|
770
|
+
(n(!0), m(U, null, q(s.value, (h, N) => (n(), m("div", { key: N }, [
|
|
771
771
|
Qt,
|
|
772
772
|
t("span", {
|
|
773
|
-
onDragover: (R) => N === s.value.length - 1 ||
|
|
774
|
-
onDragleave: (R) => N === s.value.length - 1 ||
|
|
773
|
+
onDragover: (R) => N === s.value.length - 1 || y(R),
|
|
774
|
+
onDragleave: (R) => N === s.value.length - 1 || x(R),
|
|
775
775
|
onDrop: (R) => N === s.value.length - 1 || _(R, N),
|
|
776
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",
|
|
777
777
|
title: h.basename,
|
|
@@ -843,8 +843,8 @@ const Je = (p, e) => {
|
|
|
843
843
|
"leave-to-class": "opacity-0"
|
|
844
844
|
}, {
|
|
845
845
|
default: A(() => [
|
|
846
|
-
(n(!0), m(U, null,
|
|
847
|
-
onClick: (
|
|
846
|
+
(n(!0), m(U, null, q(o.value, (g, _) => (n(), m("div", {
|
|
847
|
+
onClick: (y) => u(_),
|
|
848
848
|
key: g,
|
|
849
849
|
class: z([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
850
|
}, v(g.label), 11, _s))), 128))
|
|
@@ -916,7 +916,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
916
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"
|
|
917
917
|
}, null, -1), Rs = [
|
|
918
918
|
Hs
|
|
919
|
-
],
|
|
919
|
+
], Is = {
|
|
920
920
|
key: 1,
|
|
921
921
|
xmlns: "http://www.w3.org/2000/svg",
|
|
922
922
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -924,12 +924,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
924
924
|
viewBox: "0 0 24 24",
|
|
925
925
|
stroke: "currentColor",
|
|
926
926
|
"stroke-width": "1"
|
|
927
|
-
},
|
|
927
|
+
}, qs = /* @__PURE__ */ t("path", {
|
|
928
928
|
"stroke-linecap": "round",
|
|
929
929
|
"stroke-linejoin": "round",
|
|
930
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"
|
|
931
931
|
}, null, -1), Ps = [
|
|
932
|
-
|
|
932
|
+
qs
|
|
933
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 = {
|
|
934
934
|
key: 0,
|
|
935
935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -967,17 +967,17 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
967
967
|
setup(p) {
|
|
968
968
|
const e = F("ServiceContainer"), { t: s } = e.i18n;
|
|
969
969
|
e.storage;
|
|
970
|
-
const r = (
|
|
970
|
+
const r = (w) => w == null ? void 0 : w.substring(0, 3), o = k(null), i = k(null), u = k(0), d = k(null), l = Math.floor(Math.random() * 2 ** 32), c = k("");
|
|
971
971
|
let g;
|
|
972
972
|
e.emitter.on("vf-fullscreen-toggle", () => {
|
|
973
973
|
o.value.style.height = null;
|
|
974
|
-
}), e.emitter.on("vf-search-query", ({ newQuery:
|
|
975
|
-
c.value =
|
|
974
|
+
}), e.emitter.on("vf-search-query", ({ newQuery: w }) => {
|
|
975
|
+
c.value = w, w ? e.emitter.emit("vf-fetch", {
|
|
976
976
|
params: {
|
|
977
977
|
q: "search",
|
|
978
978
|
adapter: e.data.adapter,
|
|
979
979
|
path: e.data.dirname,
|
|
980
|
-
filter:
|
|
980
|
+
filter: w
|
|
981
981
|
},
|
|
982
982
|
onSuccess: (D) => {
|
|
983
983
|
D.files.length || e.emitter.emit("vf-toast-push", { label: s("No search result found.") });
|
|
@@ -985,11 +985,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
985
985
|
}) : e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
|
|
986
986
|
});
|
|
987
987
|
let _ = null;
|
|
988
|
-
const
|
|
988
|
+
const y = () => {
|
|
989
989
|
_ && clearTimeout(_);
|
|
990
|
-
},
|
|
991
|
-
|
|
992
|
-
},
|
|
990
|
+
}, x = k(!0), E = (w) => {
|
|
991
|
+
w.touches.length > 1 && (x.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")), x.value = !x.value);
|
|
992
|
+
}, $ = (w) => {
|
|
993
993
|
_ = setTimeout(() => {
|
|
994
994
|
const D = new MouseEvent("contextmenu", {
|
|
995
995
|
bubbles: !0,
|
|
@@ -997,35 +997,35 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
997
997
|
view: window,
|
|
998
998
|
button: 2,
|
|
999
999
|
buttons: 0,
|
|
1000
|
-
clientX:
|
|
1001
|
-
clientY:
|
|
1000
|
+
clientX: w.target.getBoundingClientRect().x,
|
|
1001
|
+
clientY: w.target.getBoundingClientRect().y
|
|
1002
1002
|
});
|
|
1003
|
-
|
|
1003
|
+
w.target.dispatchEvent(D);
|
|
1004
1004
|
}, 500);
|
|
1005
|
-
}, f = (
|
|
1006
|
-
|
|
1007
|
-
}, h = ie({ active: !1, column: "", order: "" }), N = (
|
|
1008
|
-
let D = [...e.data.files],
|
|
1009
|
-
if (!
|
|
1005
|
+
}, f = (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
|
+
}, h = ie({ active: !1, column: "", order: "" }), N = (w = !0) => {
|
|
1008
|
+
let D = [...e.data.files], C = h.column, j = h.order == "asc" ? 1 : -1;
|
|
1009
|
+
if (!w)
|
|
1010
1010
|
return D;
|
|
1011
1011
|
const S = (b, L) => typeof b == "string" && typeof L == "string" ? b.toLowerCase().localeCompare(L.toLowerCase()) : b < L ? -1 : b > L ? 1 : 0;
|
|
1012
|
-
return h.active && (D = D.slice().sort((b, L) => S(b[
|
|
1013
|
-
}, R = (
|
|
1014
|
-
h.active && h.column ==
|
|
1015
|
-
}, K = () => d.value.getSelection().map((
|
|
1016
|
-
if (
|
|
1017
|
-
return
|
|
1018
|
-
|
|
1019
|
-
}, se = (
|
|
1020
|
-
|
|
1021
|
-
let
|
|
1022
|
-
if (
|
|
1012
|
+
return h.active && (D = D.slice().sort((b, L) => S(b[C], L[C]) * j)), D;
|
|
1013
|
+
}, R = (w) => {
|
|
1014
|
+
h.active && h.column == w ? (h.active = h.order == "asc", h.column = w, h.order = "desc") : (h.active = !0, h.column = w, h.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 C = JSON.parse(w.dataTransfer.getData("items"));
|
|
1022
|
+
if (C.find((j) => j.storage !== e.adapter)) {
|
|
1023
1023
|
alert("Moving items between different storages is not supported yet.");
|
|
1024
1024
|
return;
|
|
1025
1025
|
}
|
|
1026
|
-
e.emitter.emit("vf-modal-show", { type: "move", items: { from:
|
|
1027
|
-
}, ae = (
|
|
1028
|
-
|
|
1026
|
+
e.emitter.emit("vf-modal-show", { type: "move", items: { from: C, to: D } });
|
|
1027
|
+
}, ae = (w, D) => {
|
|
1028
|
+
w.preventDefault(), !D || D.type !== "dir" || d.value.getSelection().find((C) => C == w.currentTarget) ? (w.dataTransfer.dropEffect = "none", w.dataTransfer.effectAllowed = "none") : w.dataTransfer.dropEffect = "copy";
|
|
1029
1029
|
}, oe = () => {
|
|
1030
1030
|
d.value = new Ve({
|
|
1031
1031
|
area: o.value,
|
|
@@ -1036,16 +1036,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1036
1036
|
d.value.clearSelection(), d.value.setSettings({
|
|
1037
1037
|
selectables: document.getElementsByClassName("vf-item-" + l)
|
|
1038
1038
|
});
|
|
1039
|
-
})), d.value.subscribe("predragstart", ({ event:
|
|
1039
|
+
})), d.value.subscribe("predragstart", ({ event: w, isDragging: D }) => {
|
|
1040
1040
|
if (D)
|
|
1041
1041
|
u.value = d.value.getSelection().length, d.value.break();
|
|
1042
1042
|
else {
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1043
|
+
const C = w.target.offsetWidth - w.offsetX, j = w.target.offsetHeight - w.offsetY;
|
|
1044
|
+
C < 15 && j < 15 && (d.value.clearSelection(), d.value.break());
|
|
1045
1045
|
}
|
|
1046
|
-
}), d.value.subscribe("predragmove", ({ isDragging:
|
|
1047
|
-
|
|
1048
|
-
}), d.value.subscribe("callback", ({ items:
|
|
1046
|
+
}), d.value.subscribe("predragmove", ({ isDragging: w }) => {
|
|
1047
|
+
w && d.value.break();
|
|
1048
|
+
}), d.value.subscribe("callback", ({ items: w, event: D, isDragging: C }) => {
|
|
1049
1049
|
e.emitter.emit("vf-nodes-selected", K()), u.value = d.value.getSelection().length;
|
|
1050
1050
|
});
|
|
1051
1051
|
};
|
|
@@ -1057,14 +1057,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1057
1057
|
de(() => e.view, () => e.emitter.emit("vf-explorer-update"));
|
|
1058
1058
|
}), ke(() => {
|
|
1059
1059
|
g.destroy();
|
|
1060
|
-
}), (
|
|
1060
|
+
}), (w, D) => (n(), m("div", ys, [
|
|
1061
1061
|
a(e).view == "list" || c.value.length ? (n(), m("div", xs, [
|
|
1062
1062
|
t("div", {
|
|
1063
|
-
onClick: D[0] || (D[0] = (
|
|
1063
|
+
onClick: D[0] || (D[0] = (C) => R("basename")),
|
|
1064
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"
|
|
1065
1065
|
}, [
|
|
1066
1066
|
V(v(a(s)("Name")) + " ", 1),
|
|
1067
|
-
|
|
1067
|
+
I(H(ne, {
|
|
1068
1068
|
direction: h.order == "asc" ? "down" : "up"
|
|
1069
1069
|
}, null, 8, ["direction"]), [
|
|
1070
1070
|
[re, h.active && h.column == "basename"]
|
|
@@ -1072,11 +1072,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1072
1072
|
]),
|
|
1073
1073
|
c.value.length ? M("", !0) : (n(), m("div", {
|
|
1074
1074
|
key: 0,
|
|
1075
|
-
onClick: D[1] || (D[1] = (
|
|
1075
|
+
onClick: D[1] || (D[1] = (C) => R("file_size")),
|
|
1076
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"
|
|
1077
1077
|
}, [
|
|
1078
1078
|
V(v(a(s)("Size")) + " ", 1),
|
|
1079
|
-
|
|
1079
|
+
I(H(ne, {
|
|
1080
1080
|
direction: h.order == "asc" ? "down" : "up"
|
|
1081
1081
|
}, null, 8, ["direction"]), [
|
|
1082
1082
|
[re, h.active && h.column == "file_size"]
|
|
@@ -1084,11 +1084,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1084
1084
|
])),
|
|
1085
1085
|
c.value.length ? M("", !0) : (n(), m("div", {
|
|
1086
1086
|
key: 1,
|
|
1087
|
-
onClick: D[2] || (D[2] = (
|
|
1087
|
+
onClick: D[2] || (D[2] = (C) => R("last_modified")),
|
|
1088
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"
|
|
1089
1089
|
}, [
|
|
1090
1090
|
V(v(a(s)("Date")) + " ", 1),
|
|
1091
|
-
|
|
1091
|
+
I(H(ne, {
|
|
1092
1092
|
direction: h.order == "asc" ? "down" : "up"
|
|
1093
1093
|
}, null, 8, ["direction"]), [
|
|
1094
1094
|
[re, h.active && h.column == "last_modified"]
|
|
@@ -1096,11 +1096,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1096
1096
|
])),
|
|
1097
1097
|
c.value.length ? (n(), m("div", {
|
|
1098
1098
|
key: 2,
|
|
1099
|
-
onClick: D[3] || (D[3] = (
|
|
1099
|
+
onClick: D[3] || (D[3] = (C) => R("path")),
|
|
1100
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"
|
|
1101
1101
|
}, [
|
|
1102
1102
|
V(v(a(s)("Filepath")) + " ", 1),
|
|
1103
|
-
|
|
1103
|
+
I(H(ne, {
|
|
1104
1104
|
direction: h.order == "asc" ? "down" : "up"
|
|
1105
1105
|
}, null, 8, ["direction"]), [
|
|
1106
1106
|
[re, h.active && h.column == "path"]
|
|
@@ -1119,84 +1119,84 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1119
1119
|
]),
|
|
1120
1120
|
t("div", {
|
|
1121
1121
|
onTouchstart: E,
|
|
1122
|
-
onContextmenu: D[10] || (D[10] = Y((
|
|
1122
|
+
onContextmenu: D[10] || (D[10] = Y((C) => a(e).emitter.emit("vf-contextmenu-show", { event: C, area: o.value, items: K() }), ["self", "prevent"])),
|
|
1123
1123
|
class: z([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"]),
|
|
1124
1124
|
ref_key: "selectorArea",
|
|
1125
1125
|
ref: o
|
|
1126
1126
|
}, [
|
|
1127
|
-
c.value.length ? (n(!0), m(U, { key: 0 },
|
|
1128
|
-
onDblclick: (S) => f(
|
|
1129
|
-
onTouchstart: D[4] || (D[4] = (S) =>
|
|
1130
|
-
onTouchend: D[5] || (D[5] = (S) =>
|
|
1131
|
-
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target:
|
|
1127
|
+
c.value.length ? (n(!0), m(U, { key: 0 }, q(N(), (C, j) => (n(), m("div", {
|
|
1128
|
+
onDblclick: (S) => f(C),
|
|
1129
|
+
onTouchstart: D[4] || (D[4] = (S) => $(S)),
|
|
1130
|
+
onTouchend: D[5] || (D[5] = (S) => y()),
|
|
1131
|
+
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
|
|
1132
1132
|
class: z(["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"]),
|
|
1133
|
-
"data-type":
|
|
1134
|
-
"data-item": JSON.stringify(
|
|
1133
|
+
"data-type": C.type,
|
|
1134
|
+
"data-item": JSON.stringify(C),
|
|
1135
1135
|
"data-index": j
|
|
1136
1136
|
}, [
|
|
1137
1137
|
t("div", Ms, [
|
|
1138
1138
|
t("div", Es, [
|
|
1139
|
-
|
|
1140
|
-
t("span", Os, v(
|
|
1139
|
+
C.type === "dir" ? (n(), m("svg", Ds, As)) : (n(), m("svg", Ls, Fs)),
|
|
1140
|
+
t("span", Os, v(C.basename), 1)
|
|
1141
1141
|
]),
|
|
1142
|
-
t("div", Vs, v(
|
|
1142
|
+
t("div", Vs, v(C.path), 1)
|
|
1143
1143
|
])
|
|
1144
1144
|
], 42, Ss))), 256)) : M("", !0),
|
|
1145
|
-
a(e).view === "list" && !c.value.length ? (n(!0), m(U, { key: 1 },
|
|
1145
|
+
a(e).view === "list" && !c.value.length ? (n(!0), m(U, { key: 1 }, q(N(), (C, j) => (n(), m("div", {
|
|
1146
1146
|
draggable: "true",
|
|
1147
|
-
onDblclick: (S) => f(
|
|
1148
|
-
onTouchstart: D[6] || (D[6] = (S) =>
|
|
1149
|
-
onTouchend: D[7] || (D[7] = (S) =>
|
|
1150
|
-
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target:
|
|
1147
|
+
onDblclick: (S) => f(C),
|
|
1148
|
+
onTouchstart: D[6] || (D[6] = (S) => $(S)),
|
|
1149
|
+
onTouchend: D[7] || (D[7] = (S) => y()),
|
|
1150
|
+
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
|
|
1151
1151
|
onDragstart: (S) => te(S),
|
|
1152
|
-
onDragover: (S) => ae(S,
|
|
1153
|
-
onDrop: (S) => se(S,
|
|
1152
|
+
onDragover: (S) => ae(S, C),
|
|
1153
|
+
onDrop: (S) => se(S, C),
|
|
1154
1154
|
class: z(["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"]),
|
|
1155
|
-
"data-type":
|
|
1156
|
-
"data-item": JSON.stringify(
|
|
1155
|
+
"data-type": C.type,
|
|
1156
|
+
"data-item": JSON.stringify(C),
|
|
1157
1157
|
"data-index": j
|
|
1158
1158
|
}, [
|
|
1159
1159
|
t("div", Bs, [
|
|
1160
1160
|
t("div", zs, [
|
|
1161
|
-
|
|
1162
|
-
t("span", Ws, v(
|
|
1161
|
+
C.type === "dir" ? (n(), m("svg", Us, Rs)) : (n(), m("svg", Is, Ps)),
|
|
1162
|
+
t("span", Ws, v(C.basename), 1)
|
|
1163
1163
|
]),
|
|
1164
|
-
t("div", Gs, v(
|
|
1165
|
-
t("div", Ys, v(a(we)(
|
|
1164
|
+
t("div", Gs, v(C.file_size ? a(e).filesize(C.file_size) : ""), 1),
|
|
1165
|
+
t("div", Ys, v(a(we)(C.last_modified)), 1)
|
|
1166
1166
|
])
|
|
1167
1167
|
], 42, Ns))), 256)) : M("", !0),
|
|
1168
|
-
a(e).view === "grid" && !c.value.length ? (n(!0), m(U, { key: 2 },
|
|
1168
|
+
a(e).view === "grid" && !c.value.length ? (n(!0), m(U, { key: 2 }, q(N(!1), (C, j) => (n(), m("div", {
|
|
1169
1169
|
draggable: "true",
|
|
1170
|
-
onDblclick: (S) => f(
|
|
1171
|
-
onTouchstart: D[8] || (D[8] = (S) =>
|
|
1172
|
-
onTouchend: D[9] || (D[9] = (S) =>
|
|
1173
|
-
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target:
|
|
1170
|
+
onDblclick: (S) => f(C),
|
|
1171
|
+
onTouchstart: D[8] || (D[8] = (S) => $(S)),
|
|
1172
|
+
onTouchend: D[9] || (D[9] = (S) => y()),
|
|
1173
|
+
onContextmenu: Y((S) => a(e).emitter.emit("vf-contextmenu-show", { event: S, area: o.value, items: K(), target: C }), ["prevent"]),
|
|
1174
1174
|
onDragstart: (S) => te(S),
|
|
1175
|
-
onDragover: (S) => ae(S,
|
|
1176
|
-
onDrop: (S) => se(S,
|
|
1175
|
+
onDragover: (S) => ae(S, C),
|
|
1176
|
+
onDrop: (S) => se(S, C),
|
|
1177
1177
|
class: z(["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"]),
|
|
1178
|
-
"data-type":
|
|
1179
|
-
"data-item": JSON.stringify(
|
|
1178
|
+
"data-type": C.type,
|
|
1179
|
+
"data-item": JSON.stringify(C),
|
|
1180
1180
|
"data-index": j
|
|
1181
1181
|
}, [
|
|
1182
1182
|
t("div", null, [
|
|
1183
1183
|
t("div", Js, [
|
|
1184
|
-
|
|
1184
|
+
C.type === "dir" ? (n(), m("svg", Xs, Zs)) : (C.mime_type ?? "").startsWith("image") ? (n(), m("img", {
|
|
1185
1185
|
key: 1,
|
|
1186
1186
|
class: "lazy h-10 md:h-12 m-auto",
|
|
1187
|
-
"data-src": a(e).requester.getPreviewUrl(a(e).adapter,
|
|
1188
|
-
alt:
|
|
1187
|
+
"data-src": a(e).requester.getPreviewUrl(a(e).adapter, C),
|
|
1188
|
+
alt: C.basename
|
|
1189
1189
|
}, null, 8, ea)) : (n(), m("svg", ta, aa)),
|
|
1190
|
-
!(
|
|
1190
|
+
!(C.mime_type ?? "").startsWith("image") && C.type != "dir" ? (n(), m("div", oa, v(r(C.extension)), 1)) : M("", !0)
|
|
1191
1191
|
]),
|
|
1192
|
-
t("span", ra, v(a(he)(
|
|
1192
|
+
t("span", ra, v(a(he)(C.basename)), 1)
|
|
1193
1193
|
])
|
|
1194
1194
|
], 42, Ks))), 256)) : M("", !0)
|
|
1195
1195
|
], 34),
|
|
1196
1196
|
H(bs)
|
|
1197
1197
|
]));
|
|
1198
1198
|
}
|
|
1199
|
-
}), ia = ["
|
|
1199
|
+
}), ia = ["href", "download"], da = ["onClick"], ca = {
|
|
1200
1200
|
name: "VFContextMenu"
|
|
1201
1201
|
}, ua = /* @__PURE__ */ Object.assign(ca, {
|
|
1202
1202
|
setup(p) {
|
|
@@ -1256,8 +1256,6 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1256
1256
|
link: ee(() => e.requester.getDownloadUrl(e.data.adapter, o.value[0])),
|
|
1257
1257
|
title: () => s("Download"),
|
|
1258
1258
|
action: () => {
|
|
1259
|
-
const _ = e.requester.getDownloadUrl(e.data.adapter, o.value[0]);
|
|
1260
|
-
e.emitter.emit("vf-download", _);
|
|
1261
1259
|
}
|
|
1262
1260
|
},
|
|
1263
1261
|
archive: {
|
|
@@ -1286,43 +1284,56 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1286
1284
|
};
|
|
1287
1285
|
e.emitter.on("vf-search-query", ({ newQuery: _ }) => {
|
|
1288
1286
|
i.value = _;
|
|
1289
|
-
}), e.emitter.on("vf-contextmenu-show", ({ event: _, area:
|
|
1287
|
+
}), e.emitter.on("vf-contextmenu-show", ({ event: _, area: y, items: x, target: E = null }) => {
|
|
1290
1288
|
if (u.items = [], i.value)
|
|
1291
1289
|
if (E)
|
|
1292
1290
|
u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [E]);
|
|
1293
1291
|
else
|
|
1294
1292
|
return;
|
|
1295
1293
|
else
|
|
1296
|
-
!E && !i.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) :
|
|
1297
|
-
g(_,
|
|
1294
|
+
!E && !i.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : x.length > 1 && x.some(($) => $.path === E.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", x)) : (E.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), E.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", [E]));
|
|
1295
|
+
g(_, y);
|
|
1298
1296
|
}), e.emitter.on("vf-contextmenu-hide", () => {
|
|
1299
1297
|
u.active = !1;
|
|
1300
1298
|
});
|
|
1301
|
-
const g = (_,
|
|
1299
|
+
const g = (_, y) => {
|
|
1302
1300
|
u.active = !0, ce(() => {
|
|
1303
|
-
const
|
|
1304
|
-
let
|
|
1305
|
-
|
|
1306
|
-
left:
|
|
1301
|
+
const x = e.root.getBoundingClientRect(), E = y.getBoundingClientRect();
|
|
1302
|
+
let $ = _.pageX - x.left, f = _.pageY - x.top, h = r.value.offsetHeight, N = r.value.offsetWidth;
|
|
1303
|
+
$ = E.right - _.pageX + window.scrollX < N ? $ - N : $, f = E.bottom - _.pageY + window.scrollY < h ? f - h : f, u.positions = {
|
|
1304
|
+
left: $ + "px",
|
|
1307
1305
|
top: f + "px"
|
|
1308
1306
|
};
|
|
1309
1307
|
});
|
|
1310
1308
|
};
|
|
1311
|
-
return (_,
|
|
1309
|
+
return (_, y) => u.active ? (n(), m("ul", {
|
|
1312
1310
|
key: 0,
|
|
1313
1311
|
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",
|
|
1314
1312
|
ref_key: "contextmenu",
|
|
1315
1313
|
ref: r,
|
|
1316
1314
|
style: be(u.positions)
|
|
1317
1315
|
}, [
|
|
1318
|
-
(n(!0), m(U, null,
|
|
1319
|
-
class: "
|
|
1320
|
-
key:
|
|
1321
|
-
onClick: (E) => c(C)
|
|
1316
|
+
(n(!0), m(U, null, q(d.value, (x) => (n(), m("li", {
|
|
1317
|
+
class: "cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
|
|
1318
|
+
key: x.title
|
|
1322
1319
|
}, [
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1320
|
+
x.link ? (n(), m("a", {
|
|
1321
|
+
key: 0,
|
|
1322
|
+
class: "block pl-2 pr-3 py-1",
|
|
1323
|
+
target: "_blank",
|
|
1324
|
+
href: x.link,
|
|
1325
|
+
download: x.link,
|
|
1326
|
+
onClick: y[0] || (y[0] = (E) => a(e).emitter.emit("vf-contextmenu-hide"))
|
|
1327
|
+
}, [
|
|
1328
|
+
t("span", null, v(x.title()), 1)
|
|
1329
|
+
], 8, ia)) : (n(), m("div", {
|
|
1330
|
+
key: 1,
|
|
1331
|
+
class: "pl-2 pr-3 py-1",
|
|
1332
|
+
onClick: (E) => c(x)
|
|
1333
|
+
}, [
|
|
1334
|
+
t("span", null, v(x.title()), 1)
|
|
1335
|
+
], 8, da))
|
|
1336
|
+
]))), 128))
|
|
1326
1337
|
], 4)) : M("", !0);
|
|
1327
1338
|
}
|
|
1328
1339
|
}), ma = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, va = { class: "flex leading-5 items-center" }, pa = ["aria-label"], ha = /* @__PURE__ */ t("svg", {
|
|
@@ -1381,12 +1392,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1381
1392
|
"data-microtip-position": "top-right",
|
|
1382
1393
|
role: "tooltip"
|
|
1383
1394
|
}, fa, 8, pa),
|
|
1384
|
-
|
|
1395
|
+
I(t("select", {
|
|
1385
1396
|
"onUpdate:modelValue": c[0] || (c[0] = (g) => a(e).adapter = g),
|
|
1386
1397
|
onChange: i,
|
|
1387
1398
|
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"
|
|
1388
1399
|
}, [
|
|
1389
|
-
(n(!0), m(U, null,
|
|
1400
|
+
(n(!0), m(U, null, q(a(e).data.storages, (g) => (n(), m("option", { value: g }, v(g), 9, ga))), 256))
|
|
1390
1401
|
], 544), [
|
|
1391
1402
|
[pe, a(e).adapter]
|
|
1392
1403
|
]),
|
|
@@ -1492,7 +1503,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1492
1503
|
let l;
|
|
1493
1504
|
return o.emitter.on("vf-fetch-abort", () => {
|
|
1494
1505
|
l.abort(), o.loading = !1;
|
|
1495
|
-
}), o.emitter.on("vf-fetch", ({ params: c, body: g = null, onSuccess: _ = null, onError:
|
|
1506
|
+
}), o.emitter.on("vf-fetch", ({ params: c, body: g = null, onSuccess: _ = null, onError: y = null, noCloseModal: x = !1 }) => {
|
|
1496
1507
|
["index", "search"].includes(c.q) && (l && l.abort(), o.loading = !0), l = new AbortController();
|
|
1497
1508
|
const E = l.signal;
|
|
1498
1509
|
o.requester.send({
|
|
@@ -1501,10 +1512,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1501
1512
|
params: c,
|
|
1502
1513
|
body: g,
|
|
1503
1514
|
abortSignal: E
|
|
1504
|
-
}).then((
|
|
1505
|
-
o.adapter =
|
|
1506
|
-
}).catch((
|
|
1507
|
-
console.error(
|
|
1515
|
+
}).then(($) => {
|
|
1516
|
+
o.adapter = $.adapter, o.persist && (o.path = $.dirname, i("path", o.path)), ["index", "search"].includes(c.q) && (o.loading = !1), x || o.emitter.emit("vf-modal-close"), d($), _ && _($);
|
|
1517
|
+
}).catch(($) => {
|
|
1518
|
+
console.error($), y && y($);
|
|
1508
1519
|
});
|
|
1509
1520
|
}), o.emitter.on("vf-download", (c) => {
|
|
1510
1521
|
const g = document.createElement("a");
|
|
@@ -1645,7 +1656,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1645
1656
|
], -1), Ha = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ra = {
|
|
1646
1657
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1647
1658
|
id: "modal-title"
|
|
1648
|
-
},
|
|
1659
|
+
}, Ia = { class: "mt-2" }, qa = { class: "text-sm text-gray-500" }, Pa = {
|
|
1649
1660
|
class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
|
|
1650
1661
|
style: { "max-height": "200px" }
|
|
1651
1662
|
}, Wa = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ga = {
|
|
@@ -1720,10 +1731,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1720
1731
|
Ua,
|
|
1721
1732
|
t("div", Ha, [
|
|
1722
1733
|
t("h3", Ra, v(a(s)("Delete files")), 1),
|
|
1723
|
-
t("div",
|
|
1724
|
-
t("p",
|
|
1734
|
+
t("div", Ia, [
|
|
1735
|
+
t("p", qa, v(a(s)("Are you sure you want to delete these files?")), 1),
|
|
1725
1736
|
t("div", Pa, [
|
|
1726
|
-
(n(!0), m(U, null,
|
|
1737
|
+
(n(!0), m(U, null, q(r.value, (l) => (n(), m("p", Wa, [
|
|
1727
1738
|
l.type === "dir" ? (n(), m("svg", Ga, Ka)) : (n(), m("svg", Ja, Qa)),
|
|
1728
1739
|
t("span", Za, v(l.basename), 1)
|
|
1729
1740
|
]))), 256))
|
|
@@ -1856,7 +1867,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1856
1867
|
t("h3", ho, v(a(s)("New Folder")), 1),
|
|
1857
1868
|
t("div", fo, [
|
|
1858
1869
|
t("p", go, v(a(s)("Create a new folder")), 1),
|
|
1859
|
-
|
|
1870
|
+
I(t("input", {
|
|
1860
1871
|
"onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
|
|
1861
1872
|
onKeyup: Q(i, ["enter"]),
|
|
1862
1873
|
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",
|
|
@@ -1945,7 +1956,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1945
1956
|
t("h3", $o, v(a(s)("New File")), 1),
|
|
1946
1957
|
t("div", Co, [
|
|
1947
1958
|
t("p", So, v(a(s)("Create a new file")), 1),
|
|
1948
|
-
|
|
1959
|
+
I(t("input", {
|
|
1949
1960
|
"onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
|
|
1950
1961
|
onKeyup: Q(i, ["enter"]),
|
|
1951
1962
|
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",
|
|
@@ -1985,15 +1996,15 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
1985
1996
|
method: "get",
|
|
1986
1997
|
params: { q: "preview", adapter: c.modal.data.adapter, path: c.modal.data.item.path },
|
|
1987
1998
|
responseType: "text"
|
|
1988
|
-
}).then((
|
|
1989
|
-
r.value =
|
|
1999
|
+
}).then((x) => {
|
|
2000
|
+
r.value = x, s("success");
|
|
1990
2001
|
});
|
|
1991
2002
|
});
|
|
1992
2003
|
const _ = () => {
|
|
1993
2004
|
u.value = !u.value, o.value = r.value, u.value == !0 && ce(() => {
|
|
1994
2005
|
i.value.focus();
|
|
1995
2006
|
});
|
|
1996
|
-
},
|
|
2007
|
+
}, y = () => {
|
|
1997
2008
|
d.value = "", l.value = !1, c.requester.send({
|
|
1998
2009
|
url: "",
|
|
1999
2010
|
method: "post",
|
|
@@ -2006,13 +2017,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2006
2017
|
content: o.value
|
|
2007
2018
|
},
|
|
2008
2019
|
responseType: "text"
|
|
2009
|
-
}).then((
|
|
2010
|
-
d.value = g("Updated."), r.value =
|
|
2011
|
-
}).catch((
|
|
2012
|
-
d.value = g(
|
|
2020
|
+
}).then((x) => {
|
|
2021
|
+
d.value = g("Updated."), r.value = x, s("success"), u.value = !u.value;
|
|
2022
|
+
}).catch((x) => {
|
|
2023
|
+
d.value = g(x.message), l.value = !0;
|
|
2013
2024
|
});
|
|
2014
2025
|
};
|
|
2015
|
-
return (
|
|
2026
|
+
return (x, E) => (n(), m(U, null, [
|
|
2016
2027
|
t("div", jo, [
|
|
2017
2028
|
t("div", {
|
|
2018
2029
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
@@ -2024,22 +2035,22 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2024
2035
|
t("div", Lo, [
|
|
2025
2036
|
u.value ? (n(), m("button", {
|
|
2026
2037
|
key: 0,
|
|
2027
|
-
onClick:
|
|
2038
|
+
onClick: y,
|
|
2028
2039
|
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"
|
|
2029
2040
|
}, v(a(g)("Save")), 1)) : M("", !0),
|
|
2030
2041
|
a(c).features.includes(a(B).EDIT) ? (n(), m("button", {
|
|
2031
2042
|
key: 1,
|
|
2032
2043
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
2033
|
-
onClick: E[0] || (E[0] = (
|
|
2044
|
+
onClick: E[0] || (E[0] = ($) => _())
|
|
2034
2045
|
}, v(u.value ? a(g)("Cancel") : a(g)("Edit")), 1)) : M("", !0)
|
|
2035
2046
|
])
|
|
2036
2047
|
]),
|
|
2037
2048
|
t("div", null, [
|
|
2038
2049
|
u.value ? (n(), m("div", Fo, [
|
|
2039
|
-
|
|
2050
|
+
I(t("textarea", {
|
|
2040
2051
|
ref_key: "editInput",
|
|
2041
2052
|
ref: i,
|
|
2042
|
-
"onUpdate:modelValue": E[1] || (E[1] = (
|
|
2053
|
+
"onUpdate:modelValue": E[1] || (E[1] = ($) => o.value = $),
|
|
2043
2054
|
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",
|
|
2044
2055
|
name: "text",
|
|
2045
2056
|
id: "",
|
|
@@ -2051,7 +2062,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2051
2062
|
])) : (n(), m("pre", To, v(r.value), 1)),
|
|
2052
2063
|
d.value.length ? (n(), T(G, {
|
|
2053
2064
|
key: 2,
|
|
2054
|
-
onHidden: E[2] || (E[2] = (
|
|
2065
|
+
onHidden: E[2] || (E[2] = ($) => d.value = ""),
|
|
2055
2066
|
error: l.value
|
|
2056
2067
|
}, {
|
|
2057
2068
|
default: A(() => [
|
|
@@ -2068,7 +2079,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2068
2079
|
setup(p, { emit: e }) {
|
|
2069
2080
|
const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = k(null), u = k(null), d = k(!1), l = k(""), c = k(!1), g = () => {
|
|
2070
2081
|
d.value = !d.value, d.value ? u.value = new Be(i.value, {
|
|
2071
|
-
crop(
|
|
2082
|
+
crop(y) {
|
|
2072
2083
|
}
|
|
2073
2084
|
}) : u.value.destroy();
|
|
2074
2085
|
}, _ = () => {
|
|
@@ -2076,10 +2087,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2076
2087
|
width: 795,
|
|
2077
2088
|
height: 341
|
|
2078
2089
|
}).toBlob(
|
|
2079
|
-
(
|
|
2090
|
+
(y) => {
|
|
2080
2091
|
l.value = "", c.value = !1;
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2092
|
+
const x = new FormData();
|
|
2093
|
+
x.set("file", y), r.requester.send({
|
|
2083
2094
|
url: "",
|
|
2084
2095
|
method: "post",
|
|
2085
2096
|
params: {
|
|
@@ -2087,7 +2098,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2087
2098
|
adapter: r.modal.data.adapter,
|
|
2088
2099
|
path: r.modal.data.item.path
|
|
2089
2100
|
},
|
|
2090
|
-
body:
|
|
2101
|
+
body: x
|
|
2091
2102
|
}).then((E) => {
|
|
2092
2103
|
l.value = o("Updated."), i.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), g(), s("success");
|
|
2093
2104
|
}).catch((E) => {
|
|
@@ -2098,7 +2109,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2098
2109
|
};
|
|
2099
2110
|
return P(() => {
|
|
2100
2111
|
s("success");
|
|
2101
|
-
}), (
|
|
2112
|
+
}), (y, x) => (n(), m(U, null, [
|
|
2102
2113
|
t("div", Vo, [
|
|
2103
2114
|
t("h3", {
|
|
2104
2115
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
@@ -2116,7 +2127,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2116
2127
|
a(r).features.includes(a(B).EDIT) ? (n(), m("button", {
|
|
2117
2128
|
key: 1,
|
|
2118
2129
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
2119
|
-
onClick:
|
|
2130
|
+
onClick: x[0] || (x[0] = (E) => g())
|
|
2120
2131
|
}, v(d.value ? a(o)("Cancel") : a(o)("Edit")), 1)) : M("", !0)
|
|
2121
2132
|
])
|
|
2122
2133
|
]),
|
|
@@ -2131,7 +2142,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2131
2142
|
]),
|
|
2132
2143
|
l.value.length ? (n(), T(G, {
|
|
2133
2144
|
key: 0,
|
|
2134
|
-
onHidden:
|
|
2145
|
+
onHidden: x[1] || (x[1] = (E) => l.value = ""),
|
|
2135
2146
|
error: c.value
|
|
2136
2147
|
}, {
|
|
2137
2148
|
default: A(() => [
|
|
@@ -2141,7 +2152,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2141
2152
|
}, 8, ["error"])) : M("", !0)
|
|
2142
2153
|
], 64));
|
|
2143
2154
|
}
|
|
2144
|
-
}, Ro = { class: "flex" },
|
|
2155
|
+
}, Ro = { class: "flex" }, Io = ["aria-label"], qo = /* @__PURE__ */ t("div", null, null, -1), Po = {
|
|
2145
2156
|
__name: "Default",
|
|
2146
2157
|
emits: ["success"],
|
|
2147
2158
|
setup(p, { emit: e }) {
|
|
@@ -2156,9 +2167,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2156
2167
|
"aria-label": a(s).modal.data.item.path,
|
|
2157
2168
|
"data-microtip-position": "bottom-right",
|
|
2158
2169
|
role: "tooltip"
|
|
2159
|
-
}, v(a(s).modal.data.item.basename), 9,
|
|
2170
|
+
}, v(a(s).modal.data.item.basename), 9, Io)
|
|
2160
2171
|
]),
|
|
2161
|
-
|
|
2172
|
+
qo
|
|
2162
2173
|
], 64));
|
|
2163
2174
|
}
|
|
2164
2175
|
}, Wo = ["aria-label"], Go = {
|
|
@@ -2448,7 +2459,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2448
2459
|
r.value.type === "dir" ? (n(), m("svg", Cr, Mr)) : (n(), m("svg", Er, jr)),
|
|
2449
2460
|
t("span", Ar, v(r.value.basename), 1)
|
|
2450
2461
|
]),
|
|
2451
|
-
|
|
2462
|
+
I(t("input", {
|
|
2452
2463
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
|
|
2453
2464
|
onKeyup: Q(u, ["enter"]),
|
|
2454
2465
|
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",
|
|
@@ -2498,7 +2509,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2498
2509
|
}, Ur = {
|
|
2499
2510
|
key: 1,
|
|
2500
2511
|
class: "pointer-events-none"
|
|
2501
|
-
}, Hr = ["disabled"], Rr = ["disabled"],
|
|
2512
|
+
}, Hr = ["disabled"], Rr = ["disabled"], Ir = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, qr = { 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" }, Pr = ["textContent"], Wr = { class: "ml-1 w-full h-fit" }, Gr = { class: "text-left hidden md:block" }, Yr = { class: "text-left md:hidden" }, Kr = {
|
|
2502
2513
|
key: 0,
|
|
2503
2514
|
class: "ml-auto"
|
|
2504
2515
|
}, Jr = ["title", "disabled", "onClick"], Xr = /* @__PURE__ */ t("svg", {
|
|
@@ -2529,10 +2540,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2529
2540
|
UPLOADING: 2,
|
|
2530
2541
|
ERROR: 3,
|
|
2531
2542
|
DONE: 10
|
|
2532
|
-
}, i = k({ QUEUE_ENTRY_STATUS: o }), u = k(null), d = k(null), l = k(null), c = k(null), g = k(null), _ = k(null),
|
|
2543
|
+
}, i = k({ QUEUE_ENTRY_STATUS: o }), u = k(null), d = k(null), l = k(null), c = k(null), g = k(null), _ = k(null), y = k([]), x = k(""), E = k(!1), $ = k(!1);
|
|
2533
2544
|
let f;
|
|
2534
2545
|
function h(j) {
|
|
2535
|
-
return
|
|
2546
|
+
return y.value.findIndex((S) => S.id === j);
|
|
2536
2547
|
}
|
|
2537
2548
|
function N(j, S = null) {
|
|
2538
2549
|
S = S ?? (j.webkitRelativePath || j.name), f.addFile({
|
|
@@ -2572,39 +2583,39 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2572
2583
|
}
|
|
2573
2584
|
function se() {
|
|
2574
2585
|
if (!E.value) {
|
|
2575
|
-
if (!
|
|
2576
|
-
|
|
2586
|
+
if (!y.value.filter((j) => j.status !== o.DONE).length) {
|
|
2587
|
+
x.value = s("Please select file to upload first.");
|
|
2577
2588
|
return;
|
|
2578
2589
|
}
|
|
2579
|
-
|
|
2590
|
+
x.value = "", f.retryAll(), f.upload();
|
|
2580
2591
|
}
|
|
2581
2592
|
}
|
|
2582
2593
|
function ae() {
|
|
2583
|
-
f.cancelAll({ reason: "user" }),
|
|
2594
|
+
f.cancelAll({ reason: "user" }), y.value.forEach((j) => {
|
|
2584
2595
|
j.status !== o.DONE && (j.status = o.CANCELED, j.statusName = s("Canceled"));
|
|
2585
2596
|
}), E.value = !1;
|
|
2586
2597
|
}
|
|
2587
2598
|
function oe(j) {
|
|
2588
|
-
E.value || (f.removeFile(j.id, "removed-by-user"),
|
|
2599
|
+
E.value || (f.removeFile(j.id, "removed-by-user"), y.value.splice(h(j.id), 1));
|
|
2589
2600
|
}
|
|
2590
|
-
function
|
|
2601
|
+
function w(j) {
|
|
2591
2602
|
if (!E.value) {
|
|
2592
2603
|
if (f.cancelAll({ reason: "user" }), j) {
|
|
2593
2604
|
const S = [];
|
|
2594
|
-
|
|
2605
|
+
y.value.forEach((b) => {
|
|
2595
2606
|
b.status !== o.DONE && S.push(b);
|
|
2596
|
-
}),
|
|
2607
|
+
}), y.value = [], S.forEach((b) => {
|
|
2597
2608
|
N(b.originalFile, b.name);
|
|
2598
2609
|
});
|
|
2599
2610
|
return;
|
|
2600
2611
|
}
|
|
2601
|
-
|
|
2612
|
+
y.value.splice(0);
|
|
2602
2613
|
}
|
|
2603
2614
|
}
|
|
2604
2615
|
function D() {
|
|
2605
2616
|
e.emitter.emit("vf-modal-close");
|
|
2606
2617
|
}
|
|
2607
|
-
function
|
|
2618
|
+
function C() {
|
|
2608
2619
|
return e.requester.transformRequestParams({
|
|
2609
2620
|
url: "",
|
|
2610
2621
|
method: "post",
|
|
@@ -2623,9 +2634,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2623
2634
|
onBeforeFileAdded(b, L) {
|
|
2624
2635
|
if (L[b.id] != null) {
|
|
2625
2636
|
const X = h(b.id);
|
|
2626
|
-
|
|
2637
|
+
y.value[X].status === o.PENDING && (x.value = f.i18n("noDuplicates", { fileName: b.name })), y.value = y.value.filter((ue) => ue.id !== b.id);
|
|
2627
2638
|
}
|
|
2628
|
-
return
|
|
2639
|
+
return y.value.push({
|
|
2629
2640
|
id: b.id,
|
|
2630
2641
|
name: b.name,
|
|
2631
2642
|
size: e.filesize(b.size),
|
|
@@ -2649,26 +2660,26 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2649
2660
|
return new Error(O);
|
|
2650
2661
|
}
|
|
2651
2662
|
}), f.on("restriction-failed", (b, L) => {
|
|
2652
|
-
const O =
|
|
2653
|
-
oe(O),
|
|
2663
|
+
const O = y.value[h(b.id)];
|
|
2664
|
+
oe(O), x.value = L.message;
|
|
2654
2665
|
}), f.on("upload", () => {
|
|
2655
|
-
const b =
|
|
2666
|
+
const b = C();
|
|
2656
2667
|
f.setMeta({ ...b.body });
|
|
2657
2668
|
const L = f.getPlugin("XHRUpload");
|
|
2658
|
-
L.opts.method = b.method, L.opts.endpoint = b.url + "?" + new URLSearchParams(b.params), L.opts.headers = b.headers, E.value = !0,
|
|
2669
|
+
L.opts.method = b.method, L.opts.endpoint = b.url + "?" + new URLSearchParams(b.params), L.opts.headers = b.headers, E.value = !0, y.value.forEach((O) => {
|
|
2659
2670
|
O.status !== o.DONE && (O.percent = null, O.status = o.UPLOADING, O.statusName = s("Pending upload"));
|
|
2660
2671
|
});
|
|
2661
2672
|
}), f.on("upload-progress", (b, L) => {
|
|
2662
2673
|
const O = Math.floor(L.bytesUploaded / L.bytesTotal * 100);
|
|
2663
|
-
|
|
2674
|
+
y.value[h(b.id)].percent = `${O}%`;
|
|
2664
2675
|
}), f.on("upload-success", (b) => {
|
|
2665
|
-
const L =
|
|
2676
|
+
const L = y.value[h(b.id)];
|
|
2666
2677
|
L.status = o.DONE, L.statusName = s("Done");
|
|
2667
2678
|
}), f.on("upload-error", (b, L) => {
|
|
2668
|
-
const O =
|
|
2679
|
+
const O = y.value[h(b.id)];
|
|
2669
2680
|
O.percent = null, O.status = o.ERROR, L.isNetworkError ? O.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : O.statusName = L ? L.message : s("Unknown Error");
|
|
2670
2681
|
}), f.on("error", (b) => {
|
|
2671
|
-
|
|
2682
|
+
x.value = b.message, E.value = !1, e.emitter.emit("vf-fetch", {
|
|
2672
2683
|
params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
|
|
2673
2684
|
noCloseModal: !0
|
|
2674
2685
|
});
|
|
@@ -2682,9 +2693,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2682
2693
|
}), g.value.addEventListener("click", () => {
|
|
2683
2694
|
l.value.click();
|
|
2684
2695
|
}), _.value.addEventListener("dragover", (b) => {
|
|
2685
|
-
b.preventDefault(),
|
|
2696
|
+
b.preventDefault(), $.value = !0;
|
|
2686
2697
|
}), _.value.addEventListener("dragleave", (b) => {
|
|
2687
|
-
b.preventDefault(),
|
|
2698
|
+
b.preventDefault(), $.value = !1;
|
|
2688
2699
|
});
|
|
2689
2700
|
function j(b, L) {
|
|
2690
2701
|
L.isFile && L.file((O) => b(L, O)), L.isDirectory && L.createReader().readEntries((O) => {
|
|
@@ -2694,7 +2705,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2694
2705
|
});
|
|
2695
2706
|
}
|
|
2696
2707
|
_.value.addEventListener("drop", (b) => {
|
|
2697
|
-
b.preventDefault(),
|
|
2708
|
+
b.preventDefault(), $.value = !1;
|
|
2698
2709
|
const L = /^[/\\](.+)/;
|
|
2699
2710
|
[...b.dataTransfer.items].forEach((O) => {
|
|
2700
2711
|
O.kind === "file" && j((X, ue) => {
|
|
@@ -2744,7 +2755,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2744
2755
|
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]",
|
|
2745
2756
|
onClick: te
|
|
2746
2757
|
}, [
|
|
2747
|
-
|
|
2758
|
+
$.value ? (n(), m("div", zr, v(a(s)("Release to drop these files.")), 1)) : (n(), m("div", Ur, v(a(s)("Drag and drop the files/folders to here or click here.")), 1))
|
|
2748
2759
|
], 512),
|
|
2749
2760
|
t("div", {
|
|
2750
2761
|
ref_key: "container",
|
|
@@ -2767,21 +2778,21 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2767
2778
|
type: "button",
|
|
2768
2779
|
class: "vf-btn vf-btn-secondary",
|
|
2769
2780
|
disabled: E.value,
|
|
2770
|
-
onClick: S[0] || (S[0] = (b) =>
|
|
2781
|
+
onClick: S[0] || (S[0] = (b) => w(!1))
|
|
2771
2782
|
}, v(a(s)("Clear all")), 9, Hr),
|
|
2772
2783
|
t("button", {
|
|
2773
2784
|
type: "button",
|
|
2774
2785
|
class: "vf-btn vf-btn-secondary",
|
|
2775
2786
|
disabled: E.value,
|
|
2776
|
-
onClick: S[1] || (S[1] = (b) =>
|
|
2787
|
+
onClick: S[1] || (S[1] = (b) => w(!0))
|
|
2777
2788
|
}, v(a(s)("Clear only successful")), 9, Rr)
|
|
2778
2789
|
], 512),
|
|
2779
|
-
t("div",
|
|
2780
|
-
(n(!0), m(U, null,
|
|
2790
|
+
t("div", Ir, [
|
|
2791
|
+
(n(!0), m(U, null, q(y.value, (b) => (n(), m("div", {
|
|
2781
2792
|
class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
|
|
2782
2793
|
key: b.id
|
|
2783
2794
|
}, [
|
|
2784
|
-
t("span",
|
|
2795
|
+
t("span", qr, [
|
|
2785
2796
|
t("span", {
|
|
2786
2797
|
class: z(["text-base m-auto", R(b)]),
|
|
2787
2798
|
textContent: v(K(b))
|
|
@@ -2805,15 +2816,15 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2805
2816
|
onClick: (L) => oe(b)
|
|
2806
2817
|
}, Qr, 10, Jr)
|
|
2807
2818
|
]))), 128)),
|
|
2808
|
-
|
|
2819
|
+
y.value.length ? M("", !0) : (n(), m("div", Zr, v(a(s)("No files selected!")), 1))
|
|
2809
2820
|
]),
|
|
2810
|
-
|
|
2821
|
+
x.value.length ? (n(), T(G, {
|
|
2811
2822
|
key: 0,
|
|
2812
|
-
onHidden: S[2] || (S[2] = (b) =>
|
|
2823
|
+
onHidden: S[2] || (S[2] = (b) => x.value = ""),
|
|
2813
2824
|
error: ""
|
|
2814
2825
|
}, {
|
|
2815
2826
|
default: A(() => [
|
|
2816
|
-
V(v(
|
|
2827
|
+
V(v(x.value), 1)
|
|
2817
2828
|
]),
|
|
2818
2829
|
_: 1
|
|
2819
2830
|
})) : M("", !0)
|
|
@@ -2934,12 +2945,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
2934
2945
|
t("h3", nn, v(a(s)("Archive the files")), 1),
|
|
2935
2946
|
t("div", ln, [
|
|
2936
2947
|
t("div", dn, [
|
|
2937
|
-
(n(!0), m(U, null,
|
|
2948
|
+
(n(!0), m(U, null, q(i.value, (c) => (n(), m("p", cn, [
|
|
2938
2949
|
c.type === "dir" ? (n(), m("svg", un, vn)) : (n(), m("svg", pn, fn)),
|
|
2939
2950
|
t("span", gn, v(c.basename), 1)
|
|
2940
2951
|
]))), 256))
|
|
2941
2952
|
]),
|
|
2942
|
-
|
|
2953
|
+
I(t("input", {
|
|
2943
2954
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => r.value = c),
|
|
2944
2955
|
onKeyup: Q(u, ["enter"]),
|
|
2945
2956
|
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",
|
|
@@ -3057,11 +3068,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
3057
3068
|
t("div", wn, [
|
|
3058
3069
|
t("h3", $n, v(a(s)("Unarchive")), 1),
|
|
3059
3070
|
t("div", Cn, [
|
|
3060
|
-
(n(!0), m(U, null,
|
|
3071
|
+
(n(!0), m(U, null, q(i.value, (c) => (n(), m("p", Sn, [
|
|
3061
3072
|
c.type === "dir" ? (n(), m("svg", Mn, Dn)) : (n(), m("svg", jn, Ln)),
|
|
3062
3073
|
t("span", Tn, v(c.basename), 1)
|
|
3063
3074
|
]))), 256)),
|
|
3064
|
-
t("p", Fn, v(a(s)("The archive will be unarchived at")) + " (" + v(
|
|
3075
|
+
t("p", Fn, v(a(s)("The archive will be unarchived at")) + " (" + v(a(e).data.dirname) + ")", 1),
|
|
3065
3076
|
o.value.length ? (n(), T(G, {
|
|
3066
3077
|
key: 0,
|
|
3067
3078
|
onHidden: l[0] || (l[0] = (c) => o.value = ""),
|
|
@@ -3098,7 +3109,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
3098
3109
|
], -1), zn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Un = {
|
|
3099
3110
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
3100
3111
|
id: "modal-title"
|
|
3101
|
-
}, Hn = { class: "text-sm text-gray-500 pb-1" }, Rn = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" },
|
|
3112
|
+
}, Hn = { class: "text-sm text-gray-500 pb-1" }, Rn = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, In = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, qn = {
|
|
3102
3113
|
key: 0,
|
|
3103
3114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3104
3115
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -3186,9 +3197,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
|
|
|
3186
3197
|
t("h3", Un, v(a(s)("Move files")), 1),
|
|
3187
3198
|
t("p", Hn, v(a(s)("Are you sure you want to move these files?")), 1),
|
|
3188
3199
|
t("div", Rn, [
|
|
3189
|
-
(n(!0), m(U, null,
|
|
3200
|
+
(n(!0), m(U, null, q(r.value, (l) => (n(), m("div", In, [
|
|
3190
3201
|
t("div", null, [
|
|
3191
|
-
l.type === "dir" ? (n(), m("svg",
|
|
3202
|
+
l.type === "dir" ? (n(), m("svg", qn, Wn)) : (n(), m("svg", Gn, Kn))
|
|
3192
3203
|
]),
|
|
3193
3204
|
t("div", Jn, v(l.path), 1)
|
|
3194
3205
|
]))), 256))
|
|
@@ -3291,11 +3302,11 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3291
3302
|
k(""), k("");
|
|
3292
3303
|
const l = async () => {
|
|
3293
3304
|
o(), location.reload();
|
|
3294
|
-
}, c = (
|
|
3295
|
-
e.theme.set(
|
|
3305
|
+
}, c = ($) => {
|
|
3306
|
+
e.theme.set($), e.emitter.emit("vf-theme-saved");
|
|
3296
3307
|
}, g = () => {
|
|
3297
3308
|
e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? xe : ye, r("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved");
|
|
3298
|
-
}, { i18n: _ } = F("VueFinderOptions"),
|
|
3309
|
+
}, { i18n: _ } = F("VueFinderOptions"), x = Object.fromEntries(
|
|
3299
3310
|
Object.entries({
|
|
3300
3311
|
en: "English",
|
|
3301
3312
|
fr: "French (Français)",
|
|
@@ -3308,13 +3319,13 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3308
3319
|
tr: "Turkish (Türkçe)",
|
|
3309
3320
|
zhCN: "Simplified Chinese (简体中文)",
|
|
3310
3321
|
zhTW: "Traditional Chinese (繁體中文)"
|
|
3311
|
-
}).filter(([
|
|
3322
|
+
}).filter(([$]) => Object.keys(_).includes($))
|
|
3312
3323
|
), E = ee(() => ({
|
|
3313
3324
|
system: i("System"),
|
|
3314
3325
|
light: i("Light"),
|
|
3315
3326
|
dark: i("Dark")
|
|
3316
3327
|
}));
|
|
3317
|
-
return (
|
|
3328
|
+
return ($, f) => (n(), T(W, null, {
|
|
3318
3329
|
buttons: A(() => [
|
|
3319
3330
|
t("button", {
|
|
3320
3331
|
type: "button",
|
|
@@ -3337,7 +3348,7 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3337
3348
|
t("div", fl, [
|
|
3338
3349
|
t("div", gl, [
|
|
3339
3350
|
t("div", _l, [
|
|
3340
|
-
|
|
3351
|
+
I(t("input", {
|
|
3341
3352
|
id: "metric_unit",
|
|
3342
3353
|
name: "metric_unit",
|
|
3343
3354
|
type: "checkbox",
|
|
@@ -3368,7 +3379,7 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3368
3379
|
t("label", wl, v(a(i)("Theme")), 1)
|
|
3369
3380
|
]),
|
|
3370
3381
|
t("div", $l, [
|
|
3371
|
-
|
|
3382
|
+
I(t("select", {
|
|
3372
3383
|
id: "theme",
|
|
3373
3384
|
"onUpdate:modelValue": f[1] || (f[1] = (h) => a(e).theme.value = h),
|
|
3374
3385
|
onChange: f[2] || (f[2] = (h) => c(h.target.value)),
|
|
@@ -3377,7 +3388,7 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3377
3388
|
t("optgroup", {
|
|
3378
3389
|
label: a(i)("Theme")
|
|
3379
3390
|
}, [
|
|
3380
|
-
(n(!0), m(U, null,
|
|
3391
|
+
(n(!0), m(U, null, q(E.value, (h, N) => (n(), m("option", { value: N }, v(h), 9, Sl))), 256))
|
|
3381
3392
|
], 8, Cl)
|
|
3382
3393
|
], 544), [
|
|
3383
3394
|
[pe, a(e).theme.value]
|
|
@@ -3393,12 +3404,12 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3393
3404
|
})
|
|
3394
3405
|
])
|
|
3395
3406
|
]),
|
|
3396
|
-
a(e).features.includes(a(B).LANGUAGE) && Object.keys(a(
|
|
3407
|
+
a(e).features.includes(a(B).LANGUAGE) && Object.keys(a(x)).length > 1 ? (n(), m("div", Ml, [
|
|
3397
3408
|
t("div", El, [
|
|
3398
3409
|
t("label", Dl, v(a(i)("Language")), 1)
|
|
3399
3410
|
]),
|
|
3400
3411
|
t("div", jl, [
|
|
3401
|
-
|
|
3412
|
+
I(t("select", {
|
|
3402
3413
|
id: "language",
|
|
3403
3414
|
"onUpdate:modelValue": f[3] || (f[3] = (h) => _e(d) ? d.value = h : null),
|
|
3404
3415
|
onChange: f[4] || (f[4] = (h) => a(u)(h.target.value)),
|
|
@@ -3407,7 +3418,7 @@ const ve = /* @__PURE__ */ ol(rl, [["render", ll]]), il = { class: "sm:flex sm:i
|
|
|
3407
3418
|
t("optgroup", {
|
|
3408
3419
|
label: a(i)("Language")
|
|
3409
3420
|
}, [
|
|
3410
|
-
(n(!0), m(U, null,
|
|
3421
|
+
(n(!0), m(U, null, q(a(x), (h, N) => (n(), m("option", { value: N }, v(h), 9, Ll))), 256))
|
|
3411
3422
|
], 8, Al)
|
|
3412
3423
|
], 544), [
|
|
3413
3424
|
[pe, a(d)]
|