vuefinder 1.3.2 → 2.0.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 +41 -13
- package/dist/{de-bb2cbcd2.js → de-3f6147f5.js} +15 -0
- package/dist/{de-d9027168.cjs → de-e4938207.cjs} +1 -1
- package/dist/{en-6bb58248.cjs → en-39d37375.cjs} +1 -1
- package/dist/{en-36ebc9b3.js → en-ffed8966.js} +6 -0
- package/dist/{fa-91321523.cjs → fa-64c35e1a.cjs} +1 -1
- package/dist/{fa-38a6b855.js → fa-7534f880.js} +18 -3
- package/dist/{he-ed562a13.js → he-1978fb6e.js} +17 -2
- package/dist/{he-dba3fb45.cjs → he-6b2ea6a2.cjs} +1 -1
- package/dist/{hi-66a90598.cjs → hi-7d3118ac.cjs} +1 -1
- package/dist/{hi-6bb62179.js → hi-ffd5a2ba.js} +18 -3
- package/dist/{ru-02b5dcbe.js → ru-9f317caf.js} +17 -2
- package/dist/{ru-2753c715.cjs → ru-f208af8a.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{sv-0c0f15f4.js → sv-07e3c393.js} +18 -3
- package/dist/{sv-51dc5883.cjs → sv-acbe2c28.cjs} +1 -1
- package/dist/{tr-3c939bbd.cjs → tr-2fed3777.cjs} +1 -1
- package/dist/{tr-410a966d.js → tr-ce32e2ae.js} +18 -3
- package/dist/vuefinder.cjs +1 -1
- package/dist/vuefinder.js +1563 -1387
- package/dist/{zhCN-f37edc4d.js → zhCN-9b524820.js} +8 -2
- package/dist/{zhCN-5e98ef29.cjs → zhCN-e25e65b3.cjs} +1 -1
- package/dist/{zhTW-ffaa338d.cjs → zhTW-6a024d5e.cjs} +1 -1
- package/dist/{zhTW-0fd6dd31.js → zhTW-a803434e.js} +6 -0
- package/package.json +1 -1
package/dist/vuefinder.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ref as g, watch as le, inject as k, openBlock as r, createElementBlock as v, createElementVNode as e, unref as a, normalizeClass as T, createTextVNode as U, toDisplayString as u, createCommentVNode as V, createVNode as P, TransitionGroup as Ve, withCtx as E, Fragment as H, renderList as J, reactive as ve, onMounted as K, onUpdated as Be, onBeforeUnmount as Oe, withDirectives as R, vShow as ue, withModifiers as Z, nextTick as ge, isRef as re, vModelSelect as ye, createStaticVNode as Ae, customRef as Le, withKeys as se, vModelText as ae, normalizeStyle as ze, provide as Y, computed as Ne, createBlock as N, resolveDynamicComponent as Ue, renderSlot as pe, onUnmounted as Te, vModelCheckbox as $e } from "vue";
|
|
2
|
+
import He from "mitt";
|
|
3
|
+
import Ie from "dragselect";
|
|
4
|
+
import qe from "vanilla-lazyload";
|
|
5
5
|
import "cropperjs/dist/cropper.css";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import Re from "cropperjs";
|
|
7
|
+
import Pe from "@uppy/core";
|
|
8
|
+
import Ge from "@uppy/xhr-upload";
|
|
9
9
|
import "microtip/microtip.css";
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
|
|
10
|
+
var De;
|
|
11
|
+
const he = (De = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : De.getAttribute("content"), fe = (l, { method: t = "get", params: s = {}, json: o = !0, signal: i = null }) => {
|
|
12
|
+
const m = { method: t };
|
|
13
|
+
if (m.signal = i, t == "get")
|
|
14
|
+
l += "?" + new URLSearchParams(s);
|
|
15
15
|
else {
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
for (const [
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
m.headers = {}, he && (m.headers["X-CSRF-Token"] = he);
|
|
17
|
+
let n = new FormData();
|
|
18
|
+
for (const [h, p] of Object.entries(s))
|
|
19
|
+
n.append(h, p);
|
|
20
|
+
m.body = n;
|
|
21
21
|
}
|
|
22
|
-
return fetch(
|
|
22
|
+
return fetch(l, m).then((n) => n.ok ? o ? n.json() : n.text() : n.json().then(Promise.reject.bind(Promise)));
|
|
23
23
|
};
|
|
24
|
-
function xe(
|
|
25
|
-
let t = localStorage.getItem(
|
|
26
|
-
const s =
|
|
27
|
-
|
|
24
|
+
function xe(l) {
|
|
25
|
+
let t = localStorage.getItem(l + "_storage");
|
|
26
|
+
const s = g(JSON.parse(t));
|
|
27
|
+
le(s, o);
|
|
28
28
|
function o() {
|
|
29
|
-
s.value === null || s.value === "" ? localStorage.removeItem(
|
|
29
|
+
s.value === null || s.value === "" ? localStorage.removeItem(l + "_storage") : localStorage.setItem(l + "_storage", JSON.stringify(s.value));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
s.value = Object.assign({ ...s.value }, { [
|
|
31
|
+
function i(h, p) {
|
|
32
|
+
s.value = Object.assign({ ...s.value }, { [h]: p });
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function m() {
|
|
35
35
|
s.value = null;
|
|
36
36
|
}
|
|
37
|
-
return { getStore: (
|
|
37
|
+
return { getStore: (h, p = null) => s.value === null || s.value === "" ? p : s.value.hasOwnProperty(h) ? s.value[h] : p, setStore: i, clearStore: m };
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
41
|
-
function
|
|
42
|
-
|
|
39
|
+
const Ce = g("");
|
|
40
|
+
function X() {
|
|
41
|
+
function l(t) {
|
|
42
|
+
Ce.value = t;
|
|
43
43
|
}
|
|
44
|
-
return { apiUrl:
|
|
44
|
+
return { apiUrl: Ce, setApiUrl: l };
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Je = {
|
|
47
47
|
key: 0,
|
|
48
48
|
class: "flex text-center"
|
|
49
|
-
},
|
|
49
|
+
}, Ke = ["aria-label"], We = /* @__PURE__ */ e("svg", {
|
|
50
50
|
xmlns: "http://www.w3.org/2000/svg",
|
|
51
51
|
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",
|
|
52
52
|
fill: "none",
|
|
@@ -59,9 +59,9 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
59
59
|
"stroke-linejoin": "round",
|
|
60
60
|
d: "M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
|
|
61
61
|
})
|
|
62
|
-
], -1),
|
|
63
|
-
|
|
64
|
-
],
|
|
62
|
+
], -1), Xe = [
|
|
63
|
+
We
|
|
64
|
+
], Qe = ["aria-label"], Ze = /* @__PURE__ */ e("svg", {
|
|
65
65
|
xmlns: "http://www.w3.org/2000/svg",
|
|
66
66
|
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",
|
|
67
67
|
fill: "none",
|
|
@@ -74,21 +74,21 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
74
74
|
"stroke-linejoin": "round",
|
|
75
75
|
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"
|
|
76
76
|
})
|
|
77
|
-
], -1),
|
|
78
|
-
|
|
79
|
-
],
|
|
77
|
+
], -1), et = [
|
|
78
|
+
Ze
|
|
79
|
+
], tt = ["aria-label"], ot = /* @__PURE__ */ e("path", {
|
|
80
80
|
"stroke-linecap": "round",
|
|
81
81
|
"stroke-linejoin": "round",
|
|
82
82
|
d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
|
|
83
|
-
}, null, -1),
|
|
84
|
-
|
|
85
|
-
],
|
|
83
|
+
}, null, -1), st = [
|
|
84
|
+
ot
|
|
85
|
+
], at = ["aria-label"], nt = /* @__PURE__ */ e("path", {
|
|
86
86
|
"stroke-linecap": "round",
|
|
87
87
|
"stroke-linejoin": "round",
|
|
88
88
|
d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
|
|
89
|
-
}, null, -1),
|
|
90
|
-
|
|
91
|
-
],
|
|
89
|
+
}, null, -1), rt = [
|
|
90
|
+
nt
|
|
91
|
+
], lt = ["aria-label"], it = /* @__PURE__ */ e("svg", {
|
|
92
92
|
xmlns: "http://www.w3.org/2000/svg",
|
|
93
93
|
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",
|
|
94
94
|
fill: "none",
|
|
@@ -101,322 +101,293 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
101
101
|
"stroke-linejoin": "round",
|
|
102
102
|
d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
|
|
103
103
|
})
|
|
104
|
-
], -1),
|
|
105
|
-
|
|
106
|
-
],
|
|
104
|
+
], -1), dt = [
|
|
105
|
+
it
|
|
106
|
+
], ct = ["aria-label"], ut = /* @__PURE__ */ e("path", {
|
|
107
107
|
"stroke-linecap": "round",
|
|
108
108
|
"stroke-linejoin": "round",
|
|
109
109
|
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"
|
|
110
|
-
}, null, -1),
|
|
111
|
-
|
|
112
|
-
],
|
|
110
|
+
}, null, -1), mt = [
|
|
111
|
+
ut
|
|
112
|
+
], vt = ["aria-label"], pt = /* @__PURE__ */ e("path", {
|
|
113
113
|
"stroke-linecap": "round",
|
|
114
114
|
"stroke-linejoin": "round",
|
|
115
115
|
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"
|
|
116
|
-
}, null, -1),
|
|
117
|
-
|
|
118
|
-
],
|
|
116
|
+
}, null, -1), ht = [
|
|
117
|
+
pt
|
|
118
|
+
], ft = {
|
|
119
119
|
key: 1,
|
|
120
120
|
class: "flex text-center"
|
|
121
|
-
},
|
|
121
|
+
}, gt = { class: "pl-2" }, kt = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, _t = {
|
|
122
122
|
key: 0,
|
|
123
123
|
class: "animate-spin p-0.5 h-5 w-5 text-white ml-auto",
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
125
125
|
fill: "none",
|
|
126
126
|
viewBox: "0 0 24 24"
|
|
127
|
-
},
|
|
127
|
+
}, xt = /* @__PURE__ */ e("circle", {
|
|
128
128
|
class: "opacity-25 stroke-blue-900 dark:stroke-blue-100",
|
|
129
129
|
cx: "12",
|
|
130
130
|
cy: "12",
|
|
131
131
|
r: "10",
|
|
132
132
|
stroke: "currentColor",
|
|
133
133
|
"stroke-width": "4"
|
|
134
|
-
}, null, -1),
|
|
134
|
+
}, null, -1), bt = /* @__PURE__ */ e("path", {
|
|
135
135
|
class: "opacity-75",
|
|
136
136
|
fill: "currentColor",
|
|
137
137
|
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"
|
|
138
|
-
}, null, -1),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
],
|
|
142
|
-
"stroke-linecap": "round",
|
|
143
|
-
"stroke-linejoin": "round",
|
|
144
|
-
d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"
|
|
145
|
-
}, null, -1), yt = [
|
|
146
|
-
wt
|
|
147
|
-
], _t = ["aria-label"], $t = {
|
|
138
|
+
}, null, -1), wt = [
|
|
139
|
+
xt,
|
|
140
|
+
bt
|
|
141
|
+
], yt = { class: "flex text-center items-center justify-end" }, $t = ["aria-label"], Ct = {
|
|
148
142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
149
143
|
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",
|
|
150
144
|
fill: "none",
|
|
151
145
|
viewBox: "0 0 24 24",
|
|
152
146
|
stroke: "none",
|
|
153
147
|
"stroke-width": "1.5"
|
|
154
|
-
},
|
|
148
|
+
}, Mt = {
|
|
155
149
|
key: 0,
|
|
156
150
|
"stroke-linecap": "round",
|
|
157
151
|
"stroke-linejoin": "round",
|
|
158
152
|
d: "M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25"
|
|
159
|
-
},
|
|
153
|
+
}, jt = {
|
|
160
154
|
key: 1,
|
|
161
155
|
"stroke-linecap": "round",
|
|
162
156
|
"stroke-linejoin": "round",
|
|
163
157
|
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"
|
|
164
|
-
},
|
|
158
|
+
}, St = ["aria-label"], Dt = {
|
|
165
159
|
key: 0,
|
|
166
160
|
"stroke-linecap": "round",
|
|
167
161
|
"stroke-linejoin": "round",
|
|
168
162
|
d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"
|
|
169
|
-
},
|
|
163
|
+
}, Ot = {
|
|
170
164
|
key: 1,
|
|
171
165
|
"stroke-linecap": "round",
|
|
172
166
|
"stroke-linejoin": "round",
|
|
173
167
|
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"
|
|
174
|
-
},
|
|
168
|
+
}, zt = {
|
|
175
169
|
name: "VFToolbar"
|
|
176
|
-
},
|
|
170
|
+
}, Et = /* @__PURE__ */ Object.assign(zt, {
|
|
177
171
|
props: {
|
|
178
172
|
data: Object
|
|
179
173
|
},
|
|
180
|
-
setup(
|
|
181
|
-
const t =
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
setup(l) {
|
|
175
|
+
const t = k("emitter");
|
|
176
|
+
k("usePropDarkMode");
|
|
177
|
+
const { getStore: s, setStore: o } = k("storage"), { t: i } = k("i18n"), m = g(s("viewport", "grid")), n = g([]), h = g(s("full-screen", !1)), p = g("");
|
|
178
|
+
t.on("vf-search-query", ({ newQuery: y }) => {
|
|
179
|
+
p.value = y;
|
|
184
180
|
});
|
|
185
|
-
const
|
|
186
|
-
|
|
181
|
+
const c = k("loadingState"), d = () => c.value, f = () => {
|
|
182
|
+
h.value = !h.value, t.emit("vf-fullscreen-toggle");
|
|
187
183
|
};
|
|
188
|
-
return t.on("vf-nodes-selected", (
|
|
189
|
-
|
|
190
|
-
}), t.on("vf-view-toggle", (
|
|
191
|
-
|
|
192
|
-
}), (
|
|
193
|
-
|
|
194
|
-
e("div",
|
|
195
|
-
|
|
196
|
-
e("span",
|
|
184
|
+
return t.on("vf-nodes-selected", (y) => {
|
|
185
|
+
n.value = y;
|
|
186
|
+
}), t.on("vf-view-toggle", (y) => {
|
|
187
|
+
o("viewport", y), m.value = y;
|
|
188
|
+
}), (y, w) => (r(), v("div", Ye, [
|
|
189
|
+
p.value.length ? (r(), v("div", ft, [
|
|
190
|
+
e("div", gt, [
|
|
191
|
+
U(u(a(i)("Search results for")) + " ", 1),
|
|
192
|
+
e("span", kt, u(p.value), 1)
|
|
197
193
|
]),
|
|
198
|
-
|
|
199
|
-
])) : (
|
|
194
|
+
d() ? (r(), v("svg", _t, wt)) : V("", !0)
|
|
195
|
+
])) : (r(), v("div", Je, [
|
|
200
196
|
e("div", {
|
|
201
197
|
class: "mx-1.5",
|
|
202
|
-
"aria-label":
|
|
198
|
+
"aria-label": a(i)("New Folder"),
|
|
203
199
|
"data-microtip-position": "bottom-right",
|
|
204
200
|
role: "tooltip",
|
|
205
|
-
onClick:
|
|
206
|
-
},
|
|
201
|
+
onClick: w[0] || (w[0] = (B) => a(t).emit("vf-modal-show", { type: "new-folder", items: n.value }))
|
|
202
|
+
}, Xe, 8, Ke),
|
|
207
203
|
e("div", {
|
|
208
204
|
class: "mx-1.5",
|
|
209
|
-
"aria-label":
|
|
205
|
+
"aria-label": a(i)("New File"),
|
|
210
206
|
"data-microtip-position": "bottom",
|
|
211
207
|
role: "tooltip",
|
|
212
|
-
onClick:
|
|
213
|
-
},
|
|
208
|
+
onClick: w[1] || (w[1] = (B) => a(t).emit("vf-modal-show", { type: "new-file", items: n.value }))
|
|
209
|
+
}, et, 8, Qe),
|
|
214
210
|
e("div", {
|
|
215
211
|
class: "mx-1.5",
|
|
216
|
-
"aria-label":
|
|
212
|
+
"aria-label": a(i)("Rename"),
|
|
217
213
|
"data-microtip-position": "bottom",
|
|
218
214
|
role: "tooltip",
|
|
219
|
-
onClick:
|
|
215
|
+
onClick: w[2] || (w[2] = (B) => n.value.length != 1 || a(t).emit("vf-modal-show", { type: "rename", items: n.value }))
|
|
220
216
|
}, [
|
|
221
|
-
(
|
|
217
|
+
(r(), v("svg", {
|
|
222
218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
223
|
-
class:
|
|
219
|
+
class: T([n.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"]),
|
|
224
220
|
fill: "none",
|
|
225
221
|
viewBox: "0 0 24 24",
|
|
226
222
|
stroke: "none",
|
|
227
223
|
"stroke-width": "1.5"
|
|
228
|
-
},
|
|
229
|
-
], 8,
|
|
224
|
+
}, st, 2))
|
|
225
|
+
], 8, tt),
|
|
230
226
|
e("div", {
|
|
231
227
|
class: "mx-1.5",
|
|
232
|
-
"aria-label":
|
|
228
|
+
"aria-label": a(i)("Delete"),
|
|
233
229
|
"data-microtip-position": "bottom",
|
|
234
230
|
role: "tooltip",
|
|
235
|
-
onClick:
|
|
231
|
+
onClick: w[3] || (w[3] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "delete", items: n.value }))
|
|
236
232
|
}, [
|
|
237
|
-
(
|
|
233
|
+
(r(), v("svg", {
|
|
238
234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
239
|
-
class:
|
|
235
|
+
class: T([n.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"]),
|
|
240
236
|
fill: "none",
|
|
241
237
|
viewBox: "0 0 24 24",
|
|
242
238
|
stroke: "none",
|
|
243
239
|
"stroke-width": "1.5"
|
|
244
|
-
},
|
|
245
|
-
], 8,
|
|
240
|
+
}, rt, 2))
|
|
241
|
+
], 8, at),
|
|
246
242
|
e("div", {
|
|
247
243
|
class: "mx-1.5",
|
|
248
|
-
"aria-label":
|
|
244
|
+
"aria-label": a(i)("Upload"),
|
|
249
245
|
"data-microtip-position": "bottom",
|
|
250
246
|
role: "tooltip",
|
|
251
|
-
onClick:
|
|
252
|
-
},
|
|
253
|
-
|
|
247
|
+
onClick: w[4] || (w[4] = (B) => a(t).emit("vf-modal-show", { type: "upload", items: n.value }))
|
|
248
|
+
}, dt, 8, lt),
|
|
249
|
+
n.value.length == 1 && n.value[0].mime_type == "application/zip" ? (r(), v("div", {
|
|
254
250
|
key: 0,
|
|
255
251
|
class: "mx-1.5",
|
|
256
|
-
"aria-label":
|
|
252
|
+
"aria-label": a(i)("Unarchive"),
|
|
257
253
|
"data-microtip-position": "bottom",
|
|
258
254
|
role: "tooltip",
|
|
259
|
-
onClick:
|
|
255
|
+
onClick: w[5] || (w[5] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "unarchive", items: n.value }))
|
|
260
256
|
}, [
|
|
261
|
-
(
|
|
257
|
+
(r(), v("svg", {
|
|
262
258
|
xmlns: "http://www.w3.org/2000/svg",
|
|
263
|
-
class:
|
|
259
|
+
class: T([n.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"]),
|
|
264
260
|
fill: "none",
|
|
265
261
|
viewBox: "0 0 24 24",
|
|
266
262
|
stroke: "none",
|
|
267
263
|
"stroke-width": "1.5"
|
|
268
|
-
},
|
|
269
|
-
], 8,
|
|
264
|
+
}, mt, 2))
|
|
265
|
+
], 8, ct)) : (r(), v("div", {
|
|
270
266
|
key: 1,
|
|
271
267
|
class: "mx-1.5",
|
|
272
|
-
"aria-label":
|
|
268
|
+
"aria-label": a(i)("Archive"),
|
|
273
269
|
"data-microtip-position": "bottom",
|
|
274
270
|
role: "tooltip",
|
|
275
|
-
onClick:
|
|
271
|
+
onClick: w[6] || (w[6] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "archive", items: n.value }))
|
|
276
272
|
}, [
|
|
277
|
-
(
|
|
273
|
+
(r(), v("svg", {
|
|
278
274
|
xmlns: "http://www.w3.org/2000/svg",
|
|
279
|
-
class:
|
|
275
|
+
class: T([n.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"]),
|
|
280
276
|
fill: "none",
|
|
281
277
|
viewBox: "0 0 24 24",
|
|
282
278
|
stroke: "none",
|
|
283
279
|
"stroke-width": "1.5"
|
|
284
|
-
},
|
|
285
|
-
], 8,
|
|
280
|
+
}, ht, 2))
|
|
281
|
+
], 8, vt))
|
|
286
282
|
])),
|
|
287
|
-
e("div",
|
|
288
|
-
q(e("div", {
|
|
289
|
-
class: "mx-1.5",
|
|
290
|
-
"aria-label": r(a)("Dark Mode"),
|
|
291
|
-
"data-microtip-position": "bottom",
|
|
292
|
-
role: "tooltip"
|
|
293
|
-
}, [
|
|
294
|
-
(n(), m("svg", {
|
|
295
|
-
onClick: y[7] || (y[7] = ($) => r(t).emit("vf-darkMode-toggle")),
|
|
296
|
-
viewBox: "0 0 24 24",
|
|
297
|
-
"stroke-width": "2",
|
|
298
|
-
"stroke-linecap": "round",
|
|
299
|
-
"stroke-linejoin": "round",
|
|
300
|
-
class: "h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300"
|
|
301
|
-
}, yt))
|
|
302
|
-
], 8, bt), [
|
|
303
|
-
[ae, !r(s)]
|
|
304
|
-
]),
|
|
283
|
+
e("div", yt, [
|
|
305
284
|
e("div", {
|
|
306
285
|
class: "mx-1.5",
|
|
307
|
-
"aria-label":
|
|
286
|
+
"aria-label": a(i)("Toggle Full Screen"),
|
|
308
287
|
"data-microtip-position": "bottom-left",
|
|
309
288
|
role: "tooltip",
|
|
310
|
-
onClick:
|
|
289
|
+
onClick: f
|
|
311
290
|
}, [
|
|
312
|
-
(
|
|
313
|
-
|
|
291
|
+
(r(), v("svg", Ct, [
|
|
292
|
+
h.value ? (r(), v("path", Mt)) : (r(), v("path", jt))
|
|
314
293
|
]))
|
|
315
|
-
], 8,
|
|
294
|
+
], 8, $t),
|
|
316
295
|
e("div", {
|
|
317
296
|
class: "mx-1.5",
|
|
318
|
-
"aria-label":
|
|
297
|
+
"aria-label": a(i)("Change View"),
|
|
319
298
|
"data-microtip-position": "bottom-left",
|
|
320
299
|
role: "tooltip",
|
|
321
|
-
onClick:
|
|
300
|
+
onClick: w[7] || (w[7] = (B) => p.value.length || a(t).emit("vf-view-toggle", m.value == "list" ? "grid" : "list"))
|
|
322
301
|
}, [
|
|
323
|
-
(
|
|
302
|
+
(r(), v("svg", {
|
|
324
303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
325
|
-
class:
|
|
304
|
+
class: T([p.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"]),
|
|
326
305
|
fill: "none",
|
|
327
306
|
viewBox: "0 0 24 24",
|
|
328
307
|
stroke: "none",
|
|
329
308
|
"stroke-width": "1.5"
|
|
330
309
|
}, [
|
|
331
|
-
|
|
332
|
-
|
|
310
|
+
m.value == "grid" ? (r(), v("path", Dt)) : V("", !0),
|
|
311
|
+
m.value == "list" ? (r(), v("path", Ot)) : V("", !0)
|
|
333
312
|
], 2))
|
|
334
|
-
], 8,
|
|
313
|
+
], 8, St)
|
|
335
314
|
])
|
|
336
315
|
]));
|
|
337
316
|
}
|
|
338
|
-
})
|
|
339
|
-
function ye(i, t, s, o, p) {
|
|
340
|
-
return (t = Math, s = t.log, o = 1024, p = s(i) / s(o) | 0, i / t.pow(o, p)).toFixed(0) + " " + (p ? "KMGTPEZY"[--p] + "iB" : "B");
|
|
341
|
-
}
|
|
342
|
-
function Et(i) {
|
|
343
|
-
const t = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(i);
|
|
344
|
-
return o[1] * Math.pow(1024, t[o[2].toLowerCase()]);
|
|
345
|
-
}
|
|
346
|
-
const De = (i, t = null) => new Date(i * 1e3).toLocaleString(t ?? navigator.language ?? "en-US"), Ft = {
|
|
317
|
+
}), Ee = (l, t = null) => new Date(l * 1e3).toLocaleString(t ?? navigator.language ?? "en-US"), Ft = {
|
|
347
318
|
key: 0,
|
|
348
319
|
xmlns: "http://www.w3.org/2000/svg",
|
|
349
320
|
class: "h-5 w-5",
|
|
350
321
|
viewBox: "0 0 20 20",
|
|
351
322
|
fill: "currentColor"
|
|
352
|
-
},
|
|
323
|
+
}, Vt = /* @__PURE__ */ e("path", {
|
|
353
324
|
"fill-rule": "evenodd",
|
|
354
325
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
355
326
|
"clip-rule": "evenodd"
|
|
356
|
-
}, null, -1),
|
|
357
|
-
|
|
358
|
-
],
|
|
327
|
+
}, null, -1), Bt = [
|
|
328
|
+
Vt
|
|
329
|
+
], At = {
|
|
359
330
|
key: 1,
|
|
360
331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
361
332
|
class: "h-5 w-5",
|
|
362
333
|
viewBox: "0 0 20 20",
|
|
363
334
|
fill: "currentColor"
|
|
364
|
-
},
|
|
335
|
+
}, Lt = /* @__PURE__ */ e("path", {
|
|
365
336
|
"fill-rule": "evenodd",
|
|
366
337
|
d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
|
|
367
338
|
"clip-rule": "evenodd"
|
|
368
|
-
}, null, -1),
|
|
369
|
-
|
|
370
|
-
],
|
|
339
|
+
}, null, -1), Nt = [
|
|
340
|
+
Lt
|
|
341
|
+
], Ut = {
|
|
371
342
|
name: "VFSortIcon"
|
|
372
|
-
},
|
|
343
|
+
}, me = /* @__PURE__ */ Object.assign(Ut, {
|
|
373
344
|
props: { direction: String },
|
|
374
|
-
setup(
|
|
375
|
-
return (t, s) => (
|
|
376
|
-
|
|
377
|
-
|
|
345
|
+
setup(l) {
|
|
346
|
+
return (t, s) => (r(), v("div", null, [
|
|
347
|
+
l.direction == "down" ? (r(), v("svg", Ft, Bt)) : V("", !0),
|
|
348
|
+
l.direction == "up" ? (r(), v("svg", At, Nt)) : V("", !0)
|
|
378
349
|
]));
|
|
379
350
|
}
|
|
380
|
-
}), Tt = ["onClick"],
|
|
351
|
+
}), Tt = ["onClick"], Ht = {
|
|
381
352
|
name: "VFToast.vue"
|
|
382
|
-
}, It = /* @__PURE__ */ Object.assign(
|
|
383
|
-
setup(
|
|
384
|
-
const t =
|
|
385
|
-
|
|
386
|
-
},
|
|
387
|
-
let
|
|
388
|
-
|
|
353
|
+
}, It = /* @__PURE__ */ Object.assign(Ht, {
|
|
354
|
+
setup(l) {
|
|
355
|
+
const t = k("emitter"), { getStore: s } = k("storage"), o = g(s("full-screen", !1)), i = (p) => p == "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", m = g([]), n = (p) => {
|
|
356
|
+
m.value.splice(p, 1);
|
|
357
|
+
}, h = (p) => {
|
|
358
|
+
let c = m.value.findIndex((d) => d.id === p);
|
|
359
|
+
c !== -1 && n(c);
|
|
389
360
|
};
|
|
390
361
|
return t.on("vf-toast-clear", () => {
|
|
391
|
-
|
|
392
|
-
}), t.on("vf-toast-push", (
|
|
393
|
-
let
|
|
394
|
-
|
|
395
|
-
|
|
362
|
+
m.value = [];
|
|
363
|
+
}), t.on("vf-toast-push", (p) => {
|
|
364
|
+
let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
|
|
365
|
+
p.id = c, m.value.push(p), setTimeout(() => {
|
|
366
|
+
h(c);
|
|
396
367
|
}, 5e3);
|
|
397
|
-
}), (
|
|
398
|
-
class:
|
|
368
|
+
}), (p, c) => (r(), v("div", {
|
|
369
|
+
class: T([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
|
|
399
370
|
}, [
|
|
400
|
-
P(
|
|
371
|
+
P(Ve, {
|
|
401
372
|
name: "vf-toast-item",
|
|
402
373
|
"leave-active-class": "transition-all duration-1000",
|
|
403
374
|
"leave-to-class": "opacity-0"
|
|
404
375
|
}, {
|
|
405
|
-
default:
|
|
406
|
-
(
|
|
407
|
-
onClick: (
|
|
408
|
-
key:
|
|
409
|
-
class:
|
|
410
|
-
},
|
|
376
|
+
default: E(() => [
|
|
377
|
+
(r(!0), v(H, null, J(m.value, (d, f) => (r(), v("div", {
|
|
378
|
+
onClick: (y) => n(f),
|
|
379
|
+
key: d,
|
|
380
|
+
class: T([i(d.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"])
|
|
381
|
+
}, u(d.label), 11, Tt))), 128))
|
|
411
382
|
]),
|
|
412
383
|
_: 1
|
|
413
384
|
})
|
|
414
385
|
], 2));
|
|
415
386
|
}
|
|
416
|
-
}), oe = (
|
|
417
|
-
function we(
|
|
387
|
+
}), oe = (l) => Object.entries(l).map((t) => t.map(encodeURIComponent).join("=")).join("&"), { apiUrl: qt } = X(), be = (l, t) => qt.value + "?" + oe({ q: "preview", adapter: l, path: t });
|
|
388
|
+
function we(l, t = 14) {
|
|
418
389
|
let s = `((?=([\\w\\W]{0,${t}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;
|
|
419
|
-
return
|
|
390
|
+
return l.replace(new RegExp(s), "$2..$4");
|
|
420
391
|
}
|
|
421
392
|
const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
422
393
|
key: 0,
|
|
@@ -462,7 +433,7 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
462
433
|
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"
|
|
463
434
|
}, null, -1), so = [
|
|
464
435
|
oo
|
|
465
|
-
],
|
|
436
|
+
], ao = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, no = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, ro = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], lo = { class: "grid grid-cols-12 items-center" }, io = { class: "flex col-span-7 items-center" }, co = {
|
|
466
437
|
key: 0,
|
|
467
438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
468
439
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -488,9 +459,9 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
488
459
|
"stroke-linecap": "round",
|
|
489
460
|
"stroke-linejoin": "round",
|
|
490
461
|
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"
|
|
491
|
-
}, null, -1),
|
|
462
|
+
}, null, -1), ho = [
|
|
492
463
|
po
|
|
493
|
-
],
|
|
464
|
+
], fo = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, go = { class: "col-span-2 text-center" }, ko = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, _o = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], xo = { class: "relative" }, bo = {
|
|
494
465
|
key: 0,
|
|
495
466
|
xmlns: "http://www.w3.org/2000/svg",
|
|
496
467
|
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",
|
|
@@ -498,13 +469,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
498
469
|
viewBox: "0 0 24 24",
|
|
499
470
|
stroke: "currentColor",
|
|
500
471
|
"stroke-width": "1"
|
|
501
|
-
},
|
|
472
|
+
}, wo = /* @__PURE__ */ e("path", {
|
|
502
473
|
"stroke-linecap": "round",
|
|
503
474
|
"stroke-linejoin": "round",
|
|
504
475
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
505
|
-
}, null, -1),
|
|
506
|
-
|
|
507
|
-
], $o = ["data-src", "alt"],
|
|
476
|
+
}, null, -1), yo = [
|
|
477
|
+
wo
|
|
478
|
+
], $o = ["data-src", "alt"], Co = {
|
|
508
479
|
key: 2,
|
|
509
480
|
xmlns: "http://www.w3.org/2000/svg",
|
|
510
481
|
class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
|
|
@@ -512,12 +483,12 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
512
483
|
viewBox: "0 0 24 24",
|
|
513
484
|
stroke: "currentColor",
|
|
514
485
|
"stroke-width": "1"
|
|
515
|
-
},
|
|
486
|
+
}, Mo = /* @__PURE__ */ e("path", {
|
|
516
487
|
"stroke-linecap": "round",
|
|
517
488
|
"stroke-linejoin": "round",
|
|
518
489
|
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"
|
|
519
|
-
}, null, -1),
|
|
520
|
-
|
|
490
|
+
}, null, -1), jo = [
|
|
491
|
+
Mo
|
|
521
492
|
], So = {
|
|
522
493
|
key: 3,
|
|
523
494
|
class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
|
|
@@ -529,239 +500,239 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
529
500
|
data: Object,
|
|
530
501
|
search: Object
|
|
531
502
|
},
|
|
532
|
-
setup(
|
|
533
|
-
const t =
|
|
534
|
-
let
|
|
503
|
+
setup(l) {
|
|
504
|
+
const t = l, s = k("emitter"), { setStore: o, getStore: i } = k("storage"), m = k("adapter"), n = (C) => C == null ? void 0 : C.substring(0, 3), h = g(null), p = g(null), c = g(0), d = g(null), { t: f } = k("i18n"), y = Math.floor(Math.random() * 2 ** 32), w = g(i("full-screen", !1)), B = k("filesize");
|
|
505
|
+
let O;
|
|
535
506
|
s.on("vf-fullscreen-toggle", () => {
|
|
536
|
-
|
|
507
|
+
h.value.style.height = null, w.value = !w.value, o("full-screen", w.value);
|
|
537
508
|
});
|
|
538
|
-
const
|
|
539
|
-
s.on("vf-search-query", ({ newQuery:
|
|
540
|
-
|
|
509
|
+
const D = g("");
|
|
510
|
+
s.on("vf-search-query", ({ newQuery: C }) => {
|
|
511
|
+
D.value = C, C ? s.emit("vf-fetch", {
|
|
541
512
|
params: {
|
|
542
513
|
q: "search",
|
|
543
514
|
adapter: t.data.adapter,
|
|
544
515
|
path: t.data.dirname,
|
|
545
|
-
filter:
|
|
516
|
+
filter: C
|
|
546
517
|
},
|
|
547
|
-
onSuccess: (
|
|
548
|
-
|
|
518
|
+
onSuccess: (b) => {
|
|
519
|
+
b.files.length || s.emit("vf-toast-push", { label: f("No search result found.") });
|
|
549
520
|
}
|
|
550
521
|
}) : s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: t.data.dirname } });
|
|
551
522
|
});
|
|
552
|
-
let
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
|
|
559
|
-
const
|
|
523
|
+
let S = null;
|
|
524
|
+
const F = () => {
|
|
525
|
+
S && clearTimeout(S);
|
|
526
|
+
}, M = g(!0), j = (C) => {
|
|
527
|
+
C.touches.length > 1 && (M.value ? (d.value.stop(), s.emit("vf-toast-push", { label: f("Drag&Drop: off") })) : (d.value.start(), s.emit("vf-toast-push", { label: f("Drag&Drop: on") }), s.emit("vf-explorer-update")), M.value = !M.value);
|
|
528
|
+
}, z = (C) => {
|
|
529
|
+
S = setTimeout(() => {
|
|
530
|
+
const b = new MouseEvent("contextmenu", {
|
|
560
531
|
bubbles: !0,
|
|
561
532
|
cancelable: !1,
|
|
562
533
|
view: window,
|
|
563
534
|
button: 2,
|
|
564
535
|
buttons: 0,
|
|
565
|
-
clientX:
|
|
566
|
-
clientY:
|
|
536
|
+
clientX: C.target.getBoundingClientRect().x,
|
|
537
|
+
clientY: C.target.getBoundingClientRect().y
|
|
567
538
|
});
|
|
568
|
-
|
|
539
|
+
C.target.dispatchEvent(b);
|
|
569
540
|
}, 500);
|
|
570
|
-
},
|
|
571
|
-
|
|
572
|
-
},
|
|
573
|
-
let
|
|
574
|
-
if (!
|
|
575
|
-
return
|
|
576
|
-
const
|
|
577
|
-
return
|
|
578
|
-
},
|
|
579
|
-
|
|
580
|
-
},
|
|
581
|
-
if (
|
|
582
|
-
return
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
|
|
586
|
-
let
|
|
587
|
-
if (
|
|
541
|
+
}, I = (C) => {
|
|
542
|
+
C.type == "dir" ? (s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: C.path } })) : s.emit("vf-modal-show", { type: "preview", adapter: t.data.adapter, item: C });
|
|
543
|
+
}, A = ve({ active: !1, column: "", order: "" }), ee = (C = !0) => {
|
|
544
|
+
let b = [...t.data.files], _ = A.column, x = A.order == "asc" ? 1 : -1;
|
|
545
|
+
if (!C)
|
|
546
|
+
return b;
|
|
547
|
+
const $ = (L, q) => typeof L == "string" && typeof q == "string" ? L.toLowerCase().localeCompare(q.toLowerCase()) : L < q ? -1 : L > q ? 1 : 0;
|
|
548
|
+
return A.active && (b = b.slice().sort((L, q) => $(L[_], q[_]) * x)), b;
|
|
549
|
+
}, G = (C) => {
|
|
550
|
+
A.active && A.column == C ? (A.active = A.order == "asc", A.column = C, A.order = "desc") : (A.active = !0, A.column = C, A.order = "asc");
|
|
551
|
+
}, te = () => d.value.getSelection().map((C) => JSON.parse(C.dataset.item)), ie = (C, b) => {
|
|
552
|
+
if (C.altKey || C.ctrlKey || C.metaKey)
|
|
553
|
+
return C.preventDefault(), !1;
|
|
554
|
+
C.dataTransfer.setDragImage(p.value, 0, 15), C.dataTransfer.effectAllowed = "all", C.dataTransfer.dropEffect = "copy", C.dataTransfer.setData("items", JSON.stringify(te()));
|
|
555
|
+
}, de = (C, b) => {
|
|
556
|
+
C.preventDefault();
|
|
557
|
+
let _ = JSON.parse(C.dataTransfer.getData("items"));
|
|
558
|
+
if (_.find((x) => x.storage != m.value)) {
|
|
588
559
|
alert("Moving items between different storages is not supported yet.");
|
|
589
560
|
return;
|
|
590
561
|
}
|
|
591
|
-
s.emit("vf-modal-show", { type: "move", items: { from:
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
},
|
|
595
|
-
|
|
596
|
-
area:
|
|
562
|
+
s.emit("vf-modal-show", { type: "move", items: { from: _, to: b } });
|
|
563
|
+
}, ne = (C, b) => {
|
|
564
|
+
C.preventDefault(), !b || b.type !== "dir" || d.value.getSelection().find((_) => _ == C.currentTarget) ? (C.dataTransfer.dropEffect = "none", C.dataTransfer.effectAllowed = "none") : C.dataTransfer.dropEffect = "copy";
|
|
565
|
+
}, ce = () => {
|
|
566
|
+
d.value = new Ie({
|
|
567
|
+
area: h.value,
|
|
597
568
|
keyboardDrag: !1,
|
|
598
569
|
selectedClass: "vf-explorer-selected",
|
|
599
570
|
selectorClass: "vf-explorer-selector"
|
|
600
|
-
}), s.on("vf-explorer-update", () =>
|
|
601
|
-
|
|
602
|
-
selectables: document.getElementsByClassName("vf-item-" +
|
|
571
|
+
}), s.on("vf-explorer-update", () => ge(() => {
|
|
572
|
+
d.value.clearSelection(), d.value.setSettings({
|
|
573
|
+
selectables: document.getElementsByClassName("vf-item-" + y)
|
|
603
574
|
});
|
|
604
|
-
})),
|
|
605
|
-
if (
|
|
606
|
-
|
|
575
|
+
})), d.value.subscribe("predragstart", ({ event: C, isDragging: b }) => {
|
|
576
|
+
if (b)
|
|
577
|
+
c.value = d.value.getSelection().length, d.value.break();
|
|
607
578
|
else {
|
|
608
|
-
const
|
|
609
|
-
|
|
579
|
+
const _ = C.target.offsetWidth - C.offsetX, x = C.target.offsetHeight - C.offsetY;
|
|
580
|
+
_ < 15 && x < 15 && (d.value.clearSelection(), d.value.break());
|
|
610
581
|
}
|
|
611
|
-
}),
|
|
612
|
-
|
|
613
|
-
}),
|
|
614
|
-
s.emit("vf-nodes-selected",
|
|
582
|
+
}), d.value.subscribe("predragmove", ({ isDragging: C }) => {
|
|
583
|
+
C && d.value.break();
|
|
584
|
+
}), d.value.subscribe("callback", ({ items: C, event: b, isDragging: _ }) => {
|
|
585
|
+
s.emit("vf-nodes-selected", te()), c.value = d.value.getSelection().length;
|
|
615
586
|
});
|
|
616
587
|
};
|
|
617
|
-
return
|
|
618
|
-
|
|
619
|
-
}),
|
|
620
|
-
|
|
621
|
-
}),
|
|
622
|
-
|
|
623
|
-
}),
|
|
624
|
-
|
|
625
|
-
}), (
|
|
626
|
-
|
|
588
|
+
return K(() => {
|
|
589
|
+
O = new qe(h.value), ce();
|
|
590
|
+
}), Be(() => {
|
|
591
|
+
d.value.Area.reset(), d.value.SelectorArea.updatePos(), O.update();
|
|
592
|
+
}), K(() => {
|
|
593
|
+
le(() => t.view, () => s.emit("vf-explorer-update"));
|
|
594
|
+
}), Oe(() => {
|
|
595
|
+
O.destroy();
|
|
596
|
+
}), (C, b) => (r(), v("div", Rt, [
|
|
597
|
+
l.view == "list" || D.value.length ? (r(), v("div", Pt, [
|
|
627
598
|
e("div", {
|
|
628
|
-
onClick:
|
|
599
|
+
onClick: b[0] || (b[0] = (_) => G("basename")),
|
|
629
600
|
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"
|
|
630
601
|
}, [
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
direction:
|
|
602
|
+
U(u(a(f)("Name")) + " ", 1),
|
|
603
|
+
R(P(me, {
|
|
604
|
+
direction: A.order == "asc" ? "down" : "up"
|
|
634
605
|
}, null, 8, ["direction"]), [
|
|
635
|
-
[
|
|
606
|
+
[ue, A.active && A.column == "basename"]
|
|
636
607
|
])
|
|
637
608
|
]),
|
|
638
|
-
|
|
609
|
+
D.value.length ? V("", !0) : (r(), v("div", {
|
|
639
610
|
key: 0,
|
|
640
|
-
onClick:
|
|
611
|
+
onClick: b[1] || (b[1] = (_) => G("file_size")),
|
|
641
612
|
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"
|
|
642
613
|
}, [
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
direction:
|
|
614
|
+
U(u(a(f)("Size")) + " ", 1),
|
|
615
|
+
R(P(me, {
|
|
616
|
+
direction: A.order == "asc" ? "down" : "up"
|
|
646
617
|
}, null, 8, ["direction"]), [
|
|
647
|
-
[
|
|
618
|
+
[ue, A.active && A.column == "file_size"]
|
|
648
619
|
])
|
|
649
620
|
])),
|
|
650
|
-
|
|
621
|
+
D.value.length ? V("", !0) : (r(), v("div", {
|
|
651
622
|
key: 1,
|
|
652
|
-
onClick:
|
|
623
|
+
onClick: b[2] || (b[2] = (_) => G("last_modified")),
|
|
653
624
|
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"
|
|
654
625
|
}, [
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
direction:
|
|
626
|
+
U(u(a(f)("Date")) + " ", 1),
|
|
627
|
+
R(P(me, {
|
|
628
|
+
direction: A.order == "asc" ? "down" : "up"
|
|
658
629
|
}, null, 8, ["direction"]), [
|
|
659
|
-
[
|
|
630
|
+
[ue, A.active && A.column == "last_modified"]
|
|
660
631
|
])
|
|
661
632
|
])),
|
|
662
|
-
|
|
633
|
+
D.value.length ? (r(), v("div", {
|
|
663
634
|
key: 2,
|
|
664
|
-
onClick:
|
|
635
|
+
onClick: b[3] || (b[3] = (_) => G("path")),
|
|
665
636
|
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"
|
|
666
637
|
}, [
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
direction:
|
|
638
|
+
U(u(a(f)("Filepath")) + " ", 1),
|
|
639
|
+
R(P(me, {
|
|
640
|
+
direction: A.order == "asc" ? "down" : "up"
|
|
670
641
|
}, null, 8, ["direction"]), [
|
|
671
|
-
[
|
|
642
|
+
[ue, A.active && A.column == "path"]
|
|
672
643
|
])
|
|
673
|
-
])) :
|
|
674
|
-
])) :
|
|
644
|
+
])) : V("", !0)
|
|
645
|
+
])) : V("", !0),
|
|
675
646
|
e("div", Gt, [
|
|
676
647
|
e("div", {
|
|
677
648
|
ref_key: "dragImage",
|
|
678
|
-
ref:
|
|
649
|
+
ref: p,
|
|
679
650
|
class: "absolute -z-50 -top-96"
|
|
680
651
|
}, [
|
|
681
652
|
Yt,
|
|
682
|
-
e("div", Jt,
|
|
653
|
+
e("div", Jt, u(c.value), 1)
|
|
683
654
|
], 512)
|
|
684
655
|
]),
|
|
685
656
|
e("div", {
|
|
686
657
|
onTouchstart: j,
|
|
687
|
-
onContextmenu:
|
|
688
|
-
class:
|
|
658
|
+
onContextmenu: b[10] || (b[10] = Z((_) => a(s).emit("vf-contextmenu-show", { event: _, area: h.value, items: te() }), ["self", "prevent"])),
|
|
659
|
+
class: T([w.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
|
|
689
660
|
ref_key: "selectorArea",
|
|
690
|
-
ref:
|
|
661
|
+
ref: h
|
|
691
662
|
}, [
|
|
692
|
-
|
|
693
|
-
onDblclick: (
|
|
694
|
-
onTouchstart:
|
|
695
|
-
onTouchend:
|
|
696
|
-
onContextmenu:
|
|
697
|
-
class:
|
|
698
|
-
"data-type":
|
|
699
|
-
"data-item": JSON.stringify(
|
|
700
|
-
"data-index":
|
|
663
|
+
D.value.length ? (r(!0), v(H, { key: 0 }, J(ee(), (_, x) => (r(), v("div", {
|
|
664
|
+
onDblclick: ($) => I(_),
|
|
665
|
+
onTouchstart: b[4] || (b[4] = ($) => z($)),
|
|
666
|
+
onTouchend: b[5] || (b[5] = ($) => F()),
|
|
667
|
+
onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
|
|
668
|
+
class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
669
|
+
"data-type": _.type,
|
|
670
|
+
"data-item": JSON.stringify(_),
|
|
671
|
+
"data-index": x
|
|
701
672
|
}, [
|
|
702
673
|
e("div", Wt, [
|
|
703
674
|
e("div", Xt, [
|
|
704
|
-
|
|
705
|
-
e("span",
|
|
675
|
+
_.type == "dir" ? (r(), v("svg", Qt, eo)) : (r(), v("svg", to, so)),
|
|
676
|
+
e("span", ao, u(_.basename), 1)
|
|
706
677
|
]),
|
|
707
|
-
e("div",
|
|
678
|
+
e("div", no, u(_.path), 1)
|
|
708
679
|
])
|
|
709
|
-
], 42, Kt))), 256)) :
|
|
710
|
-
|
|
680
|
+
], 42, Kt))), 256)) : V("", !0),
|
|
681
|
+
l.view == "list" && !D.value.length ? (r(!0), v(H, { key: 1 }, J(ee(), (_, x) => (r(), v("div", {
|
|
711
682
|
draggable: "true",
|
|
712
|
-
onDblclick: (
|
|
713
|
-
onTouchstart:
|
|
714
|
-
onTouchend:
|
|
715
|
-
onContextmenu:
|
|
716
|
-
onDragstart: (
|
|
717
|
-
onDragover: (
|
|
718
|
-
onDrop: (
|
|
719
|
-
class:
|
|
720
|
-
"data-type":
|
|
721
|
-
"data-item": JSON.stringify(
|
|
722
|
-
"data-index":
|
|
683
|
+
onDblclick: ($) => I(_),
|
|
684
|
+
onTouchstart: b[6] || (b[6] = ($) => z($)),
|
|
685
|
+
onTouchend: b[7] || (b[7] = ($) => F()),
|
|
686
|
+
onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
|
|
687
|
+
onDragstart: ($) => ie($),
|
|
688
|
+
onDragover: ($) => ne($, _),
|
|
689
|
+
onDrop: ($) => de($, _),
|
|
690
|
+
class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
691
|
+
"data-type": _.type,
|
|
692
|
+
"data-item": JSON.stringify(_),
|
|
693
|
+
"data-index": x
|
|
723
694
|
}, [
|
|
724
695
|
e("div", lo, [
|
|
725
696
|
e("div", io, [
|
|
726
|
-
|
|
727
|
-
e("span",
|
|
697
|
+
_.type == "dir" ? (r(), v("svg", co, mo)) : (r(), v("svg", vo, ho)),
|
|
698
|
+
e("span", fo, u(_.basename), 1)
|
|
728
699
|
]),
|
|
729
|
-
e("div",
|
|
730
|
-
e("div", ko,
|
|
700
|
+
e("div", go, u(_.file_size ? a(B)(_.file_size) : ""), 1),
|
|
701
|
+
e("div", ko, u(a(Ee)(_.last_modified)), 1)
|
|
731
702
|
])
|
|
732
|
-
], 42,
|
|
733
|
-
|
|
703
|
+
], 42, ro))), 256)) : V("", !0),
|
|
704
|
+
l.view == "grid" && !D.value.length ? (r(!0), v(H, { key: 2 }, J(ee(!1), (_, x) => (r(), v("div", {
|
|
734
705
|
draggable: "true",
|
|
735
|
-
onDblclick: (
|
|
736
|
-
onTouchstart:
|
|
737
|
-
onTouchend:
|
|
738
|
-
onContextmenu:
|
|
739
|
-
onDragstart: (
|
|
740
|
-
onDragover: (
|
|
741
|
-
onDrop: (
|
|
742
|
-
class:
|
|
743
|
-
"data-type":
|
|
744
|
-
"data-item": JSON.stringify(
|
|
745
|
-
"data-index":
|
|
706
|
+
onDblclick: ($) => I(_),
|
|
707
|
+
onTouchstart: b[8] || (b[8] = ($) => z($)),
|
|
708
|
+
onTouchend: b[9] || (b[9] = ($) => F()),
|
|
709
|
+
onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
|
|
710
|
+
onDragstart: ($) => ie($),
|
|
711
|
+
onDragover: ($) => ne($, _),
|
|
712
|
+
onDrop: ($) => de($, _),
|
|
713
|
+
class: T(["vf-item-" + a(y), "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"]),
|
|
714
|
+
"data-type": _.type,
|
|
715
|
+
"data-item": JSON.stringify(_),
|
|
716
|
+
"data-index": x
|
|
746
717
|
}, [
|
|
747
718
|
e("div", null, [
|
|
748
|
-
e("div",
|
|
749
|
-
|
|
719
|
+
e("div", xo, [
|
|
720
|
+
_.type == "dir" ? (r(), v("svg", bo, yo)) : (_.mime_type ?? "").startsWith("image") ? (r(), v("img", {
|
|
750
721
|
key: 1,
|
|
751
722
|
class: "lazy h-10 md:h-12 m-auto",
|
|
752
|
-
"data-src":
|
|
753
|
-
alt:
|
|
754
|
-
}, null, 8, $o)) : (
|
|
755
|
-
!(
|
|
723
|
+
"data-src": a(be)(a(m).value, _.path),
|
|
724
|
+
alt: _.basename
|
|
725
|
+
}, null, 8, $o)) : (r(), v("svg", Co, jo)),
|
|
726
|
+
!(_.mime_type ?? "").startsWith("image") && _.type != "dir" ? (r(), v("div", So, u(n(_.extension)), 1)) : V("", !0)
|
|
756
727
|
]),
|
|
757
|
-
e("span", Do,
|
|
728
|
+
e("span", Do, u(a(we)(_.basename)), 1)
|
|
758
729
|
])
|
|
759
|
-
], 42,
|
|
730
|
+
], 42, _o))), 256)) : V("", !0)
|
|
760
731
|
], 34),
|
|
761
732
|
P(It)
|
|
762
733
|
]));
|
|
763
734
|
}
|
|
764
|
-
}), Eo =
|
|
735
|
+
}), Eo = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Fo = { class: "flex leading-5 items-center" }, Vo = ["aria-label"], Bo = /* @__PURE__ */ e("svg", {
|
|
765
736
|
xmlns: "http://www.w3.org/2000/svg",
|
|
766
737
|
class: "h-5 w-5",
|
|
767
738
|
fill: "none",
|
|
@@ -774,12 +745,12 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
774
745
|
"stroke-linejoin": "round",
|
|
775
746
|
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"
|
|
776
747
|
})
|
|
777
|
-
], -1),
|
|
778
|
-
|
|
779
|
-
],
|
|
748
|
+
], -1), Ao = [
|
|
749
|
+
Bo
|
|
750
|
+
], Lo = ["value"], No = { class: "ml-3" }, Uo = { key: 0 }, To = { class: "ml-1" }, Ho = { class: "flex leading-5 items-center justify-end" }, Io = {
|
|
780
751
|
value: "",
|
|
781
752
|
disabled: ""
|
|
782
|
-
},
|
|
753
|
+
}, qo = /* @__PURE__ */ Ae('<option value="en">English</option><option value="fr">French (Français)</option><option value="de">German (Deutsch)</option><option value="he">Hebrew (עִברִית)</option><option value="hi">Hindi (हिंदी)</option><option value="fa">Persian (فارسی)</option><option value="ru">Russian (Pусский)</option><option value="sv">Swedish (Svenska)</option><option value="tr">Turkish (Türkçe)</option><option value="zhCN">Simplified Chinese (简体中文)</option><option value="zhTW">Traditional Chinese (繁體中文)</option>', 11), Ro = ["aria-label"], Po = /* @__PURE__ */ e("svg", {
|
|
783
754
|
xmlns: "http://www.w3.org/2000/svg",
|
|
784
755
|
class: "h-5 w-5 stroke-slate-500 cursor-pointer",
|
|
785
756
|
fill: "none",
|
|
@@ -792,128 +763,128 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
792
763
|
"stroke-linejoin": "round",
|
|
793
764
|
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"
|
|
794
765
|
})
|
|
795
|
-
], -1),
|
|
796
|
-
|
|
797
|
-
],
|
|
766
|
+
], -1), Go = [
|
|
767
|
+
Po
|
|
768
|
+
], Yo = {
|
|
798
769
|
name: "VFStatusbar"
|
|
799
|
-
},
|
|
770
|
+
}, Jo = /* @__PURE__ */ Object.assign(Yo, {
|
|
800
771
|
props: {
|
|
801
772
|
data: Object
|
|
802
773
|
},
|
|
803
|
-
setup(
|
|
804
|
-
const t =
|
|
805
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter:
|
|
774
|
+
setup(l) {
|
|
775
|
+
const t = k("emitter"), { getStore: s, setStore: o } = k("storage"), i = g(0), m = k("adapter"), { t: n, changeLocale: h, locale: p } = k("i18n"), c = () => {
|
|
776
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.value } }), o("adapter", m.value);
|
|
806
777
|
};
|
|
807
|
-
t.on("vf-nodes-selected", (
|
|
808
|
-
|
|
778
|
+
t.on("vf-nodes-selected", (f) => {
|
|
779
|
+
i.value = f.length;
|
|
809
780
|
});
|
|
810
|
-
const
|
|
811
|
-
return t.on("vf-search-query", ({ newQuery:
|
|
812
|
-
|
|
813
|
-
}), (
|
|
814
|
-
e("div",
|
|
781
|
+
const d = g("");
|
|
782
|
+
return t.on("vf-search-query", ({ newQuery: f }) => {
|
|
783
|
+
d.value = f;
|
|
784
|
+
}), (f, y) => (r(), v("div", Eo, [
|
|
785
|
+
e("div", Fo, [
|
|
815
786
|
e("div", {
|
|
816
787
|
class: "mx-2",
|
|
817
|
-
"aria-label":
|
|
788
|
+
"aria-label": a(n)("Storage"),
|
|
818
789
|
"data-microtip-position": "top-right",
|
|
819
790
|
role: "tooltip"
|
|
820
|
-
},
|
|
821
|
-
|
|
822
|
-
"onUpdate:modelValue":
|
|
823
|
-
onChange:
|
|
791
|
+
}, Ao, 8, Vo),
|
|
792
|
+
R(e("select", {
|
|
793
|
+
"onUpdate:modelValue": y[0] || (y[0] = (w) => re(m) ? m.value = w : null),
|
|
794
|
+
onChange: c,
|
|
824
795
|
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"
|
|
825
796
|
}, [
|
|
826
|
-
(
|
|
797
|
+
(r(!0), v(H, null, J(l.data.storages, (w) => (r(), v("option", { value: w }, u(w), 9, Lo))), 256))
|
|
827
798
|
], 544), [
|
|
828
|
-
[
|
|
799
|
+
[ye, a(m)]
|
|
829
800
|
]),
|
|
830
|
-
e("div",
|
|
831
|
-
|
|
832
|
-
e("span",
|
|
801
|
+
e("div", No, [
|
|
802
|
+
d.value.length ? (r(), v("span", Uo, u(l.data.files.length) + " items found. ", 1)) : V("", !0),
|
|
803
|
+
e("span", To, u(i.value > 0 ? i.value + " " + a(n)("item(s) selected.") : ""), 1)
|
|
833
804
|
])
|
|
834
805
|
]),
|
|
835
|
-
e("div",
|
|
836
|
-
|
|
837
|
-
"onUpdate:modelValue":
|
|
838
|
-
onChange:
|
|
806
|
+
e("div", Ho, [
|
|
807
|
+
R(e("select", {
|
|
808
|
+
"onUpdate:modelValue": y[1] || (y[1] = (w) => re(p) ? p.value = w : null),
|
|
809
|
+
onChange: y[2] || (y[2] = (w) => a(h)(w.target.value)),
|
|
839
810
|
class: "w-[120px] delay-200 duration-300 hover:w-full transition-[width] 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 mr-3"
|
|
840
811
|
}, [
|
|
841
|
-
e("option",
|
|
842
|
-
|
|
812
|
+
e("option", Io, u(a(n)("Language")), 1),
|
|
813
|
+
qo
|
|
843
814
|
], 544), [
|
|
844
|
-
[
|
|
815
|
+
[ye, a(p)]
|
|
845
816
|
]),
|
|
846
817
|
e("span", {
|
|
847
818
|
class: "mr-1",
|
|
848
|
-
"aria-label":
|
|
819
|
+
"aria-label": a(n)("About"),
|
|
849
820
|
"data-microtip-position": "top-left",
|
|
850
821
|
role: "tooltip",
|
|
851
|
-
onClick:
|
|
852
|
-
},
|
|
822
|
+
onClick: y[3] || (y[3] = (w) => a(t).emit("vf-modal-show", { type: "about" }))
|
|
823
|
+
}, Go, 8, Ro)
|
|
853
824
|
])
|
|
854
825
|
]));
|
|
855
826
|
}
|
|
856
|
-
}),
|
|
827
|
+
}), Ko = (l, t = 0, s = !1) => {
|
|
857
828
|
let o;
|
|
858
|
-
return (...
|
|
859
|
-
s && !o &&
|
|
860
|
-
|
|
829
|
+
return (...i) => {
|
|
830
|
+
s && !o && l(...i), clearTimeout(o), o = setTimeout(() => {
|
|
831
|
+
l(...i);
|
|
861
832
|
}, t);
|
|
862
833
|
};
|
|
863
|
-
},
|
|
864
|
-
const o =
|
|
865
|
-
return Le((
|
|
834
|
+
}, Wo = (l, t, s) => {
|
|
835
|
+
const o = g(l);
|
|
836
|
+
return Le((m, n) => ({
|
|
866
837
|
get() {
|
|
867
|
-
return
|
|
838
|
+
return m(), o.value;
|
|
868
839
|
},
|
|
869
|
-
set:
|
|
870
|
-
(
|
|
871
|
-
o.value =
|
|
840
|
+
set: Ko(
|
|
841
|
+
(h) => {
|
|
842
|
+
o.value = h, n();
|
|
872
843
|
},
|
|
873
844
|
t,
|
|
874
845
|
s
|
|
875
846
|
)
|
|
876
847
|
}));
|
|
877
|
-
},
|
|
848
|
+
}, Xo = { 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-xs" }, Qo = ["aria-label"], Zo = /* @__PURE__ */ e("path", {
|
|
878
849
|
"fill-rule": "evenodd",
|
|
879
850
|
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",
|
|
880
851
|
"clip-rule": "evenodd"
|
|
881
|
-
}, null, -1),
|
|
882
|
-
|
|
883
|
-
],
|
|
884
|
-
|
|
852
|
+
}, null, -1), es = [
|
|
853
|
+
Zo
|
|
854
|
+
], ts = ["aria-label"], os = /* @__PURE__ */ e("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), ss = [
|
|
855
|
+
os
|
|
885
856
|
], as = ["aria-label"], ns = /* @__PURE__ */ e("path", {
|
|
886
857
|
"stroke-linecap": "round",
|
|
887
858
|
"stroke-linejoin": "round",
|
|
888
859
|
d: "M6 18L18 6M6 6l12 12"
|
|
889
|
-
}, null, -1),
|
|
860
|
+
}, null, -1), rs = [
|
|
890
861
|
ns
|
|
891
|
-
],
|
|
892
|
-
|
|
893
|
-
],
|
|
862
|
+
], ls = /* @__PURE__ */ e("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), is = [
|
|
863
|
+
ls
|
|
864
|
+
], ds = { class: "flex leading-5" }, cs = /* @__PURE__ */ e("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), us = ["title", "onClick"], ms = {
|
|
894
865
|
key: 0,
|
|
895
866
|
class: "animate-spin p-1 h-6 w-6 text-white ml-auto",
|
|
896
867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
897
868
|
fill: "none",
|
|
898
869
|
viewBox: "0 0 24 24"
|
|
899
|
-
},
|
|
870
|
+
}, vs = /* @__PURE__ */ e("circle", {
|
|
900
871
|
class: "opacity-25 stroke-blue-900 dark:stroke-blue-100",
|
|
901
872
|
cx: "12",
|
|
902
873
|
cy: "12",
|
|
903
874
|
r: "10",
|
|
904
875
|
stroke: "currentColor",
|
|
905
876
|
"stroke-width": "4"
|
|
906
|
-
}, null, -1),
|
|
877
|
+
}, null, -1), ps = /* @__PURE__ */ e("path", {
|
|
907
878
|
class: "opacity-75",
|
|
908
879
|
fill: "currentColor",
|
|
909
880
|
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"
|
|
910
|
-
}, null, -1),
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
],
|
|
881
|
+
}, null, -1), hs = [
|
|
882
|
+
vs,
|
|
883
|
+
ps
|
|
884
|
+
], fs = {
|
|
914
885
|
key: 3,
|
|
915
886
|
class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"
|
|
916
|
-
},
|
|
887
|
+
}, gs = /* @__PURE__ */ e("div", null, [
|
|
917
888
|
/* @__PURE__ */ e("svg", {
|
|
918
889
|
class: "h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",
|
|
919
890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -926,316 +897,324 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
|
|
|
926
897
|
d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
|
|
927
898
|
})
|
|
928
899
|
])
|
|
929
|
-
], -1),
|
|
900
|
+
], -1), ks = ["placeholder"], _s = /* @__PURE__ */ e("path", {
|
|
930
901
|
"stroke-linecap": "round",
|
|
931
902
|
"stroke-linejoin": "round",
|
|
932
903
|
d: "M6 18L18 6M6 6l12 12"
|
|
933
|
-
}, null, -1),
|
|
934
|
-
|
|
935
|
-
],
|
|
904
|
+
}, null, -1), xs = [
|
|
905
|
+
_s
|
|
906
|
+
], bs = {
|
|
936
907
|
name: "VFBreadcrumb"
|
|
937
|
-
},
|
|
908
|
+
}, ws = /* @__PURE__ */ Object.assign(bs, {
|
|
938
909
|
props: {
|
|
939
910
|
data: Object
|
|
940
911
|
},
|
|
941
|
-
setup(
|
|
942
|
-
const t =
|
|
943
|
-
|
|
944
|
-
const s =
|
|
912
|
+
setup(l) {
|
|
913
|
+
const t = k("emitter");
|
|
914
|
+
k("storage");
|
|
915
|
+
const s = k("adapter"), o = g(null), i = g([]), m = g(!1), n = g(null), h = l, { t: p } = k("i18n"), c = k("loadingState");
|
|
945
916
|
t.on("vf-explorer-update", () => {
|
|
946
|
-
let
|
|
947
|
-
o.value =
|
|
948
|
-
|
|
949
|
-
basename:
|
|
950
|
-
name:
|
|
951
|
-
path: s.value + "://" +
|
|
917
|
+
let F = [], M = [];
|
|
918
|
+
o.value = h.data.dirname ?? s.value + "://", o.value.length == 0 && (i.value = []), o.value.replace(s.value + "://", "").split("/").forEach(function(j) {
|
|
919
|
+
F.push(j), F.join("/") != "" && M.push({
|
|
920
|
+
basename: j,
|
|
921
|
+
name: j,
|
|
922
|
+
path: s.value + "://" + F.join("/"),
|
|
952
923
|
type: "dir"
|
|
953
924
|
});
|
|
954
|
-
}),
|
|
925
|
+
}), M.length > 4 && (M = M.slice(-5), M[0].name = ".."), i.value = M;
|
|
955
926
|
});
|
|
956
|
-
const
|
|
957
|
-
|
|
927
|
+
const d = () => {
|
|
928
|
+
m.value = !1, y.value = "";
|
|
958
929
|
};
|
|
959
930
|
t.on("vf-search-exit", () => {
|
|
960
|
-
|
|
931
|
+
d();
|
|
961
932
|
});
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
},
|
|
965
|
-
|
|
966
|
-
t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery:
|
|
933
|
+
const f = () => {
|
|
934
|
+
m.value = !0, ge(() => n.value.focus());
|
|
935
|
+
}, y = Wo("", 400), w = () => c.value;
|
|
936
|
+
le(y, (F) => {
|
|
937
|
+
t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery: F });
|
|
967
938
|
});
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
let
|
|
971
|
-
if (
|
|
939
|
+
const B = () => i.value.length && !m.value, O = (F) => {
|
|
940
|
+
F.preventDefault();
|
|
941
|
+
let M = JSON.parse(F.dataTransfer.getData("items"));
|
|
942
|
+
if (M.find((j) => j.storage != s.value)) {
|
|
972
943
|
alert("Moving items between different storages is not supported yet.");
|
|
973
944
|
return;
|
|
974
945
|
}
|
|
975
946
|
t.emit("vf-modal-show", {
|
|
976
947
|
type: "move",
|
|
977
|
-
items: { from:
|
|
948
|
+
items: { from: M, to: i.value[i.value.length - 2] ?? { path: s.value + "://" } }
|
|
978
949
|
});
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
},
|
|
982
|
-
|
|
950
|
+
}, D = (F) => {
|
|
951
|
+
F.preventDefault(), B() ? F.dataTransfer.dropEffect = "copy" : (F.dataTransfer.dropEffect = "none", F.dataTransfer.effectAllowed = "none");
|
|
952
|
+
}, S = () => {
|
|
953
|
+
y.value == "" && d();
|
|
983
954
|
};
|
|
984
|
-
return (
|
|
955
|
+
return (F, M) => (r(), v("div", Xo, [
|
|
985
956
|
e("span", {
|
|
986
|
-
"aria-label":
|
|
957
|
+
"aria-label": a(p)("Go up a directory"),
|
|
987
958
|
"data-microtip-position": "bottom-right",
|
|
988
959
|
role: "tooltip"
|
|
989
960
|
}, [
|
|
990
|
-
(
|
|
991
|
-
onDragover:
|
|
992
|
-
onDrop:
|
|
993
|
-
onClick:
|
|
994
|
-
var
|
|
995
|
-
return !
|
|
961
|
+
(r(), v("svg", {
|
|
962
|
+
onDragover: M[0] || (M[0] = (j) => D(j)),
|
|
963
|
+
onDrop: M[1] || (M[1] = (j) => O(j)),
|
|
964
|
+
onClick: M[2] || (M[2] = (j) => {
|
|
965
|
+
var z;
|
|
966
|
+
return !B() || a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: ((z = i.value[i.value.length - 2]) == null ? void 0 : z.path) ?? a(s) + "://" } });
|
|
996
967
|
}),
|
|
997
|
-
class:
|
|
968
|
+
class: T(["h-6 w-6 p-0.5 rounded", B() ? "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"]),
|
|
998
969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
999
970
|
viewBox: "0 0 20 20",
|
|
1000
971
|
fill: "currentColor"
|
|
1001
|
-
},
|
|
1002
|
-
], 8,
|
|
1003
|
-
|
|
972
|
+
}, es, 34))
|
|
973
|
+
], 8, Qo),
|
|
974
|
+
w() ? (r(), v("span", {
|
|
1004
975
|
key: 1,
|
|
1005
|
-
"aria-label":
|
|
976
|
+
"aria-label": a(p)("Cancel"),
|
|
1006
977
|
"data-microtip-position": "bottom-right",
|
|
1007
978
|
role: "tooltip"
|
|
1008
979
|
}, [
|
|
1009
|
-
(
|
|
1010
|
-
onClick:
|
|
980
|
+
(r(), v("svg", {
|
|
981
|
+
onClick: M[4] || (M[4] = (j) => a(t).emit("vf-fetch-abort")),
|
|
1011
982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1012
983
|
fill: "none",
|
|
1013
984
|
viewBox: "0 0 24 24",
|
|
1014
985
|
"stroke-width": "1.5",
|
|
1015
986
|
stroke: "currentColor",
|
|
1016
987
|
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"
|
|
1017
|
-
},
|
|
1018
|
-
], 8, as)) : (
|
|
988
|
+
}, rs))
|
|
989
|
+
], 8, as)) : (r(), v("span", {
|
|
1019
990
|
key: 0,
|
|
1020
|
-
"aria-label":
|
|
991
|
+
"aria-label": a(p)("Refresh"),
|
|
1021
992
|
"data-microtip-position": "bottom-right",
|
|
1022
993
|
role: "tooltip"
|
|
1023
994
|
}, [
|
|
1024
|
-
(
|
|
1025
|
-
onClick:
|
|
1026
|
-
|
|
995
|
+
(r(), v("svg", {
|
|
996
|
+
onClick: M[3] || (M[3] = (j) => {
|
|
997
|
+
a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: l.data.dirname } });
|
|
1027
998
|
}),
|
|
1028
999
|
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",
|
|
1029
1000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1030
1001
|
viewBox: "-40 -40 580 580",
|
|
1031
1002
|
fill: "currentColor"
|
|
1032
|
-
},
|
|
1033
|
-
], 8,
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1003
|
+
}, ss))
|
|
1004
|
+
], 8, ts)),
|
|
1005
|
+
m.value ? (r(), v("div", fs, [
|
|
1006
|
+
gs,
|
|
1007
|
+
R(e("input", {
|
|
1037
1008
|
ref_key: "searchInput",
|
|
1038
|
-
ref:
|
|
1039
|
-
onKeydown: se(
|
|
1040
|
-
onBlur:
|
|
1041
|
-
"onUpdate:modelValue":
|
|
1042
|
-
placeholder:
|
|
1009
|
+
ref: n,
|
|
1010
|
+
onKeydown: se(d, ["esc"]),
|
|
1011
|
+
onBlur: S,
|
|
1012
|
+
"onUpdate:modelValue": M[6] || (M[6] = (j) => re(y) ? y.value = j : null),
|
|
1013
|
+
placeholder: a(p)("Search anything.."),
|
|
1043
1014
|
class: "w-full pt-1 pb-0 px-2 border-0 text-sm 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",
|
|
1044
1015
|
type: "text"
|
|
1045
|
-
}, null, 40,
|
|
1046
|
-
[
|
|
1016
|
+
}, null, 40, ks), [
|
|
1017
|
+
[ae, a(y)]
|
|
1047
1018
|
]),
|
|
1048
|
-
(
|
|
1019
|
+
(r(), v("svg", {
|
|
1049
1020
|
class: "w-6 h-6 cursor-pointer",
|
|
1050
|
-
onClick:
|
|
1021
|
+
onClick: d,
|
|
1051
1022
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1052
1023
|
fill: "none",
|
|
1053
1024
|
viewBox: "0 0 24 24",
|
|
1054
1025
|
"stroke-width": "1.5",
|
|
1055
1026
|
stroke: "currentColor"
|
|
1056
|
-
},
|
|
1057
|
-
])) : (
|
|
1027
|
+
}, xs))
|
|
1028
|
+
])) : (r(), v("div", {
|
|
1058
1029
|
key: 2,
|
|
1059
1030
|
class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
|
|
1060
|
-
onClick:
|
|
1031
|
+
onClick: Z(f, ["self"])
|
|
1061
1032
|
}, [
|
|
1062
|
-
(
|
|
1063
|
-
onClick:
|
|
1033
|
+
(r(), v("svg", {
|
|
1034
|
+
onClick: M[5] || (M[5] = (j) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter } })),
|
|
1064
1035
|
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",
|
|
1065
1036
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1066
1037
|
viewBox: "0 0 20 20",
|
|
1067
1038
|
fill: "currentColor"
|
|
1068
|
-
},
|
|
1069
|
-
e("div",
|
|
1070
|
-
(
|
|
1071
|
-
|
|
1039
|
+
}, is)),
|
|
1040
|
+
e("div", ds, [
|
|
1041
|
+
(r(!0), v(H, null, J(i.value, (j, z) => (r(), v("div", { key: z }, [
|
|
1042
|
+
cs,
|
|
1072
1043
|
e("span", {
|
|
1073
1044
|
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",
|
|
1074
|
-
title:
|
|
1075
|
-
onClick: (
|
|
1076
|
-
},
|
|
1045
|
+
title: j.basename,
|
|
1046
|
+
onClick: (I) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: j.path } })
|
|
1047
|
+
}, u(j.name), 9, us)
|
|
1077
1048
|
]))), 128))
|
|
1078
1049
|
]),
|
|
1079
|
-
|
|
1050
|
+
w() ? (r(), v("svg", ms, hs)) : V("", !0)
|
|
1080
1051
|
]))
|
|
1081
1052
|
]));
|
|
1082
1053
|
}
|
|
1083
|
-
}),
|
|
1054
|
+
}), ys = ["onClick"], $s = /* @__PURE__ */ e("span", { class: "px-1" }, null, -1), Cs = {
|
|
1084
1055
|
name: "VFContextMenu"
|
|
1085
1056
|
}, Ms = /* @__PURE__ */ Object.assign(Cs, {
|
|
1086
1057
|
props: {
|
|
1087
1058
|
current: Object
|
|
1088
1059
|
},
|
|
1089
|
-
setup(
|
|
1090
|
-
const t =
|
|
1060
|
+
setup(l) {
|
|
1061
|
+
const t = k("emitter"), s = g(null), { apiUrl: o } = X(), i = k("root"), m = l, n = ve({
|
|
1091
1062
|
active: !1,
|
|
1092
1063
|
items: [],
|
|
1093
1064
|
positions: {
|
|
1094
1065
|
left: 0,
|
|
1095
1066
|
top: 0
|
|
1096
1067
|
}
|
|
1097
|
-
}),
|
|
1068
|
+
}), h = g([]);
|
|
1098
1069
|
t.on("vf-context-selected", (w) => {
|
|
1099
|
-
|
|
1070
|
+
h.value = w;
|
|
1100
1071
|
});
|
|
1101
|
-
const { t:
|
|
1072
|
+
const { t: p } = k("i18n"), c = {
|
|
1102
1073
|
newfolder: {
|
|
1103
|
-
title: () =>
|
|
1074
|
+
title: () => p("New Folder"),
|
|
1104
1075
|
action: () => {
|
|
1105
1076
|
t.emit("vf-modal-show", { type: "new-folder" });
|
|
1106
1077
|
}
|
|
1107
1078
|
},
|
|
1108
1079
|
delete: {
|
|
1109
|
-
title: () =>
|
|
1080
|
+
title: () => p("Delete"),
|
|
1110
1081
|
action: () => {
|
|
1111
|
-
t.emit("vf-modal-show", { type: "delete", items:
|
|
1082
|
+
t.emit("vf-modal-show", { type: "delete", items: h });
|
|
1112
1083
|
}
|
|
1113
1084
|
},
|
|
1114
1085
|
refresh: {
|
|
1115
|
-
title: () =>
|
|
1086
|
+
title: () => p("Refresh"),
|
|
1116
1087
|
action: () => {
|
|
1117
|
-
t.emit("vf-fetch", { params: { q: "index", adapter:
|
|
1088
|
+
t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: m.current.dirname } });
|
|
1118
1089
|
}
|
|
1119
1090
|
},
|
|
1120
1091
|
preview: {
|
|
1121
|
-
title: () =>
|
|
1092
|
+
title: () => p("Preview"),
|
|
1122
1093
|
action: () => {
|
|
1123
|
-
t.emit("vf-modal-show", { type: "preview", adapter:
|
|
1094
|
+
t.emit("vf-modal-show", { type: "preview", adapter: m.current.adapter, item: h.value[0] });
|
|
1124
1095
|
}
|
|
1125
1096
|
},
|
|
1126
1097
|
open: {
|
|
1127
|
-
title: () =>
|
|
1098
|
+
title: () => p("Open"),
|
|
1128
1099
|
action: () => {
|
|
1129
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter:
|
|
1100
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].path } });
|
|
1130
1101
|
}
|
|
1131
1102
|
},
|
|
1132
1103
|
openDir: {
|
|
1133
|
-
title: () =>
|
|
1104
|
+
title: () => p("Open containing folder"),
|
|
1134
1105
|
action: () => {
|
|
1135
|
-
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter:
|
|
1106
|
+
t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].dir } });
|
|
1136
1107
|
}
|
|
1137
1108
|
},
|
|
1138
1109
|
download: {
|
|
1139
|
-
title: () =>
|
|
1110
|
+
title: () => p("Download"),
|
|
1140
1111
|
action: () => {
|
|
1141
|
-
const w = o.value + "?" + oe({ q: "download", adapter:
|
|
1112
|
+
const w = o.value + "?" + oe({ q: "download", adapter: m.current.adapter, path: h.value[0].path });
|
|
1142
1113
|
t.emit("vf-download", w);
|
|
1143
1114
|
}
|
|
1144
1115
|
},
|
|
1145
1116
|
archive: {
|
|
1146
|
-
title: () =>
|
|
1117
|
+
title: () => p("Archive"),
|
|
1147
1118
|
action: () => {
|
|
1148
|
-
t.emit("vf-modal-show", { type: "archive", items:
|
|
1119
|
+
t.emit("vf-modal-show", { type: "archive", items: h });
|
|
1149
1120
|
}
|
|
1150
1121
|
},
|
|
1151
1122
|
unarchive: {
|
|
1152
|
-
title: () =>
|
|
1123
|
+
title: () => p("Unarchive"),
|
|
1153
1124
|
action: () => {
|
|
1154
|
-
t.emit("vf-modal-show", { type: "unarchive", items:
|
|
1125
|
+
t.emit("vf-modal-show", { type: "unarchive", items: h });
|
|
1155
1126
|
}
|
|
1156
1127
|
},
|
|
1157
1128
|
rename: {
|
|
1158
|
-
title: () =>
|
|
1129
|
+
title: () => p("Rename"),
|
|
1159
1130
|
action: () => {
|
|
1160
|
-
t.emit("vf-modal-show", { type: "rename", items:
|
|
1131
|
+
t.emit("vf-modal-show", { type: "rename", items: h });
|
|
1161
1132
|
}
|
|
1162
1133
|
}
|
|
1163
1134
|
}, d = (w) => {
|
|
1164
1135
|
t.emit("vf-contextmenu-hide"), w.action();
|
|
1165
|
-
},
|
|
1136
|
+
}, f = g("");
|
|
1166
1137
|
t.on("vf-search-query", ({ newQuery: w }) => {
|
|
1167
|
-
|
|
1168
|
-
}), t.on("vf-contextmenu-show", ({ event: w, area:
|
|
1169
|
-
if (
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1138
|
+
f.value = w;
|
|
1139
|
+
}), t.on("vf-contextmenu-show", ({ event: w, area: B, items: O, target: D = null }) => {
|
|
1140
|
+
if (n.items = [], f.value)
|
|
1141
|
+
if (D)
|
|
1142
|
+
n.items.push(c.openDir), t.emit("vf-context-selected", [D]);
|
|
1172
1143
|
else
|
|
1173
1144
|
return;
|
|
1174
1145
|
else
|
|
1175
|
-
|
|
1176
|
-
|
|
1146
|
+
!D && !f.value ? (n.items.push(c.refresh), n.items.push(c.newfolder), t.emit("vf-context-selected", [])) : O.length > 1 && O.some((S) => S.path === D.path) ? (n.items.push(c.refresh), n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", O)) : (D.type == "dir" ? n.items.push(c.open) : (n.items.push(c.preview), n.items.push(c.download)), n.items.push(c.rename), D.mime_type == "application/zip" ? n.items.push(c.unarchive) : n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", [D]));
|
|
1147
|
+
y(w, B);
|
|
1177
1148
|
}), t.on("vf-contextmenu-hide", () => {
|
|
1178
|
-
|
|
1149
|
+
n.active = !1;
|
|
1179
1150
|
});
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1151
|
+
const y = (w, B) => {
|
|
1152
|
+
n.active = !0, ge(() => {
|
|
1153
|
+
const O = i.value.getBoundingClientRect(), D = B.getBoundingClientRect();
|
|
1154
|
+
let S = w.pageX - O.left, F = w.pageY - O.top, M = s.value.offsetHeight, j = s.value.offsetWidth;
|
|
1155
|
+
S = D.right - w.pageX + window.scrollX < j ? S - j : S, F = D.bottom - w.pageY + window.scrollY < M ? F - M : F, n.positions = {
|
|
1156
|
+
left: S + "px",
|
|
1157
|
+
top: F + "px"
|
|
1186
1158
|
};
|
|
1187
1159
|
});
|
|
1188
1160
|
};
|
|
1189
|
-
return (w,
|
|
1161
|
+
return (w, B) => n.active ? (r(), v("ul", {
|
|
1190
1162
|
key: 0,
|
|
1191
1163
|
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",
|
|
1192
1164
|
ref_key: "contextmenu",
|
|
1193
1165
|
ref: s,
|
|
1194
|
-
style:
|
|
1166
|
+
style: ze(n.positions)
|
|
1195
1167
|
}, [
|
|
1196
|
-
(
|
|
1168
|
+
(r(!0), v(H, null, J(n.items, (O) => (r(), v("li", {
|
|
1197
1169
|
class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
|
|
1198
|
-
key:
|
|
1199
|
-
onClick: (
|
|
1170
|
+
key: O.title,
|
|
1171
|
+
onClick: (D) => d(O)
|
|
1200
1172
|
}, [
|
|
1201
|
-
|
|
1202
|
-
e("span", null,
|
|
1203
|
-
], 8,
|
|
1204
|
-
], 4)) :
|
|
1173
|
+
$s,
|
|
1174
|
+
e("span", null, u(O.title()), 1)
|
|
1175
|
+
], 8, ys))), 128))
|
|
1176
|
+
], 4)) : V("", !0);
|
|
1205
1177
|
}
|
|
1206
|
-
}),
|
|
1207
|
-
const s =
|
|
1208
|
-
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o,
|
|
1209
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
1178
|
+
}), js = (l, t) => {
|
|
1179
|
+
const s = l[t];
|
|
1180
|
+
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, i) => {
|
|
1181
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(i.bind(null, new Error("Unknown variable dynamic import: " + t)));
|
|
1210
1182
|
});
|
|
1211
1183
|
};
|
|
1212
|
-
async function
|
|
1213
|
-
return (await
|
|
1184
|
+
async function Ss(l) {
|
|
1185
|
+
return (await js(/* @__PURE__ */ Object.assign({ "../locales/de.js": () => import("./de-3f6147f5.js"), "../locales/en.js": () => import("./en-ffed8966.js"), "../locales/fa.js": () => import("./fa-7534f880.js"), "../locales/he.js": () => import("./he-1978fb6e.js"), "../locales/hi.js": () => import("./hi-ffd5a2ba.js"), "../locales/ru.js": () => import("./ru-9f317caf.js"), "../locales/sv.js": () => import("./sv-07e3c393.js"), "../locales/tr.js": () => import("./tr-ce32e2ae.js"), "../locales/zhCN.js": () => import("./zhCN-9b524820.js"), "../locales/zhTW.js": () => import("./zhTW-a803434e.js") }), `../locales/${l}.js`)).default;
|
|
1214
1186
|
}
|
|
1215
|
-
function
|
|
1216
|
-
const { getStore: o, setStore:
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
}).catch((
|
|
1220
|
-
|
|
1187
|
+
function Ds(l, t, s) {
|
|
1188
|
+
const { getStore: o, setStore: i } = xe(l), m = g({}), n = g(o("locale", t)), h = (d, f = "en") => {
|
|
1189
|
+
Ss(d).then((y) => {
|
|
1190
|
+
m.value = y, i("locale", d), n.value = d, i("translations", y), s.emit("vf-toast-push", { label: "The language is set to " + d });
|
|
1191
|
+
}).catch((y) => {
|
|
1192
|
+
f ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), h(f, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
|
|
1221
1193
|
});
|
|
1222
1194
|
};
|
|
1223
|
-
o("locale") ?
|
|
1224
|
-
const
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1195
|
+
o("locale") ? m.value = o("translations") : h(t);
|
|
1196
|
+
const p = (d, ...f) => f.length ? p(d = d.replace("%s", f.shift()), ...f) : d;
|
|
1197
|
+
function c(d, ...f) {
|
|
1198
|
+
return m.value.hasOwnProperty(d) ? p(m.value[d], ...f) : p(d, ...f);
|
|
1227
1199
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
return
|
|
1200
|
+
return { t: c, changeLocale: h, locale: n };
|
|
1201
|
+
}
|
|
1202
|
+
function Me(l, t, s, o, i) {
|
|
1203
|
+
return (t = Math, s = t.log, o = 1024, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "iB" : "B");
|
|
1204
|
+
}
|
|
1205
|
+
function je(l, t, s, o, i) {
|
|
1206
|
+
return (t = Math, s = t.log, o = 1e3, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "B" : "B");
|
|
1207
|
+
}
|
|
1208
|
+
function Os(l) {
|
|
1209
|
+
const t = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(l);
|
|
1210
|
+
return o[1] * Math.pow(1024, t[o[2].toLowerCase()]);
|
|
1232
1211
|
}
|
|
1233
|
-
const zs =
|
|
1212
|
+
const zs = /* @__PURE__ */ e("iframe", {
|
|
1234
1213
|
id: "download_frame",
|
|
1235
1214
|
style: { display: "none" }
|
|
1236
|
-
}, null, -1),
|
|
1215
|
+
}, null, -1), Es = {
|
|
1237
1216
|
name: "VueFinder"
|
|
1238
|
-
},
|
|
1217
|
+
}, Fs = /* @__PURE__ */ Object.assign(Es, {
|
|
1239
1218
|
props: {
|
|
1240
1219
|
url: {
|
|
1241
1220
|
type: [String]
|
|
@@ -1269,116 +1248,128 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1269
1248
|
default: {}
|
|
1270
1249
|
}
|
|
1271
1250
|
},
|
|
1272
|
-
setup(
|
|
1273
|
-
const t =
|
|
1274
|
-
|
|
1275
|
-
const
|
|
1276
|
-
|
|
1277
|
-
const { apiUrl:
|
|
1278
|
-
|
|
1279
|
-
const d =
|
|
1280
|
-
s.on("vf-darkMode-toggle", () => {
|
|
1281
|
-
|
|
1251
|
+
setup(l) {
|
|
1252
|
+
const t = l, s = He(), { setStore: o, getStore: i } = xe(t.id), m = g(i("adapter")), n = g(null);
|
|
1253
|
+
Y("root", n), Y("emitter", s), Y("storage", xe(t.id)), Y("postData", t.postData), Y("adapter", m), Y("maxFileSize", t.maxFileSize), Y("usePropDarkMode", t.usePropDarkMode);
|
|
1254
|
+
const h = Ds(t.id, t.locale, s);
|
|
1255
|
+
Y("i18n", h);
|
|
1256
|
+
const { apiUrl: p, setApiUrl: c } = X();
|
|
1257
|
+
c(t.url);
|
|
1258
|
+
const d = ve({ adapter: m.value, storages: [], dirname: ".", files: [] }), f = g(i("viewport", "grid")), y = t.usePropDarkMode ? Ne(() => t.dark) : g(i("darkMode", t.dark));
|
|
1259
|
+
Y("darkMode", y), s.on("vf-darkMode-toggle", () => {
|
|
1260
|
+
y.value = !y.value, o("darkMode", y.value);
|
|
1282
1261
|
});
|
|
1283
|
-
const w =
|
|
1284
|
-
|
|
1285
|
-
const
|
|
1262
|
+
const w = g(i("metricUnits", !1));
|
|
1263
|
+
Y("metricUnits", w);
|
|
1264
|
+
const B = g(w.value ? je : Me);
|
|
1265
|
+
le(w, (j) => {
|
|
1266
|
+
B.value = j ? je : Me;
|
|
1267
|
+
}), Y("filesize", B), s.on("vf-metric-units-saved", (j) => {
|
|
1268
|
+
w.value = j, o("metricUnits", j);
|
|
1269
|
+
});
|
|
1270
|
+
const O = g(!1);
|
|
1271
|
+
Y("loadingState", O);
|
|
1272
|
+
const D = g(i("full-screen", !1));
|
|
1286
1273
|
s.on("vf-fullscreen-toggle", () => {
|
|
1287
|
-
|
|
1288
|
-
}), s.on("vf-view-toggle", (
|
|
1289
|
-
|
|
1274
|
+
D.value = !D.value, o("full-screen", D.value);
|
|
1275
|
+
}), s.on("vf-view-toggle", (j) => {
|
|
1276
|
+
f.value = j;
|
|
1290
1277
|
});
|
|
1291
|
-
const
|
|
1278
|
+
const S = ve({
|
|
1292
1279
|
active: !1,
|
|
1293
1280
|
type: "delete",
|
|
1294
1281
|
data: {}
|
|
1295
1282
|
});
|
|
1296
1283
|
s.on("vf-modal-close", () => {
|
|
1297
|
-
|
|
1298
|
-
}), s.on("vf-modal-show", (
|
|
1299
|
-
|
|
1284
|
+
S.active = !1;
|
|
1285
|
+
}), s.on("vf-modal-show", (j) => {
|
|
1286
|
+
S.active = !0, S.type = j.type, S.data = j;
|
|
1300
1287
|
});
|
|
1301
|
-
const
|
|
1302
|
-
Object.assign(d,
|
|
1288
|
+
const F = (j) => {
|
|
1289
|
+
Object.assign(d, j), s.emit("vf-nodes-selected", {}), s.emit("vf-explorer-update");
|
|
1303
1290
|
};
|
|
1304
|
-
let
|
|
1291
|
+
let M;
|
|
1305
1292
|
return s.on("vf-fetch-abort", () => {
|
|
1306
|
-
|
|
1307
|
-
}), s.on("vf-fetch", ({ params:
|
|
1308
|
-
["index", "search"].includes(
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}).catch((
|
|
1313
|
-
|
|
1293
|
+
M.abort(), O.value = !1;
|
|
1294
|
+
}), s.on("vf-fetch", ({ params: j, onSuccess: z = null, onError: I = null, noCloseModal: A = !1 }) => {
|
|
1295
|
+
["index", "search"].includes(j.q) && (M && M.abort(), O.value = !0), M = new AbortController();
|
|
1296
|
+
const ee = M.signal;
|
|
1297
|
+
fe(p.value, { params: j, signal: ee }).then((G) => {
|
|
1298
|
+
m.value = G.adapter, ["index", "search"].includes(j.q) && (O.value = !1), A || s.emit("vf-modal-close"), F(G), z(G);
|
|
1299
|
+
}).catch((G) => {
|
|
1300
|
+
I && I(G);
|
|
1314
1301
|
}).finally(() => {
|
|
1315
1302
|
});
|
|
1316
|
-
}), s.on("vf-download", (
|
|
1317
|
-
document.getElementById("download_frame").src =
|
|
1318
|
-
}),
|
|
1319
|
-
s.emit("vf-fetch", { params: { q: "index", adapter:
|
|
1320
|
-
}), (
|
|
1303
|
+
}), s.on("vf-download", (j) => {
|
|
1304
|
+
document.getElementById("download_frame").src = j, s.emit("vf-modal-close");
|
|
1305
|
+
}), K(() => {
|
|
1306
|
+
s.emit("vf-fetch", { params: { q: "index", adapter: m.value } });
|
|
1307
|
+
}), (j, z) => (r(), v("div", {
|
|
1308
|
+
class: "vuefinder",
|
|
1309
|
+
ref_key: "root",
|
|
1310
|
+
ref: n
|
|
1311
|
+
}, [
|
|
1321
1312
|
e("div", {
|
|
1322
|
-
class:
|
|
1313
|
+
class: T(a(y) ? "dark" : "")
|
|
1323
1314
|
}, [
|
|
1324
1315
|
e("div", {
|
|
1325
|
-
class:
|
|
1326
|
-
style:
|
|
1327
|
-
onMousedown:
|
|
1328
|
-
onTouchstart:
|
|
1316
|
+
class: T([D.value ? "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"]),
|
|
1317
|
+
style: ze(D.value ? "" : "max-height: " + l.maxHeight),
|
|
1318
|
+
onMousedown: z[0] || (z[0] = (I) => a(s).emit("vf-contextmenu-hide")),
|
|
1319
|
+
onTouchstart: z[1] || (z[1] = (I) => a(s).emit("vf-contextmenu-hide"))
|
|
1329
1320
|
}, [
|
|
1330
|
-
P(
|
|
1331
|
-
P(
|
|
1321
|
+
P(Et, { data: d }, null, 8, ["data"]),
|
|
1322
|
+
P(ws, { data: d }, null, 8, ["data"]),
|
|
1332
1323
|
P(zo, {
|
|
1333
|
-
view:
|
|
1324
|
+
view: f.value,
|
|
1334
1325
|
data: d
|
|
1335
1326
|
}, null, 8, ["view", "data"]),
|
|
1336
|
-
P(
|
|
1327
|
+
P(Jo, { data: d }, null, 8, ["data"])
|
|
1337
1328
|
], 38),
|
|
1338
|
-
|
|
1329
|
+
S.active ? (r(), N(Ue("v-f-modal-" + S.type), {
|
|
1339
1330
|
key: 0,
|
|
1340
|
-
selection:
|
|
1331
|
+
selection: S.data,
|
|
1341
1332
|
current: d
|
|
1342
|
-
}, null, 8, ["selection", "current"])) :
|
|
1333
|
+
}, null, 8, ["selection", "current"])) : V("", !0),
|
|
1343
1334
|
P(Ms, { current: d }, null, 8, ["current"]),
|
|
1344
|
-
|
|
1335
|
+
zs
|
|
1345
1336
|
], 2)
|
|
1346
|
-
]));
|
|
1337
|
+
], 512));
|
|
1347
1338
|
}
|
|
1348
|
-
}), Vs = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1),
|
|
1339
|
+
}), Vs = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Bs = { class: "fixed z-10 inset-0 overflow-hidden" }, As = { 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" }, Ls = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Ns = { 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 = {
|
|
1349
1340
|
__name: "ModalLayout",
|
|
1350
|
-
setup(
|
|
1351
|
-
const t =
|
|
1352
|
-
return
|
|
1341
|
+
setup(l) {
|
|
1342
|
+
const t = k("emitter");
|
|
1343
|
+
return K(() => {
|
|
1353
1344
|
const s = document.querySelector(".v-f-modal input");
|
|
1354
1345
|
s && s.focus();
|
|
1355
|
-
}), (s, o) => (
|
|
1346
|
+
}), (s, o) => (r(), v("div", {
|
|
1356
1347
|
class: "v-f-modal relative z-30",
|
|
1357
1348
|
"aria-labelledby": "modal-title",
|
|
1358
1349
|
role: "dialog",
|
|
1359
1350
|
"aria-modal": "true",
|
|
1360
|
-
onKeyup: o[1] || (o[1] = se((
|
|
1351
|
+
onKeyup: o[1] || (o[1] = se((i) => a(t).emit("vf-modal-close"), ["esc"])),
|
|
1361
1352
|
tabindex: "0"
|
|
1362
1353
|
}, [
|
|
1363
1354
|
Vs,
|
|
1364
|
-
e("div",
|
|
1355
|
+
e("div", Bs, [
|
|
1365
1356
|
e("div", {
|
|
1366
1357
|
class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
|
|
1367
|
-
onMousedown: o[0] || (o[0] =
|
|
1358
|
+
onMousedown: o[0] || (o[0] = Z((i) => a(t).emit("vf-modal-close"), ["self"]))
|
|
1368
1359
|
}, [
|
|
1369
|
-
e("div",
|
|
1370
|
-
e("div",
|
|
1371
|
-
|
|
1360
|
+
e("div", As, [
|
|
1361
|
+
e("div", Ls, [
|
|
1362
|
+
pe(s.$slots, "default")
|
|
1372
1363
|
]),
|
|
1373
|
-
e("div",
|
|
1374
|
-
|
|
1364
|
+
e("div", Ns, [
|
|
1365
|
+
pe(s.$slots, "buttons")
|
|
1375
1366
|
])
|
|
1376
1367
|
])
|
|
1377
1368
|
], 32)
|
|
1378
1369
|
])
|
|
1379
1370
|
], 32));
|
|
1380
1371
|
}
|
|
1381
|
-
},
|
|
1372
|
+
}, Us = ["aria-label"], Ts = /* @__PURE__ */ e("svg", {
|
|
1382
1373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1383
1374
|
fill: "none",
|
|
1384
1375
|
viewBox: "0 0 24 24",
|
|
@@ -1391,11 +1382,11 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1391
1382
|
"stroke-linejoin": "round",
|
|
1392
1383
|
d: "M6 18L18 6M6 6l12 12"
|
|
1393
1384
|
})
|
|
1394
|
-
], -1),
|
|
1395
|
-
|
|
1396
|
-
],
|
|
1385
|
+
], -1), Hs = [
|
|
1386
|
+
Ts
|
|
1387
|
+
], Is = {
|
|
1397
1388
|
name: "Message"
|
|
1398
|
-
},
|
|
1389
|
+
}, Q = /* @__PURE__ */ Object.assign(Is, {
|
|
1399
1390
|
props: {
|
|
1400
1391
|
error: {
|
|
1401
1392
|
type: Boolean,
|
|
@@ -1403,32 +1394,32 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1403
1394
|
}
|
|
1404
1395
|
},
|
|
1405
1396
|
emits: ["hidden"],
|
|
1406
|
-
setup(
|
|
1407
|
-
var
|
|
1408
|
-
const { t: s } =
|
|
1409
|
-
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1397
|
+
setup(l, { emit: t }) {
|
|
1398
|
+
var p;
|
|
1399
|
+
const { t: s } = k("i18n"), o = g(!1), i = g(null), m = g((p = i.value) == null ? void 0 : p.strMessage), n = t;
|
|
1400
|
+
le(m, () => o.value = !1);
|
|
1401
|
+
const h = () => {
|
|
1402
|
+
n("hidden"), o.value = !0;
|
|
1412
1403
|
};
|
|
1413
|
-
return (
|
|
1414
|
-
o.value ?
|
|
1404
|
+
return (c, d) => (r(), v("div", null, [
|
|
1405
|
+
o.value ? V("", !0) : (r(), v("div", {
|
|
1415
1406
|
key: 0,
|
|
1416
1407
|
ref_key: "strMessage",
|
|
1417
|
-
ref:
|
|
1418
|
-
class:
|
|
1408
|
+
ref: i,
|
|
1409
|
+
class: T(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", l.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
|
|
1419
1410
|
}, [
|
|
1420
|
-
|
|
1411
|
+
pe(c.$slots, "default"),
|
|
1421
1412
|
e("div", {
|
|
1422
1413
|
class: "ml-auto cursor-pointer",
|
|
1423
|
-
onClick:
|
|
1424
|
-
"aria-label":
|
|
1414
|
+
onClick: h,
|
|
1415
|
+
"aria-label": a(s)("Close"),
|
|
1425
1416
|
"data-microtip-position": "top-left",
|
|
1426
1417
|
role: "tooltip"
|
|
1427
|
-
},
|
|
1418
|
+
}, Hs, 8, Us)
|
|
1428
1419
|
], 2))
|
|
1429
1420
|
]));
|
|
1430
1421
|
}
|
|
1431
|
-
}),
|
|
1422
|
+
}), qs = { class: "sm:flex sm:items-start" }, Rs = /* @__PURE__ */ e("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" }, [
|
|
1432
1423
|
/* @__PURE__ */ e("svg", {
|
|
1433
1424
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1434
1425
|
class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
|
|
@@ -1443,13 +1434,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1443
1434
|
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"
|
|
1444
1435
|
})
|
|
1445
1436
|
])
|
|
1446
|
-
], -1),
|
|
1437
|
+
], -1), Ps = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Gs = {
|
|
1447
1438
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1448
1439
|
id: "modal-title"
|
|
1449
|
-
},
|
|
1450
|
-
class: "text-gray-500 text-sm mb-1 overflow-auto",
|
|
1440
|
+
}, Ys = { class: "mt-2" }, Js = { class: "text-sm text-gray-500" }, Ks = {
|
|
1441
|
+
class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
|
|
1451
1442
|
style: { "max-height": "200px" }
|
|
1452
|
-
},
|
|
1443
|
+
}, Ws = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Xs = {
|
|
1453
1444
|
key: 0,
|
|
1454
1445
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1455
1446
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -1457,13 +1448,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1457
1448
|
viewBox: "0 0 24 24",
|
|
1458
1449
|
stroke: "currentColor",
|
|
1459
1450
|
"stroke-width": "1"
|
|
1460
|
-
},
|
|
1451
|
+
}, Qs = /* @__PURE__ */ e("path", {
|
|
1461
1452
|
"stroke-linecap": "round",
|
|
1462
1453
|
"stroke-linejoin": "round",
|
|
1463
1454
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
1464
|
-
}, null, -1),
|
|
1465
|
-
|
|
1466
|
-
],
|
|
1455
|
+
}, null, -1), Zs = [
|
|
1456
|
+
Qs
|
|
1457
|
+
], ea = {
|
|
1467
1458
|
key: 1,
|
|
1468
1459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1469
1460
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -1471,75 +1462,75 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1471
1462
|
viewBox: "0 0 24 24",
|
|
1472
1463
|
stroke: "currentColor",
|
|
1473
1464
|
"stroke-width": "1"
|
|
1474
|
-
},
|
|
1465
|
+
}, ta = /* @__PURE__ */ e("path", {
|
|
1475
1466
|
"stroke-linecap": "round",
|
|
1476
1467
|
"stroke-linejoin": "round",
|
|
1477
1468
|
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"
|
|
1478
|
-
}, null, -1),
|
|
1479
|
-
|
|
1480
|
-
],
|
|
1469
|
+
}, null, -1), oa = [
|
|
1470
|
+
ta
|
|
1471
|
+
], sa = { class: "ml-1.5" }, aa = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, na = {
|
|
1481
1472
|
name: "VFModalDelete"
|
|
1482
|
-
},
|
|
1473
|
+
}, ra = /* @__PURE__ */ Object.assign(na, {
|
|
1483
1474
|
props: {
|
|
1484
1475
|
selection: Object,
|
|
1485
1476
|
current: Object
|
|
1486
1477
|
},
|
|
1487
|
-
setup(
|
|
1488
|
-
const t =
|
|
1489
|
-
|
|
1490
|
-
const s =
|
|
1491
|
-
|
|
1478
|
+
setup(l) {
|
|
1479
|
+
const t = k("emitter");
|
|
1480
|
+
k("storage");
|
|
1481
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items), n = g(""), h = () => {
|
|
1482
|
+
m.value.length && t.emit("vf-fetch", {
|
|
1492
1483
|
params: {
|
|
1493
1484
|
q: "delete",
|
|
1494
1485
|
adapter: s.value,
|
|
1495
|
-
path:
|
|
1496
|
-
items: JSON.stringify(
|
|
1486
|
+
path: i.current.dirname,
|
|
1487
|
+
items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c })))
|
|
1497
1488
|
},
|
|
1498
1489
|
onSuccess: () => {
|
|
1499
1490
|
t.emit("vf-toast-push", { label: o("Files deleted.") });
|
|
1500
1491
|
},
|
|
1501
|
-
onError: (
|
|
1502
|
-
|
|
1492
|
+
onError: (p) => {
|
|
1493
|
+
n.value = o(p.message);
|
|
1503
1494
|
}
|
|
1504
1495
|
});
|
|
1505
1496
|
};
|
|
1506
|
-
return (
|
|
1507
|
-
buttons:
|
|
1497
|
+
return (p, c) => (r(), N(W, null, {
|
|
1498
|
+
buttons: E(() => [
|
|
1508
1499
|
e("button", {
|
|
1509
1500
|
type: "button",
|
|
1510
|
-
onClick:
|
|
1511
|
-
class: "
|
|
1512
|
-
},
|
|
1501
|
+
onClick: h,
|
|
1502
|
+
class: "vf-btn vf-btn-danger"
|
|
1503
|
+
}, u(a(o)("Yes, Delete!")), 1),
|
|
1513
1504
|
e("button", {
|
|
1514
1505
|
type: "button",
|
|
1515
|
-
onClick:
|
|
1516
|
-
class: "
|
|
1517
|
-
},
|
|
1518
|
-
e("div",
|
|
1506
|
+
onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")),
|
|
1507
|
+
class: "vf-btn vf-btn-secondary"
|
|
1508
|
+
}, u(a(o)("Cancel")), 1),
|
|
1509
|
+
e("div", aa, u(a(o)("This action cannot be undone.")), 1)
|
|
1519
1510
|
]),
|
|
1520
|
-
default:
|
|
1521
|
-
e("div",
|
|
1522
|
-
|
|
1523
|
-
e("div",
|
|
1524
|
-
e("h3",
|
|
1525
|
-
e("div",
|
|
1526
|
-
e("p",
|
|
1527
|
-
e("div",
|
|
1528
|
-
(
|
|
1529
|
-
|
|
1530
|
-
e("span",
|
|
1511
|
+
default: E(() => [
|
|
1512
|
+
e("div", qs, [
|
|
1513
|
+
Rs,
|
|
1514
|
+
e("div", Ps, [
|
|
1515
|
+
e("h3", Gs, u(a(o)("Delete files")), 1),
|
|
1516
|
+
e("div", Ys, [
|
|
1517
|
+
e("p", Js, u(a(o)("Are you sure you want to delete these files?")), 1),
|
|
1518
|
+
e("div", Ks, [
|
|
1519
|
+
(r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ws, [
|
|
1520
|
+
d.type === "dir" ? (r(), v("svg", Xs, Zs)) : (r(), v("svg", ea, oa)),
|
|
1521
|
+
e("span", sa, u(d.basename), 1)
|
|
1531
1522
|
]))), 256))
|
|
1532
1523
|
]),
|
|
1533
|
-
|
|
1524
|
+
n.value.length ? (r(), N(Q, {
|
|
1534
1525
|
key: 0,
|
|
1535
|
-
onHidden:
|
|
1526
|
+
onHidden: c[0] || (c[0] = (d) => n.value = ""),
|
|
1536
1527
|
error: ""
|
|
1537
1528
|
}, {
|
|
1538
|
-
default:
|
|
1539
|
-
|
|
1529
|
+
default: E(() => [
|
|
1530
|
+
U(u(n.value), 1)
|
|
1540
1531
|
]),
|
|
1541
1532
|
_: 1
|
|
1542
|
-
})) :
|
|
1533
|
+
})) : V("", !0)
|
|
1543
1534
|
])
|
|
1544
1535
|
])
|
|
1545
1536
|
])
|
|
@@ -1547,7 +1538,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1547
1538
|
_: 1
|
|
1548
1539
|
}));
|
|
1549
1540
|
}
|
|
1550
|
-
}),
|
|
1541
|
+
}), la = { class: "sm:flex sm:items-start" }, ia = /* @__PURE__ */ e("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" }, [
|
|
1551
1542
|
/* @__PURE__ */ e("svg", {
|
|
1552
1543
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1553
1544
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1562,34 +1553,34 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1562
1553
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1563
1554
|
})
|
|
1564
1555
|
])
|
|
1565
|
-
], -1),
|
|
1556
|
+
], -1), da = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ca = {
|
|
1566
1557
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1567
1558
|
id: "modal-title"
|
|
1568
|
-
},
|
|
1559
|
+
}, ua = { class: "mt-2" }, ma = { class: "text-sm text-gray-500" }, va = {
|
|
1569
1560
|
name: "VFModalMessage"
|
|
1570
|
-
},
|
|
1561
|
+
}, pa = /* @__PURE__ */ Object.assign(va, {
|
|
1571
1562
|
props: {
|
|
1572
1563
|
selection: Object
|
|
1573
1564
|
},
|
|
1574
|
-
setup(
|
|
1575
|
-
const t =
|
|
1576
|
-
return (o,
|
|
1577
|
-
buttons:
|
|
1565
|
+
setup(l) {
|
|
1566
|
+
const t = k("emitter"), { t: s } = k("i18n");
|
|
1567
|
+
return (o, i) => (r(), N(W, null, {
|
|
1568
|
+
buttons: E(() => [
|
|
1578
1569
|
e("button", {
|
|
1579
1570
|
type: "button",
|
|
1580
|
-
onClick:
|
|
1581
|
-
class: "
|
|
1582
|
-
},
|
|
1571
|
+
onClick: i[0] || (i[0] = (m) => a(t).emit("vf-modal-close")),
|
|
1572
|
+
class: "vf-btn vf-btn-secondary"
|
|
1573
|
+
}, u(a(s)("Close")), 1)
|
|
1583
1574
|
]),
|
|
1584
|
-
default:
|
|
1585
|
-
var
|
|
1575
|
+
default: E(() => {
|
|
1576
|
+
var m, n;
|
|
1586
1577
|
return [
|
|
1587
|
-
e("div",
|
|
1588
|
-
|
|
1589
|
-
e("div",
|
|
1590
|
-
e("h3",
|
|
1591
|
-
e("div",
|
|
1592
|
-
e("p",
|
|
1578
|
+
e("div", la, [
|
|
1579
|
+
ia,
|
|
1580
|
+
e("div", da, [
|
|
1581
|
+
e("h3", ca, u(((m = l.selection) == null ? void 0 : m.title) ?? "Title"), 1),
|
|
1582
|
+
e("div", ua, [
|
|
1583
|
+
e("p", ma, u(((n = l.selection) == null ? void 0 : n.message) ?? "Message"), 1)
|
|
1593
1584
|
])
|
|
1594
1585
|
])
|
|
1595
1586
|
])
|
|
@@ -1598,7 +1589,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1598
1589
|
_: 1
|
|
1599
1590
|
}));
|
|
1600
1591
|
}
|
|
1601
|
-
}),
|
|
1592
|
+
}), ha = { class: "sm:flex sm:items-start" }, fa = /* @__PURE__ */ e("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" }, [
|
|
1602
1593
|
/* @__PURE__ */ e("svg", {
|
|
1603
1594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1604
1595
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1613,74 +1604,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1613
1604
|
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"
|
|
1614
1605
|
})
|
|
1615
1606
|
])
|
|
1616
|
-
], -1),
|
|
1607
|
+
], -1), ga = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ka = {
|
|
1617
1608
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1618
1609
|
id: "modal-title"
|
|
1619
|
-
},
|
|
1610
|
+
}, _a = { class: "mt-2" }, xa = { class: "text-sm text-gray-500" }, ba = ["placeholder"], wa = {
|
|
1620
1611
|
name: "VFModalNewFolder"
|
|
1621
|
-
},
|
|
1612
|
+
}, ya = /* @__PURE__ */ Object.assign(wa, {
|
|
1622
1613
|
props: {
|
|
1623
1614
|
selection: Object,
|
|
1624
1615
|
current: Object
|
|
1625
1616
|
},
|
|
1626
|
-
setup(
|
|
1627
|
-
const t =
|
|
1628
|
-
|
|
1629
|
-
const s =
|
|
1630
|
-
|
|
1617
|
+
setup(l) {
|
|
1618
|
+
const t = k("emitter");
|
|
1619
|
+
k("storage");
|
|
1620
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => {
|
|
1621
|
+
m.value != "" && t.emit("vf-fetch", {
|
|
1631
1622
|
params: {
|
|
1632
1623
|
q: "newfolder",
|
|
1633
1624
|
adapter: s.value,
|
|
1634
|
-
path:
|
|
1635
|
-
name:
|
|
1625
|
+
path: i.current.dirname,
|
|
1626
|
+
name: m.value
|
|
1636
1627
|
},
|
|
1637
1628
|
onSuccess: () => {
|
|
1638
|
-
t.emit("vf-toast-push", { label: o("%s is created.",
|
|
1629
|
+
t.emit("vf-toast-push", { label: o("%s is created.", m.value) });
|
|
1639
1630
|
},
|
|
1640
|
-
onError: (
|
|
1641
|
-
|
|
1631
|
+
onError: (p) => {
|
|
1632
|
+
n.value = o(p.message);
|
|
1642
1633
|
}
|
|
1643
1634
|
});
|
|
1644
1635
|
};
|
|
1645
|
-
return (
|
|
1646
|
-
buttons:
|
|
1636
|
+
return (p, c) => (r(), N(W, null, {
|
|
1637
|
+
buttons: E(() => [
|
|
1647
1638
|
e("button", {
|
|
1648
1639
|
type: "button",
|
|
1649
|
-
onClick:
|
|
1650
|
-
class: "
|
|
1651
|
-
},
|
|
1640
|
+
onClick: h,
|
|
1641
|
+
class: "vf-btn vf-btn-primary"
|
|
1642
|
+
}, u(a(o)("Create")), 1),
|
|
1652
1643
|
e("button", {
|
|
1653
1644
|
type: "button",
|
|
1654
|
-
onClick:
|
|
1655
|
-
class: "
|
|
1656
|
-
},
|
|
1645
|
+
onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")),
|
|
1646
|
+
class: "vf-btn vf-btn-secondary"
|
|
1647
|
+
}, u(a(o)("Cancel")), 1)
|
|
1657
1648
|
]),
|
|
1658
|
-
default:
|
|
1659
|
-
e("div",
|
|
1660
|
-
|
|
1661
|
-
e("div",
|
|
1662
|
-
e("h3",
|
|
1663
|
-
e("div",
|
|
1664
|
-
e("p",
|
|
1665
|
-
|
|
1666
|
-
"onUpdate:modelValue":
|
|
1667
|
-
onKeyup: se(
|
|
1649
|
+
default: E(() => [
|
|
1650
|
+
e("div", ha, [
|
|
1651
|
+
fa,
|
|
1652
|
+
e("div", ga, [
|
|
1653
|
+
e("h3", ka, u(a(o)("New Folder")), 1),
|
|
1654
|
+
e("div", _a, [
|
|
1655
|
+
e("p", xa, u(a(o)("Create a new folder")), 1),
|
|
1656
|
+
R(e("input", {
|
|
1657
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d),
|
|
1658
|
+
onKeyup: se(h, ["enter"]),
|
|
1668
1659
|
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",
|
|
1669
|
-
placeholder:
|
|
1660
|
+
placeholder: a(o)("Folder Name"),
|
|
1670
1661
|
type: "text"
|
|
1671
|
-
}, null, 40,
|
|
1672
|
-
[
|
|
1662
|
+
}, null, 40, ba), [
|
|
1663
|
+
[ae, m.value]
|
|
1673
1664
|
]),
|
|
1674
|
-
|
|
1665
|
+
n.value.length ? (r(), N(Q, {
|
|
1675
1666
|
key: 0,
|
|
1676
|
-
onHidden:
|
|
1667
|
+
onHidden: c[1] || (c[1] = (d) => n.value = ""),
|
|
1677
1668
|
error: ""
|
|
1678
1669
|
}, {
|
|
1679
|
-
default:
|
|
1680
|
-
|
|
1670
|
+
default: E(() => [
|
|
1671
|
+
U(u(n.value), 1)
|
|
1681
1672
|
]),
|
|
1682
1673
|
_: 1
|
|
1683
|
-
})) :
|
|
1674
|
+
})) : V("", !0)
|
|
1684
1675
|
])
|
|
1685
1676
|
])
|
|
1686
1677
|
])
|
|
@@ -1688,7 +1679,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1688
1679
|
_: 1
|
|
1689
1680
|
}));
|
|
1690
1681
|
}
|
|
1691
|
-
}),
|
|
1682
|
+
}), $a = { class: "sm:flex sm:items-start" }, Ca = /* @__PURE__ */ e("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" }, [
|
|
1692
1683
|
/* @__PURE__ */ e("svg", {
|
|
1693
1684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1694
1685
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -1703,74 +1694,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1703
1694
|
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"
|
|
1704
1695
|
})
|
|
1705
1696
|
])
|
|
1706
|
-
], -1),
|
|
1697
|
+
], -1), Ma = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ja = {
|
|
1707
1698
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1708
1699
|
id: "modal-title"
|
|
1709
|
-
},
|
|
1700
|
+
}, Sa = { class: "mt-2" }, Da = { class: "text-sm text-gray-500" }, Oa = ["placeholder"], za = {
|
|
1710
1701
|
name: "VFModalNewFile"
|
|
1711
|
-
},
|
|
1702
|
+
}, Ea = /* @__PURE__ */ Object.assign(za, {
|
|
1712
1703
|
props: {
|
|
1713
1704
|
selection: Object,
|
|
1714
1705
|
current: Object
|
|
1715
1706
|
},
|
|
1716
|
-
setup(
|
|
1717
|
-
const t =
|
|
1718
|
-
|
|
1719
|
-
const s =
|
|
1720
|
-
|
|
1707
|
+
setup(l) {
|
|
1708
|
+
const t = k("emitter");
|
|
1709
|
+
k("storage");
|
|
1710
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => {
|
|
1711
|
+
m.value != "" && t.emit("vf-fetch", {
|
|
1721
1712
|
params: {
|
|
1722
1713
|
q: "newfile",
|
|
1723
1714
|
adapter: s.value,
|
|
1724
|
-
path:
|
|
1725
|
-
name:
|
|
1715
|
+
path: i.current.dirname,
|
|
1716
|
+
name: m.value
|
|
1726
1717
|
},
|
|
1727
1718
|
onSuccess: () => {
|
|
1728
|
-
t.emit("vf-toast-push", { label: o("%s is created.",
|
|
1719
|
+
t.emit("vf-toast-push", { label: o("%s is created.", m.value) });
|
|
1729
1720
|
},
|
|
1730
|
-
onError: (
|
|
1731
|
-
|
|
1721
|
+
onError: (p) => {
|
|
1722
|
+
n.value = o(p.message);
|
|
1732
1723
|
}
|
|
1733
1724
|
});
|
|
1734
1725
|
};
|
|
1735
|
-
return (
|
|
1736
|
-
buttons:
|
|
1726
|
+
return (p, c) => (r(), N(W, null, {
|
|
1727
|
+
buttons: E(() => [
|
|
1737
1728
|
e("button", {
|
|
1738
1729
|
type: "button",
|
|
1739
|
-
onClick:
|
|
1740
|
-
class: "
|
|
1741
|
-
},
|
|
1730
|
+
onClick: h,
|
|
1731
|
+
class: "vf-btn vf-btn-primary"
|
|
1732
|
+
}, u(a(o)("Create")), 1),
|
|
1742
1733
|
e("button", {
|
|
1743
1734
|
type: "button",
|
|
1744
|
-
onClick:
|
|
1745
|
-
class: "
|
|
1746
|
-
},
|
|
1735
|
+
onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")),
|
|
1736
|
+
class: "vf-btn vf-btn-secondary"
|
|
1737
|
+
}, u(a(o)("Cancel")), 1)
|
|
1747
1738
|
]),
|
|
1748
|
-
default:
|
|
1749
|
-
e("div",
|
|
1750
|
-
|
|
1751
|
-
e("div",
|
|
1752
|
-
e("h3",
|
|
1753
|
-
e("div",
|
|
1754
|
-
e("p",
|
|
1755
|
-
|
|
1756
|
-
"onUpdate:modelValue":
|
|
1757
|
-
onKeyup: se(
|
|
1739
|
+
default: E(() => [
|
|
1740
|
+
e("div", $a, [
|
|
1741
|
+
Ca,
|
|
1742
|
+
e("div", Ma, [
|
|
1743
|
+
e("h3", ja, u(a(o)("New File")), 1),
|
|
1744
|
+
e("div", Sa, [
|
|
1745
|
+
e("p", Da, u(a(o)("Create a new file")), 1),
|
|
1746
|
+
R(e("input", {
|
|
1747
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d),
|
|
1748
|
+
onKeyup: se(h, ["enter"]),
|
|
1758
1749
|
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",
|
|
1759
|
-
placeholder:
|
|
1750
|
+
placeholder: a(o)("File Name"),
|
|
1760
1751
|
type: "text"
|
|
1761
|
-
}, null, 40,
|
|
1762
|
-
[
|
|
1752
|
+
}, null, 40, Oa), [
|
|
1753
|
+
[ae, m.value]
|
|
1763
1754
|
]),
|
|
1764
|
-
|
|
1755
|
+
n.value.length ? (r(), N(Q, {
|
|
1765
1756
|
key: 0,
|
|
1766
|
-
onHidden:
|
|
1757
|
+
onHidden: c[1] || (c[1] = (d) => n.value = ""),
|
|
1767
1758
|
error: ""
|
|
1768
1759
|
}, {
|
|
1769
|
-
default:
|
|
1770
|
-
|
|
1760
|
+
default: E(() => [
|
|
1761
|
+
U(u(n.value), 1)
|
|
1771
1762
|
]),
|
|
1772
1763
|
_: 1
|
|
1773
|
-
})) :
|
|
1764
|
+
})) : V("", !0)
|
|
1774
1765
|
])
|
|
1775
1766
|
])
|
|
1776
1767
|
])
|
|
@@ -1778,308 +1769,308 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
1778
1769
|
_: 1
|
|
1779
1770
|
}));
|
|
1780
1771
|
}
|
|
1781
|
-
}),
|
|
1772
|
+
}), Fa = { class: "flex" }, Va = ["aria-label"], Ba = { class: "ml-auto mb-2" }, Aa = {
|
|
1782
1773
|
key: 0,
|
|
1783
1774
|
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"
|
|
1784
|
-
},
|
|
1775
|
+
}, La = { key: 1 }, Na = {
|
|
1785
1776
|
__name: "Text",
|
|
1786
1777
|
props: {
|
|
1787
1778
|
selection: Object
|
|
1788
1779
|
},
|
|
1789
1780
|
emits: ["load"],
|
|
1790
|
-
setup(
|
|
1791
|
-
const s = t, o =
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
params: { q: "preview", adapter:
|
|
1781
|
+
setup(l, { emit: t }) {
|
|
1782
|
+
const s = t, o = g(""), i = g(""), m = g(null), n = g(!1), { apiUrl: h } = X(), p = l, c = g(""), d = g(!1), { t: f } = k("i18n");
|
|
1783
|
+
K(() => {
|
|
1784
|
+
fe(h.value, {
|
|
1785
|
+
params: { q: "preview", adapter: p.selection.adapter, path: p.selection.item.path },
|
|
1795
1786
|
json: !1
|
|
1796
|
-
}).then((
|
|
1797
|
-
o.value =
|
|
1787
|
+
}).then((O) => {
|
|
1788
|
+
o.value = O, s("load");
|
|
1798
1789
|
});
|
|
1799
1790
|
});
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
|
|
1791
|
+
const y = () => {
|
|
1792
|
+
n.value = !n.value, i.value = o.value, n.value == !0 && ge(() => {
|
|
1793
|
+
m.value.focus();
|
|
1803
1794
|
});
|
|
1804
|
-
},
|
|
1805
|
-
|
|
1795
|
+
}, w = k("postData"), B = () => {
|
|
1796
|
+
c.value = "", d.value = !1, fe(h.value, {
|
|
1806
1797
|
method: "POST",
|
|
1807
|
-
params: Object.assign(
|
|
1798
|
+
params: Object.assign(w, {
|
|
1808
1799
|
q: "save",
|
|
1809
|
-
adapter:
|
|
1810
|
-
path:
|
|
1811
|
-
content:
|
|
1800
|
+
adapter: p.selection.adapter,
|
|
1801
|
+
path: p.selection.item.path,
|
|
1802
|
+
content: i.value
|
|
1812
1803
|
}),
|
|
1813
1804
|
json: !1
|
|
1814
|
-
}).then((
|
|
1815
|
-
|
|
1816
|
-
}).catch((
|
|
1817
|
-
|
|
1805
|
+
}).then((O) => {
|
|
1806
|
+
c.value = f("Updated."), o.value = O, s("load"), n.value = !n.value;
|
|
1807
|
+
}).catch((O) => {
|
|
1808
|
+
c.value = f(O.message), d.value = !0;
|
|
1818
1809
|
});
|
|
1819
1810
|
};
|
|
1820
|
-
return (
|
|
1821
|
-
e("div",
|
|
1811
|
+
return (O, D) => (r(), v(H, null, [
|
|
1812
|
+
e("div", Fa, [
|
|
1822
1813
|
e("div", {
|
|
1823
1814
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1824
1815
|
id: "modal-title",
|
|
1825
|
-
"aria-label":
|
|
1816
|
+
"aria-label": l.selection.item.path,
|
|
1826
1817
|
"data-microtip-position": "bottom-right",
|
|
1827
1818
|
role: "tooltip"
|
|
1828
|
-
},
|
|
1829
|
-
e("div",
|
|
1830
|
-
|
|
1819
|
+
}, u(l.selection.item.basename), 9, Va),
|
|
1820
|
+
e("div", Ba, [
|
|
1821
|
+
n.value ? (r(), v("button", {
|
|
1831
1822
|
key: 0,
|
|
1832
|
-
onClick:
|
|
1823
|
+
onClick: B,
|
|
1833
1824
|
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"
|
|
1834
|
-
},
|
|
1825
|
+
}, u(a(f)("Save")), 1)) : V("", !0),
|
|
1835
1826
|
e("button", {
|
|
1836
1827
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
1837
|
-
onClick:
|
|
1838
|
-
},
|
|
1828
|
+
onClick: D[0] || (D[0] = (S) => y())
|
|
1829
|
+
}, u(n.value ? a(f)("Cancel") : a(f)("Edit")), 1)
|
|
1839
1830
|
])
|
|
1840
1831
|
]),
|
|
1841
1832
|
e("div", null, [
|
|
1842
|
-
|
|
1843
|
-
|
|
1833
|
+
n.value ? (r(), v("div", La, [
|
|
1834
|
+
R(e("textarea", {
|
|
1844
1835
|
ref_key: "editInput",
|
|
1845
|
-
ref:
|
|
1846
|
-
"onUpdate:modelValue":
|
|
1836
|
+
ref: m,
|
|
1837
|
+
"onUpdate:modelValue": D[1] || (D[1] = (S) => i.value = S),
|
|
1847
1838
|
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",
|
|
1848
1839
|
name: "text",
|
|
1849
1840
|
id: "",
|
|
1850
1841
|
cols: "30",
|
|
1851
1842
|
rows: "10"
|
|
1852
1843
|
}, null, 512), [
|
|
1853
|
-
[
|
|
1844
|
+
[ae, i.value]
|
|
1854
1845
|
])
|
|
1855
|
-
])) : (
|
|
1856
|
-
|
|
1846
|
+
])) : (r(), v("pre", Aa, u(o.value), 1)),
|
|
1847
|
+
c.value.length ? (r(), N(Q, {
|
|
1857
1848
|
key: 2,
|
|
1858
|
-
onHidden:
|
|
1859
|
-
error:
|
|
1849
|
+
onHidden: D[2] || (D[2] = (S) => c.value = ""),
|
|
1850
|
+
error: d.value
|
|
1860
1851
|
}, {
|
|
1861
|
-
default:
|
|
1862
|
-
|
|
1852
|
+
default: E(() => [
|
|
1853
|
+
U(u(c.value), 1)
|
|
1863
1854
|
]),
|
|
1864
1855
|
_: 1
|
|
1865
|
-
}, 8, ["error"])) :
|
|
1856
|
+
}, 8, ["error"])) : V("", !0)
|
|
1866
1857
|
])
|
|
1867
1858
|
], 64));
|
|
1868
1859
|
}
|
|
1869
|
-
},
|
|
1860
|
+
}, Ua = { class: "flex" }, Ta = ["aria-label"], Ha = { class: "ml-auto mb-2" }, Ia = { class: "w-full flex justify-center" }, qa = ["src"], Ra = {
|
|
1870
1861
|
__name: "Image",
|
|
1871
1862
|
props: {
|
|
1872
1863
|
selection: Object
|
|
1873
1864
|
},
|
|
1874
1865
|
emits: ["load"],
|
|
1875
|
-
setup(
|
|
1876
|
-
const s = t, o =
|
|
1877
|
-
|
|
1878
|
-
crop(
|
|
1866
|
+
setup(l, { emit: t }) {
|
|
1867
|
+
const s = t, o = l, { t: i } = k("i18n"), { apiUrl: m } = X(), n = g(null), h = g(null), p = g(!1), c = g(""), d = g(!1), f = () => {
|
|
1868
|
+
p.value = !p.value, p.value ? h.value = new Re(n.value, {
|
|
1869
|
+
crop(B) {
|
|
1879
1870
|
}
|
|
1880
|
-
}) :
|
|
1881
|
-
},
|
|
1882
|
-
|
|
1871
|
+
}) : h.value.destroy();
|
|
1872
|
+
}, y = k("postData"), w = () => {
|
|
1873
|
+
h.value.getCroppedCanvas({
|
|
1883
1874
|
width: 795,
|
|
1884
1875
|
height: 341
|
|
1885
1876
|
}).toBlob(
|
|
1886
|
-
(
|
|
1887
|
-
|
|
1877
|
+
(B) => {
|
|
1878
|
+
c.value = "", d.value = !1, fe(m.value, {
|
|
1888
1879
|
method: "POST",
|
|
1889
|
-
params: Object.assign(
|
|
1880
|
+
params: Object.assign(y, {
|
|
1890
1881
|
q: "upload",
|
|
1891
1882
|
adapter: o.selection.adapter,
|
|
1892
1883
|
path: o.selection.item.path,
|
|
1893
|
-
file:
|
|
1884
|
+
file: B
|
|
1894
1885
|
}),
|
|
1895
1886
|
name: o.selection.item.basename,
|
|
1896
1887
|
json: !1
|
|
1897
|
-
}).then((
|
|
1898
|
-
|
|
1899
|
-
}).catch((
|
|
1900
|
-
|
|
1888
|
+
}).then((O) => {
|
|
1889
|
+
c.value = i("Updated."), n.value.src = be(o.selection.adapter, o.selection.item.path), f(), s("load");
|
|
1890
|
+
}).catch((O) => {
|
|
1891
|
+
c.value = i(O.message), d.value = !0;
|
|
1901
1892
|
});
|
|
1902
1893
|
}
|
|
1903
1894
|
);
|
|
1904
1895
|
};
|
|
1905
|
-
return
|
|
1896
|
+
return K(() => {
|
|
1906
1897
|
s("load");
|
|
1907
|
-
}), (
|
|
1908
|
-
e("div",
|
|
1898
|
+
}), (B, O) => (r(), v(H, null, [
|
|
1899
|
+
e("div", Ua, [
|
|
1909
1900
|
e("h3", {
|
|
1910
1901
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1911
1902
|
id: "modal-title",
|
|
1912
|
-
"aria-label":
|
|
1903
|
+
"aria-label": l.selection.item.path,
|
|
1913
1904
|
"data-microtip-position": "bottom-right",
|
|
1914
1905
|
role: "tooltip"
|
|
1915
|
-
},
|
|
1916
|
-
e("div",
|
|
1917
|
-
|
|
1906
|
+
}, u(l.selection.item.basename), 9, Ta),
|
|
1907
|
+
e("div", Ha, [
|
|
1908
|
+
p.value ? (r(), v("button", {
|
|
1918
1909
|
key: 0,
|
|
1919
|
-
onClick:
|
|
1910
|
+
onClick: w,
|
|
1920
1911
|
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"
|
|
1921
|
-
},
|
|
1912
|
+
}, u(a(i)("Crop")), 1)) : V("", !0),
|
|
1922
1913
|
e("button", {
|
|
1923
1914
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
1924
|
-
onClick:
|
|
1925
|
-
},
|
|
1915
|
+
onClick: O[0] || (O[0] = (D) => f())
|
|
1916
|
+
}, u(p.value ? a(i)("Cancel") : a(i)("Edit")), 1)
|
|
1926
1917
|
])
|
|
1927
1918
|
]),
|
|
1928
|
-
e("div",
|
|
1919
|
+
e("div", Ia, [
|
|
1929
1920
|
e("img", {
|
|
1930
1921
|
ref_key: "image",
|
|
1931
|
-
ref:
|
|
1922
|
+
ref: n,
|
|
1932
1923
|
class: "max-w-[50vh] max-h-[50vh]",
|
|
1933
|
-
src:
|
|
1924
|
+
src: a(be)(o.selection.adapter, o.selection.item.path),
|
|
1934
1925
|
alt: ""
|
|
1935
|
-
}, null, 8,
|
|
1926
|
+
}, null, 8, qa)
|
|
1936
1927
|
]),
|
|
1937
|
-
|
|
1928
|
+
c.value.length ? (r(), N(Q, {
|
|
1938
1929
|
key: 0,
|
|
1939
|
-
onHidden:
|
|
1940
|
-
error:
|
|
1930
|
+
onHidden: O[1] || (O[1] = (D) => c.value = ""),
|
|
1931
|
+
error: d.value
|
|
1941
1932
|
}, {
|
|
1942
|
-
default:
|
|
1943
|
-
|
|
1933
|
+
default: E(() => [
|
|
1934
|
+
U(u(c.value), 1)
|
|
1944
1935
|
]),
|
|
1945
1936
|
_: 1
|
|
1946
|
-
}, 8, ["error"])) :
|
|
1937
|
+
}, 8, ["error"])) : V("", !0)
|
|
1947
1938
|
], 64));
|
|
1948
1939
|
}
|
|
1949
|
-
},
|
|
1940
|
+
}, Pa = { class: "flex" }, Ga = ["aria-label"], Ya = /* @__PURE__ */ e("div", null, null, -1), Ja = {
|
|
1950
1941
|
__name: "Default",
|
|
1951
1942
|
props: {
|
|
1952
1943
|
selection: Object
|
|
1953
1944
|
},
|
|
1954
1945
|
emits: ["load"],
|
|
1955
|
-
setup(
|
|
1946
|
+
setup(l, { emit: t }) {
|
|
1956
1947
|
const s = t;
|
|
1957
|
-
return
|
|
1948
|
+
return K(() => {
|
|
1958
1949
|
s("load");
|
|
1959
|
-
}), (o,
|
|
1960
|
-
e("div",
|
|
1950
|
+
}), (o, i) => (r(), v(H, null, [
|
|
1951
|
+
e("div", Pa, [
|
|
1961
1952
|
e("h3", {
|
|
1962
1953
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1963
1954
|
id: "modal-title",
|
|
1964
|
-
"aria-label":
|
|
1955
|
+
"aria-label": l.selection.item.path,
|
|
1965
1956
|
"data-microtip-position": "bottom-right",
|
|
1966
1957
|
role: "tooltip"
|
|
1967
|
-
},
|
|
1958
|
+
}, u(l.selection.item.basename), 9, Ga)
|
|
1968
1959
|
]),
|
|
1969
|
-
|
|
1960
|
+
Ya
|
|
1970
1961
|
], 64));
|
|
1971
1962
|
}
|
|
1972
|
-
},
|
|
1963
|
+
}, Ka = ["aria-label"], Wa = {
|
|
1973
1964
|
class: "w-full",
|
|
1974
1965
|
preload: "",
|
|
1975
1966
|
controls: ""
|
|
1976
|
-
},
|
|
1967
|
+
}, Xa = ["src"], Qa = {
|
|
1977
1968
|
__name: "Video",
|
|
1978
1969
|
props: {
|
|
1979
1970
|
selection: Object
|
|
1980
1971
|
},
|
|
1981
1972
|
emits: ["load"],
|
|
1982
|
-
setup(
|
|
1983
|
-
const { apiUrl: s } =
|
|
1984
|
-
return
|
|
1985
|
-
|
|
1986
|
-
}), (
|
|
1973
|
+
setup(l, { emit: t }) {
|
|
1974
|
+
const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
|
|
1975
|
+
return K(() => {
|
|
1976
|
+
i("load");
|
|
1977
|
+
}), (n, h) => (r(), v(H, null, [
|
|
1987
1978
|
e("h3", {
|
|
1988
1979
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
1989
1980
|
id: "modal-title",
|
|
1990
|
-
"aria-label":
|
|
1981
|
+
"aria-label": l.selection.item.path,
|
|
1991
1982
|
"data-microtip-position": "bottom-right",
|
|
1992
1983
|
role: "tooltip"
|
|
1993
|
-
},
|
|
1984
|
+
}, u(l.selection.item.basename), 9, Ka),
|
|
1994
1985
|
e("div", null, [
|
|
1995
|
-
e("video",
|
|
1986
|
+
e("video", Wa, [
|
|
1996
1987
|
e("source", {
|
|
1997
|
-
src:
|
|
1988
|
+
src: m(),
|
|
1998
1989
|
type: "video/mp4"
|
|
1999
|
-
}, null, 8,
|
|
2000
|
-
|
|
1990
|
+
}, null, 8, Xa),
|
|
1991
|
+
U(" Your browser does not support the video tag. ")
|
|
2001
1992
|
])
|
|
2002
1993
|
])
|
|
2003
1994
|
], 64));
|
|
2004
1995
|
}
|
|
2005
|
-
},
|
|
1996
|
+
}, Za = ["aria-label"], en = {
|
|
2006
1997
|
class: "w-full",
|
|
2007
1998
|
controls: ""
|
|
2008
|
-
},
|
|
1999
|
+
}, tn = ["src"], on = {
|
|
2009
2000
|
__name: "Audio",
|
|
2010
2001
|
props: {
|
|
2011
2002
|
selection: Object
|
|
2012
2003
|
},
|
|
2013
2004
|
emits: ["load"],
|
|
2014
|
-
setup(
|
|
2015
|
-
const { apiUrl: s } =
|
|
2016
|
-
return
|
|
2017
|
-
|
|
2018
|
-
}), (
|
|
2005
|
+
setup(l, { emit: t }) {
|
|
2006
|
+
const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
|
|
2007
|
+
return K(() => {
|
|
2008
|
+
i("load");
|
|
2009
|
+
}), (n, h) => (r(), v(H, null, [
|
|
2019
2010
|
e("h3", {
|
|
2020
2011
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2021
2012
|
id: "modal-title",
|
|
2022
|
-
"aria-label":
|
|
2013
|
+
"aria-label": l.selection.item.path,
|
|
2023
2014
|
"data-microtip-position": "bottom-right",
|
|
2024
2015
|
role: "tooltip"
|
|
2025
|
-
},
|
|
2016
|
+
}, u(l.selection.item.basename), 9, Za),
|
|
2026
2017
|
e("div", null, [
|
|
2027
|
-
e("audio",
|
|
2018
|
+
e("audio", en, [
|
|
2028
2019
|
e("source", {
|
|
2029
|
-
src:
|
|
2020
|
+
src: m(),
|
|
2030
2021
|
type: "audio/mpeg"
|
|
2031
|
-
}, null, 8,
|
|
2032
|
-
|
|
2022
|
+
}, null, 8, tn),
|
|
2023
|
+
U(" Your browser does not support the audio element. ")
|
|
2033
2024
|
])
|
|
2034
2025
|
])
|
|
2035
2026
|
], 64));
|
|
2036
2027
|
}
|
|
2037
|
-
},
|
|
2038
|
-
/* @__PURE__ */
|
|
2028
|
+
}, sn = ["aria-label"], an = ["data"], nn = ["src"], rn = /* @__PURE__ */ e("p", null, [
|
|
2029
|
+
/* @__PURE__ */ U(" Your browser does not support PDFs. "),
|
|
2039
2030
|
/* @__PURE__ */ e("a", { href: "https://example.com/test.pdf" }, "Download the PDF"),
|
|
2040
|
-
/* @__PURE__ */
|
|
2041
|
-
], -1),
|
|
2042
|
-
|
|
2043
|
-
],
|
|
2031
|
+
/* @__PURE__ */ U(" . ")
|
|
2032
|
+
], -1), ln = [
|
|
2033
|
+
rn
|
|
2034
|
+
], dn = {
|
|
2044
2035
|
__name: "Pdf",
|
|
2045
2036
|
props: {
|
|
2046
2037
|
selection: Object
|
|
2047
2038
|
},
|
|
2048
2039
|
emits: ["load"],
|
|
2049
|
-
setup(
|
|
2050
|
-
const { apiUrl: s } =
|
|
2051
|
-
return
|
|
2052
|
-
|
|
2053
|
-
}), (
|
|
2040
|
+
setup(l, { emit: t }) {
|
|
2041
|
+
const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
|
|
2042
|
+
return K(() => {
|
|
2043
|
+
i("load");
|
|
2044
|
+
}), (n, h) => (r(), v(H, null, [
|
|
2054
2045
|
e("h3", {
|
|
2055
2046
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2056
2047
|
id: "modal-title",
|
|
2057
|
-
"aria-label":
|
|
2048
|
+
"aria-label": l.selection.item.path,
|
|
2058
2049
|
"data-microtip-position": "bottom-right",
|
|
2059
2050
|
role: "tooltip"
|
|
2060
|
-
},
|
|
2051
|
+
}, u(l.selection.item.basename), 9, sn),
|
|
2061
2052
|
e("div", null, [
|
|
2062
2053
|
e("object", {
|
|
2063
2054
|
class: "h-[60vh]",
|
|
2064
|
-
data:
|
|
2055
|
+
data: m(),
|
|
2065
2056
|
type: "application/pdf",
|
|
2066
2057
|
width: "100%",
|
|
2067
2058
|
height: "100%"
|
|
2068
2059
|
}, [
|
|
2069
2060
|
e("iframe", {
|
|
2070
2061
|
class: "border-0",
|
|
2071
|
-
src:
|
|
2062
|
+
src: m(),
|
|
2072
2063
|
width: "100%",
|
|
2073
2064
|
height: "100%"
|
|
2074
|
-
},
|
|
2075
|
-
], 8,
|
|
2065
|
+
}, ln, 8, nn)
|
|
2066
|
+
], 8, an)
|
|
2076
2067
|
])
|
|
2077
2068
|
], 64));
|
|
2078
2069
|
}
|
|
2079
|
-
},
|
|
2070
|
+
}, cn = { class: "sm:flex sm:items-start" }, un = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, mn = { class: "text-gray-700 dark:text-gray-200 text-sm" }, vn = {
|
|
2080
2071
|
key: 0,
|
|
2081
2072
|
class: "flex leading-5"
|
|
2082
|
-
},
|
|
2073
|
+
}, pn = /* @__PURE__ */ e("svg", {
|
|
2083
2074
|
class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
|
|
2084
2075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2085
2076
|
fill: "none",
|
|
@@ -2098,83 +2089,83 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2098
2089
|
fill: "currentColor",
|
|
2099
2090
|
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"
|
|
2100
2091
|
})
|
|
2101
|
-
], -1),
|
|
2092
|
+
], -1), hn = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, fn = { class: "font-bold pl-2" }, gn = { class: "font-bold pl-2" }, kn = {
|
|
2102
2093
|
name: "VFModalPreview"
|
|
2103
|
-
},
|
|
2094
|
+
}, _n = /* @__PURE__ */ Object.assign(kn, {
|
|
2104
2095
|
props: {
|
|
2105
2096
|
selection: Object
|
|
2106
2097
|
},
|
|
2107
|
-
setup(
|
|
2108
|
-
const { apiUrl: t } =
|
|
2109
|
-
const d = t.value + "?" + oe({ q: "download", adapter:
|
|
2098
|
+
setup(l) {
|
|
2099
|
+
const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = g(!1), m = k("filesize"), n = (d) => i.value = d, h = l, p = (d) => (h.selection.item.mime_type ?? "").startsWith(d), c = () => {
|
|
2100
|
+
const d = t.value + "?" + oe({ q: "download", adapter: h.selection.adapter, path: h.selection.item.path });
|
|
2110
2101
|
s.emit("vf-download", d);
|
|
2111
2102
|
};
|
|
2112
|
-
return (d,
|
|
2113
|
-
buttons:
|
|
2103
|
+
return (d, f) => (r(), N(W, null, {
|
|
2104
|
+
buttons: E(() => [
|
|
2114
2105
|
e("button", {
|
|
2115
2106
|
type: "button",
|
|
2116
|
-
onClick:
|
|
2117
|
-
class: "
|
|
2118
|
-
},
|
|
2107
|
+
onClick: f[6] || (f[6] = (y) => a(s).emit("vf-modal-close")),
|
|
2108
|
+
class: "vf-btn vf-btn-secondary"
|
|
2109
|
+
}, u(a(o)("Close")), 1),
|
|
2119
2110
|
e("button", {
|
|
2120
2111
|
type: "button",
|
|
2121
|
-
onClick:
|
|
2122
|
-
class: "
|
|
2123
|
-
},
|
|
2112
|
+
onClick: f[7] || (f[7] = (y) => c()),
|
|
2113
|
+
class: "vf-btn vf-btn-primary"
|
|
2114
|
+
}, u(a(o)("Download")), 1)
|
|
2124
2115
|
]),
|
|
2125
|
-
default:
|
|
2126
|
-
e("div",
|
|
2127
|
-
e("div",
|
|
2116
|
+
default: E(() => [
|
|
2117
|
+
e("div", cn, [
|
|
2118
|
+
e("div", un, [
|
|
2128
2119
|
e("div", null, [
|
|
2129
|
-
|
|
2120
|
+
p("text") ? (r(), N(Na, {
|
|
2130
2121
|
key: 0,
|
|
2131
|
-
selection:
|
|
2132
|
-
onLoad:
|
|
2133
|
-
}, null, 8, ["selection"])) :
|
|
2122
|
+
selection: l.selection,
|
|
2123
|
+
onLoad: f[0] || (f[0] = (y) => n(!0))
|
|
2124
|
+
}, null, 8, ["selection"])) : p("image") ? (r(), N(Ra, {
|
|
2134
2125
|
key: 1,
|
|
2135
|
-
selection:
|
|
2136
|
-
onLoad:
|
|
2137
|
-
}, null, 8, ["selection"])) :
|
|
2126
|
+
selection: l.selection,
|
|
2127
|
+
onLoad: f[1] || (f[1] = (y) => n(!0))
|
|
2128
|
+
}, null, 8, ["selection"])) : p("video") ? (r(), N(Qa, {
|
|
2138
2129
|
key: 2,
|
|
2139
|
-
selection:
|
|
2140
|
-
onLoad:
|
|
2141
|
-
}, null, 8, ["selection"])) :
|
|
2130
|
+
selection: l.selection,
|
|
2131
|
+
onLoad: f[2] || (f[2] = (y) => n(!0))
|
|
2132
|
+
}, null, 8, ["selection"])) : p("audio") ? (r(), N(on, {
|
|
2142
2133
|
key: 3,
|
|
2143
|
-
selection:
|
|
2144
|
-
onLoad:
|
|
2145
|
-
}, null, 8, ["selection"])) :
|
|
2134
|
+
selection: l.selection,
|
|
2135
|
+
onLoad: f[3] || (f[3] = (y) => n(!0))
|
|
2136
|
+
}, null, 8, ["selection"])) : p("application/pdf") ? (r(), N(dn, {
|
|
2146
2137
|
key: 4,
|
|
2147
|
-
selection:
|
|
2148
|
-
onLoad:
|
|
2149
|
-
}, null, 8, ["selection"])) : (
|
|
2138
|
+
selection: l.selection,
|
|
2139
|
+
onLoad: f[4] || (f[4] = (y) => n(!0))
|
|
2140
|
+
}, null, 8, ["selection"])) : (r(), N(Ja, {
|
|
2150
2141
|
key: 5,
|
|
2151
|
-
selection:
|
|
2152
|
-
onLoad:
|
|
2142
|
+
selection: l.selection,
|
|
2143
|
+
onLoad: f[5] || (f[5] = (y) => n(!0))
|
|
2153
2144
|
}, null, 8, ["selection"]))
|
|
2154
2145
|
]),
|
|
2155
|
-
e("div",
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
e("span", null,
|
|
2159
|
-
])) :
|
|
2146
|
+
e("div", mn, [
|
|
2147
|
+
i.value == !1 ? (r(), v("div", vn, [
|
|
2148
|
+
pn,
|
|
2149
|
+
e("span", null, u(a(o)("Loading")), 1)
|
|
2150
|
+
])) : V("", !0)
|
|
2160
2151
|
])
|
|
2161
2152
|
])
|
|
2162
2153
|
]),
|
|
2163
|
-
e("div",
|
|
2154
|
+
e("div", hn, [
|
|
2164
2155
|
e("div", null, [
|
|
2165
|
-
e("span",
|
|
2166
|
-
|
|
2156
|
+
e("span", fn, u(a(o)("File Size")) + ": ", 1),
|
|
2157
|
+
U(u(a(m)(l.selection.item.file_size)), 1)
|
|
2167
2158
|
]),
|
|
2168
2159
|
e("div", null, [
|
|
2169
|
-
e("span",
|
|
2170
|
-
|
|
2160
|
+
e("span", gn, u(a(o)("Last Modified")) + ": ", 1),
|
|
2161
|
+
U(" " + u(a(Ee)(l.selection.item.last_modified)), 1)
|
|
2171
2162
|
])
|
|
2172
2163
|
])
|
|
2173
2164
|
]),
|
|
2174
2165
|
_: 1
|
|
2175
2166
|
}));
|
|
2176
2167
|
}
|
|
2177
|
-
}),
|
|
2168
|
+
}), xn = { class: "sm:flex sm:items-start" }, bn = /* @__PURE__ */ e("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" }, [
|
|
2178
2169
|
/* @__PURE__ */ e("svg", {
|
|
2179
2170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2180
2171
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2189,10 +2180,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2189
2180
|
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"
|
|
2190
2181
|
})
|
|
2191
2182
|
])
|
|
2192
|
-
], -1),
|
|
2183
|
+
], -1), wn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, yn = {
|
|
2193
2184
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2194
2185
|
id: "modal-title"
|
|
2195
|
-
}, $
|
|
2186
|
+
}, $n = { class: "mt-2" }, Cn = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mn = {
|
|
2196
2187
|
key: 0,
|
|
2197
2188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2198
2189
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2200,13 +2191,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2200
2191
|
viewBox: "0 0 24 24",
|
|
2201
2192
|
stroke: "currentColor",
|
|
2202
2193
|
"stroke-width": "1"
|
|
2203
|
-
},
|
|
2194
|
+
}, jn = /* @__PURE__ */ e("path", {
|
|
2204
2195
|
"stroke-linecap": "round",
|
|
2205
2196
|
"stroke-linejoin": "round",
|
|
2206
2197
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2207
|
-
}, null, -1),
|
|
2208
|
-
|
|
2209
|
-
],
|
|
2198
|
+
}, null, -1), Sn = [
|
|
2199
|
+
jn
|
|
2200
|
+
], Dn = {
|
|
2210
2201
|
key: 1,
|
|
2211
2202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2212
2203
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2214,81 +2205,81 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2214
2205
|
viewBox: "0 0 24 24",
|
|
2215
2206
|
stroke: "currentColor",
|
|
2216
2207
|
"stroke-width": "1"
|
|
2217
|
-
},
|
|
2208
|
+
}, On = /* @__PURE__ */ e("path", {
|
|
2218
2209
|
"stroke-linecap": "round",
|
|
2219
2210
|
"stroke-linejoin": "round",
|
|
2220
2211
|
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"
|
|
2221
|
-
}, null, -1),
|
|
2222
|
-
|
|
2223
|
-
],
|
|
2212
|
+
}, null, -1), zn = [
|
|
2213
|
+
On
|
|
2214
|
+
], En = { class: "ml-1.5" }, Fn = {
|
|
2224
2215
|
name: "VFModalRename"
|
|
2225
|
-
},
|
|
2216
|
+
}, Vn = /* @__PURE__ */ Object.assign(Fn, {
|
|
2226
2217
|
props: {
|
|
2227
2218
|
selection: Object,
|
|
2228
2219
|
current: Object
|
|
2229
2220
|
},
|
|
2230
|
-
setup(
|
|
2231
|
-
const t =
|
|
2232
|
-
|
|
2233
|
-
const s =
|
|
2234
|
-
|
|
2221
|
+
setup(l) {
|
|
2222
|
+
const t = k("emitter");
|
|
2223
|
+
k("storage");
|
|
2224
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items[0]), n = g(i.selection.items[0].basename), h = g(""), p = () => {
|
|
2225
|
+
n.value != "" && t.emit("vf-fetch", {
|
|
2235
2226
|
params: {
|
|
2236
2227
|
q: "rename",
|
|
2237
2228
|
adapter: s.value,
|
|
2238
|
-
path:
|
|
2239
|
-
item:
|
|
2240
|
-
name:
|
|
2229
|
+
path: i.current.dirname,
|
|
2230
|
+
item: m.value.path,
|
|
2231
|
+
name: n.value
|
|
2241
2232
|
},
|
|
2242
2233
|
onSuccess: () => {
|
|
2243
|
-
t.emit("vf-toast-push", { label: o("%s is renamed.",
|
|
2234
|
+
t.emit("vf-toast-push", { label: o("%s is renamed.", n.value) });
|
|
2244
2235
|
},
|
|
2245
|
-
onError: (
|
|
2246
|
-
|
|
2236
|
+
onError: (c) => {
|
|
2237
|
+
h.value = o(c.message);
|
|
2247
2238
|
}
|
|
2248
2239
|
});
|
|
2249
2240
|
};
|
|
2250
|
-
return (
|
|
2251
|
-
buttons:
|
|
2241
|
+
return (c, d) => (r(), N(W, null, {
|
|
2242
|
+
buttons: E(() => [
|
|
2252
2243
|
e("button", {
|
|
2253
2244
|
type: "button",
|
|
2254
|
-
onClick:
|
|
2255
|
-
class: "
|
|
2256
|
-
},
|
|
2245
|
+
onClick: p,
|
|
2246
|
+
class: "vf-btn vf-btn-primary"
|
|
2247
|
+
}, u(a(o)("Rename")), 1),
|
|
2257
2248
|
e("button", {
|
|
2258
2249
|
type: "button",
|
|
2259
|
-
onClick:
|
|
2260
|
-
class: "
|
|
2261
|
-
},
|
|
2250
|
+
onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")),
|
|
2251
|
+
class: "vf-btn vf-btn-secondary"
|
|
2252
|
+
}, u(a(o)("Cancel")), 1)
|
|
2262
2253
|
]),
|
|
2263
|
-
default:
|
|
2264
|
-
e("div",
|
|
2265
|
-
|
|
2266
|
-
e("div",
|
|
2267
|
-
e("h3",
|
|
2268
|
-
e("div", $
|
|
2269
|
-
e("p",
|
|
2270
|
-
|
|
2271
|
-
e("span",
|
|
2254
|
+
default: E(() => [
|
|
2255
|
+
e("div", xn, [
|
|
2256
|
+
bn,
|
|
2257
|
+
e("div", wn, [
|
|
2258
|
+
e("h3", yn, u(a(o)("Rename")), 1),
|
|
2259
|
+
e("div", $n, [
|
|
2260
|
+
e("p", Cn, [
|
|
2261
|
+
m.value.type == "dir" ? (r(), v("svg", Mn, Sn)) : (r(), v("svg", Dn, zn)),
|
|
2262
|
+
e("span", En, u(m.value.basename), 1)
|
|
2272
2263
|
]),
|
|
2273
|
-
|
|
2274
|
-
"onUpdate:modelValue":
|
|
2275
|
-
onKeyup: se(
|
|
2264
|
+
R(e("input", {
|
|
2265
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
|
|
2266
|
+
onKeyup: se(p, ["enter"]),
|
|
2276
2267
|
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",
|
|
2277
2268
|
placeholder: "Name",
|
|
2278
2269
|
type: "text"
|
|
2279
2270
|
}, null, 544), [
|
|
2280
|
-
[
|
|
2271
|
+
[ae, n.value]
|
|
2281
2272
|
]),
|
|
2282
|
-
|
|
2273
|
+
h.value.length ? (r(), N(Q, {
|
|
2283
2274
|
key: 0,
|
|
2284
|
-
onHidden:
|
|
2275
|
+
onHidden: d[1] || (d[1] = (f) => h.value = ""),
|
|
2285
2276
|
error: ""
|
|
2286
2277
|
}, {
|
|
2287
|
-
default:
|
|
2288
|
-
|
|
2278
|
+
default: E(() => [
|
|
2279
|
+
U(u(h.value), 1)
|
|
2289
2280
|
]),
|
|
2290
2281
|
_: 1
|
|
2291
|
-
})) :
|
|
2282
|
+
})) : V("", !0)
|
|
2292
2283
|
])
|
|
2293
2284
|
])
|
|
2294
2285
|
])
|
|
@@ -2296,7 +2287,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2296
2287
|
_: 1
|
|
2297
2288
|
}));
|
|
2298
2289
|
}
|
|
2299
|
-
}),
|
|
2290
|
+
}), Bn = { class: "sm:flex sm:items-start" }, An = /* @__PURE__ */ e("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" }, [
|
|
2300
2291
|
/* @__PURE__ */ e("svg", {
|
|
2301
2292
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2302
2293
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2311,19 +2302,19 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2311
2302
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
2312
2303
|
})
|
|
2313
2304
|
])
|
|
2314
|
-
], -1),
|
|
2305
|
+
], -1), Ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Nn = {
|
|
2315
2306
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2316
2307
|
id: "modal-title"
|
|
2317
|
-
},
|
|
2308
|
+
}, Un = { class: "mt-2" }, Tn = {
|
|
2318
2309
|
key: 0,
|
|
2319
2310
|
class: "pointer-events-none"
|
|
2320
|
-
},
|
|
2311
|
+
}, Hn = {
|
|
2321
2312
|
key: 1,
|
|
2322
2313
|
class: "pointer-events-none"
|
|
2323
|
-
},
|
|
2314
|
+
}, In = ["disabled"], qn = ["disabled"], Rn = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pn = { 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" }, Gn = ["textContent"], Yn = { class: "ml-1 w-full h-fit" }, Jn = { class: "text-left hidden md:block" }, Kn = { class: "text-left md:hidden" }, Wn = {
|
|
2324
2315
|
key: 0,
|
|
2325
2316
|
class: "ml-auto"
|
|
2326
|
-
},
|
|
2317
|
+
}, Xn = ["title", "disabled", "onClick"], Qn = /* @__PURE__ */ e("svg", {
|
|
2327
2318
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2328
2319
|
fill: "none",
|
|
2329
2320
|
viewBox: "0 0 24 24",
|
|
@@ -2336,307 +2327,318 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2336
2327
|
"stroke-linejoin": "round",
|
|
2337
2328
|
d: "M6 18L18 6M6 6l12 12"
|
|
2338
2329
|
})
|
|
2339
|
-
], -1),
|
|
2340
|
-
|
|
2341
|
-
],
|
|
2330
|
+
], -1), Zn = [
|
|
2331
|
+
Qn
|
|
2332
|
+
], er = {
|
|
2342
2333
|
key: 0,
|
|
2343
2334
|
class: "py-2"
|
|
2344
|
-
},
|
|
2335
|
+
}, tr = ["disabled"], or = {
|
|
2345
2336
|
name: "VFModalUpload"
|
|
2346
|
-
},
|
|
2337
|
+
}, sr = /* @__PURE__ */ Object.assign(or, {
|
|
2347
2338
|
props: {
|
|
2348
2339
|
current: Object
|
|
2349
2340
|
},
|
|
2350
|
-
setup(
|
|
2351
|
-
const { apiUrl: t } =
|
|
2341
|
+
setup(l) {
|
|
2342
|
+
const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = k("maxFileSize"), m = k("postData"), n = k("filesize"), h = l, p = o("uppy"), c = {
|
|
2352
2343
|
PENDING: 0,
|
|
2353
2344
|
CANCELED: 1,
|
|
2354
2345
|
UPLOADING: 2,
|
|
2355
2346
|
ERROR: 3,
|
|
2356
2347
|
DONE: 10
|
|
2357
|
-
},
|
|
2358
|
-
let
|
|
2359
|
-
function
|
|
2360
|
-
return
|
|
2348
|
+
}, d = g({ QUEUE_ENTRY_STATUS: c }), f = g(null), y = g(null), w = g(null), B = g(null), O = g(null), D = g(null), S = g([]), F = g(""), M = g(!1), j = g(!1);
|
|
2349
|
+
let z;
|
|
2350
|
+
function I(b) {
|
|
2351
|
+
return S.value.findIndex((_) => _.id === b);
|
|
2361
2352
|
}
|
|
2362
|
-
function
|
|
2363
|
-
|
|
2364
|
-
name:
|
|
2365
|
-
type:
|
|
2366
|
-
data:
|
|
2353
|
+
function A(b, _ = null) {
|
|
2354
|
+
_ = _ ?? (b.webkitRelativePath || b.name), z.addFile({
|
|
2355
|
+
name: _,
|
|
2356
|
+
type: b.type,
|
|
2357
|
+
data: b,
|
|
2367
2358
|
source: "Local"
|
|
2368
2359
|
});
|
|
2369
2360
|
}
|
|
2370
|
-
function ee(
|
|
2371
|
-
switch (
|
|
2372
|
-
case
|
|
2361
|
+
function ee(b) {
|
|
2362
|
+
switch (b.status) {
|
|
2363
|
+
case c.DONE:
|
|
2373
2364
|
return "text-green-600";
|
|
2374
|
-
case
|
|
2365
|
+
case c.ERROR:
|
|
2375
2366
|
return "text-red-600";
|
|
2376
|
-
case
|
|
2367
|
+
case c.CANCELED:
|
|
2377
2368
|
return "text-red-600";
|
|
2378
|
-
case
|
|
2369
|
+
case c.PENDING:
|
|
2379
2370
|
default:
|
|
2380
2371
|
return "";
|
|
2381
2372
|
}
|
|
2382
2373
|
}
|
|
2383
|
-
const
|
|
2384
|
-
switch (
|
|
2385
|
-
case
|
|
2374
|
+
const G = (b) => {
|
|
2375
|
+
switch (b.status) {
|
|
2376
|
+
case c.DONE:
|
|
2386
2377
|
return "✓";
|
|
2387
|
-
case
|
|
2388
|
-
case
|
|
2378
|
+
case c.ERROR:
|
|
2379
|
+
case c.CANCELED:
|
|
2389
2380
|
return "!";
|
|
2390
|
-
case
|
|
2381
|
+
case c.PENDING:
|
|
2391
2382
|
default:
|
|
2392
2383
|
return "...";
|
|
2393
2384
|
}
|
|
2394
2385
|
};
|
|
2395
|
-
function
|
|
2396
|
-
|
|
2386
|
+
function te() {
|
|
2387
|
+
B.value.click();
|
|
2397
2388
|
}
|
|
2398
|
-
function
|
|
2399
|
-
if (!
|
|
2400
|
-
if (!
|
|
2401
|
-
|
|
2389
|
+
function ie() {
|
|
2390
|
+
if (!M.value) {
|
|
2391
|
+
if (!S.value.filter((b) => b.status !== c.DONE).length) {
|
|
2392
|
+
F.value = o("Please select file to upload first.");
|
|
2402
2393
|
return;
|
|
2403
2394
|
}
|
|
2404
|
-
|
|
2395
|
+
F.value = "", z.retryAll(), z.upload();
|
|
2405
2396
|
}
|
|
2406
2397
|
}
|
|
2407
|
-
function
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
}),
|
|
2398
|
+
function de() {
|
|
2399
|
+
z.cancelAll({ reason: "user" }), S.value.forEach((b) => {
|
|
2400
|
+
b.status !== c.DONE && (b.status = c.CANCELED, b.statusName = o("Canceled"));
|
|
2401
|
+
}), M.value = !1;
|
|
2411
2402
|
}
|
|
2412
|
-
function
|
|
2413
|
-
|
|
2403
|
+
function ne(b) {
|
|
2404
|
+
M.value || (z.removeFile(b.id, "removed-by-user"), S.value.splice(I(b.id), 1));
|
|
2414
2405
|
}
|
|
2415
|
-
function
|
|
2416
|
-
if (!
|
|
2417
|
-
if (
|
|
2418
|
-
const
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
}),
|
|
2422
|
-
|
|
2406
|
+
function ce(b) {
|
|
2407
|
+
if (!M.value) {
|
|
2408
|
+
if (z.cancelAll({ reason: "user" }), b) {
|
|
2409
|
+
const _ = [];
|
|
2410
|
+
S.value.forEach((x) => {
|
|
2411
|
+
x.status !== c.DONE && _.push(x);
|
|
2412
|
+
}), S.value = [], _.forEach((x) => {
|
|
2413
|
+
A(x.originalFile, x.name);
|
|
2423
2414
|
});
|
|
2424
2415
|
return;
|
|
2425
2416
|
}
|
|
2426
|
-
|
|
2417
|
+
S.value.splice(0);
|
|
2427
2418
|
}
|
|
2428
2419
|
}
|
|
2429
|
-
function
|
|
2420
|
+
function C() {
|
|
2430
2421
|
s.emit("vf-modal-close");
|
|
2431
2422
|
}
|
|
2432
|
-
return
|
|
2433
|
-
|
|
2423
|
+
return K(async () => {
|
|
2424
|
+
z = new Pe({
|
|
2434
2425
|
debug: process.env.NODE_ENV === "development",
|
|
2435
2426
|
restrictions: {
|
|
2436
|
-
maxFileSize:
|
|
2427
|
+
maxFileSize: Os(i)
|
|
2437
2428
|
//maxNumberOfFiles
|
|
2438
2429
|
//allowedFileTypes
|
|
2439
2430
|
},
|
|
2440
|
-
locale:
|
|
2441
|
-
onBeforeFileAdded(
|
|
2442
|
-
if (
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2431
|
+
locale: p,
|
|
2432
|
+
onBeforeFileAdded(x, $) {
|
|
2433
|
+
if ($[x.id] != null) {
|
|
2434
|
+
const q = I(x.id);
|
|
2435
|
+
S.value[q].status === c.PENDING && (F.value = z.i18n("noDuplicates", { fileName: x.name })), S.value = S.value.filter((ke) => ke.id !== x.id);
|
|
2445
2436
|
}
|
|
2446
|
-
return
|
|
2447
|
-
id:
|
|
2448
|
-
name:
|
|
2449
|
-
size:
|
|
2450
|
-
status:
|
|
2437
|
+
return S.value.push({
|
|
2438
|
+
id: x.id,
|
|
2439
|
+
name: x.name,
|
|
2440
|
+
size: n.value(x.size),
|
|
2441
|
+
status: c.PENDING,
|
|
2451
2442
|
statusName: o("Pending upload"),
|
|
2452
2443
|
percent: null,
|
|
2453
|
-
originalFile:
|
|
2444
|
+
originalFile: x.data
|
|
2454
2445
|
}), !0;
|
|
2455
2446
|
}
|
|
2456
|
-
}),
|
|
2447
|
+
}), z.use(Ge, {
|
|
2457
2448
|
method: "post",
|
|
2458
|
-
endpoint: t.value + "?" + oe(Object.assign(
|
|
2449
|
+
endpoint: t.value + "?" + oe(Object.assign(m, { q: "upload", adapter: h.current.adapter, path: h.current.dirname })),
|
|
2459
2450
|
headers: {
|
|
2460
|
-
...
|
|
2451
|
+
...he && { "X-CSRF-Token": he }
|
|
2461
2452
|
},
|
|
2462
2453
|
limit: 5,
|
|
2463
2454
|
timeout: 0,
|
|
2464
|
-
getResponseError(
|
|
2465
|
-
let
|
|
2455
|
+
getResponseError(x, $) {
|
|
2456
|
+
let L;
|
|
2466
2457
|
try {
|
|
2467
|
-
|
|
2458
|
+
L = JSON.parse(x).message;
|
|
2468
2459
|
} catch {
|
|
2469
|
-
|
|
2460
|
+
L = o("Cannot parse server response.");
|
|
2470
2461
|
}
|
|
2471
|
-
return new Error(
|
|
2462
|
+
return new Error(L);
|
|
2472
2463
|
}
|
|
2473
|
-
}),
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2464
|
+
}), z.on("restriction-failed", (x, $) => {
|
|
2465
|
+
const L = S.value[I(x.id)];
|
|
2466
|
+
ne(L), F.value = $.message;
|
|
2467
|
+
}), z.on("upload", () => {
|
|
2468
|
+
M.value = !0, S.value.forEach((x) => {
|
|
2469
|
+
x.status !== c.DONE && (x.percent = null, x.status = c.UPLOADING, x.statusName = o("Pending upload"));
|
|
2478
2470
|
});
|
|
2479
|
-
}),
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
}),
|
|
2483
|
-
const
|
|
2484
|
-
|
|
2485
|
-
}),
|
|
2486
|
-
const
|
|
2487
|
-
|
|
2488
|
-
}),
|
|
2489
|
-
|
|
2490
|
-
params: { q: "index", adapter:
|
|
2471
|
+
}), z.on("upload-progress", (x, $) => {
|
|
2472
|
+
const L = Math.floor($.bytesUploaded / $.bytesTotal * 100);
|
|
2473
|
+
S.value[I(x.id)].percent = `${L}%`;
|
|
2474
|
+
}), z.on("upload-success", (x) => {
|
|
2475
|
+
const $ = S.value[I(x.id)];
|
|
2476
|
+
$.status = c.DONE, $.statusName = o("Done");
|
|
2477
|
+
}), z.on("upload-error", (x, $) => {
|
|
2478
|
+
const L = S.value[I(x.id)];
|
|
2479
|
+
L.percent = null, L.status = c.ERROR, $.isNetworkError ? L.statusName = o("Network Error, Unable establish connection to the server or interrupted.") : L.statusName = $ ? $.message : o("Unknown Error");
|
|
2480
|
+
}), z.on("error", (x) => {
|
|
2481
|
+
F.value = x.message, M.value = !1, s.emit("vf-fetch", {
|
|
2482
|
+
params: { q: "index", adapter: h.current.adapter, path: h.current.dirname },
|
|
2491
2483
|
noCloseModal: !0
|
|
2492
2484
|
});
|
|
2493
|
-
}),
|
|
2494
|
-
|
|
2495
|
-
params: { q: "index", adapter:
|
|
2485
|
+
}), z.on("complete", () => {
|
|
2486
|
+
M.value = !1, s.emit("vf-fetch", {
|
|
2487
|
+
params: { q: "index", adapter: h.current.adapter, path: h.current.dirname },
|
|
2496
2488
|
noCloseModal: !0
|
|
2497
2489
|
});
|
|
2498
|
-
}),
|
|
2490
|
+
}), B.value.addEventListener("click", () => {
|
|
2491
|
+
y.value.click();
|
|
2492
|
+
}), O.value.addEventListener("click", () => {
|
|
2499
2493
|
w.value.click();
|
|
2500
|
-
}),
|
|
2501
|
-
|
|
2502
|
-
}),
|
|
2503
|
-
|
|
2504
|
-
}), z.value.addEventListener("dragleave", (g) => {
|
|
2505
|
-
g.preventDefault(), L.value = !1;
|
|
2494
|
+
}), D.value.addEventListener("dragover", (x) => {
|
|
2495
|
+
x.preventDefault(), j.value = !0;
|
|
2496
|
+
}), D.value.addEventListener("dragleave", (x) => {
|
|
2497
|
+
x.preventDefault(), j.value = !1;
|
|
2506
2498
|
});
|
|
2507
|
-
function
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2499
|
+
function b(x, $) {
|
|
2500
|
+
$.isFile && $.file((L) => x($, L)), $.isDirectory && $.createReader().readEntries((L) => {
|
|
2501
|
+
L.forEach((q) => {
|
|
2502
|
+
b(x, q);
|
|
2511
2503
|
});
|
|
2512
2504
|
});
|
|
2513
2505
|
}
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
const
|
|
2517
|
-
[...
|
|
2518
|
-
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2521
|
-
},
|
|
2506
|
+
D.value.addEventListener("drop", (x) => {
|
|
2507
|
+
x.preventDefault(), j.value = !1;
|
|
2508
|
+
const $ = /^[/\\](.+)/;
|
|
2509
|
+
[...x.dataTransfer.items].forEach((L) => {
|
|
2510
|
+
L.kind === "file" && b((q, ke) => {
|
|
2511
|
+
const Fe = $.exec(q.fullPath);
|
|
2512
|
+
A(ke, Fe[1]);
|
|
2513
|
+
}, L.webkitGetAsEntry());
|
|
2522
2514
|
});
|
|
2523
2515
|
});
|
|
2524
|
-
const
|
|
2525
|
-
const
|
|
2526
|
-
for (const
|
|
2527
|
-
|
|
2516
|
+
const _ = ({ target: x }) => {
|
|
2517
|
+
const $ = x.files;
|
|
2518
|
+
for (const L of $)
|
|
2519
|
+
A(L);
|
|
2528
2520
|
};
|
|
2529
|
-
|
|
2530
|
-
}),
|
|
2531
|
-
|
|
2532
|
-
}), (
|
|
2533
|
-
buttons:
|
|
2521
|
+
y.value.addEventListener("change", _), w.value.addEventListener("change", _);
|
|
2522
|
+
}), Oe(() => {
|
|
2523
|
+
z == null || z.close({ reason: "unmount" });
|
|
2524
|
+
}), (b, _) => (r(), N(W, null, {
|
|
2525
|
+
buttons: E(() => [
|
|
2534
2526
|
e("button", {
|
|
2535
2527
|
type: "button",
|
|
2536
|
-
class:
|
|
2537
|
-
disabled:
|
|
2538
|
-
onClick:
|
|
2539
|
-
},
|
|
2540
|
-
|
|
2528
|
+
class: T(["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"]),
|
|
2529
|
+
disabled: M.value,
|
|
2530
|
+
onClick: Z(ie, ["prevent"])
|
|
2531
|
+
}, u(a(o)("Upload")), 11, tr),
|
|
2532
|
+
M.value ? (r(), v("button", {
|
|
2541
2533
|
key: 0,
|
|
2542
2534
|
type: "button",
|
|
2543
|
-
class: "
|
|
2544
|
-
onClick:
|
|
2545
|
-
},
|
|
2535
|
+
class: "vf-btn vf-btn-secondary",
|
|
2536
|
+
onClick: Z(de, ["prevent"])
|
|
2537
|
+
}, u(a(o)("Cancel")), 1)) : (r(), v("button", {
|
|
2546
2538
|
key: 1,
|
|
2547
2539
|
type: "button",
|
|
2548
|
-
class: "
|
|
2549
|
-
onClick:
|
|
2550
|
-
},
|
|
2540
|
+
class: "vf-btn vf-btn-secondary",
|
|
2541
|
+
onClick: Z(C, ["prevent"])
|
|
2542
|
+
}, u(a(o)("Close")), 1))
|
|
2551
2543
|
]),
|
|
2552
|
-
default:
|
|
2553
|
-
e("div",
|
|
2554
|
-
|
|
2555
|
-
e("div",
|
|
2556
|
-
e("h3",
|
|
2557
|
-
e("div",
|
|
2544
|
+
default: E(() => [
|
|
2545
|
+
e("div", Bn, [
|
|
2546
|
+
An,
|
|
2547
|
+
e("div", Ln, [
|
|
2548
|
+
e("h3", Nn, u(a(o)("Upload Files")), 1),
|
|
2549
|
+
e("div", Un, [
|
|
2558
2550
|
e("div", {
|
|
2559
2551
|
ref_key: "dropArea",
|
|
2560
|
-
ref:
|
|
2552
|
+
ref: D,
|
|
2561
2553
|
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]",
|
|
2562
|
-
onClick:
|
|
2554
|
+
onClick: te
|
|
2563
2555
|
}, [
|
|
2564
|
-
|
|
2556
|
+
j.value ? (r(), v("div", Tn, u(a(o)("Release to drop these files.")), 1)) : (r(), v("div", Hn, u(a(o)("Drag and drop the files/folders to here or click here.")), 1))
|
|
2565
2557
|
], 512),
|
|
2566
2558
|
e("div", {
|
|
2567
2559
|
ref_key: "container",
|
|
2568
|
-
ref:
|
|
2560
|
+
ref: f,
|
|
2569
2561
|
class: "text-gray-500 mb-1"
|
|
2570
2562
|
}, [
|
|
2571
2563
|
e("button", {
|
|
2572
2564
|
ref_key: "pickFiles",
|
|
2573
|
-
ref:
|
|
2565
|
+
ref: B,
|
|
2574
2566
|
type: "button",
|
|
2575
|
-
class: "
|
|
2576
|
-
},
|
|
2567
|
+
class: "vf-btn vf-btn-secondary"
|
|
2568
|
+
}, u(a(o)("Select Files")), 513),
|
|
2577
2569
|
e("button", {
|
|
2578
2570
|
ref_key: "pickFolders",
|
|
2579
|
-
ref:
|
|
2571
|
+
ref: O,
|
|
2580
2572
|
type: "button",
|
|
2581
|
-
class: "
|
|
2582
|
-
},
|
|
2573
|
+
class: "vf-btn vf-btn-secondary"
|
|
2574
|
+
}, u(a(o)("Select Folders")), 513),
|
|
2583
2575
|
e("button", {
|
|
2584
2576
|
type: "button",
|
|
2585
|
-
class: "
|
|
2586
|
-
disabled:
|
|
2587
|
-
onClick:
|
|
2588
|
-
},
|
|
2577
|
+
class: "vf-btn vf-btn-secondary",
|
|
2578
|
+
disabled: M.value,
|
|
2579
|
+
onClick: _[0] || (_[0] = (x) => ce(!1))
|
|
2580
|
+
}, u(a(o)("Clear all")), 9, In),
|
|
2589
2581
|
e("button", {
|
|
2590
2582
|
type: "button",
|
|
2591
|
-
class: "
|
|
2592
|
-
disabled:
|
|
2593
|
-
onClick:
|
|
2594
|
-
},
|
|
2583
|
+
class: "vf-btn vf-btn-secondary",
|
|
2584
|
+
disabled: M.value,
|
|
2585
|
+
onClick: _[1] || (_[1] = (x) => ce(!0))
|
|
2586
|
+
}, u(a(o)("Clear only successful")), 9, qn)
|
|
2595
2587
|
], 512),
|
|
2596
|
-
e("div",
|
|
2597
|
-
(
|
|
2588
|
+
e("div", Rn, [
|
|
2589
|
+
(r(!0), v(H, null, J(S.value, (x) => (r(), v("div", {
|
|
2598
2590
|
class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
|
|
2599
|
-
key:
|
|
2591
|
+
key: x.id
|
|
2600
2592
|
}, [
|
|
2601
|
-
e("span",
|
|
2593
|
+
e("span", Pn, [
|
|
2602
2594
|
e("span", {
|
|
2603
|
-
class:
|
|
2604
|
-
textContent:
|
|
2605
|
-
}, null, 10,
|
|
2595
|
+
class: T(["text-base m-auto", ee(x)]),
|
|
2596
|
+
textContent: u(G(x))
|
|
2597
|
+
}, null, 10, Gn)
|
|
2606
2598
|
]),
|
|
2607
|
-
e("div",
|
|
2608
|
-
e("div",
|
|
2609
|
-
e("div",
|
|
2599
|
+
e("div", Yn, [
|
|
2600
|
+
e("div", Jn, u(a(we)(x.name, 40)) + " (" + u(x.size) + ")", 1),
|
|
2601
|
+
e("div", Kn, u(a(we)(x.name, 16)) + " (" + u(x.size) + ")", 1),
|
|
2610
2602
|
e("div", {
|
|
2611
|
-
class:
|
|
2603
|
+
class: T(["flex break-all text-left", ee(x)])
|
|
2612
2604
|
}, [
|
|
2613
|
-
|
|
2614
|
-
|
|
2605
|
+
U(u(x.statusName) + " ", 1),
|
|
2606
|
+
x.status === d.value.QUEUE_ENTRY_STATUS.UPLOADING ? (r(), v("b", Wn, u(x.percent), 1)) : V("", !0)
|
|
2615
2607
|
], 2)
|
|
2616
2608
|
]),
|
|
2617
2609
|
e("button", {
|
|
2618
2610
|
type: "button",
|
|
2619
|
-
class:
|
|
2620
|
-
title:
|
|
2621
|
-
disabled:
|
|
2622
|
-
onClick: (
|
|
2623
|
-
},
|
|
2611
|
+
class: T(["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"]),
|
|
2612
|
+
title: a(o)("Delete"),
|
|
2613
|
+
disabled: M.value,
|
|
2614
|
+
onClick: ($) => ne(x)
|
|
2615
|
+
}, Zn, 10, Xn)
|
|
2624
2616
|
]))), 128)),
|
|
2625
|
-
|
|
2626
|
-
])
|
|
2617
|
+
S.value.length ? V("", !0) : (r(), v("div", er, u(a(o)("No files selected!")), 1))
|
|
2618
|
+
]),
|
|
2619
|
+
F.value.length ? (r(), N(Q, {
|
|
2620
|
+
key: 0,
|
|
2621
|
+
onHidden: _[2] || (_[2] = (x) => F.value = ""),
|
|
2622
|
+
error: ""
|
|
2623
|
+
}, {
|
|
2624
|
+
default: E(() => [
|
|
2625
|
+
U(u(F.value), 1)
|
|
2626
|
+
]),
|
|
2627
|
+
_: 1
|
|
2628
|
+
})) : V("", !0)
|
|
2627
2629
|
])
|
|
2628
2630
|
])
|
|
2629
2631
|
]),
|
|
2630
2632
|
e("input", {
|
|
2631
2633
|
ref_key: "internalFileInput",
|
|
2632
|
-
ref:
|
|
2634
|
+
ref: y,
|
|
2633
2635
|
type: "file",
|
|
2634
2636
|
multiple: "",
|
|
2635
2637
|
class: "hidden"
|
|
2636
2638
|
}, null, 512),
|
|
2637
2639
|
e("input", {
|
|
2638
2640
|
ref_key: "internalFolderInput",
|
|
2639
|
-
ref:
|
|
2641
|
+
ref: w,
|
|
2640
2642
|
type: "file",
|
|
2641
2643
|
multiple: "",
|
|
2642
2644
|
webkitdirectory: "",
|
|
@@ -2646,7 +2648,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2646
2648
|
_: 1
|
|
2647
2649
|
}));
|
|
2648
2650
|
}
|
|
2649
|
-
}),
|
|
2651
|
+
}), ar = { class: "sm:flex sm:items-start" }, nr = /* @__PURE__ */ e("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" }, [
|
|
2650
2652
|
/* @__PURE__ */ e("svg", {
|
|
2651
2653
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2652
2654
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2661,13 +2663,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2661
2663
|
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"
|
|
2662
2664
|
})
|
|
2663
2665
|
])
|
|
2664
|
-
], -1),
|
|
2666
|
+
], -1), rr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, lr = {
|
|
2665
2667
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2666
2668
|
id: "modal-title"
|
|
2667
|
-
},
|
|
2668
|
-
class: "text-gray-500 text-sm mb-1 overflow-auto",
|
|
2669
|
+
}, ir = { class: "mt-2" }, dr = {
|
|
2670
|
+
class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
|
|
2669
2671
|
style: { "max-height": "200px" }
|
|
2670
|
-
},
|
|
2672
|
+
}, cr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, ur = {
|
|
2671
2673
|
key: 0,
|
|
2672
2674
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2673
2675
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2675,13 +2677,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2675
2677
|
viewBox: "0 0 24 24",
|
|
2676
2678
|
stroke: "currentColor",
|
|
2677
2679
|
"stroke-width": "1"
|
|
2678
|
-
},
|
|
2680
|
+
}, mr = /* @__PURE__ */ e("path", {
|
|
2679
2681
|
"stroke-linecap": "round",
|
|
2680
2682
|
"stroke-linejoin": "round",
|
|
2681
2683
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2682
|
-
}, null, -1),
|
|
2683
|
-
|
|
2684
|
-
],
|
|
2684
|
+
}, null, -1), vr = [
|
|
2685
|
+
mr
|
|
2686
|
+
], pr = {
|
|
2685
2687
|
key: 1,
|
|
2686
2688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2687
2689
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2689,83 +2691,83 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2689
2691
|
viewBox: "0 0 24 24",
|
|
2690
2692
|
stroke: "currentColor",
|
|
2691
2693
|
"stroke-width": "1"
|
|
2692
|
-
},
|
|
2694
|
+
}, hr = /* @__PURE__ */ e("path", {
|
|
2693
2695
|
"stroke-linecap": "round",
|
|
2694
2696
|
"stroke-linejoin": "round",
|
|
2695
2697
|
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"
|
|
2696
|
-
}, null, -1),
|
|
2697
|
-
|
|
2698
|
-
],
|
|
2698
|
+
}, null, -1), fr = [
|
|
2699
|
+
hr
|
|
2700
|
+
], gr = { class: "ml-1.5" }, kr = ["placeholder"], _r = {
|
|
2699
2701
|
name: "VFModalArchive"
|
|
2700
|
-
},
|
|
2702
|
+
}, xr = /* @__PURE__ */ Object.assign(_r, {
|
|
2701
2703
|
props: {
|
|
2702
2704
|
selection: Object,
|
|
2703
2705
|
current: Object
|
|
2704
2706
|
},
|
|
2705
|
-
setup(
|
|
2706
|
-
const t =
|
|
2707
|
-
|
|
2708
|
-
const s =
|
|
2709
|
-
|
|
2707
|
+
setup(l) {
|
|
2708
|
+
const t = k("emitter");
|
|
2709
|
+
k("storage");
|
|
2710
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = g(i.selection.items), p = () => {
|
|
2711
|
+
h.value.length && t.emit("vf-fetch", {
|
|
2710
2712
|
params: {
|
|
2711
2713
|
q: "archive",
|
|
2712
2714
|
adapter: s.value,
|
|
2713
|
-
path:
|
|
2714
|
-
items: JSON.stringify(
|
|
2715
|
-
name:
|
|
2715
|
+
path: i.current.dirname,
|
|
2716
|
+
items: JSON.stringify(h.value.map(({ path: c, type: d }) => ({ path: c, type: d }))),
|
|
2717
|
+
name: m.value
|
|
2716
2718
|
},
|
|
2717
2719
|
onSuccess: () => {
|
|
2718
2720
|
t.emit("vf-toast-push", { label: o("The file(s) archived.") });
|
|
2719
2721
|
},
|
|
2720
|
-
onError: (
|
|
2721
|
-
|
|
2722
|
+
onError: (c) => {
|
|
2723
|
+
n.value = o(c.message);
|
|
2722
2724
|
}
|
|
2723
2725
|
});
|
|
2724
2726
|
};
|
|
2725
|
-
return (
|
|
2726
|
-
buttons:
|
|
2727
|
+
return (c, d) => (r(), N(W, null, {
|
|
2728
|
+
buttons: E(() => [
|
|
2727
2729
|
e("button", {
|
|
2728
2730
|
type: "button",
|
|
2729
|
-
onClick:
|
|
2730
|
-
class: "
|
|
2731
|
-
},
|
|
2731
|
+
onClick: p,
|
|
2732
|
+
class: "vf-btn vf-btn-primary"
|
|
2733
|
+
}, u(a(o)("Archive")), 1),
|
|
2732
2734
|
e("button", {
|
|
2733
2735
|
type: "button",
|
|
2734
|
-
onClick:
|
|
2735
|
-
class: "
|
|
2736
|
-
},
|
|
2736
|
+
onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")),
|
|
2737
|
+
class: "vf-btn vf-btn-secondary"
|
|
2738
|
+
}, u(a(o)("Cancel")), 1)
|
|
2737
2739
|
]),
|
|
2738
|
-
default:
|
|
2739
|
-
e("div",
|
|
2740
|
-
|
|
2741
|
-
e("div",
|
|
2742
|
-
e("h3",
|
|
2743
|
-
e("div",
|
|
2744
|
-
e("div",
|
|
2745
|
-
(
|
|
2746
|
-
|
|
2747
|
-
e("span",
|
|
2740
|
+
default: E(() => [
|
|
2741
|
+
e("div", ar, [
|
|
2742
|
+
nr,
|
|
2743
|
+
e("div", rr, [
|
|
2744
|
+
e("h3", lr, u(a(o)("Archive the files")), 1),
|
|
2745
|
+
e("div", ir, [
|
|
2746
|
+
e("div", dr, [
|
|
2747
|
+
(r(!0), v(H, null, J(h.value, (f) => (r(), v("p", cr, [
|
|
2748
|
+
f.type == "dir" ? (r(), v("svg", ur, vr)) : (r(), v("svg", pr, fr)),
|
|
2749
|
+
e("span", gr, u(f.basename), 1)
|
|
2748
2750
|
]))), 256))
|
|
2749
2751
|
]),
|
|
2750
|
-
|
|
2751
|
-
"onUpdate:modelValue":
|
|
2752
|
-
onKeyup: se(
|
|
2752
|
+
R(e("input", {
|
|
2753
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => m.value = f),
|
|
2754
|
+
onKeyup: se(p, ["enter"]),
|
|
2753
2755
|
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",
|
|
2754
|
-
placeholder:
|
|
2756
|
+
placeholder: a(o)("Archive name. (.zip file will be created)"),
|
|
2755
2757
|
type: "text"
|
|
2756
|
-
}, null, 40,
|
|
2757
|
-
[
|
|
2758
|
+
}, null, 40, kr), [
|
|
2759
|
+
[ae, m.value]
|
|
2758
2760
|
]),
|
|
2759
|
-
|
|
2761
|
+
n.value.length ? (r(), N(Q, {
|
|
2760
2762
|
key: 0,
|
|
2761
|
-
onHidden:
|
|
2763
|
+
onHidden: d[1] || (d[1] = (f) => n.value = ""),
|
|
2762
2764
|
error: ""
|
|
2763
2765
|
}, {
|
|
2764
|
-
default:
|
|
2765
|
-
|
|
2766
|
+
default: E(() => [
|
|
2767
|
+
U(u(n.value), 1)
|
|
2766
2768
|
]),
|
|
2767
2769
|
_: 1
|
|
2768
|
-
})) :
|
|
2770
|
+
})) : V("", !0)
|
|
2769
2771
|
])
|
|
2770
2772
|
])
|
|
2771
2773
|
])
|
|
@@ -2773,7 +2775,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2773
2775
|
_: 1
|
|
2774
2776
|
}));
|
|
2775
2777
|
}
|
|
2776
|
-
}),
|
|
2778
|
+
}), br = { class: "sm:flex sm:items-start" }, wr = /* @__PURE__ */ e("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" }, [
|
|
2777
2779
|
/* @__PURE__ */ e("svg", {
|
|
2778
2780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2779
2781
|
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
@@ -2788,10 +2790,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2788
2790
|
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"
|
|
2789
2791
|
})
|
|
2790
2792
|
])
|
|
2791
|
-
], -1),
|
|
2793
|
+
], -1), yr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = {
|
|
2792
2794
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2793
2795
|
id: "modal-title"
|
|
2794
|
-
},
|
|
2796
|
+
}, Cr = { class: "mt-2" }, Mr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, jr = {
|
|
2795
2797
|
key: 0,
|
|
2796
2798
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2797
2799
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2799,13 +2801,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2799
2801
|
viewBox: "0 0 24 24",
|
|
2800
2802
|
stroke: "currentColor",
|
|
2801
2803
|
"stroke-width": "1"
|
|
2802
|
-
},
|
|
2804
|
+
}, Sr = /* @__PURE__ */ e("path", {
|
|
2803
2805
|
"stroke-linecap": "round",
|
|
2804
2806
|
"stroke-linejoin": "round",
|
|
2805
2807
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2806
|
-
}, null, -1),
|
|
2807
|
-
|
|
2808
|
-
],
|
|
2808
|
+
}, null, -1), Dr = [
|
|
2809
|
+
Sr
|
|
2810
|
+
], Or = {
|
|
2809
2811
|
key: 1,
|
|
2810
2812
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2811
2813
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2813,74 +2815,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2813
2815
|
viewBox: "0 0 24 24",
|
|
2814
2816
|
stroke: "currentColor",
|
|
2815
2817
|
"stroke-width": "1"
|
|
2816
|
-
},
|
|
2818
|
+
}, zr = /* @__PURE__ */ e("path", {
|
|
2817
2819
|
"stroke-linecap": "round",
|
|
2818
2820
|
"stroke-linejoin": "round",
|
|
2819
2821
|
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"
|
|
2820
|
-
}, null, -1),
|
|
2821
|
-
|
|
2822
|
-
],
|
|
2822
|
+
}, null, -1), Er = [
|
|
2823
|
+
zr
|
|
2824
|
+
], Fr = { class: "ml-1.5" }, Vr = { class: "my-1 text-sm text-gray-500" }, Br = {
|
|
2823
2825
|
name: "VFModalUnarchive"
|
|
2824
|
-
},
|
|
2826
|
+
}, Ar = /* @__PURE__ */ Object.assign(Br, {
|
|
2825
2827
|
props: {
|
|
2826
2828
|
selection: Object,
|
|
2827
2829
|
current: Object
|
|
2828
2830
|
},
|
|
2829
|
-
setup(
|
|
2830
|
-
const t =
|
|
2831
|
-
|
|
2832
|
-
const s =
|
|
2833
|
-
|
|
2834
|
-
const
|
|
2831
|
+
setup(l) {
|
|
2832
|
+
const t = k("emitter");
|
|
2833
|
+
k("storage");
|
|
2834
|
+
const s = k("adapter"), { t: o } = k("i18n"), i = l;
|
|
2835
|
+
g("");
|
|
2836
|
+
const m = g(i.selection.items[0]), n = g(""), h = g([]), p = () => {
|
|
2835
2837
|
t.emit("vf-fetch", {
|
|
2836
2838
|
params: {
|
|
2837
2839
|
q: "unarchive",
|
|
2838
2840
|
adapter: s.value,
|
|
2839
|
-
path:
|
|
2840
|
-
item:
|
|
2841
|
+
path: i.current.dirname,
|
|
2842
|
+
item: m.value.path
|
|
2841
2843
|
},
|
|
2842
2844
|
onSuccess: () => {
|
|
2843
2845
|
t.emit("vf-toast-push", { label: o("The file unarchived.") });
|
|
2844
2846
|
},
|
|
2845
|
-
onError: (
|
|
2846
|
-
|
|
2847
|
+
onError: (c) => {
|
|
2848
|
+
n.value = o(c.message);
|
|
2847
2849
|
}
|
|
2848
2850
|
});
|
|
2849
2851
|
};
|
|
2850
|
-
return (
|
|
2851
|
-
buttons:
|
|
2852
|
+
return (c, d) => (r(), N(W, null, {
|
|
2853
|
+
buttons: E(() => [
|
|
2852
2854
|
e("button", {
|
|
2853
2855
|
type: "button",
|
|
2854
|
-
onClick:
|
|
2855
|
-
class: "
|
|
2856
|
-
},
|
|
2856
|
+
onClick: p,
|
|
2857
|
+
class: "vf-btn vf-btn-primary"
|
|
2858
|
+
}, u(a(o)("Unarchive")), 1),
|
|
2857
2859
|
e("button", {
|
|
2858
2860
|
type: "button",
|
|
2859
|
-
onClick:
|
|
2860
|
-
class: "
|
|
2861
|
-
},
|
|
2861
|
+
onClick: d[1] || (d[1] = (f) => a(t).emit("vf-modal-close")),
|
|
2862
|
+
class: "vf-btn vf-btn-secondary"
|
|
2863
|
+
}, u(a(o)("Cancel")), 1)
|
|
2862
2864
|
]),
|
|
2863
|
-
default:
|
|
2864
|
-
e("div",
|
|
2865
|
-
|
|
2866
|
-
e("div",
|
|
2867
|
-
e("h3",
|
|
2868
|
-
e("div",
|
|
2869
|
-
(
|
|
2870
|
-
|
|
2871
|
-
e("span",
|
|
2865
|
+
default: E(() => [
|
|
2866
|
+
e("div", br, [
|
|
2867
|
+
wr,
|
|
2868
|
+
e("div", yr, [
|
|
2869
|
+
e("h3", $r, u(a(o)("Unarchive")), 1),
|
|
2870
|
+
e("div", Cr, [
|
|
2871
|
+
(r(!0), v(H, null, J(h.value, (f) => (r(), v("p", Mr, [
|
|
2872
|
+
f.type == "dir" ? (r(), v("svg", jr, Dr)) : (r(), v("svg", Or, Er)),
|
|
2873
|
+
e("span", Fr, u(f.basename), 1)
|
|
2872
2874
|
]))), 256)),
|
|
2873
|
-
e("p",
|
|
2874
|
-
|
|
2875
|
+
e("p", Vr, u(a(o)("The archive will be unarchived at")) + " (" + u(l.current.dirname) + ")", 1),
|
|
2876
|
+
n.value.length ? (r(), N(Q, {
|
|
2875
2877
|
key: 0,
|
|
2876
|
-
onHidden:
|
|
2878
|
+
onHidden: d[0] || (d[0] = (f) => n.value = ""),
|
|
2877
2879
|
error: ""
|
|
2878
2880
|
}, {
|
|
2879
|
-
default:
|
|
2880
|
-
|
|
2881
|
+
default: E(() => [
|
|
2882
|
+
U(u(n.value), 1)
|
|
2881
2883
|
]),
|
|
2882
2884
|
_: 1
|
|
2883
|
-
})) :
|
|
2885
|
+
})) : V("", !0)
|
|
2884
2886
|
])
|
|
2885
2887
|
])
|
|
2886
2888
|
])
|
|
@@ -2888,7 +2890,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2888
2890
|
_: 1
|
|
2889
2891
|
}));
|
|
2890
2892
|
}
|
|
2891
|
-
}),
|
|
2893
|
+
}), Lr = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ e("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" }, [
|
|
2892
2894
|
/* @__PURE__ */ e("svg", {
|
|
2893
2895
|
class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
|
|
2894
2896
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2904,10 +2906,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2904
2906
|
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"
|
|
2905
2907
|
})
|
|
2906
2908
|
])
|
|
2907
|
-
], -1),
|
|
2909
|
+
], -1), Ur = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Tr = {
|
|
2908
2910
|
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
2909
2911
|
id: "modal-title"
|
|
2910
|
-
},
|
|
2912
|
+
}, Hr = { class: "mt-2" }, Ir = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, qr = {
|
|
2911
2913
|
key: 0,
|
|
2912
2914
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2913
2915
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
@@ -2915,13 +2917,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2915
2917
|
viewBox: "0 0 24 24",
|
|
2916
2918
|
stroke: "currentColor",
|
|
2917
2919
|
"stroke-width": "1"
|
|
2918
|
-
},
|
|
2920
|
+
}, Rr = /* @__PURE__ */ e("path", {
|
|
2919
2921
|
"stroke-linecap": "round",
|
|
2920
2922
|
"stroke-linejoin": "round",
|
|
2921
2923
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2922
|
-
}, null, -1),
|
|
2923
|
-
|
|
2924
|
-
],
|
|
2924
|
+
}, null, -1), Pr = [
|
|
2925
|
+
Rr
|
|
2926
|
+
], Gr = {
|
|
2925
2927
|
key: 1,
|
|
2926
2928
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2927
2929
|
class: "h-5 w-5 text-neutral-500",
|
|
@@ -2929,13 +2931,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2929
2931
|
viewBox: "0 0 24 24",
|
|
2930
2932
|
stroke: "currentColor",
|
|
2931
2933
|
"stroke-width": "1"
|
|
2932
|
-
},
|
|
2934
|
+
}, Yr = /* @__PURE__ */ e("path", {
|
|
2933
2935
|
"stroke-linecap": "round",
|
|
2934
2936
|
"stroke-linejoin": "round",
|
|
2935
2937
|
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"
|
|
2936
|
-
}, null, -1),
|
|
2937
|
-
|
|
2938
|
-
],
|
|
2938
|
+
}, null, -1), Jr = [
|
|
2939
|
+
Yr
|
|
2940
|
+
], Kr = { class: "ml-1.5" }, Wr = { class: "text-sm text-gray-500 pb-1 pt-3" }, Xr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Qr = /* @__PURE__ */ e("svg", {
|
|
2939
2941
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2940
2942
|
class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
|
|
2941
2943
|
fill: "none",
|
|
@@ -2948,71 +2950,244 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
2948
2950
|
"stroke-linejoin": "round",
|
|
2949
2951
|
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
2950
2952
|
})
|
|
2951
|
-
], -1),
|
|
2953
|
+
], -1), Zr = { class: "ml-1.5 overflow-auto" }, el = {
|
|
2952
2954
|
name: "VFModalMove"
|
|
2953
|
-
},
|
|
2955
|
+
}, tl = /* @__PURE__ */ Object.assign(el, {
|
|
2954
2956
|
props: {
|
|
2955
2957
|
selection: Object,
|
|
2956
2958
|
current: Object
|
|
2957
2959
|
},
|
|
2958
|
-
setup(
|
|
2959
|
-
const t =
|
|
2960
|
-
|
|
2961
|
-
const o =
|
|
2962
|
-
|
|
2960
|
+
setup(l) {
|
|
2961
|
+
const t = k("emitter"), { t: s } = k("i18n");
|
|
2962
|
+
k("storage");
|
|
2963
|
+
const o = k("adapter"), i = l, m = g(i.selection.items.from), n = g(""), h = () => {
|
|
2964
|
+
m.value.length && t.emit("vf-fetch", {
|
|
2963
2965
|
params: {
|
|
2964
2966
|
q: "move",
|
|
2965
2967
|
adapter: o.value,
|
|
2966
|
-
path:
|
|
2967
|
-
items: JSON.stringify(
|
|
2968
|
-
item:
|
|
2968
|
+
path: i.current.dirname,
|
|
2969
|
+
items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c }))),
|
|
2970
|
+
item: i.selection.items.to.path
|
|
2969
2971
|
},
|
|
2970
2972
|
onSuccess: () => {
|
|
2971
|
-
t.emit("vf-toast-push", { label: s("Files moved.",
|
|
2973
|
+
t.emit("vf-toast-push", { label: s("Files moved.", i.selection.items.to.name) });
|
|
2972
2974
|
},
|
|
2973
|
-
onError: (
|
|
2974
|
-
|
|
2975
|
+
onError: (p) => {
|
|
2976
|
+
n.value = s(p.message);
|
|
2975
2977
|
}
|
|
2976
2978
|
});
|
|
2977
2979
|
};
|
|
2978
|
-
return (
|
|
2979
|
-
buttons:
|
|
2980
|
+
return (p, c) => (r(), N(W, null, {
|
|
2981
|
+
buttons: E(() => [
|
|
2980
2982
|
e("button", {
|
|
2981
2983
|
type: "button",
|
|
2982
|
-
onClick:
|
|
2983
|
-
class: "
|
|
2984
|
-
},
|
|
2984
|
+
onClick: h,
|
|
2985
|
+
class: "vf-btn vf-btn-primary"
|
|
2986
|
+
}, u(a(s)("Yes, Move!")), 1),
|
|
2985
2987
|
e("button", {
|
|
2986
2988
|
type: "button",
|
|
2987
|
-
onClick:
|
|
2988
|
-
class: "
|
|
2989
|
-
},
|
|
2989
|
+
onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")),
|
|
2990
|
+
class: "vf-btn vf-btn-secondary"
|
|
2991
|
+
}, u(a(s)("Cancel")), 1)
|
|
2990
2992
|
]),
|
|
2991
|
-
default:
|
|
2992
|
-
e("div",
|
|
2993
|
-
|
|
2994
|
-
e("div",
|
|
2995
|
-
e("h3",
|
|
2996
|
-
e("div",
|
|
2997
|
-
(
|
|
2998
|
-
|
|
2999
|
-
e("span",
|
|
2993
|
+
default: E(() => [
|
|
2994
|
+
e("div", Lr, [
|
|
2995
|
+
Nr,
|
|
2996
|
+
e("div", Ur, [
|
|
2997
|
+
e("h3", Tr, u(a(s)("Move files")), 1),
|
|
2998
|
+
e("div", Hr, [
|
|
2999
|
+
(r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ir, [
|
|
3000
|
+
d.type == "dir" ? (r(), v("svg", qr, Pr)) : (r(), v("svg", Gr, Jr)),
|
|
3001
|
+
e("span", Kr, u(d.path), 1)
|
|
3000
3002
|
]))), 256)),
|
|
3001
|
-
e("p",
|
|
3002
|
-
e("p",
|
|
3003
|
-
|
|
3004
|
-
e("span",
|
|
3003
|
+
e("p", Wr, u(a(s)("Are you sure you want to move these files?")), 1),
|
|
3004
|
+
e("p", Xr, [
|
|
3005
|
+
Qr,
|
|
3006
|
+
e("span", Zr, u(l.selection.items.to.path), 1)
|
|
3005
3007
|
]),
|
|
3006
|
-
|
|
3008
|
+
n.value.length ? (r(), N(Q, {
|
|
3007
3009
|
key: 0,
|
|
3008
|
-
onHidden:
|
|
3010
|
+
onHidden: c[0] || (c[0] = (d) => n.value = ""),
|
|
3009
3011
|
error: ""
|
|
3010
3012
|
}, {
|
|
3011
|
-
default:
|
|
3012
|
-
|
|
3013
|
+
default: E(() => [
|
|
3014
|
+
U(u(n.value), 1)
|
|
3013
3015
|
]),
|
|
3014
3016
|
_: 1
|
|
3015
|
-
})) :
|
|
3017
|
+
})) : V("", !0)
|
|
3018
|
+
])
|
|
3019
|
+
])
|
|
3020
|
+
])
|
|
3021
|
+
]),
|
|
3022
|
+
_: 1
|
|
3023
|
+
}));
|
|
3024
|
+
}
|
|
3025
|
+
}), ol = (l, t) => {
|
|
3026
|
+
const s = l.__vccOpts || l;
|
|
3027
|
+
for (const [o, i] of t)
|
|
3028
|
+
s[o] = i;
|
|
3029
|
+
return s;
|
|
3030
|
+
}, sl = {
|
|
3031
|
+
props: {
|
|
3032
|
+
on: { type: String, required: !0 }
|
|
3033
|
+
},
|
|
3034
|
+
setup(l, { emit: t, slots: s }) {
|
|
3035
|
+
const o = k("emitter"), i = g(!1);
|
|
3036
|
+
let m = null;
|
|
3037
|
+
const n = () => {
|
|
3038
|
+
clearTimeout(m), i.value = !0, m = setTimeout(() => {
|
|
3039
|
+
i.value = !1;
|
|
3040
|
+
}, 2e3);
|
|
3041
|
+
};
|
|
3042
|
+
return K(() => {
|
|
3043
|
+
o.on(l.on, n);
|
|
3044
|
+
}), Te(() => {
|
|
3045
|
+
clearTimeout(m);
|
|
3046
|
+
}), {
|
|
3047
|
+
shown: i
|
|
3048
|
+
};
|
|
3049
|
+
}
|
|
3050
|
+
}, al = { key: 1 };
|
|
3051
|
+
function nl(l, t, s, o, i, m) {
|
|
3052
|
+
return r(), v("div", {
|
|
3053
|
+
class: T(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !o.shown }]])
|
|
3054
|
+
}, [
|
|
3055
|
+
l.$slots.default ? pe(l.$slots, "default", { key: 0 }) : (r(), v("span", al, "Saved."))
|
|
3056
|
+
], 2);
|
|
3057
|
+
}
|
|
3058
|
+
const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: "sm:flex sm:items-start" }, il = /* @__PURE__ */ e("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" }, [
|
|
3059
|
+
/* @__PURE__ */ e("svg", {
|
|
3060
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3061
|
+
class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
|
|
3062
|
+
fill: "none",
|
|
3063
|
+
viewBox: "0 0 24 24",
|
|
3064
|
+
"stroke-width": "1.5",
|
|
3065
|
+
stroke: "currentColor"
|
|
3066
|
+
}, [
|
|
3067
|
+
/* @__PURE__ */ e("path", {
|
|
3068
|
+
"stroke-linecap": "round",
|
|
3069
|
+
"stroke-linejoin": "round",
|
|
3070
|
+
d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
|
|
3071
|
+
}),
|
|
3072
|
+
/* @__PURE__ */ e("path", {
|
|
3073
|
+
"stroke-linecap": "round",
|
|
3074
|
+
"stroke-linejoin": "round",
|
|
3075
|
+
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
3076
|
+
})
|
|
3077
|
+
])
|
|
3078
|
+
], -1), dl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, cl = {
|
|
3079
|
+
class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
3080
|
+
id: "modal-title"
|
|
3081
|
+
}, ul = { class: "mt-2" }, ml = { class: "text-sm text-gray-500" }, vl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, pl = { class: "mt-3 text-left" }, hl = { class: "space-y-2" }, fl = { class: "flex relative gap-x-3" }, gl = { class: "h-6 items-center" }, kl = { class: "flex-1 block text-sm" }, _l = {
|
|
3082
|
+
for: "dark_mode",
|
|
3083
|
+
class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
|
|
3084
|
+
}, xl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, wl = { class: "flex-1 block text-sm" }, yl = {
|
|
3085
|
+
for: "metric_unit",
|
|
3086
|
+
class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
|
|
3087
|
+
}, $l = {
|
|
3088
|
+
name: "VFModalAbout"
|
|
3089
|
+
}, Cl = /* @__PURE__ */ Object.assign($l, {
|
|
3090
|
+
props: {
|
|
3091
|
+
selection: Object,
|
|
3092
|
+
current: Object
|
|
3093
|
+
},
|
|
3094
|
+
setup(l) {
|
|
3095
|
+
const t = k("emitter"), { getStore: s, clearStore: o } = k("storage");
|
|
3096
|
+
k("adapter");
|
|
3097
|
+
const { t: i } = k("i18n");
|
|
3098
|
+
g(""), g("");
|
|
3099
|
+
const m = k("darkMode"), n = async () => {
|
|
3100
|
+
o(), location.reload();
|
|
3101
|
+
}, h = () => {
|
|
3102
|
+
t.emit("vf-darkMode-toggle"), t.emit("vf-darkMode-saved");
|
|
3103
|
+
}, p = k("metricUnits"), c = () => {
|
|
3104
|
+
t.emit("vf-metric-units-saved", !p.value);
|
|
3105
|
+
};
|
|
3106
|
+
return (d, f) => (r(), N(W, null, {
|
|
3107
|
+
buttons: E(() => [
|
|
3108
|
+
e("button", {
|
|
3109
|
+
type: "button",
|
|
3110
|
+
onClick: f[2] || (f[2] = (y) => a(t).emit("vf-modal-close")),
|
|
3111
|
+
class: "vf-btn vf-btn-secondary"
|
|
3112
|
+
}, u(a(i)("Close")), 1)
|
|
3113
|
+
]),
|
|
3114
|
+
default: E(() => [
|
|
3115
|
+
e("div", ll, [
|
|
3116
|
+
il,
|
|
3117
|
+
e("div", dl, [
|
|
3118
|
+
e("h3", cl, u(a(i)("About %s", "Vuefinder " + a(rl))), 1),
|
|
3119
|
+
e("div", ul, [
|
|
3120
|
+
e("p", ml, u(a(i)("Vuefinder is a file manager component for vue 3.")), 1),
|
|
3121
|
+
e("div", null, [
|
|
3122
|
+
e("h3", vl, u(a(i)("Settings")), 1)
|
|
3123
|
+
]),
|
|
3124
|
+
e("div", pl, [
|
|
3125
|
+
e("fieldset", null, [
|
|
3126
|
+
e("div", hl, [
|
|
3127
|
+
e("div", fl, [
|
|
3128
|
+
e("div", gl, [
|
|
3129
|
+
R(e("input", {
|
|
3130
|
+
id: "dark_mode",
|
|
3131
|
+
name: "dark_mode",
|
|
3132
|
+
"onUpdate:modelValue": f[0] || (f[0] = (y) => re(m) ? m.value = y : null),
|
|
3133
|
+
type: "checkbox",
|
|
3134
|
+
onClick: h,
|
|
3135
|
+
class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
|
|
3136
|
+
}, null, 512), [
|
|
3137
|
+
[$e, a(m)]
|
|
3138
|
+
])
|
|
3139
|
+
]),
|
|
3140
|
+
e("div", kl, [
|
|
3141
|
+
e("label", _l, [
|
|
3142
|
+
U(u(a(i)("Dark Mode")) + " ", 1),
|
|
3143
|
+
P(Se, {
|
|
3144
|
+
class: "ms-3",
|
|
3145
|
+
on: "vf-darkMode-saved"
|
|
3146
|
+
}, {
|
|
3147
|
+
default: E(() => [
|
|
3148
|
+
U(u(a(i)("Saved.")), 1)
|
|
3149
|
+
]),
|
|
3150
|
+
_: 1
|
|
3151
|
+
})
|
|
3152
|
+
])
|
|
3153
|
+
])
|
|
3154
|
+
]),
|
|
3155
|
+
e("div", xl, [
|
|
3156
|
+
e("div", bl, [
|
|
3157
|
+
R(e("input", {
|
|
3158
|
+
id: "metric_unit",
|
|
3159
|
+
name: "metric_unit",
|
|
3160
|
+
type: "checkbox",
|
|
3161
|
+
"onUpdate:modelValue": f[1] || (f[1] = (y) => re(p) ? p.value = y : null),
|
|
3162
|
+
onClick: c,
|
|
3163
|
+
class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
|
|
3164
|
+
}, null, 512), [
|
|
3165
|
+
[$e, a(p)]
|
|
3166
|
+
])
|
|
3167
|
+
]),
|
|
3168
|
+
e("div", wl, [
|
|
3169
|
+
e("label", yl, [
|
|
3170
|
+
U(u(a(i)("Use Metric Units")) + " ", 1),
|
|
3171
|
+
P(Se, {
|
|
3172
|
+
class: "ms-3",
|
|
3173
|
+
on: "vf-metric-units-saved"
|
|
3174
|
+
}, {
|
|
3175
|
+
default: E(() => [
|
|
3176
|
+
U(u(a(i)("Saved.")), 1)
|
|
3177
|
+
]),
|
|
3178
|
+
_: 1
|
|
3179
|
+
})
|
|
3180
|
+
])
|
|
3181
|
+
])
|
|
3182
|
+
]),
|
|
3183
|
+
e("button", {
|
|
3184
|
+
onClick: n,
|
|
3185
|
+
type: "button",
|
|
3186
|
+
class: "vf-btn vf-btn-secondary"
|
|
3187
|
+
}, u(a(i)("Clear Local Storage")), 1)
|
|
3188
|
+
])
|
|
3189
|
+
])
|
|
3190
|
+
])
|
|
3016
3191
|
])
|
|
3017
3192
|
])
|
|
3018
3193
|
])
|
|
@@ -3020,31 +3195,32 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
|
|
|
3020
3195
|
_: 1
|
|
3021
3196
|
}));
|
|
3022
3197
|
}
|
|
3023
|
-
}),
|
|
3198
|
+
}), Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3024
3199
|
__proto__: null,
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3200
|
+
ModalAbout: Cl,
|
|
3201
|
+
ModalArchive: xr,
|
|
3202
|
+
ModalDelete: ra,
|
|
3203
|
+
ModalMessage: pa,
|
|
3204
|
+
ModalMove: tl,
|
|
3205
|
+
ModalNewFile: Ea,
|
|
3206
|
+
ModalNewFolder: ya,
|
|
3207
|
+
ModalPreview: _n,
|
|
3208
|
+
ModalRename: Vn,
|
|
3209
|
+
ModalUnarchive: Ar,
|
|
3210
|
+
ModalUpload: sr
|
|
3211
|
+
}, Symbol.toStringTag, { value: "Module" })), _e = {
|
|
3212
|
+
VueFinder: Fs,
|
|
3213
|
+
...Ml
|
|
3038
3214
|
};
|
|
3039
|
-
const
|
|
3040
|
-
install(
|
|
3041
|
-
for (const t in
|
|
3042
|
-
if (
|
|
3043
|
-
const s =
|
|
3044
|
-
|
|
3215
|
+
const Al = {
|
|
3216
|
+
install(l) {
|
|
3217
|
+
for (const t in _e)
|
|
3218
|
+
if (_e.hasOwnProperty(t)) {
|
|
3219
|
+
const s = _e[t];
|
|
3220
|
+
l.component(s.name, s);
|
|
3045
3221
|
}
|
|
3046
3222
|
}
|
|
3047
3223
|
};
|
|
3048
3224
|
export {
|
|
3049
|
-
|
|
3225
|
+
Al as default
|
|
3050
3226
|
};
|