@brftech/filex-core 0.1.56 → 0.1.61
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/LICENSE +21 -21
- package/README.md +108 -108
- package/dist/{ArchiveViewer-CJdaw5x3.js → ArchiveViewer-CbUUEREI.js} +20 -20
- package/dist/ArchiveViewer-CbUUEREI.js.map +1 -0
- package/dist/{CsvViewer-QYx_tePQ.js → CsvViewer-72rDsQJX.js} +3 -3
- package/dist/CsvViewer-72rDsQJX.js.map +1 -0
- package/dist/{DrawioViewer-GWt0TyB7.js → DrawioViewer-DSyMwGvg.js} +7 -7
- package/dist/DrawioViewer-DSyMwGvg.js.map +1 -0
- package/dist/{EpubViewer-Je0ywklQ.js → EpubViewer-DvDa17d7.js} +3 -3
- package/dist/EpubViewer-DvDa17d7.js.map +1 -0
- package/dist/{IpynbViewer-TsB4gqP-.js → IpynbViewer-DibIkdsz.js} +3 -3
- package/dist/IpynbViewer-DibIkdsz.js.map +1 -0
- package/dist/{MermaidViewer-CXfeDS-7.js → MermaidViewer-BoFLtGvl.js} +3 -3
- package/dist/MermaidViewer-BoFLtGvl.js.map +1 -0
- package/dist/{PsdViewer-VtPpxKVe.js → PsdViewer-K2iZkwax.js} +3 -3
- package/dist/PsdViewer-K2iZkwax.js.map +1 -0
- package/dist/{TiffViewer-OINn9bbb.js → TiffViewer-JzDzbqpO.js} +3 -3
- package/dist/TiffViewer-JzDzbqpO.js.map +1 -0
- package/dist/{Viewer3D-xvvyiWHd.js → Viewer3D-WEMYCP8l.js} +7 -7
- package/dist/Viewer3D-WEMYCP8l.js.map +1 -0
- package/dist/filex-core.js +1 -1
- package/dist/filex-core.umd.cjs +4 -4
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/{index-CmSYzt6L.js → index-B5YT-m5Q.js} +209 -209
- package/dist/index-B5YT-m5Q.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/useViewerFetch-czqbd2Lj.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Breadcrumb.vue +282 -282
- package/src/components/ContextMenu.vue +152 -152
- package/src/components/GridView.vue +166 -166
- package/src/components/ListView.vue +212 -212
- package/src/components/PendingOpsTray.vue +91 -91
- package/src/components/RecentlyOpened.vue +155 -155
- package/src/components/StarButton.vue +101 -101
- package/src/components/TagPicker.vue +184 -184
- package/src/components/Toolbar.vue +220 -220
- package/src/components/UploadProgress.vue +78 -78
- package/src/composables/useFileApi.ts +692 -692
- package/src/composables/useKeyboardShortcuts.ts +144 -144
- package/src/composables/useLocale.ts +60 -60
- package/src/composables/useMonacoLoader.ts +98 -98
- package/src/composables/usePendingOps.ts +200 -200
- package/src/composables/useSelection.ts +81 -81
- package/src/composables/useUploadChunked.ts +250 -250
- package/src/composables/useViewerFetch.ts +58 -58
- package/src/index.ts +80 -80
- package/src/locales/en.ts +122 -122
- package/src/locales/index.ts +12 -12
- package/src/locales/tr.ts +122 -122
- package/src/modals/DeleteConfirmModal.vue +32 -32
- package/src/modals/Modal.vue +104 -104
- package/src/modals/NewFolderModal.vue +64 -64
- package/src/modals/PermissionsModal.vue +815 -815
- package/src/modals/PreviewModal.vue +1070 -1070
- package/src/modals/RenameModal.vue +58 -58
- package/src/modals/ShareModal.vue +135 -135
- package/src/styles/base.css +1224 -1224
- package/src/styles/variables.css +90 -90
- package/src/types/FileNode.ts +136 -136
- package/src/types/index.ts +27 -27
- package/src/types/peers.d.ts +45 -45
- package/src/viewers/ArchiveViewer.vue +186 -186
- package/src/viewers/CsvViewer.vue +319 -319
- package/src/viewers/DrawioViewer.vue +243 -243
- package/src/viewers/EpubViewer.vue +307 -307
- package/src/viewers/IpynbViewer.vue +365 -365
- package/src/viewers/MermaidViewer.vue +259 -259
- package/src/viewers/PdfViewer.vue +562 -562
- package/src/viewers/PsdViewer.vue +264 -264
- package/src/viewers/TiffViewer.vue +273 -273
- package/src/viewers/Viewer3D.vue +120 -120
- package/dist/ArchiveViewer-CJdaw5x3.js.map +0 -1
- package/dist/CsvViewer-QYx_tePQ.js.map +0 -1
- package/dist/DrawioViewer-GWt0TyB7.js.map +0 -1
- package/dist/EpubViewer-Je0ywklQ.js.map +0 -1
- package/dist/IpynbViewer-TsB4gqP-.js.map +0 -1
- package/dist/MermaidViewer-CXfeDS-7.js.map +0 -1
- package/dist/PsdViewer-VtPpxKVe.js.map +0 -1
- package/dist/TiffViewer-OINn9bbb.js.map +0 -1
- package/dist/Viewer3D-xvvyiWHd.js.map +0 -1
- package/dist/index-CmSYzt6L.js.map +0 -1
|
@@ -78,7 +78,7 @@ function Ya(s) {
|
|
|
78
78
|
function o() {
|
|
79
79
|
return e.kind === "csrf" ? "include" : "same-origin";
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function _(P) {
|
|
82
82
|
const z = (s.locale ?? "tr") !== "en", X = {
|
|
83
83
|
400: ["Geçersiz istek", "Bad request"],
|
|
84
84
|
401: ["Oturum gerekli, tekrar giriş yapın", "Sign-in required"],
|
|
@@ -105,7 +105,7 @@ function Ya(s) {
|
|
|
105
105
|
credentials: o()
|
|
106
106
|
});
|
|
107
107
|
if (!X.ok) {
|
|
108
|
-
const re = await X.text().catch(() => ""), de = new Error(
|
|
108
|
+
const re = await X.text().catch(() => ""), de = new Error(_(X.status));
|
|
109
109
|
throw de.status = X.status, de.detail = re.slice(0, 300), de;
|
|
110
110
|
}
|
|
111
111
|
return X.json();
|
|
@@ -170,7 +170,7 @@ function Ya(s) {
|
|
|
170
170
|
body: JSON.stringify({ path: P, item: z, name: V })
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
async function
|
|
173
|
+
async function w(P, z, V) {
|
|
174
174
|
return f(A("move"), {
|
|
175
175
|
method: "POST",
|
|
176
176
|
headers: { "Content-Type": "application/json" },
|
|
@@ -368,7 +368,7 @@ function Ya(s) {
|
|
|
368
368
|
subfolders: v,
|
|
369
369
|
newFolder: d,
|
|
370
370
|
rename: S,
|
|
371
|
-
move:
|
|
371
|
+
move: w,
|
|
372
372
|
copy: j,
|
|
373
373
|
moveAsync: G,
|
|
374
374
|
deleteAsync: ie,
|
|
@@ -411,7 +411,7 @@ function Wa(s, c) {
|
|
|
411
411
|
const e = s.chunkSize ?? 5242880, u = Math.max(1, Math.min(8, s.parallelChunks ?? 4));
|
|
412
412
|
async function l(o) {
|
|
413
413
|
var N, M;
|
|
414
|
-
const
|
|
414
|
+
const _ = o.chunkSize ?? e, f = o.parallelChunks ?? u, y = {
|
|
415
415
|
id: crypto.randomUUID(),
|
|
416
416
|
file: o.file,
|
|
417
417
|
path: o.path,
|
|
@@ -449,10 +449,10 @@ function Wa(s, c) {
|
|
|
449
449
|
}
|
|
450
450
|
);
|
|
451
451
|
y.uploadId = C.uploadId, y.status = "uploading", O();
|
|
452
|
-
const g = C.chunkBytes ??
|
|
452
|
+
const g = C.chunkBytes ?? _, L = /* @__PURE__ */ new Map(), R = [];
|
|
453
453
|
let A = 0;
|
|
454
454
|
async function J(K) {
|
|
455
|
-
const G = (K.partNumber - 1) * (C.chunkBytes ??
|
|
455
|
+
const G = (K.partNumber - 1) * (C.chunkBytes ?? _), ie = Math.min(G + (C.chunkBytes ?? _), o.file.size), ae = o.file.slice(G, ie), Z = new AbortController();
|
|
456
456
|
U.push(Z), await new Promise((fe, ce) => {
|
|
457
457
|
const ne = new XMLHttpRequest();
|
|
458
458
|
ne.open("PUT", K.presignedUrl), ne.upload.onprogress = (_e) => {
|
|
@@ -503,12 +503,12 @@ function Wa(s, c) {
|
|
|
503
503
|
throw new DOMException("Aborted by user", "AbortError");
|
|
504
504
|
if (!c.endpoints.uploadFinalize) throw new Error("uploadFinalize not configured");
|
|
505
505
|
y.status = "finalizing", R.sort((K, j) => K.partNumber - j.partNumber);
|
|
506
|
-
const
|
|
506
|
+
const w = await c.jsonFetch(c.endpoints.uploadFinalize, {
|
|
507
507
|
method: "POST",
|
|
508
508
|
headers: { "Content-Type": "application/json" },
|
|
509
509
|
body: JSON.stringify({ uploadId: C.uploadId, parts: R })
|
|
510
510
|
});
|
|
511
|
-
return y.status = "done", y.uploadedBytes = y.totalBytes, y.percent = 100, O(), (N = o.onDone) == null || N.call(o, y,
|
|
511
|
+
return y.status = "done", y.uploadedBytes = y.totalBytes, y.percent = 100, O(), (N = o.onDone) == null || N.call(o, y, w), w;
|
|
512
512
|
} catch (C) {
|
|
513
513
|
const g = C instanceof Error ? C : new Error(String(C));
|
|
514
514
|
if (y.status = g.name === "AbortError" ? "aborted" : "error", y.error = g.message, O(), y.uploadId && c.endpoints.uploadAbort && y.status === "aborted")
|
|
@@ -552,7 +552,7 @@ function Ga(s) {
|
|
|
552
552
|
function o() {
|
|
553
553
|
c.value = new Set(s().map((N) => N.path));
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function _(N) {
|
|
556
556
|
return c.value.has(N);
|
|
557
557
|
}
|
|
558
558
|
function f(N) {
|
|
@@ -564,7 +564,7 @@ function Ga(s) {
|
|
|
564
564
|
M.delete(N), c.value = M;
|
|
565
565
|
}
|
|
566
566
|
const $ = Q(() => c.value.size), U = Q(() => c.value.size === 0), O = Q(() => s().filter((M) => c.value.has(M.path)));
|
|
567
|
-
return { selected: c, anchor: e, click: u, clear: l, selectAll: o, has:
|
|
567
|
+
return { selected: c, anchor: e, click: u, clear: l, selectAll: o, has: _, add: f, remove: y, size: $, isEmpty: U, nodes: O };
|
|
568
568
|
}
|
|
569
569
|
function Ja(s, c) {
|
|
570
570
|
function e(u) {
|
|
@@ -573,7 +573,7 @@ function Ja(s, c) {
|
|
|
573
573
|
const o = u.target;
|
|
574
574
|
if (o && (o.tagName === "INPUT" || o.tagName === "TEXTAREA" || o.isContentEditable) && u.key !== "Escape")
|
|
575
575
|
return;
|
|
576
|
-
const
|
|
576
|
+
const _ = u.ctrlKey || u.metaKey;
|
|
577
577
|
switch (u.key) {
|
|
578
578
|
case "Delete":
|
|
579
579
|
c.onDelete && (u.preventDefault(), c.onDelete());
|
|
@@ -591,31 +591,31 @@ function Ja(s, c) {
|
|
|
591
591
|
c.onClose && c.onClose();
|
|
592
592
|
break;
|
|
593
593
|
case "/":
|
|
594
|
-
c.onFocusSearch && !
|
|
594
|
+
c.onFocusSearch && !_ && (u.preventDefault(), c.onFocusSearch());
|
|
595
595
|
break;
|
|
596
596
|
case "a":
|
|
597
597
|
case "A":
|
|
598
|
-
|
|
598
|
+
_ && c.onSelectAll && (u.preventDefault(), c.onSelectAll());
|
|
599
599
|
break;
|
|
600
600
|
case "x":
|
|
601
601
|
case "X":
|
|
602
|
-
|
|
602
|
+
_ && c.onCut && (u.preventDefault(), c.onCut());
|
|
603
603
|
break;
|
|
604
604
|
case "c":
|
|
605
605
|
case "C":
|
|
606
|
-
|
|
606
|
+
_ && c.onCopy && (u.preventDefault(), c.onCopy());
|
|
607
607
|
break;
|
|
608
608
|
case "v":
|
|
609
609
|
case "V":
|
|
610
|
-
|
|
610
|
+
_ && c.onPaste && (u.preventDefault(), c.onPaste());
|
|
611
611
|
break;
|
|
612
612
|
case "d":
|
|
613
613
|
case "D":
|
|
614
|
-
|
|
614
|
+
_ && c.onDuplicate && (u.preventDefault(), c.onDuplicate());
|
|
615
615
|
break;
|
|
616
616
|
case "k":
|
|
617
617
|
case "K":
|
|
618
|
-
|
|
618
|
+
_ && c.onPathJump && (u.preventDefault(), c.onPathJump());
|
|
619
619
|
break;
|
|
620
620
|
case "ArrowUp":
|
|
621
621
|
u.altKey && c.onGoUp && (u.preventDefault(), c.onGoUp());
|
|
@@ -844,23 +844,23 @@ function ze(s) {
|
|
|
844
844
|
const o = typeof s == "function" ? s() : s.value;
|
|
845
845
|
return Yt[o] ?? Yt.tr;
|
|
846
846
|
});
|
|
847
|
-
function e(o,
|
|
847
|
+
function e(o, _ = {}) {
|
|
848
848
|
const f = c.value[o] ?? o;
|
|
849
|
-
return Object.entries(
|
|
849
|
+
return Object.entries(_).reduce(
|
|
850
850
|
(y, [$, U]) => y.replaceAll(`{${$}}`, String(U)),
|
|
851
851
|
f
|
|
852
852
|
);
|
|
853
853
|
}
|
|
854
854
|
function u(o) {
|
|
855
855
|
if (o == null || o <= 0) return "—";
|
|
856
|
-
const
|
|
856
|
+
const _ = [
|
|
857
857
|
[1024 ** 4, "unit.tb"],
|
|
858
858
|
[1024 ** 3, "unit.gb"],
|
|
859
859
|
[1024 ** 2, "unit.mb"],
|
|
860
860
|
[1024, "unit.kb"],
|
|
861
861
|
[1, "unit.bytes"]
|
|
862
862
|
];
|
|
863
|
-
for (const [f, y] of
|
|
863
|
+
for (const [f, y] of _)
|
|
864
864
|
if (o >= f) {
|
|
865
865
|
const $ = o / f;
|
|
866
866
|
return `${$ >= 100 ? Math.round($) : $.toFixed($ >= 10 ? 1 : 2)} ${e(y)}`;
|
|
@@ -869,8 +869,8 @@ function ze(s) {
|
|
|
869
869
|
}
|
|
870
870
|
function l(o) {
|
|
871
871
|
if (o.basename === ".trash") return e("node.trash");
|
|
872
|
-
const
|
|
873
|
-
return
|
|
872
|
+
const _ = o.basename.match(/^\d{8}-\d{6}-[A-Za-z0-9]+__(.+)$/);
|
|
873
|
+
return _ ? _[1] : o.basename;
|
|
874
874
|
}
|
|
875
875
|
return { t: e, formatSize: u, nodeDisplayName: l };
|
|
876
876
|
}
|
|
@@ -882,10 +882,10 @@ function Wt(s) {
|
|
|
882
882
|
}, e = (...f) => {
|
|
883
883
|
for (const y of f) if (typeof y == "string" && y !== "") return y;
|
|
884
884
|
return null;
|
|
885
|
-
}, u = String(s.status ?? "pending"), l = u === "ok" || u === "done" ? "done" : u === "failed" || u === "partial" || u === "error" ? "error" : u === "running" ? "running" : "pending", o = Array.isArray(s.sources) ? s.sources : [],
|
|
885
|
+
}, u = String(s.status ?? "pending"), l = u === "ok" || u === "done" ? "done" : u === "failed" || u === "partial" || u === "error" ? "error" : u === "running" ? "running" : "pending", o = Array.isArray(s.sources) ? s.sources : [], _ = e(s.op_type, s.kind) ?? "delete";
|
|
886
886
|
return {
|
|
887
887
|
id: c(s.id),
|
|
888
|
-
op_type:
|
|
888
|
+
op_type: _ === "copy" || _ === "move" ? _ : "delete",
|
|
889
889
|
status: l,
|
|
890
890
|
progress_total: c(s.progress_total, s.total, o.length),
|
|
891
891
|
progress_done: c(s.progress_done, s.done),
|
|
@@ -900,7 +900,7 @@ function Wt(s) {
|
|
|
900
900
|
}
|
|
901
901
|
function en(s, c, e = {}) {
|
|
902
902
|
const u = h([]), l = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
903
|
-
let
|
|
903
|
+
let _ = !1;
|
|
904
904
|
const f = Q(
|
|
905
905
|
() => u.value.some((C) => C.status === "pending" || C.status === "running")
|
|
906
906
|
);
|
|
@@ -918,13 +918,13 @@ function en(s, c, e = {}) {
|
|
|
918
918
|
if (c.endpoints.opsList)
|
|
919
919
|
try {
|
|
920
920
|
const L = ((await c.jsonFetch(c.endpoints.opsList)).ops || []).map(Wt);
|
|
921
|
-
for (const
|
|
922
|
-
(
|
|
923
|
-
const R = new Set(u.value.map((
|
|
924
|
-
|
|
925
|
-
const d = Date.now(), S = v.filter((
|
|
926
|
-
if (
|
|
927
|
-
const K = o.get(
|
|
921
|
+
for (const w of L)
|
|
922
|
+
(w.status === "done" || w.status === "error") && !l.has(w.id) && (l.add(w.id), o.set(w.id, Date.now()), _ && ((C = e.onSettled) == null || C.call(e, w)));
|
|
923
|
+
const R = new Set(u.value.map((w) => w.id)), A = L.filter((w) => w.status === "pending" || w.status === "running" ? !0 : _ ? R.has(w.id) : !1), J = new Set(A.map((w) => w.id)), b = u.value.filter((w) => !J.has(w.id)), v = [...A, ...b];
|
|
924
|
+
_ = !0;
|
|
925
|
+
const d = Date.now(), S = v.filter((w) => {
|
|
926
|
+
if (w.status === "pending" || w.status === "running") return !0;
|
|
927
|
+
const K = o.get(w.id);
|
|
928
928
|
return K !== void 0 && d - K < Za;
|
|
929
929
|
});
|
|
930
930
|
u.value = S, !f.value && S.length === 0 && U();
|
|
@@ -1002,7 +1002,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1002
1002
|
},
|
|
1003
1003
|
emits: ["update:viewMode", "update:searchQuery", "new-folder", "upload", "refresh", "go-up", "action", "open-recents"],
|
|
1004
1004
|
setup(s, { expose: c, emit: e }) {
|
|
1005
|
-
const u = s, l = e, { t: o } = ze(() => u.locale),
|
|
1005
|
+
const u = s, l = e, { t: o } = ze(() => u.locale), _ = h(null), f = h(u.searchQuery);
|
|
1006
1006
|
Ke(() => u.searchQuery, (C) => {
|
|
1007
1007
|
f.value = C;
|
|
1008
1008
|
});
|
|
@@ -1013,7 +1013,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1013
1013
|
}
|
|
1014
1014
|
function U() {
|
|
1015
1015
|
var C, g;
|
|
1016
|
-
(C =
|
|
1016
|
+
(C = _.value) == null || C.focus(), (g = _.value) == null || g.select();
|
|
1017
1017
|
}
|
|
1018
1018
|
c({ focusSearch: U });
|
|
1019
1019
|
const O = Q(() => u.selectionMode ?? "none"), N = Q(() => u.actions.filter((C) => !C.divider && !C.hidden));
|
|
@@ -1069,7 +1069,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1069
1069
|
n("div", vn, [
|
|
1070
1070
|
n("input", {
|
|
1071
1071
|
ref_key: "searchEl",
|
|
1072
|
-
ref:
|
|
1072
|
+
ref: _,
|
|
1073
1073
|
type: "search",
|
|
1074
1074
|
class: "fe-search__input",
|
|
1075
1075
|
placeholder: F(o)("toolbar.search.placeholder"),
|
|
@@ -1130,7 +1130,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1130
1130
|
},
|
|
1131
1131
|
emits: ["change", "error"],
|
|
1132
1132
|
setup(s, { emit: c }) {
|
|
1133
|
-
const e = s, u = c, l = h([]), o = h(!1),
|
|
1133
|
+
const e = s, u = c, l = h([]), o = h(!1), _ = h(!1), f = h(""), y = Q(() => e.palette ?? [
|
|
1134
1134
|
"#ef4444",
|
|
1135
1135
|
"#f59e0b",
|
|
1136
1136
|
"#10b981",
|
|
@@ -1185,10 +1185,10 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1185
1185
|
function M() {
|
|
1186
1186
|
const g = f.value.trim();
|
|
1187
1187
|
if (!g || l.value.includes(g)) {
|
|
1188
|
-
f.value = "",
|
|
1188
|
+
f.value = "", _.value = !1;
|
|
1189
1189
|
return;
|
|
1190
1190
|
}
|
|
1191
|
-
N([...l.value, g]), f.value = "",
|
|
1191
|
+
N([...l.value, g]), f.value = "", _.value = !1;
|
|
1192
1192
|
}
|
|
1193
1193
|
function C(g) {
|
|
1194
1194
|
N(l.value.filter((L) => L !== g));
|
|
@@ -1209,7 +1209,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1209
1209
|
"aria-label": "Remove tag"
|
|
1210
1210
|
}, "×", 8, kn)
|
|
1211
1211
|
], 4))), 128)),
|
|
1212
|
-
|
|
1212
|
+
_.value ? (r(), p("form", {
|
|
1213
1213
|
key: 0,
|
|
1214
1214
|
class: "filex-tag-add",
|
|
1215
1215
|
onSubmit: be(M, ["prevent"])
|
|
@@ -1220,7 +1220,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1220
1220
|
placeholder: "tag name",
|
|
1221
1221
|
onBlur: M,
|
|
1222
1222
|
onKeydown: L[1] || (L[1] = qe((R) => {
|
|
1223
|
-
|
|
1223
|
+
_.value = !1, f.value = "";
|
|
1224
1224
|
}, ["escape"]))
|
|
1225
1225
|
}, null, 544), [
|
|
1226
1226
|
[Be, f.value]
|
|
@@ -1229,7 +1229,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1229
1229
|
key: 1,
|
|
1230
1230
|
class: "filex-tag-add-btn",
|
|
1231
1231
|
type: "button",
|
|
1232
|
-
onClick: L[2] || (L[2] = (R) =>
|
|
1232
|
+
onClick: L[2] || (L[2] = (R) => _.value = !0)
|
|
1233
1233
|
}, "+ Add tag"))
|
|
1234
1234
|
], 2));
|
|
1235
1235
|
}
|
|
@@ -1238,7 +1238,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1238
1238
|
for (const [u, l] of c)
|
|
1239
1239
|
e[u] = l;
|
|
1240
1240
|
return e;
|
|
1241
|
-
}, $n = /* @__PURE__ */ ft(xn, [["__scopeId", "data-v-
|
|
1241
|
+
}, $n = /* @__PURE__ */ ft(xn, [["__scopeId", "data-v-7040583c"]]), Cn = { class: "filex-recent" }, Sn = ["disabled"], Tn = { key: 0 }, En = ["onClick"], Pn = { class: "filex-recent-name" }, Dn = { class: "filex-recent-meta" }, An = {
|
|
1242
1242
|
key: 1,
|
|
1243
1243
|
class: "filex-recent-empty"
|
|
1244
1244
|
}, On = {
|
|
@@ -1255,7 +1255,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1255
1255
|
emits: ["open", "error"],
|
|
1256
1256
|
setup(s, { emit: c }) {
|
|
1257
1257
|
const e = s, u = c, l = h([]), o = h(!1);
|
|
1258
|
-
async function
|
|
1258
|
+
async function _() {
|
|
1259
1259
|
o.value = !0;
|
|
1260
1260
|
try {
|
|
1261
1261
|
const y = await (e.authHeaders ?? (() => ({})))(), $ = e.apiBase ?? "", U = e.limit ?? 20, O = await fetch(`${$}/api/files/manager/recent?limit=${U}`, {
|
|
@@ -1279,13 +1279,13 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1279
1279
|
const U = Date.now() - $;
|
|
1280
1280
|
return U < 6e4 ? "just now" : U < 36e5 ? `${Math.floor(U / 6e4)}m ago` : U < 864e5 ? `${Math.floor(U / 36e5)}h ago` : `${Math.floor(U / 864e5)}d ago`;
|
|
1281
1281
|
}
|
|
1282
|
-
return Qe(
|
|
1282
|
+
return Qe(_), Ke(() => e.refreshKey, _), (y, $) => (r(), p("div", Cn, [
|
|
1283
1283
|
n("header", null, [
|
|
1284
1284
|
$[0] || ($[0] = n("h3", null, "Recently opened", -1)),
|
|
1285
1285
|
n("button", {
|
|
1286
1286
|
class: "filex-recent-refresh",
|
|
1287
1287
|
type: "button",
|
|
1288
|
-
onClick:
|
|
1288
|
+
onClick: _,
|
|
1289
1289
|
disabled: o.value
|
|
1290
1290
|
}, " ↻ ", 8, Sn)
|
|
1291
1291
|
]),
|
|
@@ -1305,7 +1305,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1305
1305
|
])) : o.value ? (r(), p("p", On, "Loading…")) : (r(), p("p", An, "Nothing here yet."))
|
|
1306
1306
|
]));
|
|
1307
1307
|
}
|
|
1308
|
-
}), Bn = /* @__PURE__ */ ft(Mn, [["__scopeId", "data-v-
|
|
1308
|
+
}), Bn = /* @__PURE__ */ ft(Mn, [["__scopeId", "data-v-559f2c71"]]), In = {
|
|
1309
1309
|
class: "fe-breadcrumb",
|
|
1310
1310
|
"aria-label": "Breadcrumb"
|
|
1311
1311
|
}, Ln = ["aria-current", "onClick", "onContextmenu", "onDrop"], zn = {
|
|
@@ -1333,10 +1333,10 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1333
1333
|
if (!A) return e.rootLabel || e.adapter;
|
|
1334
1334
|
const J = A.split("/");
|
|
1335
1335
|
return J[J.length - 1] || e.rootLabel || e.adapter;
|
|
1336
|
-
}), { t: o } = ze(() => e.locale),
|
|
1336
|
+
}), { t: o } = ze(() => e.locale), _ = c, f = Q(() => {
|
|
1337
1337
|
const A = `${e.adapter}://`, J = e.dirname.startsWith(A) ? e.dirname.slice(A.length) : e.dirname, b = J.split("/").filter(Boolean), v = [];
|
|
1338
1338
|
if (e.rootPath) {
|
|
1339
|
-
const S = u.value,
|
|
1339
|
+
const S = u.value, w = J.replace(/^\/+|\/+$/g, ""), K = S && (w === S || w.startsWith(S + "/")) ? w.slice(S.length).replace(/^\/+/, "") : "";
|
|
1340
1340
|
v.push({ label: l.value, adapterPath: e.rootPath });
|
|
1341
1341
|
let j = S;
|
|
1342
1342
|
for (const G of K.split("/").filter(Boolean))
|
|
@@ -1350,16 +1350,16 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1350
1350
|
let d = "";
|
|
1351
1351
|
for (const S of b) {
|
|
1352
1352
|
d = d ? `${d}/${S}` : S;
|
|
1353
|
-
const
|
|
1354
|
-
v.push({ label:
|
|
1353
|
+
const w = S === ".trash" ? o("node.trash") : S;
|
|
1354
|
+
v.push({ label: w, adapterPath: `${A}${d}` });
|
|
1355
1355
|
}
|
|
1356
1356
|
return v;
|
|
1357
1357
|
});
|
|
1358
1358
|
function y(A) {
|
|
1359
|
-
|
|
1359
|
+
_("navigate", A.adapterPath);
|
|
1360
1360
|
}
|
|
1361
1361
|
function $(A, J) {
|
|
1362
|
-
A.preventDefault(), A.stopPropagation(),
|
|
1362
|
+
A.preventDefault(), A.stopPropagation(), _("crumb-context", {
|
|
1363
1363
|
x: A.clientX,
|
|
1364
1364
|
y: A.clientY,
|
|
1365
1365
|
adapterPath: J.adapterPath,
|
|
@@ -1372,7 +1372,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1372
1372
|
}
|
|
1373
1373
|
function O(A, J) {
|
|
1374
1374
|
var b;
|
|
1375
|
-
(b = A.dataTransfer) != null && b.types.includes("application/x-brf-files") && (A.preventDefault(), A.stopPropagation(),
|
|
1375
|
+
(b = A.dataTransfer) != null && b.types.includes("application/x-brf-files") && (A.preventDefault(), A.stopPropagation(), _("crumb-drop", J.adapterPath, A));
|
|
1376
1376
|
}
|
|
1377
1377
|
const N = h(!1), M = h(""), C = h(null);
|
|
1378
1378
|
function g() {
|
|
@@ -1380,8 +1380,8 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1380
1380
|
if (e.rootPath) {
|
|
1381
1381
|
const b = u.value, v = J.replace(/^\/+|\/+$/g, ""), d = b && (v === b || v.startsWith(b + "/")) ? v.slice(b.length).replace(/^\/+/, "") : "";
|
|
1382
1382
|
M.value = d ? `/${d}` : "/", N.value = !0, ut(() => {
|
|
1383
|
-
var S,
|
|
1384
|
-
(S = C.value) == null || S.focus(), (
|
|
1383
|
+
var S, w;
|
|
1384
|
+
(S = C.value) == null || S.focus(), (w = C.value) == null || w.select();
|
|
1385
1385
|
});
|
|
1386
1386
|
return;
|
|
1387
1387
|
}
|
|
@@ -1403,21 +1403,21 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1403
1403
|
const A = M.value.trim();
|
|
1404
1404
|
if (N.value = !1, e.rootPath) {
|
|
1405
1405
|
const b = A.replace(/^\/+|\/+$/g, ""), v = u.value, d = b ? v ? `${v}/${b}` : b : v;
|
|
1406
|
-
|
|
1406
|
+
_("navigate", d ? `${e.adapter}://${d}` : `${e.adapter}://`);
|
|
1407
1407
|
return;
|
|
1408
1408
|
}
|
|
1409
1409
|
if (e.multiStorageRoot) {
|
|
1410
1410
|
const b = A.replace(/^\/+|\/+$/g, "");
|
|
1411
1411
|
if (!b) {
|
|
1412
|
-
|
|
1412
|
+
_("navigate", "");
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
1415
|
const v = b.indexOf("/"), d = v === -1 ? b : b.slice(0, v), S = v === -1 ? "" : b.slice(v + 1);
|
|
1416
|
-
|
|
1416
|
+
_("navigate", S ? `${d}://${S}` : `${d}://`);
|
|
1417
1417
|
return;
|
|
1418
1418
|
}
|
|
1419
1419
|
const J = A.replace(/^\/+|\/+$/g, "");
|
|
1420
|
-
J &&
|
|
1420
|
+
J && _("navigate", `${e.adapter}://${J}`);
|
|
1421
1421
|
}
|
|
1422
1422
|
function R() {
|
|
1423
1423
|
N.value = !1;
|
|
@@ -1484,12 +1484,12 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1484
1484
|
emits: ["change", "error"],
|
|
1485
1485
|
setup(s, { emit: c }) {
|
|
1486
1486
|
const e = s, u = c, l = h(e.starred);
|
|
1487
|
-
Ke(() => e.starred, (
|
|
1488
|
-
l.value =
|
|
1487
|
+
Ke(() => e.starred, (_) => {
|
|
1488
|
+
l.value = _;
|
|
1489
1489
|
});
|
|
1490
1490
|
async function o() {
|
|
1491
|
-
const
|
|
1492
|
-
l.value =
|
|
1491
|
+
const _ = !l.value;
|
|
1492
|
+
l.value = _;
|
|
1493
1493
|
try {
|
|
1494
1494
|
const f = {
|
|
1495
1495
|
"Content-Type": "application/json",
|
|
@@ -1498,15 +1498,15 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1498
1498
|
method: "POST",
|
|
1499
1499
|
headers: f,
|
|
1500
1500
|
credentials: "include",
|
|
1501
|
-
body: JSON.stringify({ node_id: e.nodeId, starred:
|
|
1501
|
+
body: JSON.stringify({ node_id: e.nodeId, starred: _ })
|
|
1502
1502
|
});
|
|
1503
1503
|
if (!$.ok) throw new Error(`star toggle failed: ${$.status}`);
|
|
1504
|
-
u("change",
|
|
1504
|
+
u("change", _);
|
|
1505
1505
|
} catch (f) {
|
|
1506
|
-
l.value = !
|
|
1506
|
+
l.value = !_, u("error", f instanceof Error ? f.message : String(f));
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
return (
|
|
1509
|
+
return (_, f) => (r(), p("button", {
|
|
1510
1510
|
type: "button",
|
|
1511
1511
|
class: pe(["filex-star-btn", { "is-starred": l.value, "is-compact": s.compact }]),
|
|
1512
1512
|
"aria-pressed": l.value,
|
|
@@ -1525,7 +1525,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1525
1525
|
s.compact ? W("", !0) : (r(), p("span", Hn, i(l.value ? "Starred" : "Star"), 1))
|
|
1526
1526
|
], 10, Fn));
|
|
1527
1527
|
}
|
|
1528
|
-
}), Yn = /* @__PURE__ */ ft(Vn, [["__scopeId", "data-v-
|
|
1528
|
+
}), Yn = /* @__PURE__ */ ft(Vn, [["__scopeId", "data-v-12a2f9c5"]]), Wn = {
|
|
1529
1529
|
class: "fe-list__head",
|
|
1530
1530
|
role: "row"
|
|
1531
1531
|
}, Gn = {
|
|
@@ -1561,7 +1561,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1561
1561
|
},
|
|
1562
1562
|
emits: ["click-row", "dbl-row", "context-row", "item-drag-start", "item-drop-into", "star-change"],
|
|
1563
1563
|
setup(s, { emit: c }) {
|
|
1564
|
-
const e = s, u = c, { t: l, formatSize: o, nodeDisplayName:
|
|
1564
|
+
const e = s, u = c, { t: l, formatSize: o, nodeDisplayName: _ } = ze(() => e.locale);
|
|
1565
1565
|
function f(d) {
|
|
1566
1566
|
return e.selected.has(d.path);
|
|
1567
1567
|
}
|
|
@@ -1578,21 +1578,21 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1578
1578
|
u("item-drag-start", d, S);
|
|
1579
1579
|
}
|
|
1580
1580
|
function N(d, S) {
|
|
1581
|
-
var
|
|
1582
|
-
d.type === "dir" && (
|
|
1581
|
+
var w;
|
|
1582
|
+
d.type === "dir" && (w = S.dataTransfer) != null && w.types.includes("application/x-brf-files") && (S.preventDefault(), S.stopPropagation(), S.dataTransfer && (S.dataTransfer.dropEffect = "move"));
|
|
1583
1583
|
}
|
|
1584
1584
|
function M(d, S) {
|
|
1585
|
-
var
|
|
1586
|
-
d.type === "dir" && (
|
|
1585
|
+
var w;
|
|
1586
|
+
d.type === "dir" && (w = S.dataTransfer) != null && w.types.includes("application/x-brf-files") && (S.preventDefault(), S.stopPropagation(), u("item-drop-into", d, S));
|
|
1587
1587
|
}
|
|
1588
1588
|
let C, g = null;
|
|
1589
1589
|
function L(d, S) {
|
|
1590
1590
|
g = d, C && clearTimeout(C), C = setTimeout(() => {
|
|
1591
1591
|
if (g) {
|
|
1592
|
-
const
|
|
1592
|
+
const w = S.touches[0];
|
|
1593
1593
|
u("context-row", g, {
|
|
1594
|
-
clientX:
|
|
1595
|
-
clientY:
|
|
1594
|
+
clientX: w.clientX,
|
|
1595
|
+
clientY: w.clientY,
|
|
1596
1596
|
preventDefault: () => {
|
|
1597
1597
|
}
|
|
1598
1598
|
});
|
|
@@ -1612,8 +1612,8 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1612
1612
|
return d ? new Date(d * (d < 1e12 ? 1e3 : 1)).toLocaleString() : "—";
|
|
1613
1613
|
}
|
|
1614
1614
|
function b(d) {
|
|
1615
|
-
const S = d.replace(/^[a-z][a-z0-9+.-]*:\/\//i, ""),
|
|
1616
|
-
return
|
|
1615
|
+
const S = d.replace(/^[a-z][a-z0-9+.-]*:\/\//i, ""), w = S.lastIndexOf("/");
|
|
1616
|
+
return w === -1 ? "" : S.slice(0, w);
|
|
1617
1617
|
}
|
|
1618
1618
|
const v = Q(() => e.files);
|
|
1619
1619
|
return (d, S) => (r(), p("div", {
|
|
@@ -1630,26 +1630,26 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1630
1630
|
n("div", qn, i(F(l)("col.modified")), 1)
|
|
1631
1631
|
]),
|
|
1632
1632
|
n("div", Xn, [
|
|
1633
|
-
(r(!0), p(le, null, Ce(v.value, (
|
|
1633
|
+
(r(!0), p(le, null, Ce(v.value, (w) => {
|
|
1634
1634
|
var K, j;
|
|
1635
1635
|
return r(), p("div", {
|
|
1636
|
-
key:
|
|
1636
|
+
key: w.path,
|
|
1637
1637
|
class: pe(["fe-list__row", {
|
|
1638
|
-
"is-selected": f(
|
|
1639
|
-
"is-dir":
|
|
1640
|
-
"is-trash":
|
|
1641
|
-
"is-clipped": (K = s.clipped) == null ? void 0 : K.has(
|
|
1638
|
+
"is-selected": f(w),
|
|
1639
|
+
"is-dir": w.type === "dir",
|
|
1640
|
+
"is-trash": w.trashed,
|
|
1641
|
+
"is-clipped": (K = s.clipped) == null ? void 0 : K.has(w.path)
|
|
1642
1642
|
}]),
|
|
1643
1643
|
role: "row",
|
|
1644
1644
|
tabindex: "0",
|
|
1645
1645
|
draggable: "true",
|
|
1646
|
-
onClick: (G) => y(
|
|
1647
|
-
onDblclick: (G) => $(
|
|
1648
|
-
onContextmenu: (G) => U(
|
|
1649
|
-
onDragstart: (G) => O(
|
|
1650
|
-
onDragover: (G) => N(
|
|
1651
|
-
onDrop: (G) => M(
|
|
1652
|
-
onTouchstartPassive: (G) => L(
|
|
1646
|
+
onClick: (G) => y(w, G),
|
|
1647
|
+
onDblclick: (G) => $(w),
|
|
1648
|
+
onContextmenu: (G) => U(w, G),
|
|
1649
|
+
onDragstart: (G) => O(w, G),
|
|
1650
|
+
onDragover: (G) => N(w, G),
|
|
1651
|
+
onDrop: (G) => M(w, G),
|
|
1652
|
+
onTouchstartPassive: (G) => L(w, G),
|
|
1653
1653
|
onTouchend: R,
|
|
1654
1654
|
onTouchmove: R
|
|
1655
1655
|
}, [
|
|
@@ -1658,32 +1658,32 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1658
1658
|
onClick: S[0] || (S[0] = be(() => {
|
|
1659
1659
|
}, ["stop"]))
|
|
1660
1660
|
}, [
|
|
1661
|
-
typeof
|
|
1661
|
+
typeof w.id == "number" && w.type === "file" ? (r(), Ae(Yn, {
|
|
1662
1662
|
key: 0,
|
|
1663
|
-
starred: !!((j = s.starredIds) != null && j.has(
|
|
1664
|
-
"node-id":
|
|
1663
|
+
starred: !!((j = s.starredIds) != null && j.has(w.id)),
|
|
1664
|
+
"node-id": w.id,
|
|
1665
1665
|
"api-base": s.apiBase,
|
|
1666
1666
|
"auth-headers": s.authHeaders,
|
|
1667
1667
|
compact: "",
|
|
1668
|
-
onChange: (G) => u("star-change",
|
|
1668
|
+
onChange: (G) => u("star-change", w, G)
|
|
1669
1669
|
}, null, 8, ["starred", "node-id", "api-base", "auth-headers", "onChange"])) : W("", !0)
|
|
1670
1670
|
]),
|
|
1671
1671
|
n("div", Zn, [
|
|
1672
|
-
n("span", eo, i(A(
|
|
1672
|
+
n("span", eo, i(A(w)), 1),
|
|
1673
1673
|
n("div", to, [
|
|
1674
1674
|
n("span", {
|
|
1675
1675
|
class: "fe-list__name",
|
|
1676
|
-
title:
|
|
1677
|
-
}, i(F(
|
|
1676
|
+
title: w.basename
|
|
1677
|
+
}, i(F(_)(w)), 9, ao),
|
|
1678
1678
|
s.showParentPath ? (r(), p("span", {
|
|
1679
1679
|
key: 0,
|
|
1680
1680
|
class: "fe-list__parent",
|
|
1681
|
-
title: b(
|
|
1682
|
-
}, i(b(
|
|
1681
|
+
title: b(w.path)
|
|
1682
|
+
}, i(b(w.path) || "—"), 9, no)) : W("", !0)
|
|
1683
1683
|
])
|
|
1684
1684
|
]),
|
|
1685
|
-
n("div", oo, i(
|
|
1686
|
-
n("div", so, i(J(
|
|
1685
|
+
n("div", oo, i(F(o)(w.size)), 1),
|
|
1686
|
+
n("div", so, i(J(w.last_modified)), 1)
|
|
1687
1687
|
], 42, Qn);
|
|
1688
1688
|
}), 128)),
|
|
1689
1689
|
!s.loading && v.value.length === 0 ? (r(), p("div", ro, i(F(l)("empty.folder")), 1)) : W("", !0)
|
|
@@ -1708,7 +1708,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1708
1708
|
},
|
|
1709
1709
|
emits: ["click-card", "dbl-card", "context-card", "item-drag-start", "item-drop-into"],
|
|
1710
1710
|
setup(s, { emit: c }) {
|
|
1711
|
-
const e = s, u = c, { t: l, formatSize: o, nodeDisplayName:
|
|
1711
|
+
const e = s, u = c, { t: l, formatSize: o, nodeDisplayName: _ } = ze(() => e.locale);
|
|
1712
1712
|
function f(b) {
|
|
1713
1713
|
return e.selected.has(b.path);
|
|
1714
1714
|
}
|
|
@@ -1774,13 +1774,13 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1774
1774
|
}]),
|
|
1775
1775
|
tabindex: "0",
|
|
1776
1776
|
draggable: "true",
|
|
1777
|
-
onClick: (
|
|
1778
|
-
onDblclick: (
|
|
1779
|
-
onContextmenu: (
|
|
1780
|
-
onDragstart: (
|
|
1781
|
-
onDragover: (
|
|
1782
|
-
onDrop: (
|
|
1783
|
-
onTouchstartPassive: (
|
|
1777
|
+
onClick: (w) => y(d, w),
|
|
1778
|
+
onDblclick: (w) => $(d),
|
|
1779
|
+
onContextmenu: (w) => U(d, w),
|
|
1780
|
+
onDragstart: (w) => O(d, w),
|
|
1781
|
+
onDragover: (w) => N(d, w),
|
|
1782
|
+
onDrop: (w) => M(d, w),
|
|
1783
|
+
onTouchstartPassive: (w) => L(d, w),
|
|
1784
1784
|
onTouchend: R,
|
|
1785
1785
|
onTouchmove: R
|
|
1786
1786
|
}, [
|
|
@@ -1796,13 +1796,13 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1796
1796
|
n("div", {
|
|
1797
1797
|
class: "fe-grid__label",
|
|
1798
1798
|
title: d.basename
|
|
1799
|
-
}, i(F(
|
|
1799
|
+
}, i(F(_)(d)), 9, fo),
|
|
1800
1800
|
s.showParentPath ? (r(), p("div", {
|
|
1801
1801
|
key: 0,
|
|
1802
1802
|
class: "fe-grid__parent",
|
|
1803
1803
|
title: A(d.path)
|
|
1804
1804
|
}, i(A(d.path) || "—"), 9, vo)) : W("", !0),
|
|
1805
|
-
n("div", mo, i(
|
|
1805
|
+
n("div", mo, i(F(o)(d.size)), 1)
|
|
1806
1806
|
], 42, io);
|
|
1807
1807
|
}), 128)),
|
|
1808
1808
|
!s.loading && s.files.length === 0 ? (r(), p("div", ho, i(F(l)("empty.folder")), 1)) : W("", !0)
|
|
@@ -1826,15 +1826,15 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1826
1826
|
setup(s, { expose: c, emit: e }) {
|
|
1827
1827
|
const u = s, l = e;
|
|
1828
1828
|
ze(() => u.locale);
|
|
1829
|
-
const o = h(!1),
|
|
1829
|
+
const o = h(!1), _ = h(0), f = h(0), y = h([]), $ = h(null);
|
|
1830
1830
|
async function U(b, v) {
|
|
1831
|
-
o.value = !0,
|
|
1831
|
+
o.value = !0, _.value = b.clientX, f.value = b.clientY, y.value = v, await ut(), O();
|
|
1832
1832
|
}
|
|
1833
1833
|
function O() {
|
|
1834
1834
|
const b = $.value;
|
|
1835
1835
|
if (!b || typeof window > "u") return;
|
|
1836
|
-
const v = b.getBoundingClientRect(), d = 8, S = window.innerWidth,
|
|
1837
|
-
f.value + v.height >
|
|
1836
|
+
const v = b.getBoundingClientRect(), d = 8, S = window.innerWidth, w = window.innerHeight;
|
|
1837
|
+
f.value + v.height > w - d && (f.value = Math.max(d, w - v.height - d)), _.value + v.width > S - d && (_.value = Math.max(d, S - v.width - d));
|
|
1838
1838
|
}
|
|
1839
1839
|
function N() {
|
|
1840
1840
|
o.value = !1;
|
|
@@ -1874,7 +1874,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1874
1874
|
ref: $,
|
|
1875
1875
|
class: "fe-ctx",
|
|
1876
1876
|
role: "menu",
|
|
1877
|
-
style: gt({ top: f.value + "px", left:
|
|
1877
|
+
style: gt({ top: f.value + "px", left: _.value + "px" }),
|
|
1878
1878
|
onClick: v[0] || (v[0] = be(() => {
|
|
1879
1879
|
}, ["stop"]))
|
|
1880
1880
|
}, [
|
|
@@ -1887,7 +1887,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1887
1887
|
class: pe(["fe-ctx__item", { "is-danger": d.danger, "is-disabled": d.disabled }]),
|
|
1888
1888
|
disabled: d.disabled,
|
|
1889
1889
|
role: "menuitem",
|
|
1890
|
-
onClick: (
|
|
1890
|
+
onClick: (w) => M(d)
|
|
1891
1891
|
}, [
|
|
1892
1892
|
d.icon ? (r(), p("span", go, i(d.icon), 1)) : W("", !0),
|
|
1893
1893
|
n("span", ko, i(d.label), 1)
|
|
@@ -1911,7 +1911,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1911
1911
|
},
|
|
1912
1912
|
emits: ["cancel", "dismiss"],
|
|
1913
1913
|
setup(s, { emit: c }) {
|
|
1914
|
-
const e = s, u = c, { t: l, formatSize: o } = ze(() => e.locale),
|
|
1914
|
+
const e = s, u = c, { t: l, formatSize: o } = ze(() => e.locale), _ = Q(() => e.jobs);
|
|
1915
1915
|
function f(y) {
|
|
1916
1916
|
switch (y.status) {
|
|
1917
1917
|
case "done":
|
|
@@ -1926,13 +1926,13 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1926
1926
|
}
|
|
1927
1927
|
return (y, $) => (r(), Ae(ct, { name: "fe-upload-slide" }, {
|
|
1928
1928
|
default: Ee(() => [
|
|
1929
|
-
|
|
1929
|
+
_.value.length > 0 ? (r(), p("div", $o, [
|
|
1930
1930
|
n("div", Co, [
|
|
1931
1931
|
n("strong", null, i(F(l)("upload.progress")), 1),
|
|
1932
|
-
n("span", So, i(
|
|
1932
|
+
n("span", So, i(_.value.length), 1)
|
|
1933
1933
|
]),
|
|
1934
1934
|
n("ul", To, [
|
|
1935
|
-
(r(!0), p(le, null, Ce(
|
|
1935
|
+
(r(!0), p(le, null, Ce(_.value, (U) => (r(), p("li", {
|
|
1936
1936
|
key: U.id,
|
|
1937
1937
|
class: pe(["fe-upload__item", `is-${U.status}`])
|
|
1938
1938
|
}, [
|
|
@@ -1984,7 +1984,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
1984
1984
|
emits: ["dismiss"],
|
|
1985
1985
|
setup(s, { emit: c }) {
|
|
1986
1986
|
const e = s, u = c, { t: l } = ze(() => e.locale), o = Q(() => [...e.ops].sort(($, U) => U.id - $.id));
|
|
1987
|
-
function
|
|
1987
|
+
function _($) {
|
|
1988
1988
|
return $.status === "done" ? 100 : $.progress_total <= 0 ? 0 : Math.min(100, Math.round($.progress_done / $.progress_total * 100));
|
|
1989
1989
|
}
|
|
1990
1990
|
function f($) {
|
|
@@ -2023,7 +2023,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2023
2023
|
n("div", zo, [
|
|
2024
2024
|
n("div", {
|
|
2025
2025
|
class: "fe-ops__bar-fill",
|
|
2026
|
-
style: gt({ width:
|
|
2026
|
+
style: gt({ width: _(O) + "%" })
|
|
2027
2027
|
}, null, 4)
|
|
2028
2028
|
]),
|
|
2029
2029
|
O.status === "error" && O.error_message ? (r(), p("div", No, i(O.error_message), 1)) : W("", !0)
|
|
@@ -2066,7 +2066,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2066
2066
|
function o(f) {
|
|
2067
2067
|
f.key === "Escape" && u("close");
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function _() {
|
|
2070
2070
|
e.closeOnBackdrop !== !1 && u("close");
|
|
2071
2071
|
}
|
|
2072
2072
|
return (f, y) => (r(), Ae(ct, { name: "fe-modal" }, {
|
|
@@ -2079,7 +2079,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2079
2079
|
s.theme === "dark" ? "fe--theme-dark" : ""
|
|
2080
2080
|
]]),
|
|
2081
2081
|
role: "presentation",
|
|
2082
|
-
onClick:
|
|
2082
|
+
onClick: _
|
|
2083
2083
|
}, [
|
|
2084
2084
|
n("div", {
|
|
2085
2085
|
ref_key: "cardEl",
|
|
@@ -2125,18 +2125,18 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2125
2125
|
},
|
|
2126
2126
|
emits: ["close", "submit"],
|
|
2127
2127
|
setup(s, { emit: c }) {
|
|
2128
|
-
const e = s, u = c, { t: l } = ze(() => e.locale), o = h(""),
|
|
2128
|
+
const e = s, u = c, { t: l } = ze(() => e.locale), o = h(""), _ = h(null);
|
|
2129
2129
|
Ke(() => e.open, (y) => {
|
|
2130
|
-
y && (o.value = "",
|
|
2130
|
+
y && (o.value = "", _.value = null);
|
|
2131
2131
|
});
|
|
2132
2132
|
function f() {
|
|
2133
2133
|
const y = o.value.trim();
|
|
2134
2134
|
if (!y) {
|
|
2135
|
-
|
|
2135
|
+
_.value = l("modal.newfolder.placeholder");
|
|
2136
2136
|
return;
|
|
2137
2137
|
}
|
|
2138
2138
|
if (/[\\/]/.test(y) || y === "." || y === "..") {
|
|
2139
|
-
|
|
2139
|
+
_.value = "Geçersiz karakter";
|
|
2140
2140
|
return;
|
|
2141
2141
|
}
|
|
2142
2142
|
u("submit", y);
|
|
@@ -2173,7 +2173,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2173
2173
|
}, null, 40, Ho), [
|
|
2174
2174
|
[Be, o.value]
|
|
2175
2175
|
]),
|
|
2176
|
-
|
|
2176
|
+
_.value ? (r(), p("p", Vo, i(_.value), 1)) : W("", !0)
|
|
2177
2177
|
], 32)
|
|
2178
2178
|
]),
|
|
2179
2179
|
_: 1
|
|
@@ -2195,7 +2195,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2195
2195
|
f && (o.value = y);
|
|
2196
2196
|
}
|
|
2197
2197
|
);
|
|
2198
|
-
function
|
|
2198
|
+
function _() {
|
|
2199
2199
|
const f = o.value.trim();
|
|
2200
2200
|
f && (/[\\/]/.test(f) || f === "." || f === ".." || u("submit", f));
|
|
2201
2201
|
}
|
|
@@ -2214,19 +2214,19 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2214
2214
|
n("button", {
|
|
2215
2215
|
type: "button",
|
|
2216
2216
|
class: "fe-btn fe-btn--primary",
|
|
2217
|
-
onClick:
|
|
2217
|
+
onClick: _
|
|
2218
2218
|
}, i(F(l)("modal.rename.save")), 1)
|
|
2219
2219
|
]),
|
|
2220
2220
|
default: Ee(() => [
|
|
2221
2221
|
n("form", {
|
|
2222
|
-
onSubmit: be(
|
|
2222
|
+
onSubmit: be(_, ["prevent"])
|
|
2223
2223
|
}, [
|
|
2224
2224
|
he(n("input", {
|
|
2225
2225
|
"onUpdate:modelValue": y[0] || (y[0] = ($) => o.value = $),
|
|
2226
2226
|
type: "text",
|
|
2227
2227
|
class: "fe-input",
|
|
2228
2228
|
autocomplete: "off",
|
|
2229
|
-
onKeydown: qe(be(
|
|
2229
|
+
onKeydown: qe(be(_, ["prevent"]), ["enter"])
|
|
2230
2230
|
}, null, 40, Wo), [
|
|
2231
2231
|
[Be, o.value]
|
|
2232
2232
|
])
|
|
@@ -2245,22 +2245,22 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2245
2245
|
emits: ["close", "confirm"],
|
|
2246
2246
|
setup(s, { emit: c }) {
|
|
2247
2247
|
const e = s, u = c, { t: l } = ze(() => e.locale);
|
|
2248
|
-
return (o,
|
|
2248
|
+
return (o, _) => (r(), Ae(vt, {
|
|
2249
2249
|
open: s.open,
|
|
2250
2250
|
title: F(l)("modal.delete.title"),
|
|
2251
2251
|
size: "sm",
|
|
2252
|
-
onClose:
|
|
2252
|
+
onClose: _[2] || (_[2] = (f) => u("close"))
|
|
2253
2253
|
}, {
|
|
2254
2254
|
actions: Ee(() => [
|
|
2255
2255
|
n("button", {
|
|
2256
2256
|
type: "button",
|
|
2257
2257
|
class: "fe-btn",
|
|
2258
|
-
onClick:
|
|
2258
|
+
onClick: _[0] || (_[0] = (f) => u("close"))
|
|
2259
2259
|
}, i(F(l)("modal.delete.cancel")), 1),
|
|
2260
2260
|
n("button", {
|
|
2261
2261
|
type: "button",
|
|
2262
2262
|
class: "fe-btn fe-btn--danger",
|
|
2263
|
-
onClick:
|
|
2263
|
+
onClick: _[1] || (_[1] = (f) => u("confirm"))
|
|
2264
2264
|
}, i(F(l)("modal.delete.confirm")), 1)
|
|
2265
2265
|
]),
|
|
2266
2266
|
default: Ee(() => [
|
|
@@ -2284,14 +2284,14 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2284
2284
|
},
|
|
2285
2285
|
emits: ["close", "submit", "toast"],
|
|
2286
2286
|
setup(s, { emit: c }) {
|
|
2287
|
-
const e = s, u = c, { t: l } = ze(() => e.locale), o = h(!1),
|
|
2287
|
+
const e = s, u = c, { t: l } = ze(() => e.locale), o = h(!1), _ = h(""), f = h("");
|
|
2288
2288
|
Ke(() => e.open, (N) => {
|
|
2289
|
-
N && (o.value = !1,
|
|
2289
|
+
N && (o.value = !1, _.value = "", f.value = "");
|
|
2290
2290
|
});
|
|
2291
2291
|
function y() {
|
|
2292
2292
|
u("submit", {
|
|
2293
2293
|
password: o.value,
|
|
2294
|
-
expires_at:
|
|
2294
|
+
expires_at: _.value ? new Date(_.value).toISOString() : null,
|
|
2295
2295
|
max_downloads: f.value ? Number(f.value) : null
|
|
2296
2296
|
});
|
|
2297
2297
|
}
|
|
@@ -2393,11 +2393,11 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2393
2393
|
n("label", Xo, [
|
|
2394
2394
|
n("span", null, i(F(l)("modal.share.expires")), 1),
|
|
2395
2395
|
he(n("input", {
|
|
2396
|
-
"onUpdate:modelValue": M[1] || (M[1] = (C) =>
|
|
2396
|
+
"onUpdate:modelValue": M[1] || (M[1] = (C) => _.value = C),
|
|
2397
2397
|
type: "datetime-local",
|
|
2398
2398
|
class: "fe-input"
|
|
2399
2399
|
}, null, 512), [
|
|
2400
|
-
[Be,
|
|
2400
|
+
[Be, _.value]
|
|
2401
2401
|
])
|
|
2402
2402
|
]),
|
|
2403
2403
|
n("label", Qo, [
|
|
@@ -2500,7 +2500,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2500
2500
|
function o(B) {
|
|
2501
2501
|
return ((B == null ? void 0 : B.extension) || "").toLowerCase();
|
|
2502
2502
|
}
|
|
2503
|
-
const
|
|
2503
|
+
const _ = ["jpg", "jpeg", "png", "webp", "gif", "bmp", "avif", "svg", "heic"], f = ["mp4", "webm", "mov", "mkv", "m4v", "ogv"], y = ["mp3", "wav", "ogg", "flac", "m4a", "aac", "opus"], $ = {
|
|
2504
2504
|
md: "markdown",
|
|
2505
2505
|
markdown: "markdown",
|
|
2506
2506
|
txt: "plaintext",
|
|
@@ -2555,32 +2555,32 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2555
2555
|
diff: "diff",
|
|
2556
2556
|
patch: "diff"
|
|
2557
2557
|
}, U = ["txt", "log"], O = ["docx", "doc", "xlsx", "xls", "pptx", "ppt", "odt", "ods", "odp", "rtf"], N = {
|
|
2558
|
-
glb: () => import("./Viewer3D-
|
|
2559
|
-
gltf: () => import("./Viewer3D-
|
|
2560
|
-
obj: () => import("./Viewer3D-
|
|
2561
|
-
stl: () => import("./Viewer3D-
|
|
2562
|
-
fbx: () => import("./Viewer3D-
|
|
2563
|
-
"3ds": () => import("./Viewer3D-
|
|
2564
|
-
epub: () => import("./EpubViewer-
|
|
2565
|
-
mmd: () => import("./MermaidViewer-
|
|
2566
|
-
mermaid: () => import("./MermaidViewer-
|
|
2567
|
-
drawio: () => import("./DrawioViewer-
|
|
2568
|
-
dio: () => import("./DrawioViewer-
|
|
2569
|
-
tif: () => import("./TiffViewer-
|
|
2570
|
-
tiff: () => import("./TiffViewer-
|
|
2571
|
-
psd: () => import("./PsdViewer-
|
|
2558
|
+
glb: () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2559
|
+
gltf: () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2560
|
+
obj: () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2561
|
+
stl: () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2562
|
+
fbx: () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2563
|
+
"3ds": () => import("./Viewer3D-WEMYCP8l.js"),
|
|
2564
|
+
epub: () => import("./EpubViewer-DvDa17d7.js"),
|
|
2565
|
+
mmd: () => import("./MermaidViewer-BoFLtGvl.js"),
|
|
2566
|
+
mermaid: () => import("./MermaidViewer-BoFLtGvl.js"),
|
|
2567
|
+
drawio: () => import("./DrawioViewer-DSyMwGvg.js"),
|
|
2568
|
+
dio: () => import("./DrawioViewer-DSyMwGvg.js"),
|
|
2569
|
+
tif: () => import("./TiffViewer-JzDzbqpO.js"),
|
|
2570
|
+
tiff: () => import("./TiffViewer-JzDzbqpO.js"),
|
|
2571
|
+
psd: () => import("./PsdViewer-K2iZkwax.js"),
|
|
2572
2572
|
// PDF deliberately uses the native browser viewer (`kind === 'pdf'`
|
|
2573
2573
|
// branch in the template). PdfViewer.vue still exists for callers
|
|
2574
2574
|
// that want the rich custom UI but the SFC default keeps things
|
|
2575
2575
|
// minimal — the browser already paints search/zoom/page UI for free.
|
|
2576
|
-
ipynb: () => import("./IpynbViewer-
|
|
2577
|
-
csv: () => import("./CsvViewer-
|
|
2578
|
-
tsv: () => import("./CsvViewer-
|
|
2579
|
-
zip: () => import("./ArchiveViewer-
|
|
2576
|
+
ipynb: () => import("./IpynbViewer-DibIkdsz.js"),
|
|
2577
|
+
csv: () => import("./CsvViewer-72rDsQJX.js"),
|
|
2578
|
+
tsv: () => import("./CsvViewer-72rDsQJX.js"),
|
|
2579
|
+
zip: () => import("./ArchiveViewer-CbUUEREI.js")
|
|
2580
2580
|
}, M = Q(() => {
|
|
2581
2581
|
const B = o(e.file);
|
|
2582
2582
|
if (!B) return "other";
|
|
2583
|
-
if (
|
|
2583
|
+
if (_.includes(B)) return "image";
|
|
2584
2584
|
if (f.includes(B)) return "video";
|
|
2585
2585
|
if (y.includes(B)) return "audio";
|
|
2586
2586
|
if (B === "pdf") return "pdf";
|
|
@@ -2692,7 +2692,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
2692
2692
|
"dockerfile",
|
|
2693
2693
|
"graphql",
|
|
2694
2694
|
"gql"
|
|
2695
|
-
]),
|
|
2695
|
+
]), w = Q(
|
|
2696
2696
|
() => !!e.file && S.has(o(e.file))
|
|
2697
2697
|
), K = Q(() => e.file ? e.previewUrl(e.file.path) : ""), j = Q(() => e.file ? e.downloadUrl(e.file.path) : "");
|
|
2698
2698
|
function G(B) {
|
|
@@ -3090,7 +3090,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3090
3090
|
onClose: m[2] || (m[2] = (te) => u("close"))
|
|
3091
3091
|
}, {
|
|
3092
3092
|
actions: Ee(() => [
|
|
3093
|
-
s.file && s.openMode === "view" &&
|
|
3093
|
+
s.file && s.openMode === "view" && w.value ? (r(), p("button", {
|
|
3094
3094
|
key: 0,
|
|
3095
3095
|
type: "button",
|
|
3096
3096
|
class: "fe-btn fe-btn--primary",
|
|
@@ -3312,28 +3312,28 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3312
3312
|
},
|
|
3313
3313
|
emits: ["close", "done"],
|
|
3314
3314
|
setup(s, { emit: c }) {
|
|
3315
|
-
const e = s, u = c, l = h(null), o = h("loading"),
|
|
3315
|
+
const e = s, u = c, l = h(null), o = h("loading"), _ = h(null), f = h([]), y = h(""), $ = h(null), U = Q(() => (e.fileName.split(".").pop() || "").toLowerCase()), O = Q(() => {
|
|
3316
3316
|
const v = f.value.filter((d) => d.from);
|
|
3317
3317
|
return v.find((d) => (d.ext || "").toLowerCase() === U.value) || v.find((d) => (d.format || "").toLowerCase() === U.value) || null;
|
|
3318
3318
|
}), N = Q(() => {
|
|
3319
3319
|
const v = y.value.trim().toLowerCase(), d = /* @__PURE__ */ new Set(), S = [];
|
|
3320
|
-
for (const
|
|
3321
|
-
if (!
|
|
3322
|
-
const K = (
|
|
3323
|
-
!K || d.has(K) || (d.add(K), S.push(
|
|
3320
|
+
for (const w of f.value) {
|
|
3321
|
+
if (!w.to) continue;
|
|
3322
|
+
const K = (w.ext || w.format || "").toLowerCase();
|
|
3323
|
+
!K || d.has(K) || (d.add(K), S.push(w));
|
|
3324
3324
|
}
|
|
3325
|
-
return S.sort((
|
|
3326
|
-
(
|
|
3325
|
+
return S.sort((w, K) => (w.ext || w.format).localeCompare(K.ext || K.format)), v ? S.filter(
|
|
3326
|
+
(w) => (w.ext || "").toLowerCase().includes(v) || (w.format || "").toLowerCase().includes(v) || (w.name || "").toLowerCase().includes(v) || (w.mime || "").toLowerCase().includes(v)
|
|
3327
3327
|
) : S;
|
|
3328
3328
|
}), M = Q(() => `${e.convertUrl.replace(/\/$/, "")}/?embed=1`);
|
|
3329
3329
|
let C = 0;
|
|
3330
3330
|
const g = /* @__PURE__ */ new Map();
|
|
3331
3331
|
function L(v, d = {}, S = []) {
|
|
3332
|
-
const
|
|
3332
|
+
const w = ++C;
|
|
3333
3333
|
return new Promise((K, j) => {
|
|
3334
3334
|
var G, ie;
|
|
3335
|
-
g.set(
|
|
3336
|
-
g.has(
|
|
3335
|
+
g.set(w, { resolve: K, reject: j }), (ie = (G = l.value) == null ? void 0 : G.contentWindow) == null || ie.postMessage({ target: "convert-embed", id: w, cmd: v, ...d }, "*", S), setTimeout(() => {
|
|
3336
|
+
g.has(w) && (g.delete(w), j(new Error("convert timeout")));
|
|
3337
3337
|
}, 18e4);
|
|
3338
3338
|
});
|
|
3339
3339
|
}
|
|
@@ -3350,23 +3350,23 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3350
3350
|
async function A() {
|
|
3351
3351
|
try {
|
|
3352
3352
|
const v = await L("listFormats");
|
|
3353
|
-
f.value = v.formats || [], o.value = "ready", O.value || (
|
|
3353
|
+
f.value = v.formats || [], o.value = "ready", O.value || (_.value = b("convert.unsupportedInput", "Bu dosya tipi için kaynak format bulunamadı."));
|
|
3354
3354
|
} catch (v) {
|
|
3355
|
-
|
|
3355
|
+
_.value = v.message, o.value = "error";
|
|
3356
3356
|
}
|
|
3357
3357
|
}
|
|
3358
3358
|
async function J() {
|
|
3359
3359
|
if (!(!$.value || !O.value)) {
|
|
3360
|
-
o.value = "converting",
|
|
3360
|
+
o.value = "converting", _.value = null;
|
|
3361
3361
|
try {
|
|
3362
3362
|
const v = await e.fetchBytes(), d = await L(
|
|
3363
3363
|
"convert",
|
|
3364
3364
|
{ name: e.fileName, bytes: v, fromIndex: O.value.index, toIndex: $.value.index },
|
|
3365
3365
|
[v]
|
|
3366
|
-
), S = e.fileName.replace(/\.[^.]+$/, ""),
|
|
3366
|
+
), S = e.fileName.replace(/\.[^.]+$/, ""), w = d.ext || $.value.ext || $.value.format, K = `${S}.${w}`, j = new File([d.bytes], K, { type: $.value.mime || "application/octet-stream" });
|
|
3367
3367
|
await e.upload(j), o.value = "done", u("done", K);
|
|
3368
3368
|
} catch (v) {
|
|
3369
|
-
|
|
3369
|
+
_.value = v.message, o.value = "error";
|
|
3370
3370
|
}
|
|
3371
3371
|
}
|
|
3372
3372
|
}
|
|
@@ -3405,10 +3405,10 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3405
3405
|
]),
|
|
3406
3406
|
n("div", ir, [
|
|
3407
3407
|
(r(!0), p(le, null, Ce(N.value, (S) => {
|
|
3408
|
-
var
|
|
3408
|
+
var w;
|
|
3409
3409
|
return r(), p("button", {
|
|
3410
3410
|
key: S.index,
|
|
3411
|
-
class: pe(["filex-cv__fmt", { "is-sel": ((
|
|
3411
|
+
class: pe(["filex-cv__fmt", { "is-sel": ((w = $.value) == null ? void 0 : w.index) === S.index }]),
|
|
3412
3412
|
onClick: (K) => $.value = S
|
|
3413
3413
|
}, [
|
|
3414
3414
|
n("b", null, i((S.ext || S.format).toUpperCase()), 1),
|
|
@@ -3417,7 +3417,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3417
3417
|
}), 128)),
|
|
3418
3418
|
N.value.length === 0 ? (r(), p("div", ur, i(b("convert.noFmt", "Eşleşen format yok.")), 1)) : W("", !0)
|
|
3419
3419
|
]),
|
|
3420
|
-
|
|
3420
|
+
_.value ? (r(), p("div", dr, i(_.value), 1)) : W("", !0),
|
|
3421
3421
|
n("footer", pr, [
|
|
3422
3422
|
n("button", {
|
|
3423
3423
|
class: "filex-cv__convert",
|
|
@@ -3514,19 +3514,19 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3514
3514
|
function o(T, x) {
|
|
3515
3515
|
return l.value ? T : x;
|
|
3516
3516
|
}
|
|
3517
|
-
const
|
|
3517
|
+
const _ = Q(() => {
|
|
3518
3518
|
const T = /^([^:]+):\/\/(.*)$/.exec(e.path), x = T ? T[1] : "", H = T ? T[2] : e.path, se = H.split("/").filter(Boolean);
|
|
3519
3519
|
return { adapter: x, name: se.length ? se[se.length - 1] : x, rel: H };
|
|
3520
3520
|
}), f = h("perms"), y = h(!1), $ = h(!0), U = h(""), O = h([]), N = h([]), M = h(!0), C = h(""), g = h("viewer"), L = h(!1), R = h(""), A = h(!1), J = h("user"), b = h(null), v = h([]), d = h(!1);
|
|
3521
3521
|
let S;
|
|
3522
|
-
const
|
|
3522
|
+
const w = [
|
|
3523
3523
|
{ v: "viewer", l: o("Görüntüleyen", "Viewer"), d: o("görüntüle + indir", "view + download") },
|
|
3524
3524
|
{ v: "editor", l: o("Düzenleyen", "Editor"), d: o("oku + yaz + sil", "read + write + delete") },
|
|
3525
3525
|
{ v: "owner", l: o("Sahip", "Owner"), d: o("düzenle + izin yönet", "edit + manage access") }
|
|
3526
3526
|
];
|
|
3527
3527
|
function K(T) {
|
|
3528
3528
|
var x;
|
|
3529
|
-
return ((x =
|
|
3529
|
+
return ((x = w.find((H) => H.v === T)) == null ? void 0 : x.l) ?? T;
|
|
3530
3530
|
}
|
|
3531
3531
|
const j = h([]), G = h(!1), ie = h(!1), ae = h(0), Z = h(null), fe = h(""), ce = h(""), ne = h(""), _e = h(!1), ve = h(""), De = [
|
|
3532
3532
|
{ v: 0, l: o("Süresiz", "Never") },
|
|
@@ -3800,8 +3800,8 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3800
3800
|
class: "fx-perm-sub",
|
|
3801
3801
|
title: s.path
|
|
3802
3802
|
}, [
|
|
3803
|
-
Le(i(
|
|
3804
|
-
n("span", xr, " · " + i(
|
|
3803
|
+
Le(i(_.value.name), 1),
|
|
3804
|
+
n("span", xr, " · " + i(_.value.adapter), 1)
|
|
3805
3805
|
], 8, kr)
|
|
3806
3806
|
])
|
|
3807
3807
|
]),
|
|
@@ -3863,9 +3863,9 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3863
3863
|
he(n("select", {
|
|
3864
3864
|
"onUpdate:modelValue": x[5] || (x[5] = (D) => g.value = D),
|
|
3865
3865
|
class: "fx-perm-sel",
|
|
3866
|
-
title: (H =
|
|
3866
|
+
title: (H = w.find((D) => D.v === g.value)) == null ? void 0 : H.d
|
|
3867
3867
|
}, [
|
|
3868
|
-
(r(), p(le, null, Ce(
|
|
3868
|
+
(r(), p(le, null, Ce(w, (D) => n("option", {
|
|
3869
3869
|
key: D.v,
|
|
3870
3870
|
value: D.v
|
|
3871
3871
|
}, i(D.l), 9, Rr)), 64))
|
|
@@ -3927,7 +3927,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
3927
3927
|
value: D.level,
|
|
3928
3928
|
onChange: (ue) => Ve(D, ue.target.value)
|
|
3929
3929
|
}, [
|
|
3930
|
-
(r(), p(le, null, Ce(
|
|
3930
|
+
(r(), p(le, null, Ce(w, (ue) => n("option", {
|
|
3931
3931
|
key: ue.v,
|
|
3932
3932
|
value: ue.v
|
|
3933
3933
|
}, i(ue.l), 9, nl)), 64))
|
|
@@ -4203,7 +4203,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4203
4203
|
]);
|
|
4204
4204
|
};
|
|
4205
4205
|
}
|
|
4206
|
-
}), oi = /* @__PURE__ */ ft(ni, [["__scopeId", "data-v-
|
|
4206
|
+
}), oi = /* @__PURE__ */ ft(ni, [["__scopeId", "data-v-cc43fc18"]]), si = {
|
|
4207
4207
|
key: 0,
|
|
4208
4208
|
class: "fe__loading"
|
|
4209
4209
|
}, ri = { class: "fe__loading-text" }, li = {
|
|
@@ -4219,7 +4219,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4219
4219
|
},
|
|
4220
4220
|
emits: ["share-created", "file-opened", "error", "upload-progress", "selection-change"],
|
|
4221
4221
|
setup(s, { emit: c }) {
|
|
4222
|
-
const e = s, u = c, l = Ya(e.config), o = Wa(e.config, l),
|
|
4222
|
+
const e = s, u = c, l = Ya(e.config), o = Wa(e.config, l), _ = en(e.config, l, {
|
|
4223
4223
|
onSettled: (t) => {
|
|
4224
4224
|
if (t.status === "error")
|
|
4225
4225
|
m(t.error_message || "İşlem başarısız");
|
|
@@ -4257,7 +4257,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4257
4257
|
const t = (O.value ?? "").replace(/^\/+|\/+$/g, "");
|
|
4258
4258
|
return $ && t === $ ? !1 : t.length > 0;
|
|
4259
4259
|
}), S = Q(() => I.value ? !(O.value ?? "").replace(/^\/+|\/+$/g, "") : !1);
|
|
4260
|
-
function
|
|
4260
|
+
function w() {
|
|
4261
4261
|
if (A.value) {
|
|
4262
4262
|
H(J.value);
|
|
4263
4263
|
return;
|
|
@@ -4505,7 +4505,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4505
4505
|
var a;
|
|
4506
4506
|
kt();
|
|
4507
4507
|
const t = tt();
|
|
4508
|
-
await H(t || void 0), await ut(), (a = Je.value) == null || a.focus(), _e(), Me() === "hash" && window.addEventListener("hashchange", Pt), l.endpoints.opsList &&
|
|
4508
|
+
await H(t || void 0), await ut(), (a = Je.value) == null || a.focus(), _e(), Me() === "hash" && window.addEventListener("hashchange", Pt), l.endpoints.opsList && _.startPolling(), l.endpoints.capabilities && l.capabilities().then((k) => {
|
|
4509
4509
|
ie.value = k;
|
|
4510
4510
|
}).catch(() => {
|
|
4511
4511
|
});
|
|
@@ -4532,7 +4532,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4532
4532
|
onCut: () => pa(),
|
|
4533
4533
|
onCopy: () => fa(),
|
|
4534
4534
|
onPaste: () => Bt(),
|
|
4535
|
-
onGoUp: () =>
|
|
4535
|
+
onGoUp: () => w(),
|
|
4536
4536
|
hasSelection: () => !j.isEmpty.value
|
|
4537
4537
|
});
|
|
4538
4538
|
const Zt = /* @__PURE__ */ new Set([
|
|
@@ -4805,10 +4805,10 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4805
4805
|
}
|
|
4806
4806
|
if (t.mode === "cut") {
|
|
4807
4807
|
const { op: q } = await l.moveAsync(a, ue(O.value), ue(k) || void 0);
|
|
4808
|
-
|
|
4808
|
+
_.register(q), m("Taşıma kuyruğa alındı");
|
|
4809
4809
|
} else {
|
|
4810
4810
|
const { op: q } = await l.copy(a, ue(O.value));
|
|
4811
|
-
|
|
4811
|
+
_.register(q), m("Kopyalama kuyruğa alındı");
|
|
4812
4812
|
}
|
|
4813
4813
|
G.value = { mode: null, items: [], sourcePath: null };
|
|
4814
4814
|
} catch (a) {
|
|
@@ -4818,7 +4818,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4818
4818
|
async function va(t) {
|
|
4819
4819
|
try {
|
|
4820
4820
|
const { op: a } = await l.copy([t.path], ue(O.value));
|
|
4821
|
-
|
|
4821
|
+
_.register(a);
|
|
4822
4822
|
} catch (a) {
|
|
4823
4823
|
u("error", { message: a.message, context: { op: "duplicate" } });
|
|
4824
4824
|
}
|
|
@@ -4856,7 +4856,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
4856
4856
|
try {
|
|
4857
4857
|
if (l.endpoints.deleteAsync) {
|
|
4858
4858
|
const { op: a } = await l.deleteAsync(t, ue(O.value));
|
|
4859
|
-
|
|
4859
|
+
_.register(a), m("Silme kuyruğa alındı");
|
|
4860
4860
|
} else
|
|
4861
4861
|
await l.deleteItems(ue(O.value), t), await H();
|
|
4862
4862
|
V.value = !1, j.clear();
|
|
@@ -5034,7 +5034,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
5034
5034
|
try {
|
|
5035
5035
|
if (l.endpoints.moveAsync) {
|
|
5036
5036
|
const { op: E } = await l.moveAsync(t, a, ue(O.value));
|
|
5037
|
-
|
|
5037
|
+
_.register(E), m("Taşıma kuyruğa alındı");
|
|
5038
5038
|
} else
|
|
5039
5039
|
await l.move(ue(O.value), t, a), await H();
|
|
5040
5040
|
j.clear();
|
|
@@ -5137,7 +5137,7 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
5137
5137
|
onNewFolder: a[2] || (a[2] = (Y) => P.value = !0),
|
|
5138
5138
|
onUpload: $a,
|
|
5139
5139
|
onRefresh: a[3] || (a[3] = () => H()),
|
|
5140
|
-
onGoUp:
|
|
5140
|
+
onGoUp: w,
|
|
5141
5141
|
onAction: ra,
|
|
5142
5142
|
onOpenRecents: a[4] || (a[4] = (Y) => Z.value = !0)
|
|
5143
5143
|
}, null, 8, ["view-mode", "search-query", "trash-active", "actions", "selection-mode", "paste-enabled", "convert-enabled", "can-go-up", "at-virtual-root", "can-write", "locale"]),
|
|
@@ -5208,9 +5208,9 @@ const an = { class: "fe-toolbar" }, nn = { class: "fe-toolbar__primary" }, on =
|
|
|
5208
5208
|
onDismiss: Ba
|
|
5209
5209
|
}, null, 8, ["jobs", "locale"]),
|
|
5210
5210
|
Pe(Uo, {
|
|
5211
|
-
ops: F(
|
|
5211
|
+
ops: F(_).ops.value,
|
|
5212
5212
|
locale: v.value,
|
|
5213
|
-
onDismiss: a[8] || (a[8] = (Y) => F(
|
|
5213
|
+
onDismiss: a[8] || (a[8] = (Y) => F(_).dismiss(Y))
|
|
5214
5214
|
}, null, 8, ["ops", "locale"]),
|
|
5215
5215
|
Pe(xo, {
|
|
5216
5216
|
ref_key: "ctxRef",
|
|
@@ -5401,4 +5401,4 @@ export {
|
|
|
5401
5401
|
qa as t,
|
|
5402
5402
|
Ya as u
|
|
5403
5403
|
};
|
|
5404
|
-
//# sourceMappingURL=index-
|
|
5404
|
+
//# sourceMappingURL=index-B5YT-m5Q.js.map
|