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