@burdenoff/microfe-files 2026.626.1 → 2026.713.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/StorageBanner.js +43 -24
- package/dist/files/components/StorageBanner.js.map +1 -1
- package/dist/files/hooks/useStorageQuota.js +1 -1
- package/dist/files/hooks/useStorageQuota.js.map +1 -1
- package/dist/files/hooks/useUploadFile.js +43 -44
- package/dist/files/hooks/useUploadFile.js.map +1 -1
- package/dist/files/pages/BrowserPage.js +361 -351
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/utils/quotaUtils.js +2 -14
- package/package.json +1 -1
- package/dist/files/utils/quotaUtils.js.map +0 -1
|
@@ -6,42 +6,42 @@ import { useRecentFiles as i } from "../hooks/useRecentFiles.js";
|
|
|
6
6
|
import { useStarredItems as ee } from "../hooks/useStarredItems.js";
|
|
7
7
|
import { useBinItems as te } from "../hooks/useBinItems.js";
|
|
8
8
|
import { useCreateFolder as ne } from "../hooks/useCreateFolder.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
9
|
+
import { isQuotaExhaustedError as re } from "../utils/quotaUtils.js";
|
|
10
|
+
import { useUploadFile as ie } from "../hooks/useUploadFile.js";
|
|
11
|
+
import { useDeleteFile as ae } from "../hooks/useDeleteFile.js";
|
|
12
|
+
import { useDeleteFolder as oe } from "../hooks/useDeleteFolder.js";
|
|
13
|
+
import { useRestoreFile as se } from "../hooks/useRestoreFile.js";
|
|
14
|
+
import { useRestoreFolder as ce } from "../hooks/useRestoreFolder.js";
|
|
15
|
+
import { usePermanentlyDeleteFile as le } from "../hooks/usePermanentlyDeleteFile.js";
|
|
16
|
+
import { usePermanentlyDeleteFolder as ue } from "../hooks/usePermanentlyDeleteFolder.js";
|
|
17
|
+
import { useToggleStar as de } from "../hooks/useToggleStar.js";
|
|
18
|
+
import { useRenameFile as fe } from "../hooks/useRenameFile.js";
|
|
19
|
+
import { useRenameFolder as pe } from "../hooks/useRenameFolder.js";
|
|
20
|
+
import { useCreateShare as me } from "../hooks/useCreateShare.js";
|
|
21
|
+
import { useCreateFolderShare as he } from "../hooks/useCreateFolderShare.js";
|
|
22
|
+
import { useCopyFile as ge } from "../hooks/useCopyFile.js";
|
|
23
|
+
import { useMoveFile as _e } from "../hooks/useMoveFile.js";
|
|
24
|
+
import { useMoveFolder as ve } from "../hooks/useMoveFolder.js";
|
|
25
|
+
import { useBulkDelete as ye } from "../hooks/useBatchOperations.js";
|
|
26
|
+
import { useSearch as be } from "../hooks/useSearch.js";
|
|
27
|
+
import { useToast as xe } from "../hooks/useToast.js";
|
|
28
|
+
import { generateThumbnail as Se } from "../utils/thumbnail.js";
|
|
28
29
|
import "../utils/index.js";
|
|
29
30
|
import { tWithFallback as a } from "../utils/i18n.js";
|
|
30
|
-
import { FileBrowser as
|
|
31
|
-
import { TabBar as
|
|
32
|
-
import { ShareDialog as
|
|
33
|
-
import { FilePreviewModal as
|
|
34
|
-
import { FileInfoPanel as
|
|
35
|
-
import { EmptyState as
|
|
36
|
-
import { ToastContainer as
|
|
37
|
-
import { SearchBar as
|
|
38
|
-
import { MoveDialog as
|
|
39
|
-
import { CopyDialog as
|
|
40
|
-
import { ConfirmDialog as
|
|
41
|
-
import { UploadQueue as
|
|
42
|
-
import { StorageBanner as
|
|
43
|
-
import { useStorageQuota as
|
|
44
|
-
import { isQuotaExhaustedError as Ie } from "../utils/quotaUtils.js";
|
|
31
|
+
import { FileBrowser as Ce } from "../components/FileBrowser.js";
|
|
32
|
+
import { TabBar as we } from "../components/TabBar.js";
|
|
33
|
+
import { ShareDialog as Te } from "../components/ShareDialog.js";
|
|
34
|
+
import { FilePreviewModal as Ee } from "../components/FilePreviewModal.js";
|
|
35
|
+
import { FileInfoPanel as De } from "../components/FileInfoPanel.js";
|
|
36
|
+
import { EmptyState as Oe } from "../components/EmptyState.js";
|
|
37
|
+
import { ToastContainer as ke } from "../components/Toast.js";
|
|
38
|
+
import { SearchBar as Ae } from "../components/SearchBar.js";
|
|
39
|
+
import { MoveDialog as je } from "../components/MoveDialog.js";
|
|
40
|
+
import { CopyDialog as Me } from "../components/CopyDialog.js";
|
|
41
|
+
import { ConfirmDialog as Ne } from "../components/ConfirmDialog.js";
|
|
42
|
+
import { UploadQueue as Pe } from "../components/UploadQueue.js";
|
|
43
|
+
import { StorageBanner as Fe } from "../components/StorageBanner.js";
|
|
44
|
+
import { useStorageQuota as Ie } from "../hooks/useStorageQuota.js";
|
|
45
45
|
import { nativeImpact as Le, nativeNotify as Re, nativeOpenUrl as ze } from "../../utils/nativeBridge.js";
|
|
46
46
|
import { emitFilesEvent as Be } from "../utils/events.js";
|
|
47
47
|
import { useEffect as Ve, useMemo as He, useState as o } from "react";
|
|
@@ -52,23 +52,23 @@ import { useI18n as nt } from "@burdenoff/fe-libs/shared/providers/shell/I18nPro
|
|
|
52
52
|
import { AuroraBackground as rt, Button as u, CTAOverflowMenu as it, EmphasisPanel as at, GradientText as ot, IllustratedEmptyState as st, Input as ct, NextSteps as lt, PagePurpose as ut, ResponsiveDialog as dt, ResponsiveDialogContent as ft, ResponsiveDialogFooter as pt, ResponsiveDialogHeader as mt, ResponsiveDialogTitle as ht } from "@burdenoff/fe-libs/ui";
|
|
53
53
|
//#region src/files/pages/BrowserPage.tsx
|
|
54
54
|
function d() {
|
|
55
|
-
let { t: d } = nt(), { folderId: f } = tt(),
|
|
55
|
+
let { t: d } = nt(), { folderId: f } = tt(), p = et(), gt = e(), { workspaceId: m } = gt, _t = Ie(m ?? ""), { viewMode: vt, setViewMode: yt, breadcrumbs: bt, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, y] = o("all"), xt = He(() => [
|
|
56
56
|
"all",
|
|
57
57
|
"recent",
|
|
58
58
|
"starred",
|
|
59
59
|
"bin"
|
|
60
60
|
], []);
|
|
61
61
|
Ve(() => {
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
let [
|
|
62
|
+
xt.includes(v) || y("all");
|
|
63
|
+
}, [xt, v]);
|
|
64
|
+
let [b, St] = o(""), [Ct, wt] = o(), x = b.trim().length >= 2, [Tt, Et] = o(null), [S, Dt] = o(null), C = xe(), w = r({
|
|
65
65
|
folderId: f || void 0,
|
|
66
66
|
pageSize: 100,
|
|
67
|
-
skip:
|
|
68
|
-
}),
|
|
67
|
+
skip: v !== "all" || x
|
|
68
|
+
}), T = i({ skip: v !== "recent" || x }), E = ee({ skip: v !== "starred" || x }), D = te({ skip: v !== "bin" || x }), O = be(b, x, Ct);
|
|
69
69
|
Ve(() => {
|
|
70
|
-
if (f &&
|
|
71
|
-
let e =
|
|
70
|
+
if (f && w.data?.folderPath && w.data?.currentFolder) {
|
|
71
|
+
let e = w.data.folderPath.folders || [], n = w.data.currentFolder, r = [...e.map((e) => ({
|
|
72
72
|
id: e.id,
|
|
73
73
|
name: e.name
|
|
74
74
|
})), {
|
|
@@ -77,26 +77,26 @@ function d() {
|
|
|
77
77
|
}];
|
|
78
78
|
t.getState().setBreadcrumbs(r);
|
|
79
79
|
} else t.getState().setBreadcrumbs([]);
|
|
80
|
-
}, [f,
|
|
81
|
-
let
|
|
82
|
-
if (
|
|
83
|
-
else switch (
|
|
80
|
+
}, [f, w.data]);
|
|
81
|
+
let k = [], A = [], j = !1, M = null, N = !1;
|
|
82
|
+
if (x && O.data) k = O.data.files || [], A = O.data.folders || [], j = O.isLoading, M = O.error;
|
|
83
|
+
else switch (v) {
|
|
84
84
|
case "all":
|
|
85
|
-
|
|
85
|
+
k = w.data?.filesList?.files || [], A = w.data?.foldersList?.folders || [], j = w.loading, M = w.error || null, N = !1;
|
|
86
86
|
break;
|
|
87
87
|
case "recent":
|
|
88
|
-
|
|
88
|
+
k = T.files || [], A = T.folders || [], j = T.isLoading, M = T.error || null, N = !0;
|
|
89
89
|
break;
|
|
90
90
|
case "starred":
|
|
91
|
-
|
|
91
|
+
k = E.files, A = E.folders, j = E.isLoading, M = E.error || null, N = !0;
|
|
92
92
|
break;
|
|
93
93
|
case "bin":
|
|
94
|
-
|
|
94
|
+
k = D.files, A = D.folders, j = D.isLoading, M = D.error || null, N = !0;
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
|
-
let
|
|
98
|
-
Be(
|
|
99
|
-
},
|
|
97
|
+
let Ot = v === "all" ? (w.data?.filesList?.total ?? k.length) + (w.data?.foldersList?.total ?? A.length) : null, P = h.size + g.size, [kt, F] = o(!1), [At, jt] = o(!1), [Mt, Nt] = o(!1), [Pt, I] = o(!1), [Ft, L] = o(!1), [It, Lt] = o(!1), [Rt, zt] = o(!1), [Bt, Vt] = o(null), [R, Ht] = o(null), [z, Ut] = o(null), [B, V] = o(null), [H, U] = o(""), [W, G] = o(""), [Wt, K] = o(!1), [Gt, q] = o([]), [Kt, qt] = o(!1), [J, Y] = o(null), X = (e, t) => {
|
|
98
|
+
Be(gt, e, t);
|
|
99
|
+
}, Jt = async () => {
|
|
100
100
|
if (!J || J.loading) return;
|
|
101
101
|
let e = J.onConfirm;
|
|
102
102
|
Y({
|
|
@@ -114,13 +114,13 @@ function d() {
|
|
|
114
114
|
loading: !1
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
}, Z = ne(),
|
|
117
|
+
}, Z = ne(), Yt = ie(), Xt = ae(), Zt = oe(), Qt = se(), $t = ce(), en = le(), tn = ue(), nn = de(), Q = fe(), $ = pe(), rn = me(), an = he(), on = ge(), sn = _e(), cn = ve(), ln = ye(), un = () => {
|
|
118
118
|
let e = document.createElement("input");
|
|
119
119
|
e.type = "file", e.multiple = !0, e.onchange = async (e) => {
|
|
120
120
|
let t = e.target.files;
|
|
121
121
|
if (t && t.length > 0) {
|
|
122
122
|
let e = await Promise.all(Array.from(t).map(async (e, t) => {
|
|
123
|
-
let n = await
|
|
123
|
+
let n = await Se(e);
|
|
124
124
|
return {
|
|
125
125
|
id: `${Date.now()}-${t}-${e.name}`,
|
|
126
126
|
file: e,
|
|
@@ -130,21 +130,21 @@ function d() {
|
|
|
130
130
|
thumbnailUrl: n ?? void 0
|
|
131
131
|
};
|
|
132
132
|
}));
|
|
133
|
-
|
|
134
|
-
for (let t of e) await
|
|
135
|
-
|
|
133
|
+
q((t) => [...t, ...e]), qt(!0), K(!0);
|
|
134
|
+
for (let t of e) await dn(t);
|
|
135
|
+
K(!1);
|
|
136
136
|
}
|
|
137
137
|
}, e.click();
|
|
138
|
-
},
|
|
138
|
+
}, dn = async (e) => {
|
|
139
139
|
let t = (t) => {
|
|
140
|
-
|
|
140
|
+
q((n) => n.map((n) => n.id === e.id ? {
|
|
141
141
|
...n,
|
|
142
142
|
...t
|
|
143
143
|
} : n));
|
|
144
144
|
};
|
|
145
145
|
t({ status: "uploading" });
|
|
146
146
|
try {
|
|
147
|
-
let n = await
|
|
147
|
+
let n = await Yt.mutateAsync({
|
|
148
148
|
file: e.file,
|
|
149
149
|
folderId: e.folderId,
|
|
150
150
|
onProgress: (e) => {
|
|
@@ -161,10 +161,10 @@ function d() {
|
|
|
161
161
|
});
|
|
162
162
|
} catch (n) {
|
|
163
163
|
let r = n instanceof Error ? n.message : a(d, "files.upload.errors.failed", "Upload failed");
|
|
164
|
-
r === "Upload paused" ? t({ status: "paused" }) :
|
|
164
|
+
r === "Upload paused" ? t({ status: "paused" }) : re(n) ? (t({
|
|
165
165
|
status: "failed",
|
|
166
166
|
error: a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
|
|
167
|
-
}),
|
|
167
|
+
}), Nt(!0)) : (t({
|
|
168
168
|
status: "failed",
|
|
169
169
|
error: r
|
|
170
170
|
}), X("files.api.failed", {
|
|
@@ -173,30 +173,30 @@ function d() {
|
|
|
173
173
|
message: r
|
|
174
174
|
}));
|
|
175
175
|
}
|
|
176
|
-
},
|
|
177
|
-
|
|
176
|
+
}, fn = (e) => {
|
|
177
|
+
Yt.pause(), q((t) => t.map((t) => t.id === e ? {
|
|
178
178
|
...t,
|
|
179
179
|
status: "paused"
|
|
180
180
|
} : t));
|
|
181
|
-
},
|
|
182
|
-
let t =
|
|
183
|
-
t &&
|
|
184
|
-
},
|
|
185
|
-
let t =
|
|
186
|
-
t && (
|
|
181
|
+
}, pn = (e) => {
|
|
182
|
+
let t = Gt.find((t) => t.id === e);
|
|
183
|
+
t && dn(t);
|
|
184
|
+
}, mn = (e) => {
|
|
185
|
+
let t = Gt.find((t) => t.id === e);
|
|
186
|
+
t && (q((t) => t.map((t) => t.id === e ? {
|
|
187
187
|
...t,
|
|
188
188
|
status: "pending",
|
|
189
189
|
progress: 0,
|
|
190
190
|
error: void 0
|
|
191
|
-
} : t)),
|
|
192
|
-
},
|
|
193
|
-
|
|
191
|
+
} : t)), dn(t));
|
|
192
|
+
}, hn = (e) => {
|
|
193
|
+
q((t) => {
|
|
194
194
|
let n = t.filter((t) => t.id !== e);
|
|
195
|
-
return n.length === 0 && (
|
|
195
|
+
return n.length === 0 && (qt(!1), K(!1)), n;
|
|
196
196
|
});
|
|
197
|
-
},
|
|
198
|
-
if (!
|
|
199
|
-
|
|
197
|
+
}, gn = () => {
|
|
198
|
+
if (!m) {
|
|
199
|
+
C.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
202
|
let e = document.createElement("input");
|
|
@@ -225,7 +225,7 @@ function d() {
|
|
|
225
225
|
for (let [t, r] of e) {
|
|
226
226
|
let e = t ? n.get(t) : f || void 0;
|
|
227
227
|
for (let t of r) {
|
|
228
|
-
let n = await
|
|
228
|
+
let n = await Se(t);
|
|
229
229
|
i.push({
|
|
230
230
|
id: `${Date.now()}-${ee++}-${t.name}`,
|
|
231
231
|
file: t,
|
|
@@ -236,41 +236,41 @@ function d() {
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
|
|
240
|
-
for (let e of i) await
|
|
241
|
-
|
|
239
|
+
q((e) => [...e, ...i]), qt(!0), K(!0);
|
|
240
|
+
for (let e of i) await dn(e);
|
|
241
|
+
K(!1), C.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
|
|
242
242
|
count: i.length,
|
|
243
243
|
plural: i.length > 1 ? "s" : ""
|
|
244
244
|
}));
|
|
245
245
|
}
|
|
246
246
|
}, e.click();
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
if (
|
|
247
|
+
}, _n = () => {
|
|
248
|
+
F(!0);
|
|
249
|
+
}, vn = async () => {
|
|
250
|
+
if (W.trim() && m) {
|
|
251
251
|
let { data: e, error: t } = await Z.mutateAsync({
|
|
252
|
-
name:
|
|
252
|
+
name: W,
|
|
253
253
|
parentFolderId: f
|
|
254
254
|
});
|
|
255
255
|
if (t) {
|
|
256
|
-
|
|
256
|
+
re(t) ? (F(!1), G(""), jt(!0)) : (C.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
|
|
257
257
|
action: "createFolder",
|
|
258
258
|
message: t instanceof Error ? t.message : "Folder creation failed"
|
|
259
259
|
}));
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
|
-
e && (
|
|
263
|
-
folderName:
|
|
262
|
+
e && (G(""), F(!1), X("files.folder.created", {
|
|
263
|
+
folderName: W,
|
|
264
264
|
parentFolderId: f
|
|
265
265
|
}));
|
|
266
266
|
}
|
|
267
|
-
}, _n = (e) => {
|
|
268
|
-
kt(e);
|
|
269
|
-
}, vn = (e) => {
|
|
270
|
-
P(e), Rt(!0);
|
|
271
267
|
}, yn = (e) => {
|
|
272
|
-
|
|
273
|
-
}, bn =
|
|
268
|
+
Dt(e);
|
|
269
|
+
}, bn = (e) => {
|
|
270
|
+
Vt(e), L(!0);
|
|
271
|
+
}, xn = (e) => {
|
|
272
|
+
Vt(e), L(!0);
|
|
273
|
+
}, Sn = async (e) => {
|
|
274
274
|
if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
|
|
275
275
|
let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
|
|
276
276
|
if (e.fileId) {
|
|
@@ -283,7 +283,7 @@ function d() {
|
|
|
283
283
|
shareType: t,
|
|
284
284
|
accessLevel: "DOWNLOAD"
|
|
285
285
|
};
|
|
286
|
-
n = (await
|
|
286
|
+
n = (await rn.mutateAsync(r))?.token ?? "", X("files.share.created", {
|
|
287
287
|
entityType: "file",
|
|
288
288
|
fileId: e.fileId,
|
|
289
289
|
shareType: t
|
|
@@ -298,7 +298,7 @@ function d() {
|
|
|
298
298
|
shareType: t,
|
|
299
299
|
accessLevel: "DOWNLOAD"
|
|
300
300
|
};
|
|
301
|
-
n = (await
|
|
301
|
+
n = (await an.mutateAsync(r))?.createFolderShare?.token ?? "", X("files.share.created", {
|
|
302
302
|
entityType: "folder",
|
|
303
303
|
folderId: e.folderId,
|
|
304
304
|
shareType: t
|
|
@@ -308,7 +308,7 @@ function d() {
|
|
|
308
308
|
publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
|
|
309
309
|
token: n
|
|
310
310
|
};
|
|
311
|
-
},
|
|
311
|
+
}, Cn = async (e) => {
|
|
312
312
|
Le("medium"), Y({
|
|
313
313
|
title: a(d, "files.confirm.deleteFile.title", "Delete file"),
|
|
314
314
|
description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
|
|
@@ -316,13 +316,13 @@ function d() {
|
|
|
316
316
|
variant: "danger",
|
|
317
317
|
onConfirm: async () => {
|
|
318
318
|
try {
|
|
319
|
-
await
|
|
319
|
+
await Xt.mutateAsync({ id: e.id }), Re("success"), C.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
|
|
320
320
|
fileId: e.id,
|
|
321
321
|
fileName: e.name,
|
|
322
322
|
permanent: !1
|
|
323
323
|
});
|
|
324
324
|
} catch (t) {
|
|
325
|
-
|
|
325
|
+
C.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Re("error"), X("files.api.failed", {
|
|
326
326
|
action: "deleteFile",
|
|
327
327
|
fileId: e.id,
|
|
328
328
|
message: t instanceof Error ? t.message : "Failed to delete file"
|
|
@@ -330,16 +330,16 @@ function d() {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
|
-
},
|
|
333
|
+
}, wn = async (e) => {
|
|
334
334
|
try {
|
|
335
|
-
await
|
|
335
|
+
await Qt.mutateAsync({ id: e.id }), C.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
|
|
336
336
|
fileId: e.id,
|
|
337
337
|
fileName: e.name
|
|
338
338
|
});
|
|
339
339
|
} catch (e) {
|
|
340
|
-
|
|
340
|
+
C.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
|
|
341
341
|
}
|
|
342
|
-
},
|
|
342
|
+
}, Tn = async (e) => {
|
|
343
343
|
Le("heavy"), Y({
|
|
344
344
|
title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
|
|
345
345
|
description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
|
|
@@ -347,19 +347,19 @@ function d() {
|
|
|
347
347
|
variant: "danger",
|
|
348
348
|
onConfirm: async () => {
|
|
349
349
|
try {
|
|
350
|
-
await
|
|
350
|
+
await en.mutateAsync({ id: e.id }), C.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
|
|
351
351
|
fileId: e.id,
|
|
352
352
|
fileName: e.name,
|
|
353
353
|
permanent: !0
|
|
354
354
|
});
|
|
355
355
|
} catch (e) {
|
|
356
|
-
|
|
356
|
+
C.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
|
-
},
|
|
360
|
+
}, En = async (e) => {
|
|
361
361
|
try {
|
|
362
|
-
await
|
|
362
|
+
await nn.mutateAsync({
|
|
363
363
|
id: e.id,
|
|
364
364
|
type: "file"
|
|
365
365
|
}), X("files.file.starred", {
|
|
@@ -368,47 +368,47 @@ function d() {
|
|
|
368
368
|
starred: !e.starred
|
|
369
369
|
});
|
|
370
370
|
} catch {
|
|
371
|
-
|
|
371
|
+
C.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
|
|
372
372
|
action: "toggleFileStar",
|
|
373
373
|
fileId: e.id
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
|
-
},
|
|
377
|
-
|
|
376
|
+
}, Dn = (e) => {
|
|
377
|
+
V({
|
|
378
378
|
id: e.id,
|
|
379
379
|
name: e.name,
|
|
380
380
|
type: "file"
|
|
381
|
-
}),
|
|
382
|
-
},
|
|
381
|
+
}), U(e.name), I(!0);
|
|
382
|
+
}, On = async (e) => {
|
|
383
383
|
try {
|
|
384
384
|
let t = e.downloadUrl || e.url;
|
|
385
385
|
if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
|
|
386
386
|
let n = document.createElement("a");
|
|
387
|
-
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),
|
|
387
|
+
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), C.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), X("files.file.downloaded", {
|
|
388
388
|
fileId: e.id,
|
|
389
389
|
fileName: e.name
|
|
390
390
|
});
|
|
391
391
|
} catch (e) {
|
|
392
|
-
|
|
392
|
+
C.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
|
|
393
393
|
}
|
|
394
|
-
},
|
|
394
|
+
}, kn = (e) => {
|
|
395
395
|
Ut({
|
|
396
396
|
item: e,
|
|
397
397
|
type: "file"
|
|
398
|
-
}),
|
|
399
|
-
},
|
|
400
|
-
|
|
398
|
+
}), zt(!0);
|
|
399
|
+
}, An = (e) => {
|
|
400
|
+
Ht({
|
|
401
401
|
item: e,
|
|
402
402
|
type: "file"
|
|
403
|
-
}),
|
|
404
|
-
},
|
|
405
|
-
|
|
403
|
+
}), Lt(!0);
|
|
404
|
+
}, jn = (e) => {
|
|
405
|
+
Et({
|
|
406
406
|
item: e,
|
|
407
407
|
type: "file"
|
|
408
408
|
});
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
},
|
|
409
|
+
}, Mn = (e) => {
|
|
410
|
+
p(`/files/browse/${e.id}`);
|
|
411
|
+
}, Nn = async (e) => {
|
|
412
412
|
Le("medium"), Y({
|
|
413
413
|
title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
|
|
414
414
|
description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
|
|
@@ -416,29 +416,29 @@ function d() {
|
|
|
416
416
|
variant: "danger",
|
|
417
417
|
onConfirm: async () => {
|
|
418
418
|
try {
|
|
419
|
-
await
|
|
419
|
+
await Zt.mutateAsync({
|
|
420
420
|
id: e.id,
|
|
421
421
|
recursive: !0
|
|
422
|
-
}),
|
|
422
|
+
}), C.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.folder.deleted", {
|
|
423
423
|
folderId: e.id,
|
|
424
424
|
folderName: e.name,
|
|
425
425
|
permanent: !1
|
|
426
426
|
});
|
|
427
427
|
} catch (e) {
|
|
428
|
-
|
|
428
|
+
C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
});
|
|
432
|
-
},
|
|
432
|
+
}, Pn = async (e) => {
|
|
433
433
|
try {
|
|
434
|
-
await
|
|
434
|
+
await $t.mutateAsync({ id: e.id }), C.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
|
|
435
435
|
folderId: e.id,
|
|
436
436
|
folderName: e.name
|
|
437
437
|
});
|
|
438
438
|
} catch (e) {
|
|
439
|
-
|
|
439
|
+
C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
|
|
440
440
|
}
|
|
441
|
-
},
|
|
441
|
+
}, Fn = async (e) => {
|
|
442
442
|
Y({
|
|
443
443
|
title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
|
|
444
444
|
description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
|
|
@@ -446,30 +446,30 @@ function d() {
|
|
|
446
446
|
variant: "danger",
|
|
447
447
|
onConfirm: async () => {
|
|
448
448
|
try {
|
|
449
|
-
await
|
|
449
|
+
await tn.mutateAsync({ id: e.id }), C.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
|
|
450
450
|
folderId: e.id,
|
|
451
451
|
folderName: e.name,
|
|
452
452
|
permanent: !0
|
|
453
453
|
});
|
|
454
454
|
} catch (e) {
|
|
455
|
-
|
|
455
|
+
C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
|
-
},
|
|
460
|
-
|
|
459
|
+
}, In = (e) => {
|
|
460
|
+
V({
|
|
461
461
|
id: e.id,
|
|
462
462
|
name: e.name,
|
|
463
463
|
type: "folder"
|
|
464
|
-
}),
|
|
465
|
-
},
|
|
466
|
-
|
|
464
|
+
}), U(e.name), I(!0);
|
|
465
|
+
}, Ln = (e) => {
|
|
466
|
+
Ht({
|
|
467
467
|
item: e,
|
|
468
468
|
type: "folder"
|
|
469
|
-
}),
|
|
470
|
-
},
|
|
469
|
+
}), Lt(!0);
|
|
470
|
+
}, Rn = async (e) => {
|
|
471
471
|
try {
|
|
472
|
-
await
|
|
472
|
+
await nn.mutateAsync({
|
|
473
473
|
id: e.id,
|
|
474
474
|
type: "folder"
|
|
475
475
|
}), X("files.folder.starred", {
|
|
@@ -478,102 +478,102 @@ function d() {
|
|
|
478
478
|
starred: !e.starred
|
|
479
479
|
});
|
|
480
480
|
} catch {
|
|
481
|
-
|
|
481
|
+
C.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
|
|
482
482
|
action: "toggleFolderStar",
|
|
483
483
|
folderId: e.id
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
-
},
|
|
487
|
-
|
|
486
|
+
}, zn = (e) => {
|
|
487
|
+
Et({
|
|
488
488
|
item: e,
|
|
489
489
|
type: "folder"
|
|
490
490
|
});
|
|
491
|
-
},
|
|
492
|
-
if (
|
|
493
|
-
|
|
494
|
-
fileId:
|
|
491
|
+
}, Bn = async (e) => {
|
|
492
|
+
if (R) try {
|
|
493
|
+
R.type === "file" ? (await sn.mutateAsync({
|
|
494
|
+
fileId: R.item.id,
|
|
495
495
|
targetFolderId: e || null
|
|
496
|
-
}),
|
|
497
|
-
fileId:
|
|
498
|
-
fileName:
|
|
496
|
+
}), C.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), X("files.file.moved", {
|
|
497
|
+
fileId: R.item.id,
|
|
498
|
+
fileName: R.item.name,
|
|
499
499
|
destinationFolderId: e
|
|
500
|
-
})) : (await
|
|
501
|
-
folderId:
|
|
500
|
+
})) : (await cn.mutateAsync({
|
|
501
|
+
folderId: R.item.id,
|
|
502
502
|
targetParentFolderId: e
|
|
503
|
-
}),
|
|
504
|
-
folderId:
|
|
505
|
-
folderName:
|
|
503
|
+
}), C.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), X("files.folder.moved", {
|
|
504
|
+
folderId: R.item.id,
|
|
505
|
+
folderName: R.item.name,
|
|
506
506
|
destinationFolderId: e
|
|
507
|
-
})),
|
|
507
|
+
})), Lt(!1), Ht(null);
|
|
508
508
|
} catch (e) {
|
|
509
|
-
|
|
510
|
-
action:
|
|
511
|
-
itemId:
|
|
512
|
-
itemType:
|
|
509
|
+
C.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), X("files.api.failed", {
|
|
510
|
+
action: R.type === "file" ? "moveFile" : "moveFolder",
|
|
511
|
+
itemId: R.item.id,
|
|
512
|
+
itemType: R.type,
|
|
513
513
|
message: e instanceof Error ? e.message : void 0
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
},
|
|
517
|
-
if (
|
|
518
|
-
if (
|
|
519
|
-
await
|
|
520
|
-
id:
|
|
521
|
-
newName: t || `Copy of ${
|
|
516
|
+
}, Vn = async (e, t) => {
|
|
517
|
+
if (z) try {
|
|
518
|
+
if (z.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
|
|
519
|
+
await on.mutateAsync({
|
|
520
|
+
id: z.item.id,
|
|
521
|
+
newName: t || `Copy of ${z.item.name}`,
|
|
522
522
|
targetFolderId: e || void 0
|
|
523
|
-
}),
|
|
524
|
-
fileId:
|
|
525
|
-
fileName:
|
|
523
|
+
}), C.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: z.item.name })), X("files.file.copied", {
|
|
524
|
+
fileId: z.item.id,
|
|
525
|
+
fileName: z.item.name,
|
|
526
526
|
destinationFolderId: e
|
|
527
|
-
}),
|
|
527
|
+
}), zt(!1), Ut(null);
|
|
528
528
|
} catch (e) {
|
|
529
|
-
|
|
529
|
+
C.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: z.item.name })), X("files.api.failed", {
|
|
530
530
|
action: "copyFile",
|
|
531
|
-
fileId:
|
|
531
|
+
fileId: z.item.id,
|
|
532
532
|
message: e instanceof Error ? e.message : void 0
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
},
|
|
536
|
-
if (!(!
|
|
537
|
-
let e =
|
|
538
|
-
|
|
539
|
-
fileId:
|
|
535
|
+
}, Hn = async () => {
|
|
536
|
+
if (!(!B || !H.trim())) try {
|
|
537
|
+
let e = B.name, t = H.trim();
|
|
538
|
+
B.type === "file" ? (await Q.mutateAsync({
|
|
539
|
+
fileId: B.id,
|
|
540
540
|
newName: t
|
|
541
|
-
}),
|
|
542
|
-
fileId:
|
|
541
|
+
}), C.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.file.renamed", {
|
|
542
|
+
fileId: B.id,
|
|
543
543
|
previousName: e,
|
|
544
544
|
name: t
|
|
545
545
|
})) : (await $.mutateAsync({
|
|
546
|
-
folderId:
|
|
546
|
+
folderId: B.id,
|
|
547
547
|
newName: t
|
|
548
|
-
}),
|
|
549
|
-
folderId:
|
|
548
|
+
}), C.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.folder.renamed", {
|
|
549
|
+
folderId: B.id,
|
|
550
550
|
previousName: e,
|
|
551
551
|
name: t
|
|
552
|
-
})),
|
|
552
|
+
})), I(!1), V(null), U("");
|
|
553
553
|
} catch (e) {
|
|
554
|
-
|
|
555
|
-
action:
|
|
556
|
-
itemId:
|
|
557
|
-
itemType:
|
|
554
|
+
C.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: B.type })), X("files.api.failed", {
|
|
555
|
+
action: B.type === "file" ? "renameFile" : "renameFolder",
|
|
556
|
+
itemId: B.id,
|
|
557
|
+
itemType: B.type,
|
|
558
558
|
message: e instanceof Error ? e.message : void 0
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
562
|
return n({
|
|
563
|
-
files:
|
|
564
|
-
folders:
|
|
565
|
-
onFilePreview:
|
|
566
|
-
onFileDelete:
|
|
567
|
-
onFolderOpen:
|
|
568
|
-
onFolderDelete:
|
|
569
|
-
activeTab:
|
|
570
|
-
}),
|
|
563
|
+
files: k,
|
|
564
|
+
folders: A,
|
|
565
|
+
onFilePreview: yn,
|
|
566
|
+
onFileDelete: Cn,
|
|
567
|
+
onFolderOpen: Mn,
|
|
568
|
+
onFolderDelete: Nn,
|
|
569
|
+
activeTab: v
|
|
570
|
+
}), m === void 0 ? /* @__PURE__ */ l("div", {
|
|
571
571
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
572
572
|
children: [/* @__PURE__ */ c(s, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ c("p", {
|
|
573
573
|
className: "text-sm text-text-secondary max-w-md",
|
|
574
574
|
children: a(d, "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.")
|
|
575
575
|
})]
|
|
576
|
-
}) :
|
|
576
|
+
}) : m === "" ? /* @__PURE__ */ l("div", {
|
|
577
577
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
578
578
|
children: [/* @__PURE__ */ c(Ge, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ c("p", {
|
|
579
579
|
className: "text-sm text-text-secondary max-w-md",
|
|
@@ -597,22 +597,22 @@ function d() {
|
|
|
597
597
|
className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
|
|
598
598
|
children: [/* @__PURE__ */ l("button", {
|
|
599
599
|
type: "button",
|
|
600
|
-
onClick: () =>
|
|
600
|
+
onClick: () => p("/files/browse"),
|
|
601
601
|
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",
|
|
602
602
|
title: a(d, "files.browser.actions.goToRoot", "Go to root"),
|
|
603
603
|
children: [/* @__PURE__ */ c(qe, { className: "size-4" }), /* @__PURE__ */ c("span", {
|
|
604
604
|
className: "hidden sm:inline",
|
|
605
605
|
children: a(d, "files.browser.rootLabel", "My Drive")
|
|
606
606
|
})]
|
|
607
|
-
}),
|
|
607
|
+
}), bt.map((e, t) => /* @__PURE__ */ l("div", {
|
|
608
608
|
className: "flex items-center gap-1 sm:gap-2",
|
|
609
609
|
children: [/* @__PURE__ */ c("span", {
|
|
610
610
|
className: "text-text-tertiary",
|
|
611
611
|
children: "/"
|
|
612
612
|
}), /* @__PURE__ */ c("button", {
|
|
613
613
|
type: "button",
|
|
614
|
-
onClick: () =>
|
|
615
|
-
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t ===
|
|
614
|
+
onClick: () => p(`/files/browse/${e.id}`),
|
|
615
|
+
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === bt.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
|
|
616
616
|
title: `Go to ${e.name}`,
|
|
617
617
|
children: e.name
|
|
618
618
|
})]
|
|
@@ -625,7 +625,7 @@ function d() {
|
|
|
625
625
|
})
|
|
626
626
|
]
|
|
627
627
|
}),
|
|
628
|
-
!
|
|
628
|
+
!x && /* @__PURE__ */ c("div", {
|
|
629
629
|
className: "px-4 pt-3 sm:px-6",
|
|
630
630
|
children: /* @__PURE__ */ c(lt, {
|
|
631
631
|
storageKey: "files-browser",
|
|
@@ -636,38 +636,38 @@ function d() {
|
|
|
636
636
|
label: a(d, "files.browser.nextSteps.upload.label", "Upload your first files"),
|
|
637
637
|
description: a(d, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
|
|
638
638
|
icon: /* @__PURE__ */ c(Ze, { className: "size-4" }),
|
|
639
|
-
onClick:
|
|
639
|
+
onClick: un
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
id: "new-folder",
|
|
643
643
|
label: a(d, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
|
|
644
644
|
description: a(d, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
|
|
645
645
|
icon: /* @__PURE__ */ c(Ue, { className: "size-4" }),
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: _n
|
|
647
647
|
},
|
|
648
648
|
{
|
|
649
649
|
id: "starred",
|
|
650
650
|
label: a(d, "files.browser.nextSteps.starred.label", "Star items you use often"),
|
|
651
651
|
description: a(d, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
|
|
652
652
|
icon: /* @__PURE__ */ c(Ye, { className: "size-4" }),
|
|
653
|
-
onClick: () =>
|
|
653
|
+
onClick: () => y("starred")
|
|
654
654
|
},
|
|
655
655
|
{
|
|
656
656
|
id: "bin",
|
|
657
657
|
label: a(d, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
|
|
658
658
|
description: a(d, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
|
|
659
659
|
icon: /* @__PURE__ */ c(Xe, { className: "size-4" }),
|
|
660
|
-
onClick: () =>
|
|
660
|
+
onClick: () => y("bin")
|
|
661
661
|
}
|
|
662
662
|
]
|
|
663
663
|
})
|
|
664
664
|
}),
|
|
665
665
|
/* @__PURE__ */ c("div", {
|
|
666
666
|
"data-tour": "files-tab-bar",
|
|
667
|
-
children: /* @__PURE__ */ c(
|
|
668
|
-
activeTab:
|
|
669
|
-
onTabChange:
|
|
670
|
-
tabs:
|
|
667
|
+
children: /* @__PURE__ */ c(we, {
|
|
668
|
+
activeTab: v,
|
|
669
|
+
onTabChange: y,
|
|
670
|
+
tabs: xt
|
|
671
671
|
})
|
|
672
672
|
}),
|
|
673
673
|
/* @__PURE__ */ l("div", {
|
|
@@ -680,42 +680,42 @@ function d() {
|
|
|
680
680
|
"data-tour": "files-search-bar",
|
|
681
681
|
children: /* @__PURE__ */ c("div", {
|
|
682
682
|
className: "relative w-full max-w-2xl",
|
|
683
|
-
children: /* @__PURE__ */ c(
|
|
683
|
+
children: /* @__PURE__ */ c(Ae, {
|
|
684
684
|
onSearch: (e, t) => {
|
|
685
|
-
|
|
685
|
+
St(e), wt(t);
|
|
686
686
|
},
|
|
687
687
|
placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
|
|
688
|
-
initialQuery:
|
|
688
|
+
initialQuery: b,
|
|
689
689
|
showFilters: !0
|
|
690
690
|
})
|
|
691
691
|
})
|
|
692
692
|
}), /* @__PURE__ */ l("div", {
|
|
693
693
|
className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
|
|
694
|
-
children: [!
|
|
694
|
+
children: [!x && /* @__PURE__ */ c("div", {
|
|
695
695
|
"data-tour": "files-upload-files-button",
|
|
696
696
|
children: /* @__PURE__ */ c(it, {
|
|
697
697
|
primary: {
|
|
698
|
-
label:
|
|
699
|
-
onSelect:
|
|
700
|
-
disabled:
|
|
701
|
-
icon:
|
|
698
|
+
label: Wt ? a(d, "files.browser.upload.uploading", "Uploading...") : a(d, "files.browser.actions.uploadFiles", "Upload Files"),
|
|
699
|
+
onSelect: un,
|
|
700
|
+
disabled: Wt,
|
|
701
|
+
icon: Wt ? /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }) : /* @__PURE__ */ c(Ze, { className: "size-4" })
|
|
702
702
|
},
|
|
703
703
|
actions: [
|
|
704
704
|
{
|
|
705
705
|
label: a(d, "files.browser.actions.newFolder", "New Folder"),
|
|
706
706
|
icon: /* @__PURE__ */ c(Ue, { className: "size-4" }),
|
|
707
|
-
onSelect:
|
|
707
|
+
onSelect: _n
|
|
708
708
|
},
|
|
709
709
|
{
|
|
710
710
|
label: a(d, "files.browser.actions.uploadFolder", "Upload Folder"),
|
|
711
711
|
icon: /* @__PURE__ */ c(We, { className: "size-4" }),
|
|
712
|
-
onSelect:
|
|
713
|
-
disabled:
|
|
712
|
+
onSelect: gn,
|
|
713
|
+
disabled: Wt
|
|
714
714
|
},
|
|
715
|
-
...
|
|
715
|
+
...k.length > 0 || A.length > 0 ? [{
|
|
716
716
|
label: a(d, "files.browser.actions.selectAll", "Select All"),
|
|
717
717
|
onSelect: () => {
|
|
718
|
-
let e =
|
|
718
|
+
let e = k.map((e) => e.id), n = A.map((e) => e.id);
|
|
719
719
|
t.getState().selectAllFiles(e), n.forEach((e) => t.getState().selectFolder(e));
|
|
720
720
|
}
|
|
721
721
|
}] : []
|
|
@@ -726,51 +726,51 @@ function d() {
|
|
|
726
726
|
"data-tour": "files-view-mode-toggle",
|
|
727
727
|
children: [/* @__PURE__ */ c("button", {
|
|
728
728
|
type: "button",
|
|
729
|
-
onClick: () =>
|
|
730
|
-
className: `p-2 transition-colors duration-200 ${
|
|
729
|
+
onClick: () => yt("grid"),
|
|
730
|
+
className: `p-2 transition-colors duration-200 ${vt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
731
731
|
"aria-label": a(d, "files.browser.view.grid", "Grid view"),
|
|
732
732
|
children: /* @__PURE__ */ c(Ke, { className: "size-5" })
|
|
733
733
|
}), /* @__PURE__ */ c("button", {
|
|
734
734
|
type: "button",
|
|
735
|
-
onClick: () =>
|
|
736
|
-
className: `p-2 transition-colors duration-200 ${
|
|
735
|
+
onClick: () => yt("list"),
|
|
736
|
+
className: `p-2 transition-colors duration-200 ${vt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
737
737
|
"aria-label": a(d, "files.browser.view.list", "List view"),
|
|
738
738
|
children: /* @__PURE__ */ c(Je, { className: "size-5" })
|
|
739
739
|
})]
|
|
740
740
|
})]
|
|
741
741
|
})]
|
|
742
742
|
}),
|
|
743
|
-
|
|
743
|
+
x && /* @__PURE__ */ l("div", {
|
|
744
744
|
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",
|
|
745
745
|
children: [/* @__PURE__ */ l("span", {
|
|
746
746
|
className: "text-sm font-medium text-status-success-text",
|
|
747
|
-
children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query:
|
|
747
|
+
children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: b }), O.data && ` (${(O.data.files?.length || 0) + (O.data.folders?.length || 0)} items)`]
|
|
748
748
|
}), /* @__PURE__ */ l("button", {
|
|
749
749
|
type: "button",
|
|
750
|
-
onClick: () =>
|
|
750
|
+
onClick: () => St(""),
|
|
751
751
|
className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
|
|
752
752
|
children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
|
|
753
753
|
})]
|
|
754
754
|
}),
|
|
755
|
-
|
|
755
|
+
P > 0 && /* @__PURE__ */ l(at, {
|
|
756
756
|
className: "mt-3 flex items-center justify-between p-3",
|
|
757
757
|
children: [/* @__PURE__ */ l("div", {
|
|
758
758
|
className: "flex items-center gap-4",
|
|
759
759
|
children: [/* @__PURE__ */ c("span", {
|
|
760
760
|
className: "text-sm font-medium text-text-primary",
|
|
761
761
|
children: a(d, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
|
|
762
|
-
count:
|
|
763
|
-
suffix:
|
|
762
|
+
count: P,
|
|
763
|
+
suffix: P > 1 ? "s" : ""
|
|
764
764
|
})
|
|
765
765
|
}), /* @__PURE__ */ c("div", {
|
|
766
766
|
className: "flex items-center gap-2",
|
|
767
|
-
children:
|
|
767
|
+
children: v === "bin" ? /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c("button", {
|
|
768
768
|
type: "button",
|
|
769
769
|
onClick: async () => {
|
|
770
770
|
try {
|
|
771
|
-
await Promise.all([...Array.from(
|
|
771
|
+
await Promise.all([...Array.from(h).map((e) => Qt.mutateAsync({ id: e })), ...Array.from(g).map((e) => $t.mutateAsync({ id: e }))]), _(), C.success(`${P} item${P > 1 ? "s" : ""} restored`);
|
|
772
772
|
} catch (e) {
|
|
773
|
-
|
|
773
|
+
C.error(e instanceof Error ? e.message : "Failed to restore some items");
|
|
774
774
|
}
|
|
775
775
|
},
|
|
776
776
|
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",
|
|
@@ -781,19 +781,19 @@ function d() {
|
|
|
781
781
|
Y({
|
|
782
782
|
title: a(d, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
|
|
783
783
|
description: a(d, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
|
|
784
|
-
count:
|
|
785
|
-
plural:
|
|
784
|
+
count: P,
|
|
785
|
+
plural: P > 1 ? "s" : ""
|
|
786
786
|
}),
|
|
787
787
|
confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
788
788
|
variant: "danger",
|
|
789
789
|
onConfirm: async () => {
|
|
790
790
|
try {
|
|
791
|
-
await Promise.all([...Array.from(
|
|
792
|
-
count:
|
|
793
|
-
plural:
|
|
791
|
+
await Promise.all([...Array.from(h).map((e) => en.mutateAsync({ id: e })), ...Array.from(g).map((e) => tn.mutateAsync({ id: e }))]), _(), C.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
|
|
792
|
+
count: P,
|
|
793
|
+
plural: P > 1 ? "s" : ""
|
|
794
794
|
}));
|
|
795
795
|
} catch (e) {
|
|
796
|
-
|
|
796
|
+
C.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
});
|
|
@@ -806,23 +806,23 @@ function d() {
|
|
|
806
806
|
Y({
|
|
807
807
|
title: a(d, "files.confirm.bulkDelete.title", "Delete selected items"),
|
|
808
808
|
description: a(d, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
|
|
809
|
-
count:
|
|
810
|
-
plural:
|
|
809
|
+
count: P,
|
|
810
|
+
plural: P > 1 ? "s" : ""
|
|
811
811
|
}),
|
|
812
812
|
confirmLabel: a(d, "files.common.actions.delete", "Delete"),
|
|
813
813
|
variant: "danger",
|
|
814
814
|
onConfirm: async () => {
|
|
815
815
|
try {
|
|
816
|
-
let e = Array.from(
|
|
817
|
-
e.length > 0 && await
|
|
816
|
+
let e = Array.from(h), t = Array.from(g);
|
|
817
|
+
e.length > 0 && await ln.mutateAsync(e), await Promise.all(t.map((e) => Zt.mutateAsync({
|
|
818
818
|
id: e,
|
|
819
819
|
recursive: !0
|
|
820
|
-
}))),
|
|
821
|
-
count:
|
|
822
|
-
plural:
|
|
820
|
+
}))), _(), C.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
|
|
821
|
+
count: P,
|
|
822
|
+
plural: P > 1 ? "s" : ""
|
|
823
823
|
}));
|
|
824
824
|
} catch (e) {
|
|
825
|
-
|
|
825
|
+
C.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
});
|
|
@@ -833,53 +833,53 @@ function d() {
|
|
|
833
833
|
})]
|
|
834
834
|
}), /* @__PURE__ */ l("button", {
|
|
835
835
|
type: "button",
|
|
836
|
-
onClick:
|
|
836
|
+
onClick: _,
|
|
837
837
|
className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
|
|
838
838
|
children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
|
|
839
839
|
})]
|
|
840
840
|
})
|
|
841
841
|
]
|
|
842
842
|
}),
|
|
843
|
-
(
|
|
843
|
+
(_t.isExhausted || _t.isNearLimit) && /* @__PURE__ */ c("div", {
|
|
844
844
|
className: "px-4 sm:px-6 pt-3",
|
|
845
|
-
children: /* @__PURE__ */ c(
|
|
845
|
+
children: /* @__PURE__ */ c(Fe, { quota: _t })
|
|
846
846
|
}),
|
|
847
847
|
/* @__PURE__ */ l("div", {
|
|
848
848
|
className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
|
|
849
849
|
"data-tour": "files-browser-grid",
|
|
850
|
-
children: [/* @__PURE__ */ c(
|
|
851
|
-
files:
|
|
852
|
-
folders:
|
|
853
|
-
loading:
|
|
854
|
-
error:
|
|
855
|
-
preserveSortOrder:
|
|
856
|
-
onFilePreview:
|
|
857
|
-
onFileShare:
|
|
858
|
-
onFileDelete:
|
|
859
|
-
onFileRestore:
|
|
860
|
-
onFileFavorite:
|
|
861
|
-
onFileRename:
|
|
862
|
-
onFileDownload:
|
|
863
|
-
onFileCopy:
|
|
864
|
-
onFileMove:
|
|
865
|
-
onFileInfo:
|
|
866
|
-
onFolderOpen:
|
|
867
|
-
onFolderShare:
|
|
868
|
-
onFolderDelete:
|
|
869
|
-
onFolderRestore:
|
|
870
|
-
onFolderRename:
|
|
871
|
-
onFolderFavorite:
|
|
872
|
-
onFolderMove:
|
|
873
|
-
onFolderInfo:
|
|
874
|
-
}), !
|
|
850
|
+
children: [/* @__PURE__ */ c(Ce, {
|
|
851
|
+
files: k,
|
|
852
|
+
folders: A,
|
|
853
|
+
loading: j,
|
|
854
|
+
error: M,
|
|
855
|
+
preserveSortOrder: N,
|
|
856
|
+
onFilePreview: yn,
|
|
857
|
+
onFileShare: v === "bin" ? void 0 : bn,
|
|
858
|
+
onFileDelete: v === "bin" ? Tn : Cn,
|
|
859
|
+
onFileRestore: v === "bin" ? wn : void 0,
|
|
860
|
+
onFileFavorite: v === "bin" ? void 0 : En,
|
|
861
|
+
onFileRename: v === "bin" ? void 0 : Dn,
|
|
862
|
+
onFileDownload: On,
|
|
863
|
+
onFileCopy: v === "bin" ? void 0 : kn,
|
|
864
|
+
onFileMove: v === "bin" ? void 0 : An,
|
|
865
|
+
onFileInfo: jn,
|
|
866
|
+
onFolderOpen: Mn,
|
|
867
|
+
onFolderShare: v === "bin" ? void 0 : xn,
|
|
868
|
+
onFolderDelete: v === "bin" ? Fn : Nn,
|
|
869
|
+
onFolderRestore: v === "bin" ? Pn : void 0,
|
|
870
|
+
onFolderRename: v === "bin" ? void 0 : In,
|
|
871
|
+
onFolderFavorite: v === "bin" ? void 0 : Rn,
|
|
872
|
+
onFolderMove: v === "bin" ? void 0 : Ln,
|
|
873
|
+
onFolderInfo: zn
|
|
874
|
+
}), !j && (k.length > 0 || A.length > 0) && /* @__PURE__ */ l("div", {
|
|
875
875
|
className: "mt-4 px-2 text-sm text-text-secondary",
|
|
876
|
-
children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count:
|
|
876
|
+
children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: k.length + A.length }), !x && v === "all" && Ot !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: Ot })}`]
|
|
877
877
|
})]
|
|
878
878
|
}),
|
|
879
|
-
|
|
879
|
+
kt && /* @__PURE__ */ c(dt, {
|
|
880
880
|
open: !0,
|
|
881
881
|
onOpenChange: (e) => {
|
|
882
|
-
!e && !Z.isPending && (
|
|
882
|
+
!e && !Z.isPending && (F(!1), G(""));
|
|
883
883
|
},
|
|
884
884
|
children: /* @__PURE__ */ l(ft, {
|
|
885
885
|
className: "w-full max-w-xs",
|
|
@@ -894,10 +894,10 @@ function d() {
|
|
|
894
894
|
}),
|
|
895
895
|
/* @__PURE__ */ c(ct, {
|
|
896
896
|
type: "text",
|
|
897
|
-
value:
|
|
898
|
-
onChange: (e) =>
|
|
897
|
+
value: W,
|
|
898
|
+
onChange: (e) => G(e.target.value),
|
|
899
899
|
onKeyDown: (e) => {
|
|
900
|
-
e.key === "Enter" &&
|
|
900
|
+
e.key === "Enter" && vn();
|
|
901
901
|
},
|
|
902
902
|
"aria-label": a(d, "files.browser.newFolderDialog.title", "New folder"),
|
|
903
903
|
placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name")
|
|
@@ -906,22 +906,22 @@ function d() {
|
|
|
906
906
|
type: "button",
|
|
907
907
|
variant: "outline",
|
|
908
908
|
onClick: () => {
|
|
909
|
-
|
|
909
|
+
F(!1), G("");
|
|
910
910
|
},
|
|
911
911
|
children: a(d, "files.common.actions.cancel", "Cancel")
|
|
912
912
|
}), /* @__PURE__ */ l(u, {
|
|
913
913
|
type: "button",
|
|
914
|
-
onClick:
|
|
915
|
-
disabled: !
|
|
914
|
+
onClick: vn,
|
|
915
|
+
disabled: !W.trim() || Z.isPending,
|
|
916
916
|
children: [Z.isPending && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Z.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
|
|
917
917
|
})] })
|
|
918
918
|
]
|
|
919
919
|
})
|
|
920
920
|
}),
|
|
921
|
-
|
|
921
|
+
Pt && B && /* @__PURE__ */ c(dt, {
|
|
922
922
|
open: !0,
|
|
923
923
|
onOpenChange: (e) => {
|
|
924
|
-
!e && !Q.isPending && !$.isPending && (
|
|
924
|
+
!e && !Q.isPending && !$.isPending && (I(!1), V(null), U(""));
|
|
925
925
|
},
|
|
926
926
|
children: /* @__PURE__ */ l(ft, {
|
|
927
927
|
className: "w-full max-w-xs",
|
|
@@ -931,15 +931,15 @@ function d() {
|
|
|
931
931
|
children: /* @__PURE__ */ c(ht, {
|
|
932
932
|
id: "files-rename-title",
|
|
933
933
|
className: "text-base font-semibold text-text-primary",
|
|
934
|
-
children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type:
|
|
934
|
+
children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: B.type })
|
|
935
935
|
})
|
|
936
936
|
}),
|
|
937
937
|
/* @__PURE__ */ c(ct, {
|
|
938
938
|
type: "text",
|
|
939
|
-
value:
|
|
940
|
-
onChange: (e) =>
|
|
939
|
+
value: H,
|
|
940
|
+
onChange: (e) => U(e.target.value),
|
|
941
941
|
onKeyDown: (e) => {
|
|
942
|
-
e.key === "Enter" &&
|
|
942
|
+
e.key === "Enter" && Hn();
|
|
943
943
|
},
|
|
944
944
|
"aria-label": a(d, "files.browser.renameDialog.title", "Rename"),
|
|
945
945
|
placeholder: a(d, "files.browser.renameDialog.placeholder", "New name")
|
|
@@ -948,114 +948,124 @@ function d() {
|
|
|
948
948
|
type: "button",
|
|
949
949
|
variant: "outline",
|
|
950
950
|
onClick: () => {
|
|
951
|
-
|
|
951
|
+
I(!1), V(null), U("");
|
|
952
952
|
},
|
|
953
953
|
children: a(d, "files.common.actions.cancel", "Cancel")
|
|
954
954
|
}), /* @__PURE__ */ l(u, {
|
|
955
955
|
type: "button",
|
|
956
|
-
onClick:
|
|
957
|
-
disabled: !
|
|
956
|
+
onClick: Hn,
|
|
957
|
+
disabled: !H.trim() || H.trim() === B.name || Q.isPending || $.isPending,
|
|
958
958
|
children: [(Q.isPending || $.isPending) && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Q.isPending || $.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
|
|
959
959
|
})] })
|
|
960
960
|
]
|
|
961
961
|
})
|
|
962
962
|
}),
|
|
963
|
-
|
|
964
|
-
item:
|
|
965
|
-
itemType: "mimeType" in
|
|
963
|
+
Ft && Bt && /* @__PURE__ */ c(Te, {
|
|
964
|
+
item: Bt,
|
|
965
|
+
itemType: "mimeType" in Bt ? "file" : "folder",
|
|
966
966
|
onClose: () => {
|
|
967
|
-
|
|
967
|
+
L(!1), Vt(null);
|
|
968
968
|
},
|
|
969
|
-
onCreateShare:
|
|
970
|
-
isLoading:
|
|
969
|
+
onCreateShare: Sn,
|
|
970
|
+
isLoading: rn.isPending
|
|
971
971
|
}),
|
|
972
|
-
J && /* @__PURE__ */ c(
|
|
972
|
+
J && /* @__PURE__ */ c(Ne, {
|
|
973
973
|
title: J.title,
|
|
974
974
|
description: J.description,
|
|
975
975
|
confirmLabel: J.confirmLabel,
|
|
976
976
|
cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
|
|
977
977
|
variant: J.variant,
|
|
978
978
|
loading: J.loading,
|
|
979
|
-
onConfirm:
|
|
979
|
+
onConfirm: Jt,
|
|
980
980
|
onCancel: () => {
|
|
981
981
|
J.loading || Y(null);
|
|
982
982
|
}
|
|
983
983
|
}),
|
|
984
|
-
|
|
984
|
+
At && /* @__PURE__ */ c(Ne, {
|
|
985
985
|
title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
|
|
986
986
|
description: a(d, "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."),
|
|
987
987
|
confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
|
|
988
988
|
cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
|
|
989
989
|
onConfirm: () => {
|
|
990
|
-
|
|
990
|
+
jt(!1), p("/billing");
|
|
991
991
|
},
|
|
992
|
-
onCancel: () =>
|
|
992
|
+
onCancel: () => jt(!1)
|
|
993
993
|
}),
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
994
|
+
Mt && /* @__PURE__ */ c(Ne, {
|
|
995
|
+
title: a(d, "files.storage.quota.title", "Storage Limit Reached"),
|
|
996
|
+
description: a(d, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
|
|
997
|
+
confirmLabel: a(d, "files.storage.quota.upgrade", "View Billing"),
|
|
998
|
+
cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
|
|
999
|
+
onConfirm: () => {
|
|
1000
|
+
Nt(!1), p("/billing");
|
|
1001
|
+
},
|
|
1002
|
+
onCancel: () => Nt(!1)
|
|
1003
|
+
}),
|
|
1004
|
+
It && R && /* @__PURE__ */ c(je, {
|
|
1005
|
+
item: R.item,
|
|
1006
|
+
type: R.type,
|
|
997
1007
|
onClose: () => {
|
|
998
|
-
|
|
1008
|
+
Lt(!1), Ht(null);
|
|
999
1009
|
},
|
|
1000
|
-
onMove:
|
|
1001
|
-
isLoading:
|
|
1010
|
+
onMove: Bn,
|
|
1011
|
+
isLoading: sn.isPending || cn.isPending
|
|
1002
1012
|
}),
|
|
1003
|
-
|
|
1004
|
-
item:
|
|
1005
|
-
type:
|
|
1013
|
+
Rt && z && /* @__PURE__ */ c(Me, {
|
|
1014
|
+
item: z.item,
|
|
1015
|
+
type: z.type,
|
|
1006
1016
|
onClose: () => {
|
|
1007
|
-
|
|
1017
|
+
zt(!1), Ut(null);
|
|
1008
1018
|
},
|
|
1009
|
-
onCopy:
|
|
1010
|
-
isLoading:
|
|
1019
|
+
onCopy: Vn,
|
|
1020
|
+
isLoading: on.isPending
|
|
1011
1021
|
}),
|
|
1012
|
-
|
|
1013
|
-
file:
|
|
1014
|
-
onClose: () =>
|
|
1022
|
+
S && /* @__PURE__ */ c(Ee, {
|
|
1023
|
+
file: S,
|
|
1024
|
+
onClose: () => Dt(null),
|
|
1015
1025
|
onDownload: () => {
|
|
1016
|
-
ze(
|
|
1026
|
+
ze(S.downloadUrl || S.url);
|
|
1017
1027
|
},
|
|
1018
|
-
onShare:
|
|
1019
|
-
|
|
1028
|
+
onShare: v === "bin" ? void 0 : () => {
|
|
1029
|
+
Vt(S), L(!0);
|
|
1020
1030
|
},
|
|
1021
|
-
onStar:
|
|
1022
|
-
onDelete: () =>
|
|
1031
|
+
onStar: v === "bin" ? void 0 : () => En(S),
|
|
1032
|
+
onDelete: () => v === "bin" ? Tn(S) : Cn(S)
|
|
1023
1033
|
}),
|
|
1024
|
-
|
|
1025
|
-
item:
|
|
1026
|
-
type:
|
|
1027
|
-
onClose: () =>
|
|
1034
|
+
Tt && /* @__PURE__ */ c(De, {
|
|
1035
|
+
item: Tt.item,
|
|
1036
|
+
type: Tt.type,
|
|
1037
|
+
onClose: () => Et(null)
|
|
1028
1038
|
}),
|
|
1029
|
-
/* @__PURE__ */ c(
|
|
1030
|
-
items:
|
|
1031
|
-
isOpen:
|
|
1032
|
-
onClose: () =>
|
|
1033
|
-
onPause:
|
|
1034
|
-
onResume:
|
|
1035
|
-
onRetry:
|
|
1036
|
-
onCancel:
|
|
1039
|
+
/* @__PURE__ */ c(Pe, {
|
|
1040
|
+
items: Gt,
|
|
1041
|
+
isOpen: Kt,
|
|
1042
|
+
onClose: () => qt(!1),
|
|
1043
|
+
onPause: fn,
|
|
1044
|
+
onResume: pn,
|
|
1045
|
+
onRetry: mn,
|
|
1046
|
+
onCancel: hn
|
|
1037
1047
|
}),
|
|
1038
|
-
/* @__PURE__ */ c(
|
|
1039
|
-
toasts:
|
|
1040
|
-
onClose:
|
|
1048
|
+
/* @__PURE__ */ c(ke, {
|
|
1049
|
+
toasts: C.toasts,
|
|
1050
|
+
onClose: C.removeToast
|
|
1041
1051
|
}),
|
|
1042
|
-
!
|
|
1052
|
+
!j && k.length === 0 && A.length === 0 && /* @__PURE__ */ c("div", {
|
|
1043
1053
|
className: "px-6 py-12",
|
|
1044
|
-
children:
|
|
1054
|
+
children: x ? /* @__PURE__ */ c(st, {
|
|
1045
1055
|
illustration: "empty-search",
|
|
1046
1056
|
title: a(d, "files.browser.empty.search.title", "No results found"),
|
|
1047
1057
|
description: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
|
|
1048
1058
|
action: /* @__PURE__ */ c(u, {
|
|
1049
1059
|
type: "button",
|
|
1050
1060
|
onClick: () => {
|
|
1051
|
-
|
|
1061
|
+
St(""), wt(void 0);
|
|
1052
1062
|
},
|
|
1053
1063
|
children: a(d, "files.browser.search.clear", "Clear search")
|
|
1054
1064
|
})
|
|
1055
|
-
}) : /* @__PURE__ */ c(
|
|
1056
|
-
type:
|
|
1057
|
-
onUpload:
|
|
1058
|
-
onNewFolder:
|
|
1065
|
+
}) : /* @__PURE__ */ c(Oe, {
|
|
1066
|
+
type: v,
|
|
1067
|
+
onUpload: v === "all" ? un : void 0,
|
|
1068
|
+
onNewFolder: v === "all" ? _n : void 0
|
|
1059
1069
|
})
|
|
1060
1070
|
})
|
|
1061
1071
|
]
|