@burdenoff/microfe-files 2026.1115.1 → 2026.1119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/files/components/CopyDialog.d.ts +6 -0
- package/dist/files/components/CopyDialog.js +112 -101
- package/dist/files/components/CopyDialog.js.map +1 -1
- package/dist/files/components/FileBrowser.js +175 -165
- package/dist/files/components/FileBrowser.js.map +1 -1
- package/dist/files/components/FileInfoPanel.d.ts +7 -1
- package/dist/files/components/FileInfoPanel.js +225 -184
- package/dist/files/components/FileInfoPanel.js.map +1 -1
- package/dist/files/components/SearchBar.d.ts +7 -1
- package/dist/files/components/SearchBar.js +167 -160
- package/dist/files/components/SearchBar.js.map +1 -1
- package/dist/files/components/ShareAccessParts.d.ts +9 -1
- package/dist/files/components/ShareAccessParts.js +31 -23
- package/dist/files/components/ShareAccessParts.js.map +1 -1
- package/dist/files/components/ShareDialog.d.ts +5 -4
- package/dist/files/components/ShareDialog.js +54 -50
- package/dist/files/components/ShareDialog.js.map +1 -1
- package/dist/files/components/UploadVisibilitySelect.js +16 -15
- package/dist/files/components/UploadVisibilitySelect.js.map +1 -1
- package/dist/files/components/viewers/VideoPlayer.js +48 -47
- package/dist/files/components/viewers/VideoPlayer.js.map +1 -1
- package/dist/files/pages/BrowserPage.js +274 -271
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/pages/ShareAccessPage.js +52 -51
- package/dist/files/pages/ShareAccessPage.js.map +1 -1
- package/dist/files/utils/fileKind.d.ts +16 -0
- package/dist/files/utils/fileKind.js +120 -0
- package/dist/files/utils/fileKind.js.map +1 -0
- package/dist/files/utils/infoTechnicalDetails.d.ts +12 -0
- package/dist/files/utils/infoTechnicalDetails.js +16 -0
- package/dist/files/utils/infoTechnicalDetails.js.map +1 -0
- package/dist/files/utils/shareAccess.d.ts +6 -0
- package/dist/files/utils/shareAccess.js +6 -1
- package/dist/files/utils/shareAccess.js.map +1 -1
- package/dist/translations/en.d.ts +29 -0
- package/dist/translations/en.js +32 -1
- package/dist/translations/en.js.map +1 -1
- package/package.json +2 -2
|
@@ -55,29 +55,29 @@ import { isDesktopFileDrag as Ze } from "../utils/desktopDrop.js";
|
|
|
55
55
|
import { bulkTargets as Qe, runPerItem as $e, summarizeFailedNames as et } from "../utils/bulkResults.js";
|
|
56
56
|
import { ToolbarMoreMenu as tt } from "../components/ToolbarMoreMenu.js";
|
|
57
57
|
import { useEffect as nt, useMemo as rt, useState as s } from "react";
|
|
58
|
-
import { FolderPlus as it, FolderUp as at, FolderX as ot, Grid3x3 as st, Home as ct, List as lt, Loader2 as
|
|
59
|
-
import { Fragment as
|
|
60
|
-
import { useNavigate as
|
|
61
|
-
import { useI18n as
|
|
62
|
-
import { AuroraBackground as
|
|
58
|
+
import { FolderPlus as it, FolderUp as at, FolderX as ot, Grid3x3 as st, Home as ct, List as lt, Loader2 as c, Star as ut, Trash2 as dt, Upload as ft, X as pt } from "lucide-react";
|
|
59
|
+
import { Fragment as mt, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
60
|
+
import { useNavigate as ht, useParams as gt } from "react-router";
|
|
61
|
+
import { useI18n as _t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
62
|
+
import { AuroraBackground as vt, Button as d, CTAOverflowMenu as yt, EmphasisPanel as bt, GradientText as xt, IllustratedEmptyState as St, Input as Ct, NextSteps as wt, PagePurpose as Tt, ResponsiveDialog as Et, ResponsiveDialogContent as Dt, ResponsiveDialogFooter as Ot, ResponsiveDialogHeader as kt, ResponsiveDialogTitle as At } from "@burdenoff/fe-libs/ui";
|
|
63
63
|
// src/files/pages/BrowserPage.tsx
|
|
64
|
-
function
|
|
65
|
-
let { t:
|
|
64
|
+
function f() {
|
|
65
|
+
let { t: f } = _t(), { folderId: p } = gt(), m = ht(), jt = i(), { workspaceId: h } = jt, g = jt.navigationV2 === !0, Mt = Ge(h ?? ""), { viewMode: Nt, setViewMode: Pt, breadcrumbs: Ft, selectedFiles: _, selectedFolders: It, clearSelection: Lt } = a(), [v, Rt] = s("all"), zt = rt(() => [
|
|
66
66
|
"all",
|
|
67
67
|
"recent",
|
|
68
68
|
"starred",
|
|
69
69
|
"bin"
|
|
70
70
|
], []);
|
|
71
71
|
nt(() => {
|
|
72
|
-
zt.includes(
|
|
73
|
-
}, [zt,
|
|
72
|
+
zt.includes(v) || Rt("all");
|
|
73
|
+
}, [zt, v]);
|
|
74
74
|
let [y, Bt] = s(""), [Vt, Ht] = s(), b = y.trim().length >= 2, [Ut, Wt] = s(null), [x, Gt] = s(null), S = Ae(), C = ee({
|
|
75
|
-
folderId:
|
|
75
|
+
folderId: p || void 0,
|
|
76
76
|
pageSize: 100,
|
|
77
|
-
skip:
|
|
78
|
-
}), Kt = te({ skip:
|
|
77
|
+
skip: v !== "all" || b
|
|
78
|
+
}), Kt = te({ skip: v !== "recent" || b }), qt = ne({ skip: v !== "starred" || b }), w = re({ skip: v !== "bin" || b }), T = ke(y, b, Vt);
|
|
79
79
|
nt(() => {
|
|
80
|
-
if (
|
|
80
|
+
if (p && C.data?.folderPath && C.data?.currentFolder) {
|
|
81
81
|
let e = C.data.folderPath.folders || [], t = C.data.currentFolder, n = [...e.map((e) => ({
|
|
82
82
|
id: e.id,
|
|
83
83
|
name: e.name
|
|
@@ -87,10 +87,10 @@ function d() {
|
|
|
87
87
|
}];
|
|
88
88
|
a.getState().setBreadcrumbs(n);
|
|
89
89
|
} else a.getState().setBreadcrumbs([]);
|
|
90
|
-
}, [
|
|
90
|
+
}, [p, C.data]);
|
|
91
91
|
let E = [], D = [], O = !1, k = null, A = !1;
|
|
92
92
|
if (b && T.data) E = T.data.files || [], D = T.data.folders || [], O = T.isLoading, k = T.error;
|
|
93
|
-
else switch (
|
|
93
|
+
else switch (v) {
|
|
94
94
|
case "all":
|
|
95
95
|
E = C.data?.filesList?.files.map(t) || [], D = C.data?.foldersList?.folders.map(n) || [], O = C.loading, k = C.error || null, A = !1;
|
|
96
96
|
break;
|
|
@@ -102,8 +102,8 @@ function d() {
|
|
|
102
102
|
break;
|
|
103
103
|
case "bin": E = w.files, D = w.folders, O = w.isLoading, k = w.error || null, A = !0;
|
|
104
104
|
}
|
|
105
|
-
let Jt =
|
|
106
|
-
Xe(
|
|
105
|
+
let Jt = v === "all" ? (C.data?.filesList?.total ?? E.length) + (C.data?.foldersList?.total ?? D.length) : null, j = _.size + It.size, [Yt, M] = s(!1), [Xt, Zt] = s(!1), [Qt, $t] = s(!1), [en, N] = s(!1), [tn, nn] = s(!1), [rn, P] = s(!1), [an, on] = s(!1), [sn, cn] = s(null), [ln, un] = s(void 0), [F, I] = s(null), [L, dn] = s(null), [R, z] = s(null), [B, V] = s(""), [H, U] = s(""), [fn, pn] = s(oe.Private), { uploading: W, uploadQueue: mn, isUploadPanelOpen: hn, setUploading: gn, setUploadQueue: G, setIsUploadPanelOpen: _n, cancelUpload: vn } = e(), [K, q] = s(null), J = (e, t) => {
|
|
106
|
+
Xe(jt, e, t);
|
|
107
107
|
}, yn = async () => {
|
|
108
108
|
if (!K || K.loading) return;
|
|
109
109
|
let e = K.onConfirm;
|
|
@@ -122,7 +122,7 @@ function d() {
|
|
|
122
122
|
loading: !1
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
}, Y = ie(), bn = ae(), xn = ce(), Sn = le(), Cn = ue(), wn = de(), Tn = fe(), En = pe(), Dn = me(), X = he(), Z = ge(), On = _e(), kn = ve(), Q = x ? xe(x) : null, An = be(Q &&
|
|
125
|
+
}, Y = ie(), bn = ae(), xn = ce(), Sn = le(), Cn = ue(), wn = de(), Tn = fe(), En = pe(), Dn = me(), X = he(), Z = ge(), On = _e(), kn = ve(), Q = x ? xe(x) : null, An = be(Q && v !== "bin" ? Ce(Q.share) : null), jn = ye(), Mn = Ee(), Nn = De(), Pn = Oe(), Fn = async (e) => {
|
|
126
126
|
if (e.length === 0) return;
|
|
127
127
|
let t = await Promise.all(e.map(async (e, t) => {
|
|
128
128
|
let n = await Ne(e);
|
|
@@ -131,7 +131,7 @@ function d() {
|
|
|
131
131
|
file: e,
|
|
132
132
|
status: "pending",
|
|
133
133
|
progress: 0,
|
|
134
|
-
folderId:
|
|
134
|
+
folderId: p || void 0,
|
|
135
135
|
visibility: fn,
|
|
136
136
|
thumbnailUrl: n ?? void 0
|
|
137
137
|
};
|
|
@@ -145,7 +145,7 @@ function d() {
|
|
|
145
145
|
let t = e.target.files;
|
|
146
146
|
t && t.length > 0 && await Fn(Array.from(t));
|
|
147
147
|
}, e.click();
|
|
148
|
-
}, [Ln, Rn] = s(!1), $ =
|
|
148
|
+
}, [Ln, Rn] = s(!1), $ = g && v === "all" && !b && !W, zn = (e) => {
|
|
149
149
|
$ && Ze(e.dataTransfer) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", Ln || Rn(!0));
|
|
150
150
|
}, Bn = (e) => {
|
|
151
151
|
let t = e.relatedTarget;
|
|
@@ -178,10 +178,10 @@ function d() {
|
|
|
178
178
|
folderId: e.folderId
|
|
179
179
|
});
|
|
180
180
|
} catch (n) {
|
|
181
|
-
let r = n instanceof Error ? n.message : o(
|
|
181
|
+
let r = n instanceof Error ? n.message : o(f, "files.upload.errors.failed", "Upload failed");
|
|
182
182
|
r === "Upload paused" ? t({ status: "paused" }) : Ke(n) ? (t({
|
|
183
183
|
status: "failed",
|
|
184
|
-
error: o(
|
|
184
|
+
error: o(f, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
|
|
185
185
|
}), $t(!0)) : (t({
|
|
186
186
|
status: "failed",
|
|
187
187
|
error: r
|
|
@@ -208,8 +208,8 @@ function d() {
|
|
|
208
208
|
error: void 0
|
|
209
209
|
} : t)), Hn(t));
|
|
210
210
|
}, Kn = vn, qn = () => {
|
|
211
|
-
if (!
|
|
212
|
-
S.error(o(
|
|
211
|
+
if (!h) {
|
|
212
|
+
S.error(o(f, "files.workspace.errors.notSelected", "Workspace not selected"));
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
let e = document.createElement("input");
|
|
@@ -224,7 +224,7 @@ function d() {
|
|
|
224
224
|
let n = /* @__PURE__ */ new Map(), r = Array.from(e.keys()).sort();
|
|
225
225
|
for (let e of r) {
|
|
226
226
|
if (!e) continue;
|
|
227
|
-
let t = e.split("/"), r = "", i =
|
|
227
|
+
let t = e.split("/"), r = "", i = p || void 0;
|
|
228
228
|
for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
|
|
229
229
|
else try {
|
|
230
230
|
let { data: t } = await Y.mutateAsync({
|
|
@@ -236,7 +236,7 @@ function d() {
|
|
|
236
236
|
}
|
|
237
237
|
let i = [], a = 0;
|
|
238
238
|
for (let [t, r] of e) {
|
|
239
|
-
let e = t ? n.get(t) :
|
|
239
|
+
let e = t ? n.get(t) : p || void 0;
|
|
240
240
|
for (let t of r) {
|
|
241
241
|
let n = await Ne(t);
|
|
242
242
|
i.push({
|
|
@@ -252,7 +252,7 @@ function d() {
|
|
|
252
252
|
}
|
|
253
253
|
G((e) => [...e, ...i]), _n(!0), gn(!0);
|
|
254
254
|
for (let e of i) await Hn(e);
|
|
255
|
-
gn(!1), S.success(o(
|
|
255
|
+
gn(!1), S.success(o(f, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
|
|
256
256
|
count: i.length,
|
|
257
257
|
plural: i.length > 1 ? "s" : ""
|
|
258
258
|
}));
|
|
@@ -264,13 +264,13 @@ function d() {
|
|
|
264
264
|
let e = a.getState();
|
|
265
265
|
e.selectAllFiles(E.map((e) => e.id)), D.forEach((t) => e.selectFolder(t.id));
|
|
266
266
|
}, Xn = async () => {
|
|
267
|
-
if (H.trim() &&
|
|
267
|
+
if (H.trim() && h) {
|
|
268
268
|
let { data: e, error: t } = await Y.mutateAsync({
|
|
269
269
|
name: H,
|
|
270
|
-
parentFolderId:
|
|
270
|
+
parentFolderId: p
|
|
271
271
|
});
|
|
272
272
|
if (t) {
|
|
273
|
-
Ke(t) ? (M(!1), U(""), Zt(!0)) : (S.error(t instanceof Error ? t.message : o(
|
|
273
|
+
Ke(t) ? (M(!1), U(""), Zt(!0)) : (S.error(t instanceof Error ? t.message : o(f, "files.folder.errors.createFailed", "Folder creation failed")), J("files.api.failed", {
|
|
274
274
|
action: "createFolder",
|
|
275
275
|
message: t instanceof Error ? t.message : "Folder creation failed"
|
|
276
276
|
}));
|
|
@@ -278,7 +278,7 @@ function d() {
|
|
|
278
278
|
}
|
|
279
279
|
e && (U(""), M(!1), J("files.folder.created", {
|
|
280
280
|
folderName: H,
|
|
281
|
-
parentFolderId:
|
|
281
|
+
parentFolderId: p
|
|
282
282
|
}));
|
|
283
283
|
}
|
|
284
284
|
}, Zn = (e) => {
|
|
@@ -290,7 +290,7 @@ function d() {
|
|
|
290
290
|
}, er = (e, t) => {
|
|
291
291
|
Qn(e, t);
|
|
292
292
|
}, tr = async (e) => {
|
|
293
|
-
if (!e.fileId && !e.folderId) throw Error(o(
|
|
293
|
+
if (!e.fileId && !e.folderId) throw Error(o(f, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
|
|
294
294
|
let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
|
|
295
295
|
if (e.fileId) {
|
|
296
296
|
let r = {
|
|
@@ -329,19 +329,19 @@ function d() {
|
|
|
329
329
|
};
|
|
330
330
|
}, nr = async (e) => {
|
|
331
331
|
qe("medium"), q({
|
|
332
|
-
title: o(
|
|
333
|
-
description: o(
|
|
334
|
-
confirmLabel: o(
|
|
332
|
+
title: o(f, "files.confirm.deleteFile.title", "Delete file"),
|
|
333
|
+
description: o(f, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
|
|
334
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
335
335
|
variant: "danger",
|
|
336
336
|
onConfirm: async () => {
|
|
337
337
|
try {
|
|
338
|
-
await xn.mutateAsync({ id: e.id }), Je("success"), S.success(o(
|
|
338
|
+
await xn.mutateAsync({ id: e.id }), Je("success"), S.success(o(f, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), J("files.file.deleted", {
|
|
339
339
|
fileId: e.id,
|
|
340
340
|
fileName: e.name,
|
|
341
341
|
permanent: !1
|
|
342
342
|
});
|
|
343
343
|
} catch (t) {
|
|
344
|
-
S.error(t instanceof Error ? t.message : o(
|
|
344
|
+
S.error(t instanceof Error ? t.message : o(f, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Je("error"), J("files.api.failed", {
|
|
345
345
|
action: "deleteFile",
|
|
346
346
|
fileId: e.id,
|
|
347
347
|
message: t instanceof Error ? t.message : "Failed to delete file"
|
|
@@ -351,28 +351,28 @@ function d() {
|
|
|
351
351
|
});
|
|
352
352
|
}, rr = async (e) => {
|
|
353
353
|
try {
|
|
354
|
-
await Cn.mutateAsync({ id: e.id }), S.success(o(
|
|
354
|
+
await Cn.mutateAsync({ id: e.id }), S.success(o(f, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), J("files.file.restored", {
|
|
355
355
|
fileId: e.id,
|
|
356
356
|
fileName: e.name
|
|
357
357
|
});
|
|
358
358
|
} catch (e) {
|
|
359
|
-
S.error(e instanceof Error ? e.message : o(
|
|
359
|
+
S.error(e instanceof Error ? e.message : o(f, "files.file.errors.restoreFailed", "Failed to restore file"));
|
|
360
360
|
}
|
|
361
361
|
}, ir = async (e) => {
|
|
362
362
|
qe("heavy"), q({
|
|
363
|
-
title: o(
|
|
364
|
-
description: o(
|
|
365
|
-
confirmLabel: o(
|
|
363
|
+
title: o(f, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
|
|
364
|
+
description: o(f, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
|
|
365
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
366
366
|
variant: "danger",
|
|
367
367
|
onConfirm: async () => {
|
|
368
368
|
try {
|
|
369
|
-
await Tn.mutateAsync({ id: e.id }), S.success(o(
|
|
369
|
+
await Tn.mutateAsync({ id: e.id }), S.success(o(f, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), J("files.file.deleted", {
|
|
370
370
|
fileId: e.id,
|
|
371
371
|
fileName: e.name,
|
|
372
372
|
permanent: !0
|
|
373
373
|
});
|
|
374
374
|
} catch (e) {
|
|
375
|
-
S.error(e instanceof Error ? e.message : o(
|
|
375
|
+
S.error(e instanceof Error ? e.message : o(f, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
});
|
|
@@ -387,7 +387,7 @@ function d() {
|
|
|
387
387
|
starred: !e.starred
|
|
388
388
|
});
|
|
389
389
|
} catch {
|
|
390
|
-
S.error(o(
|
|
390
|
+
S.error(o(f, "files.file.errors.starFailed", "Failed to update starred state")), J("files.api.failed", {
|
|
391
391
|
action: "toggleFileStar",
|
|
392
392
|
fileId: e.id
|
|
393
393
|
});
|
|
@@ -401,14 +401,14 @@ function d() {
|
|
|
401
401
|
}, sr = async (e) => {
|
|
402
402
|
try {
|
|
403
403
|
let t = e.downloadUrl || e.url;
|
|
404
|
-
if (!t) throw Error(o(
|
|
404
|
+
if (!t) throw Error(o(f, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
|
|
405
405
|
let n = document.createElement("a");
|
|
406
|
-
n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), S.success(o(
|
|
406
|
+
n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), S.success(o(f, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), J("files.file.downloaded", {
|
|
407
407
|
fileId: e.id,
|
|
408
408
|
fileName: e.name
|
|
409
409
|
});
|
|
410
410
|
} catch (e) {
|
|
411
|
-
S.error(e instanceof Error ? e.message : o(
|
|
411
|
+
S.error(e instanceof Error ? e.message : o(f, "files.file.errors.downloadFailed", "Failed to download file"));
|
|
412
412
|
}
|
|
413
413
|
}, cr = (e) => {
|
|
414
414
|
dn({
|
|
@@ -426,52 +426,52 @@ function d() {
|
|
|
426
426
|
type: "file"
|
|
427
427
|
});
|
|
428
428
|
}, dr = (e) => {
|
|
429
|
-
|
|
429
|
+
m(`/files/browse/${e.id}`);
|
|
430
430
|
}, fr = async (e) => {
|
|
431
431
|
qe("medium"), q({
|
|
432
|
-
title: o(
|
|
433
|
-
description: o(
|
|
434
|
-
confirmLabel: o(
|
|
432
|
+
title: o(f, "files.confirm.deleteFolder.title", "Delete folder"),
|
|
433
|
+
description: o(f, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
|
|
434
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
435
435
|
variant: "danger",
|
|
436
436
|
onConfirm: async () => {
|
|
437
437
|
try {
|
|
438
438
|
await Sn.mutateAsync({
|
|
439
439
|
id: e.id,
|
|
440
440
|
recursive: !0
|
|
441
|
-
}), S.success(o(
|
|
441
|
+
}), S.success(o(f, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), J("files.folder.deleted", {
|
|
442
442
|
folderId: e.id,
|
|
443
443
|
folderName: e.name,
|
|
444
444
|
permanent: !1
|
|
445
445
|
});
|
|
446
446
|
} catch (e) {
|
|
447
|
-
S.error(e instanceof Error ? e.message : o(
|
|
447
|
+
S.error(e instanceof Error ? e.message : o(f, "files.folder.errors.deleteFailed", "Failed to delete folder"));
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
451
|
}, pr = async (e) => {
|
|
452
452
|
try {
|
|
453
|
-
await wn.mutateAsync({ id: e.id }), S.success(o(
|
|
453
|
+
await wn.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), J("files.folder.restored", {
|
|
454
454
|
folderId: e.id,
|
|
455
455
|
folderName: e.name
|
|
456
456
|
});
|
|
457
457
|
} catch (e) {
|
|
458
|
-
S.error(e instanceof Error ? e.message : o(
|
|
458
|
+
S.error(e instanceof Error ? e.message : o(f, "files.folder.errors.restoreFailed", "Failed to restore folder"));
|
|
459
459
|
}
|
|
460
460
|
}, mr = async (e) => {
|
|
461
461
|
q({
|
|
462
|
-
title: o(
|
|
463
|
-
description: o(
|
|
464
|
-
confirmLabel: o(
|
|
462
|
+
title: o(f, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
|
|
463
|
+
description: o(f, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
|
|
464
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
465
465
|
variant: "danger",
|
|
466
466
|
onConfirm: async () => {
|
|
467
467
|
try {
|
|
468
|
-
await En.mutateAsync({ id: e.id }), S.success(o(
|
|
468
|
+
await En.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), J("files.folder.deleted", {
|
|
469
469
|
folderId: e.id,
|
|
470
470
|
folderName: e.name,
|
|
471
471
|
permanent: !0
|
|
472
472
|
});
|
|
473
473
|
} catch (e) {
|
|
474
|
-
S.error(e instanceof Error ? e.message : o(
|
|
474
|
+
S.error(e instanceof Error ? e.message : o(f, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
});
|
|
@@ -497,7 +497,7 @@ function d() {
|
|
|
497
497
|
starred: !e.starred
|
|
498
498
|
});
|
|
499
499
|
} catch {
|
|
500
|
-
S.error(o(
|
|
500
|
+
S.error(o(f, "files.folder.errors.starFailed", "Failed to update starred state")), J("files.api.failed", {
|
|
501
501
|
action: "toggleFolderStar",
|
|
502
502
|
folderId: e.id
|
|
503
503
|
});
|
|
@@ -512,20 +512,20 @@ function d() {
|
|
|
512
512
|
F.type === "file" ? (await Mn.mutateAsync({
|
|
513
513
|
fileId: F.item.id,
|
|
514
514
|
targetFolderId: e || null
|
|
515
|
-
}), S.success(o(
|
|
515
|
+
}), S.success(o(f, "files.file.move.success", "\"{{name}}\" moved", { name: F.item.name })), J("files.file.moved", {
|
|
516
516
|
fileId: F.item.id,
|
|
517
517
|
fileName: F.item.name,
|
|
518
518
|
destinationFolderId: e
|
|
519
519
|
})) : (await Nn.mutateAsync({
|
|
520
520
|
folderId: F.item.id,
|
|
521
521
|
targetParentFolderId: e
|
|
522
|
-
}), S.success(o(
|
|
522
|
+
}), S.success(o(f, "files.folder.move.success", "\"{{name}}\" moved", { name: F.item.name })), J("files.folder.moved", {
|
|
523
523
|
folderId: F.item.id,
|
|
524
524
|
folderName: F.item.name,
|
|
525
525
|
destinationFolderId: e
|
|
526
526
|
})), P(!1), I(null);
|
|
527
527
|
} catch (e) {
|
|
528
|
-
S.error(e instanceof Error ? e.message : o(
|
|
528
|
+
S.error(e instanceof Error ? e.message : o(f, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: F.item.name })), J("files.api.failed", {
|
|
529
529
|
action: F.type === "file" ? "moveFile" : "moveFolder",
|
|
530
530
|
itemId: F.item.id,
|
|
531
531
|
itemType: F.type,
|
|
@@ -534,18 +534,18 @@ function d() {
|
|
|
534
534
|
}
|
|
535
535
|
}, br = async (e, t) => {
|
|
536
536
|
if (L) try {
|
|
537
|
-
if (L.type !== "file") throw Error(o(
|
|
537
|
+
if (L.type !== "file") throw Error(o(f, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
|
|
538
538
|
await jn.mutateAsync({
|
|
539
539
|
id: L.item.id,
|
|
540
|
-
newName: t || `${o(
|
|
540
|
+
newName: t || `${o(f, "files.copyDialog.copyOf", "Copy of")} ${L.item.name}`,
|
|
541
541
|
targetFolderId: e || void 0
|
|
542
|
-
}), S.success(o(
|
|
542
|
+
}), S.success(o(f, "files.file.copy.success", "\"{{name}}\" copied", { name: L.item.name })), J("files.file.copied", {
|
|
543
543
|
fileId: L.item.id,
|
|
544
544
|
fileName: L.item.name,
|
|
545
545
|
destinationFolderId: e
|
|
546
546
|
}), on(!1), dn(null);
|
|
547
547
|
} catch (e) {
|
|
548
|
-
S.error(e instanceof Error ? e.message : o(
|
|
548
|
+
S.error(e instanceof Error ? e.message : o(f, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: L.item.name })), J("files.api.failed", {
|
|
549
549
|
action: "copyFile",
|
|
550
550
|
fileId: L.item.id,
|
|
551
551
|
message: e instanceof Error ? e.message : void 0
|
|
@@ -557,20 +557,20 @@ function d() {
|
|
|
557
557
|
R.type === "file" ? (await X.mutateAsync({
|
|
558
558
|
fileId: R.id,
|
|
559
559
|
newName: t
|
|
560
|
-
}), S.success(o(
|
|
560
|
+
}), S.success(o(f, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), J("files.file.renamed", {
|
|
561
561
|
fileId: R.id,
|
|
562
562
|
previousName: e,
|
|
563
563
|
name: t
|
|
564
564
|
})) : (await Z.mutateAsync({
|
|
565
565
|
folderId: R.id,
|
|
566
566
|
newName: t
|
|
567
|
-
}), S.success(o(
|
|
567
|
+
}), S.success(o(f, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), J("files.folder.renamed", {
|
|
568
568
|
folderId: R.id,
|
|
569
569
|
previousName: e,
|
|
570
570
|
name: t
|
|
571
571
|
})), N(!1), z(null), V("");
|
|
572
572
|
} catch (e) {
|
|
573
|
-
S.error(e instanceof Error ? e.message : o(
|
|
573
|
+
S.error(e instanceof Error ? e.message : o(f, R.type === "folder" ? "files.folder.errors.renameFailed" : "files.file.errors.renameFailed", R.type === "folder" ? "Failed to rename folder" : "Failed to rename file")), J("files.api.failed", {
|
|
574
574
|
action: R.type === "file" ? "renameFile" : "renameFolder",
|
|
575
575
|
itemId: R.id,
|
|
576
576
|
itemType: R.type,
|
|
@@ -578,20 +578,20 @@ function d() {
|
|
|
578
578
|
});
|
|
579
579
|
}
|
|
580
580
|
}, Sr = (e, t) => {
|
|
581
|
-
|
|
581
|
+
Lt();
|
|
582
582
|
let n = a.getState();
|
|
583
583
|
for (let t of e.failed) t.type === "file" ? n.selectFile(t.id) : n.selectFolder(t.id);
|
|
584
584
|
let r = e.succeeded.length + e.failed.length;
|
|
585
|
-
e.failed.length === 0 ? S.success(o(
|
|
585
|
+
e.failed.length === 0 ? S.success(o(f, t.successKey, t.successFallback, {
|
|
586
586
|
count: r,
|
|
587
587
|
plural: r > 1 ? "s" : ""
|
|
588
|
-
})) : S.error(o(
|
|
588
|
+
})) : S.error(o(f, t.partialKey, t.partialFallback, {
|
|
589
589
|
done: e.succeeded.length,
|
|
590
590
|
total: r,
|
|
591
|
-
names: et(e.failed, 3, (e) => o(
|
|
591
|
+
names: et(e.failed, 3, (e) => o(f, "files.bulk.moreNames", "+{{count}} more", { count: e }))
|
|
592
592
|
}));
|
|
593
593
|
}, Cr = async () => {
|
|
594
|
-
let e = await $e(Qe(
|
|
594
|
+
let e = await $e(Qe(_, It, E, D), (e) => e.type === "file" ? Cn.mutateAsync({ id: e.id }) : wn.mutateAsync({ id: e.id }));
|
|
595
595
|
Sr(e, {
|
|
596
596
|
successKey: "files.bulk.restore.success",
|
|
597
597
|
successFallback: "{{count}} item{{plural}} restored",
|
|
@@ -599,7 +599,7 @@ function d() {
|
|
|
599
599
|
partialFallback: "Restored {{done}} of {{total}} items. Couldn't restore {{names}}."
|
|
600
600
|
});
|
|
601
601
|
}, wr = async () => {
|
|
602
|
-
let e = await $e(Qe(
|
|
602
|
+
let e = await $e(Qe(_, It, E, D), (e) => e.type === "file" ? Tn.mutateAsync({ id: e.id }) : En.mutateAsync({ id: e.id }));
|
|
603
603
|
Sr(e, {
|
|
604
604
|
successKey: "files.bulk.permanentDelete.success",
|
|
605
605
|
successFallback: "{{count}} item{{plural}} deleted permanently",
|
|
@@ -614,410 +614,411 @@ function d() {
|
|
|
614
614
|
onFileDelete: nr,
|
|
615
615
|
onFolderOpen: dr,
|
|
616
616
|
onFolderDelete: fr,
|
|
617
|
-
activeTab:
|
|
618
|
-
}),
|
|
617
|
+
activeTab: v
|
|
618
|
+
}), h === void 0 ? /* @__PURE__ */ u("div", {
|
|
619
619
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
620
|
-
children: [/* @__PURE__ */ c
|
|
620
|
+
children: [/* @__PURE__ */ l(c, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
621
621
|
className: "text-sm text-text-secondary max-w-md",
|
|
622
|
-
children: o(
|
|
622
|
+
children: o(f, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
|
|
623
623
|
})]
|
|
624
|
-
}) :
|
|
624
|
+
}) : h === "" ? /* @__PURE__ */ u("div", {
|
|
625
625
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ l(ot, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
627
627
|
className: "text-sm text-text-secondary max-w-md",
|
|
628
|
-
children: o(
|
|
628
|
+
children: o(f, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
|
|
629
629
|
})]
|
|
630
|
-
}) : /* @__PURE__ */
|
|
630
|
+
}) : /* @__PURE__ */ u("div", {
|
|
631
631
|
className: "min-h-screen bg-bg-surface",
|
|
632
632
|
children: [
|
|
633
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ u("div", {
|
|
634
634
|
className: "relative overflow-hidden bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
|
|
635
635
|
"data-tour": "files-breadcrumb-nav",
|
|
636
636
|
children: [
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ l(vt, { intensity: "subtle" }),
|
|
638
|
+
/* @__PURE__ */ l("h1", {
|
|
639
639
|
className: "mb-2 text-lg font-semibold tracking-tight sm:text-xl",
|
|
640
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ l(xt, { children: o(f, "files.browser.rootLabel", "My Drive") })
|
|
641
641
|
}),
|
|
642
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ l("div", {
|
|
643
643
|
className: "flex items-center gap-2 sm:gap-4",
|
|
644
|
-
children: /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ u("div", {
|
|
645
645
|
className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ u("button", {
|
|
647
647
|
type: "button",
|
|
648
|
-
onClick: () =>
|
|
648
|
+
onClick: () => m("/files/browse"),
|
|
649
649
|
className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
|
|
650
|
-
title: o(
|
|
651
|
-
children: [/* @__PURE__ */
|
|
650
|
+
title: o(f, "files.browser.actions.goToRoot", "Go to root"),
|
|
651
|
+
children: [/* @__PURE__ */ l(ct, { className: "size-4" }), /* @__PURE__ */ l("span", {
|
|
652
652
|
className: "hidden sm:inline",
|
|
653
|
-
children: o(
|
|
653
|
+
children: o(f, "files.browser.rootLabel", "My Drive")
|
|
654
654
|
})]
|
|
655
|
-
}),
|
|
655
|
+
}), Ft.map((e, t) => /* @__PURE__ */ u("div", {
|
|
656
656
|
className: "flex items-center gap-1 sm:gap-2",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ l("span", {
|
|
658
658
|
className: "text-text-tertiary",
|
|
659
659
|
children: "/"
|
|
660
|
-
}), /* @__PURE__ */
|
|
660
|
+
}), /* @__PURE__ */ l("button", {
|
|
661
661
|
type: "button",
|
|
662
|
-
onClick: () =>
|
|
663
|
-
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t ===
|
|
664
|
-
title: o(
|
|
662
|
+
onClick: () => m(`/files/browse/${e.id}`),
|
|
663
|
+
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === Ft.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
|
|
664
|
+
title: o(f, "files.browser.breadcrumb.goTo", "Go to {{name}}", { name: e.name }),
|
|
665
665
|
children: e.name
|
|
666
666
|
})]
|
|
667
667
|
}, e.id))]
|
|
668
668
|
})
|
|
669
669
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ l(Tt, {
|
|
671
671
|
className: "relative mt-2 max-w-3xl",
|
|
672
|
-
children: o(
|
|
672
|
+
children: o(f, "files.browser.purpose", "Your workspace drive: upload, organise and share documents, images, videos and more with your team. Browse folders, star what you use often, search across everything, and recover deleted items from the Bin.")
|
|
673
673
|
})
|
|
674
674
|
]
|
|
675
675
|
}),
|
|
676
|
-
!b && /* @__PURE__ */
|
|
676
|
+
!b && /* @__PURE__ */ l("div", {
|
|
677
677
|
className: "px-4 pt-3 sm:px-6",
|
|
678
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ l(wt, {
|
|
679
679
|
storageKey: "files-browser",
|
|
680
|
-
title: o(
|
|
680
|
+
title: o(f, "files.browser.nextSteps.title", "Get started with Files"),
|
|
681
681
|
steps: [
|
|
682
682
|
{
|
|
683
683
|
id: "upload",
|
|
684
|
-
label: o(
|
|
685
|
-
description: o(
|
|
686
|
-
icon: /* @__PURE__ */
|
|
684
|
+
label: o(f, "files.browser.nextSteps.upload.label", "Upload your first files"),
|
|
685
|
+
description: o(f, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
|
|
686
|
+
icon: /* @__PURE__ */ l(ft, { className: "size-4" }),
|
|
687
687
|
onClick: In
|
|
688
688
|
},
|
|
689
689
|
{
|
|
690
690
|
id: "new-folder",
|
|
691
|
-
label: o(
|
|
692
|
-
description: o(
|
|
693
|
-
icon: /* @__PURE__ */
|
|
691
|
+
label: o(f, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
|
|
692
|
+
description: o(f, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
|
|
693
|
+
icon: /* @__PURE__ */ l(it, { className: "size-4" }),
|
|
694
694
|
onClick: Jn
|
|
695
695
|
},
|
|
696
696
|
{
|
|
697
697
|
id: "starred",
|
|
698
|
-
label: o(
|
|
699
|
-
description: o(
|
|
700
|
-
icon: /* @__PURE__ */
|
|
701
|
-
onClick: () =>
|
|
698
|
+
label: o(f, "files.browser.nextSteps.starred.label", "Star items you use often"),
|
|
699
|
+
description: o(f, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
|
|
700
|
+
icon: /* @__PURE__ */ l(ut, { className: "size-4" }),
|
|
701
|
+
onClick: () => Rt("starred")
|
|
702
702
|
},
|
|
703
703
|
{
|
|
704
704
|
id: "bin",
|
|
705
|
-
label: o(
|
|
706
|
-
description: o(
|
|
707
|
-
icon: /* @__PURE__ */
|
|
708
|
-
onClick: () =>
|
|
705
|
+
label: o(f, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
|
|
706
|
+
description: o(f, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
|
|
707
|
+
icon: /* @__PURE__ */ l(dt, { className: "size-4" }),
|
|
708
|
+
onClick: () => Rt("bin")
|
|
709
709
|
}
|
|
710
710
|
]
|
|
711
711
|
})
|
|
712
712
|
}),
|
|
713
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ l("div", {
|
|
714
714
|
"data-tour": "files-tab-bar",
|
|
715
|
-
children: /* @__PURE__ */
|
|
716
|
-
activeTab:
|
|
717
|
-
onTabChange:
|
|
715
|
+
children: /* @__PURE__ */ l(Me, {
|
|
716
|
+
activeTab: v,
|
|
717
|
+
onTabChange: Rt,
|
|
718
718
|
tabs: zt
|
|
719
719
|
})
|
|
720
720
|
}),
|
|
721
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ u("div", {
|
|
722
722
|
className: "bg-bg-surface border-b border-border-seam px-4 py-2 sm:px-6 sm:py-3",
|
|
723
723
|
children: [
|
|
724
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ u("div", {
|
|
725
725
|
className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-inline-gap",
|
|
726
|
-
children: [/* @__PURE__ */
|
|
726
|
+
children: [/* @__PURE__ */ l("div", {
|
|
727
727
|
className: "w-full sm:flex-1 min-w-0 order-2 sm:order-1",
|
|
728
728
|
"data-tour": "files-search-bar",
|
|
729
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ l("div", {
|
|
730
730
|
className: "relative w-full max-w-2xl",
|
|
731
|
-
children: /* @__PURE__ */
|
|
731
|
+
children: /* @__PURE__ */ l(ze, {
|
|
732
732
|
onSearch: (e, t) => {
|
|
733
733
|
Bt(e), Ht(t);
|
|
734
734
|
},
|
|
735
|
-
placeholder: o(
|
|
735
|
+
placeholder: o(f, "files.search.input.placeholder", "Search files and folders..."),
|
|
736
736
|
initialQuery: y,
|
|
737
|
-
showFilters: !0
|
|
737
|
+
showFilters: !0,
|
|
738
|
+
navigationV2: g
|
|
738
739
|
})
|
|
739
740
|
})
|
|
740
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), /* @__PURE__ */ u("div", {
|
|
741
742
|
className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
|
|
742
|
-
children: [!b && /* @__PURE__ */
|
|
743
|
+
children: [!b && /* @__PURE__ */ u("div", {
|
|
743
744
|
className: "flex flex-wrap items-center gap-2",
|
|
744
745
|
"data-tour": "files-upload-files-button",
|
|
745
746
|
children: [
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ l(se, {
|
|
747
748
|
value: fn,
|
|
748
749
|
onChange: pn,
|
|
749
750
|
disabled: W
|
|
750
751
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ u(d, {
|
|
752
753
|
type: "button",
|
|
753
754
|
variant: "default",
|
|
754
755
|
onClick: In,
|
|
755
756
|
disabled: W,
|
|
756
|
-
children: [W ? /* @__PURE__ */ c
|
|
757
|
+
children: [W ? /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l(ft, { className: "size-4" }), W ? o(f, "files.browser.upload.uploading", "Uploading...") : o(f, "files.browser.actions.uploadFiles", "Upload Files")]
|
|
757
758
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ l("div", {
|
|
759
760
|
"data-tour": "files-more-actions-trigger",
|
|
760
|
-
children:
|
|
761
|
+
children: g ? /* @__PURE__ */ l(tt, {
|
|
761
762
|
onNewFolder: Jn,
|
|
762
763
|
onUploadFolder: qn,
|
|
763
764
|
onSelectAll: E.length > 0 || D.length > 0 ? Yn : void 0,
|
|
764
765
|
uploading: W
|
|
765
|
-
}) : /* @__PURE__ */
|
|
766
|
+
}) : /* @__PURE__ */ l(yt, { actions: [
|
|
766
767
|
{
|
|
767
|
-
label: o(
|
|
768
|
-
icon: /* @__PURE__ */
|
|
768
|
+
label: o(f, "files.browser.actions.newFolder", "New Folder"),
|
|
769
|
+
icon: /* @__PURE__ */ l(it, { className: "size-4" }),
|
|
769
770
|
onSelect: Jn,
|
|
770
771
|
dataTour: "files-new-folder-button"
|
|
771
772
|
},
|
|
772
773
|
{
|
|
773
|
-
label: o(
|
|
774
|
-
icon: /* @__PURE__ */
|
|
774
|
+
label: o(f, "files.browser.actions.uploadFolder", "Upload Folder"),
|
|
775
|
+
icon: /* @__PURE__ */ l(at, { className: "size-4" }),
|
|
775
776
|
onSelect: qn,
|
|
776
777
|
disabled: W
|
|
777
778
|
},
|
|
778
779
|
...E.length > 0 || D.length > 0 ? [{
|
|
779
|
-
label: o(
|
|
780
|
+
label: o(f, "files.browser.actions.selectAll", "Select All"),
|
|
780
781
|
onSelect: Yn
|
|
781
782
|
}] : []
|
|
782
783
|
] })
|
|
783
784
|
})
|
|
784
785
|
]
|
|
785
|
-
}), /* @__PURE__ */
|
|
786
|
+
}), /* @__PURE__ */ u("div", {
|
|
786
787
|
className: "flex items-center border border-border-seam rounded-lg overflow-hidden",
|
|
787
788
|
"data-tour": "files-view-mode-toggle",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
789
|
+
children: [/* @__PURE__ */ l("button", {
|
|
789
790
|
type: "button",
|
|
790
|
-
onClick: () =>
|
|
791
|
-
className: `p-2 transition-colors duration-200 ${
|
|
792
|
-
"aria-label": o(
|
|
793
|
-
children: /* @__PURE__ */
|
|
794
|
-
}), /* @__PURE__ */
|
|
791
|
+
onClick: () => Pt("grid"),
|
|
792
|
+
className: `p-2 transition-colors duration-200 ${Nt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
793
|
+
"aria-label": o(f, "files.browser.view.grid", "Grid view"),
|
|
794
|
+
children: /* @__PURE__ */ l(st, { className: "size-5" })
|
|
795
|
+
}), /* @__PURE__ */ l("button", {
|
|
795
796
|
type: "button",
|
|
796
|
-
onClick: () =>
|
|
797
|
-
className: `p-2 transition-colors duration-200 ${
|
|
798
|
-
"aria-label": o(
|
|
799
|
-
children: /* @__PURE__ */
|
|
797
|
+
onClick: () => Pt("list"),
|
|
798
|
+
className: `p-2 transition-colors duration-200 ${Nt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
799
|
+
"aria-label": o(f, "files.browser.view.list", "List view"),
|
|
800
|
+
children: /* @__PURE__ */ l(lt, { className: "size-5" })
|
|
800
801
|
})]
|
|
801
802
|
})]
|
|
802
803
|
})]
|
|
803
804
|
}),
|
|
804
|
-
b && /* @__PURE__ */
|
|
805
|
+
b && /* @__PURE__ */ u("div", {
|
|
805
806
|
className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
|
|
806
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ u("span", {
|
|
807
808
|
className: "text-sm font-medium text-status-success-text",
|
|
808
|
-
children: [o(
|
|
809
|
-
}), /* @__PURE__ */
|
|
809
|
+
children: [o(f, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: y }), T.data && ` (${(T.data.files?.length || 0) + (T.data.folders?.length || 0)} items)`]
|
|
810
|
+
}), /* @__PURE__ */ u("button", {
|
|
810
811
|
type: "button",
|
|
811
812
|
onClick: () => Bt(""),
|
|
812
813
|
className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
|
|
813
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ l(pt, { className: "size-4" }), o(f, "files.browser.search.clear", "Clear search")]
|
|
814
815
|
})]
|
|
815
816
|
}),
|
|
816
|
-
j > 0 && /* @__PURE__ */
|
|
817
|
+
j > 0 && /* @__PURE__ */ u(bt, {
|
|
817
818
|
className: "mt-3 flex items-center justify-between p-3",
|
|
818
|
-
children: [/* @__PURE__ */
|
|
819
|
+
children: [/* @__PURE__ */ u("div", {
|
|
819
820
|
className: "flex items-center gap-4",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
821
|
+
children: [/* @__PURE__ */ l("span", {
|
|
821
822
|
className: "text-sm font-medium text-text-primary",
|
|
822
|
-
children: o(
|
|
823
|
+
children: o(f, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
|
|
823
824
|
count: j,
|
|
824
825
|
suffix: j > 1 ? "s" : ""
|
|
825
826
|
})
|
|
826
|
-
}), /* @__PURE__ */
|
|
827
|
+
}), /* @__PURE__ */ l("div", {
|
|
827
828
|
className: "flex items-center gap-2",
|
|
828
|
-
children:
|
|
829
|
+
children: v === "bin" ? /* @__PURE__ */ u(mt, { children: [/* @__PURE__ */ l("button", {
|
|
829
830
|
type: "button",
|
|
830
831
|
onClick: Cr,
|
|
831
832
|
className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
|
|
832
|
-
children: o(
|
|
833
|
-
}), /* @__PURE__ */
|
|
833
|
+
children: o(f, "files.browser.selection.actions.restore", "Restore")
|
|
834
|
+
}), /* @__PURE__ */ u("button", {
|
|
834
835
|
type: "button",
|
|
835
836
|
onClick: async () => {
|
|
836
837
|
q({
|
|
837
|
-
title: o(
|
|
838
|
-
description: o(
|
|
838
|
+
title: o(f, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
|
|
839
|
+
description: o(f, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
|
|
839
840
|
count: j,
|
|
840
841
|
plural: j > 1 ? "s" : ""
|
|
841
842
|
}),
|
|
842
|
-
confirmLabel: o(
|
|
843
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
843
844
|
variant: "danger",
|
|
844
845
|
onConfirm: wr
|
|
845
846
|
});
|
|
846
847
|
},
|
|
847
848
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
848
|
-
children: [/* @__PURE__ */
|
|
849
|
-
})] }) : /* @__PURE__ */
|
|
849
|
+
children: [/* @__PURE__ */ l(dt, { className: "size-4" }), o(f, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
|
|
850
|
+
})] }) : /* @__PURE__ */ u("button", {
|
|
850
851
|
type: "button",
|
|
851
852
|
onClick: async () => {
|
|
852
853
|
q({
|
|
853
|
-
title: o(
|
|
854
|
-
description: o(
|
|
854
|
+
title: o(f, "files.confirm.bulkDelete.title", "Delete selected items"),
|
|
855
|
+
description: o(f, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
|
|
855
856
|
count: j,
|
|
856
857
|
plural: j > 1 ? "s" : ""
|
|
857
858
|
}),
|
|
858
|
-
confirmLabel: o(
|
|
859
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
859
860
|
variant: "danger",
|
|
860
861
|
onConfirm: async () => {
|
|
861
862
|
try {
|
|
862
|
-
let e = Array.from(
|
|
863
|
+
let e = Array.from(_), t = Array.from(It);
|
|
863
864
|
e.length > 0 && await Pn.mutateAsync(e), await Promise.all(t.map((e) => Sn.mutateAsync({
|
|
864
865
|
id: e,
|
|
865
866
|
recursive: !0
|
|
866
|
-
}))),
|
|
867
|
+
}))), Lt(), S.success(o(f, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
|
|
867
868
|
count: j,
|
|
868
869
|
plural: j > 1 ? "s" : ""
|
|
869
870
|
}));
|
|
870
871
|
} catch (e) {
|
|
871
|
-
S.error(e instanceof Error ? e.message : o(
|
|
872
|
+
S.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
|
|
872
873
|
}
|
|
873
874
|
}
|
|
874
875
|
});
|
|
875
876
|
},
|
|
876
877
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
877
|
-
children: [/* @__PURE__ */
|
|
878
|
+
children: [/* @__PURE__ */ l(dt, { className: "size-4" }), o(f, "files.browser.selection.actions.delete", "Delete")]
|
|
878
879
|
})
|
|
879
880
|
})]
|
|
880
|
-
}), /* @__PURE__ */
|
|
881
|
+
}), /* @__PURE__ */ u("button", {
|
|
881
882
|
type: "button",
|
|
882
|
-
onClick:
|
|
883
|
+
onClick: Lt,
|
|
883
884
|
className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
|
|
884
|
-
children: [/* @__PURE__ */
|
|
885
|
+
children: [/* @__PURE__ */ l(pt, { className: "size-4" }), o(f, "files.common.actions.clear", "Clear")]
|
|
885
886
|
})]
|
|
886
887
|
})
|
|
887
888
|
]
|
|
888
889
|
}),
|
|
889
|
-
(
|
|
890
|
+
(Mt.isExhausted || Mt.isNearLimit) && /* @__PURE__ */ l("div", {
|
|
890
891
|
className: "px-4 sm:px-6 pt-3",
|
|
891
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ l(We, { quota: Mt })
|
|
892
893
|
}),
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ u("div", {
|
|
894
895
|
className: `relative px-2 sm:px-4 md:px-6 py-3 sm:py-4 ${Ln ? "rounded-lg outline-2 outline-dashed outline-action-primary-border bg-bg-accent" : ""}`,
|
|
895
896
|
"data-tour": "files-browser-grid",
|
|
896
897
|
onDragOver: $ ? zn : void 0,
|
|
897
898
|
onDragLeave: $ ? Bn : void 0,
|
|
898
899
|
onDrop: $ ? Vn : void 0,
|
|
899
900
|
children: [
|
|
900
|
-
Ln && /* @__PURE__ */
|
|
901
|
+
Ln && /* @__PURE__ */ l("p", {
|
|
901
902
|
role: "status",
|
|
902
903
|
className: "pointer-events-none mb-3 text-center text-sm font-medium text-text-link",
|
|
903
|
-
children: o(
|
|
904
|
+
children: o(f, "files.browser.dropToUpload", "Drop files to upload them here")
|
|
904
905
|
}),
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ l(je, {
|
|
906
907
|
files: E,
|
|
907
908
|
folders: D,
|
|
908
909
|
loading: O,
|
|
909
910
|
error: k,
|
|
910
911
|
preserveSortOrder: A,
|
|
911
912
|
onFilePreview: Zn,
|
|
912
|
-
onFileShare:
|
|
913
|
-
onFileDelete:
|
|
914
|
-
onFileRestore:
|
|
915
|
-
onFileFavorite:
|
|
916
|
-
onFileRename:
|
|
913
|
+
onFileShare: v === "bin" ? void 0 : $n,
|
|
914
|
+
onFileDelete: v === "bin" ? ir : nr,
|
|
915
|
+
onFileRestore: v === "bin" ? rr : void 0,
|
|
916
|
+
onFileFavorite: v === "bin" ? void 0 : ar,
|
|
917
|
+
onFileRename: v === "bin" ? void 0 : or,
|
|
917
918
|
onFileDownload: sr,
|
|
918
|
-
onFileCopy:
|
|
919
|
-
onFileMove:
|
|
919
|
+
onFileCopy: v === "bin" ? void 0 : cr,
|
|
920
|
+
onFileMove: v === "bin" ? void 0 : lr,
|
|
920
921
|
onFileInfo: ur,
|
|
921
922
|
onFolderOpen: dr,
|
|
922
|
-
onFolderShare:
|
|
923
|
-
onFolderDelete:
|
|
924
|
-
onFolderRestore:
|
|
925
|
-
onFolderRename:
|
|
926
|
-
onFolderFavorite:
|
|
927
|
-
onFolderMove:
|
|
923
|
+
onFolderShare: v === "bin" ? void 0 : er,
|
|
924
|
+
onFolderDelete: v === "bin" ? mr : fr,
|
|
925
|
+
onFolderRestore: v === "bin" ? pr : void 0,
|
|
926
|
+
onFolderRename: v === "bin" ? void 0 : hr,
|
|
927
|
+
onFolderFavorite: v === "bin" ? void 0 : _r,
|
|
928
|
+
onFolderMove: v === "bin" ? void 0 : gr,
|
|
928
929
|
onFolderInfo: vr
|
|
929
930
|
}),
|
|
930
|
-
!O && (E.length > 0 || D.length > 0) && /* @__PURE__ */
|
|
931
|
+
!O && (E.length > 0 || D.length > 0) && /* @__PURE__ */ u("div", {
|
|
931
932
|
className: "mt-4 px-2 text-sm text-text-secondary",
|
|
932
|
-
children: [o(
|
|
933
|
+
children: [o(f, "files.browser.results.showingItems", "Showing {{count}} items", { count: E.length + D.length }), !b && v === "all" && Jt !== null && ` ${o(f, "files.browser.results.ofItems", "of {{count}} items", { count: Jt })}`]
|
|
933
934
|
})
|
|
934
935
|
]
|
|
935
936
|
}),
|
|
936
|
-
Yt && /* @__PURE__ */
|
|
937
|
+
Yt && /* @__PURE__ */ l(Et, {
|
|
937
938
|
open: !0,
|
|
938
939
|
onOpenChange: (e) => {
|
|
939
940
|
!e && !Y.isPending && (M(!1), U(""));
|
|
940
941
|
},
|
|
941
|
-
children: /* @__PURE__ */
|
|
942
|
+
children: /* @__PURE__ */ u(Dt, {
|
|
942
943
|
className: "w-full max-w-xs",
|
|
943
944
|
children: [
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ l(kt, {
|
|
945
946
|
className: "text-left",
|
|
946
|
-
children: /* @__PURE__ */
|
|
947
|
+
children: /* @__PURE__ */ l(At, {
|
|
947
948
|
id: "files-new-folder-title",
|
|
948
949
|
className: "text-base font-semibold text-text-primary",
|
|
949
|
-
children: o(
|
|
950
|
+
children: o(f, "files.browser.newFolderDialog.title", "New folder")
|
|
950
951
|
})
|
|
951
952
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ l(Ct, {
|
|
953
954
|
type: "text",
|
|
954
955
|
value: H,
|
|
955
956
|
onChange: (e) => U(e.target.value),
|
|
956
957
|
onKeyDown: (e) => {
|
|
957
958
|
e.key === "Enter" && Xn();
|
|
958
959
|
},
|
|
959
|
-
"aria-label": o(
|
|
960
|
-
placeholder: o(
|
|
960
|
+
"aria-label": o(f, "files.browser.newFolderDialog.title", "New folder"),
|
|
961
|
+
placeholder: o(f, "files.browser.newFolderDialog.placeholder", "Folder name")
|
|
961
962
|
}),
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ u(Ot, { children: [/* @__PURE__ */ l(d, {
|
|
963
964
|
type: "button",
|
|
964
965
|
variant: "outline",
|
|
965
966
|
onClick: () => {
|
|
966
967
|
M(!1), U("");
|
|
967
968
|
},
|
|
968
|
-
children: o(
|
|
969
|
-
}), /* @__PURE__ */
|
|
969
|
+
children: o(f, "files.common.actions.cancel", "Cancel")
|
|
970
|
+
}), /* @__PURE__ */ u(d, {
|
|
970
971
|
type: "button",
|
|
971
972
|
onClick: Xn,
|
|
972
973
|
disabled: !H.trim() || Y.isPending,
|
|
973
|
-
children: [Y.isPending && /* @__PURE__ */ c
|
|
974
|
+
children: [Y.isPending && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), Y.isPending ? o(f, "files.browser.newFolderDialog.actions.creating", "Creating...") : o(f, "files.common.actions.create", "Create")]
|
|
974
975
|
})] })
|
|
975
976
|
]
|
|
976
977
|
})
|
|
977
978
|
}),
|
|
978
|
-
en && R && /* @__PURE__ */
|
|
979
|
+
en && R && /* @__PURE__ */ l(Et, {
|
|
979
980
|
open: !0,
|
|
980
981
|
onOpenChange: (e) => {
|
|
981
982
|
e || X.isPending || Z.isPending || (N(!1), z(null), V(""));
|
|
982
983
|
},
|
|
983
|
-
children: /* @__PURE__ */
|
|
984
|
+
children: /* @__PURE__ */ u(Dt, {
|
|
984
985
|
className: "w-full max-w-xs",
|
|
985
986
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ l(kt, {
|
|
987
988
|
className: "text-left",
|
|
988
|
-
children: /* @__PURE__ */
|
|
989
|
+
children: /* @__PURE__ */ l(At, {
|
|
989
990
|
id: "files-rename-title",
|
|
990
991
|
className: "text-base font-semibold text-text-primary",
|
|
991
|
-
children:
|
|
992
|
+
children: g ? R.type === "folder" ? o(f, "files.browser.renameDialog.titleFolder", "Rename folder") : o(f, "files.browser.renameDialog.titleFile", "Rename file") : o(f, "files.browser.renameDialog.title", "Rename {{type}}", { type: R.type })
|
|
992
993
|
})
|
|
993
994
|
}),
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ l(Ct, {
|
|
995
996
|
type: "text",
|
|
996
997
|
value: B,
|
|
997
998
|
onChange: (e) => V(e.target.value),
|
|
998
999
|
onKeyDown: (e) => {
|
|
999
1000
|
e.key === "Enter" && xr();
|
|
1000
1001
|
},
|
|
1001
|
-
"aria-label": o(
|
|
1002
|
-
placeholder: o(
|
|
1002
|
+
"aria-label": o(f, "files.browser.renameDialog.title", "Rename"),
|
|
1003
|
+
placeholder: o(f, "files.browser.renameDialog.placeholder", "New name")
|
|
1003
1004
|
}),
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ u(Ot, { children: [/* @__PURE__ */ l(d, {
|
|
1005
1006
|
type: "button",
|
|
1006
1007
|
variant: "outline",
|
|
1007
1008
|
onClick: () => {
|
|
1008
1009
|
N(!1), z(null), V("");
|
|
1009
1010
|
},
|
|
1010
|
-
children: o(
|
|
1011
|
-
}), /* @__PURE__ */
|
|
1011
|
+
children: o(f, "files.common.actions.cancel", "Cancel")
|
|
1012
|
+
}), /* @__PURE__ */ u(d, {
|
|
1012
1013
|
type: "button",
|
|
1013
1014
|
onClick: xr,
|
|
1014
1015
|
disabled: !B.trim() || B.trim() === R.name || X.isPending || Z.isPending,
|
|
1015
|
-
children: [(X.isPending || Z.isPending) && /* @__PURE__ */ c
|
|
1016
|
+
children: [(X.isPending || Z.isPending) && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), X.isPending || Z.isPending ? o(f, "files.browser.renameDialog.actions.renaming", "Renaming...") : o(f, "files.common.actions.rename", "Rename")]
|
|
1016
1017
|
})] })
|
|
1017
1018
|
]
|
|
1018
1019
|
})
|
|
1019
1020
|
}),
|
|
1020
|
-
tn && sn && /* @__PURE__ */
|
|
1021
|
+
tn && sn && /* @__PURE__ */ l(Pe, {
|
|
1021
1022
|
item: sn,
|
|
1022
1023
|
itemType: "mimeType" in sn ? "file" : "folder",
|
|
1023
1024
|
onClose: () => {
|
|
@@ -1025,14 +1026,14 @@ function d() {
|
|
|
1025
1026
|
},
|
|
1026
1027
|
onCreateShare: tr,
|
|
1027
1028
|
knownPermission: ln,
|
|
1028
|
-
|
|
1029
|
+
navigationV2: g,
|
|
1029
1030
|
isLoading: On.isPending || kn.isPending
|
|
1030
1031
|
}),
|
|
1031
|
-
K && /* @__PURE__ */
|
|
1032
|
+
K && /* @__PURE__ */ l(He, {
|
|
1032
1033
|
title: K.title,
|
|
1033
1034
|
description: K.description,
|
|
1034
1035
|
confirmLabel: K.confirmLabel,
|
|
1035
|
-
cancelLabel: o(
|
|
1036
|
+
cancelLabel: o(f, "files.common.actions.cancel", "Cancel"),
|
|
1036
1037
|
variant: K.variant,
|
|
1037
1038
|
loading: K.loading,
|
|
1038
1039
|
onConfirm: yn,
|
|
@@ -1040,27 +1041,27 @@ function d() {
|
|
|
1040
1041
|
K.loading || q(null);
|
|
1041
1042
|
}
|
|
1042
1043
|
}),
|
|
1043
|
-
Xt && /* @__PURE__ */
|
|
1044
|
-
title: o(
|
|
1045
|
-
description: o(
|
|
1046
|
-
confirmLabel: o(
|
|
1047
|
-
cancelLabel: o(
|
|
1044
|
+
Xt && /* @__PURE__ */ l(He, {
|
|
1045
|
+
title: o(f, "files.folder.quota.title", "Folder Limit Reached"),
|
|
1046
|
+
description: o(f, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
|
|
1047
|
+
confirmLabel: o(f, "files.folder.quota.upgrade", "View Billing"),
|
|
1048
|
+
cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
|
|
1048
1049
|
onConfirm: () => {
|
|
1049
|
-
Zt(!1),
|
|
1050
|
+
Zt(!1), m("/billing");
|
|
1050
1051
|
},
|
|
1051
1052
|
onCancel: () => Zt(!1)
|
|
1052
1053
|
}),
|
|
1053
|
-
Qt && /* @__PURE__ */
|
|
1054
|
-
title: o(
|
|
1055
|
-
description: o(
|
|
1056
|
-
confirmLabel: o(
|
|
1057
|
-
cancelLabel: o(
|
|
1054
|
+
Qt && /* @__PURE__ */ l(He, {
|
|
1055
|
+
title: o(f, "files.storage.quota.title", "Storage Limit Reached"),
|
|
1056
|
+
description: o(f, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
|
|
1057
|
+
confirmLabel: o(f, "files.storage.quota.upgrade", "View Billing"),
|
|
1058
|
+
cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
|
|
1058
1059
|
onConfirm: () => {
|
|
1059
|
-
$t(!1),
|
|
1060
|
+
$t(!1), m("/billing");
|
|
1060
1061
|
},
|
|
1061
1062
|
onCancel: () => $t(!1)
|
|
1062
1063
|
}),
|
|
1063
|
-
rn && F && /* @__PURE__ */
|
|
1064
|
+
rn && F && /* @__PURE__ */ l(Be, {
|
|
1064
1065
|
item: F.item,
|
|
1065
1066
|
type: F.type,
|
|
1066
1067
|
onClose: () => {
|
|
@@ -1069,7 +1070,7 @@ function d() {
|
|
|
1069
1070
|
onMove: yr,
|
|
1070
1071
|
isLoading: Mn.isPending || Nn.isPending
|
|
1071
1072
|
}),
|
|
1072
|
-
an && L && /* @__PURE__ */
|
|
1073
|
+
an && L && /* @__PURE__ */ l(Ve, {
|
|
1073
1074
|
item: L.item,
|
|
1074
1075
|
type: L.type,
|
|
1075
1076
|
onClose: () => {
|
|
@@ -1077,27 +1078,29 @@ function d() {
|
|
|
1077
1078
|
},
|
|
1078
1079
|
onCopy: br,
|
|
1079
1080
|
isLoading: jn.isPending,
|
|
1080
|
-
initialFolderId:
|
|
1081
|
-
initialBreadcrumbs:
|
|
1081
|
+
initialFolderId: g ? p ?? null : null,
|
|
1082
|
+
initialBreadcrumbs: g ? Ft : [],
|
|
1083
|
+
navigationV2: g
|
|
1082
1084
|
}),
|
|
1083
|
-
x && /* @__PURE__ */
|
|
1085
|
+
x && /* @__PURE__ */ l(Fe, {
|
|
1084
1086
|
file: x,
|
|
1085
1087
|
onClose: () => Gt(null),
|
|
1086
1088
|
onDownload: () => {
|
|
1087
1089
|
let e = x.downloadUrl || x.url;
|
|
1088
1090
|
e && Ye(e);
|
|
1089
1091
|
},
|
|
1090
|
-
onShare:
|
|
1091
|
-
shareDeniedReason:
|
|
1092
|
-
onStar:
|
|
1093
|
-
onDelete:
|
|
1092
|
+
onShare: v === "bin" || !Q || !Se(Q.share) ? void 0 : () => Qn(x, An === "denied" ? "denied" : void 0),
|
|
1093
|
+
shareDeniedReason: v === "bin" ? void 0 : we(An, Te(f)),
|
|
1094
|
+
onStar: v === "bin" || !Q?.canUpdate ? void 0 : () => ar(x),
|
|
1095
|
+
onDelete: v === "bin" ? () => ir(x) : Q?.canDelete ? () => nr(x) : void 0
|
|
1094
1096
|
}),
|
|
1095
|
-
Ut && /* @__PURE__ */
|
|
1097
|
+
Ut && /* @__PURE__ */ l(Ie, {
|
|
1096
1098
|
item: Ut.item,
|
|
1097
1099
|
type: Ut.type,
|
|
1098
|
-
onClose: () => Wt(null)
|
|
1100
|
+
onClose: () => Wt(null),
|
|
1101
|
+
navigationV2: g
|
|
1099
1102
|
}),
|
|
1100
|
-
/* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ l(Ue, {
|
|
1101
1104
|
items: mn,
|
|
1102
1105
|
isOpen: hn,
|
|
1103
1106
|
onClose: () => _n(!1),
|
|
@@ -1105,34 +1108,34 @@ function d() {
|
|
|
1105
1108
|
onResume: Wn,
|
|
1106
1109
|
onRetry: Gn,
|
|
1107
1110
|
onCancel: Kn,
|
|
1108
|
-
navigationV2:
|
|
1111
|
+
navigationV2: g
|
|
1109
1112
|
}),
|
|
1110
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ l(Re, {
|
|
1111
1114
|
toasts: S.toasts,
|
|
1112
1115
|
onClose: S.removeToast
|
|
1113
1116
|
}),
|
|
1114
|
-
!O && E.length === 0 && D.length === 0 && /* @__PURE__ */
|
|
1117
|
+
!O && E.length === 0 && D.length === 0 && /* @__PURE__ */ l("div", {
|
|
1115
1118
|
className: "px-6 py-12",
|
|
1116
|
-
children: b ? /* @__PURE__ */
|
|
1119
|
+
children: b ? /* @__PURE__ */ l(St, {
|
|
1117
1120
|
illustration: "empty-search",
|
|
1118
|
-
title: o(
|
|
1119
|
-
description: o(
|
|
1120
|
-
action: /* @__PURE__ */
|
|
1121
|
+
title: o(f, "files.browser.empty.search.title", "No results found"),
|
|
1122
|
+
description: o(f, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
|
|
1123
|
+
action: /* @__PURE__ */ l(d, {
|
|
1121
1124
|
type: "button",
|
|
1122
1125
|
onClick: () => {
|
|
1123
1126
|
Bt(""), Ht(void 0);
|
|
1124
1127
|
},
|
|
1125
|
-
children: o(
|
|
1128
|
+
children: o(f, "files.browser.search.clear", "Clear search")
|
|
1126
1129
|
})
|
|
1127
|
-
}) : /* @__PURE__ */
|
|
1128
|
-
type:
|
|
1129
|
-
onUpload:
|
|
1130
|
-
onNewFolder:
|
|
1130
|
+
}) : /* @__PURE__ */ l(Le, {
|
|
1131
|
+
type: v,
|
|
1132
|
+
onUpload: v === "all" ? In : void 0,
|
|
1133
|
+
onNewFolder: v === "all" ? Jn : void 0
|
|
1131
1134
|
})
|
|
1132
1135
|
})
|
|
1133
1136
|
]
|
|
1134
1137
|
});
|
|
1135
1138
|
}
|
|
1136
|
-
export {
|
|
1139
|
+
export { f as BrowserPage };
|
|
1137
1140
|
|
|
1138
1141
|
//# sourceMappingURL=BrowserPage.js.map
|