@burdenoff/microfe-files 2026.525.3 → 2026.527.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/ActionMenu.js +3 -1
- package/dist/files/components/ActionMenu.js.map +1 -1
- package/dist/files/components/ContextMenu.js +16 -112
- package/dist/files/components/ContextMenu.js.map +1 -1
- package/dist/files/components/CopyDialog.js +8 -0
- package/dist/files/components/CopyDialog.js.map +1 -1
- package/dist/files/components/EmptyState.js +2 -0
- package/dist/files/components/EmptyState.js.map +1 -1
- package/dist/files/components/FileBrowser.js +192 -171
- package/dist/files/components/FileBrowser.js.map +1 -1
- package/dist/files/components/FileCard.js +4 -0
- package/dist/files/components/FileCard.js.map +1 -1
- package/dist/files/components/FileInfoPanel.js +2 -0
- package/dist/files/components/FileInfoPanel.js.map +1 -1
- package/dist/files/components/FileListItem.js +6 -0
- package/dist/files/components/FileListItem.js.map +1 -1
- package/dist/files/components/FilePreviewModal.js +9 -3
- package/dist/files/components/FilePreviewModal.js.map +1 -1
- package/dist/files/components/FileVersionPanel.js +5 -0
- package/dist/files/components/FileVersionPanel.js.map +1 -1
- package/dist/files/components/FolderCard.js +147 -158
- package/dist/files/components/FolderCard.js.map +1 -1
- package/dist/files/components/MoveDialog.js +17 -12
- package/dist/files/components/MoveDialog.js.map +1 -1
- package/dist/files/components/SearchBar.js +4 -0
- package/dist/files/components/SearchBar.js.map +1 -1
- package/dist/files/components/ShareDialog.js +109 -104
- package/dist/files/components/ShareDialog.js.map +1 -1
- package/dist/files/components/TabBar.js +1 -0
- package/dist/files/components/TabBar.js.map +1 -1
- package/dist/files/components/Toast.js +1 -0
- package/dist/files/components/Toast.js.map +1 -1
- package/dist/files/components/UploadQueue.js +5 -0
- package/dist/files/components/UploadQueue.js.map +1 -1
- package/dist/files/components/contextMenuItems.js +103 -0
- package/dist/files/components/contextMenuItems.js.map +1 -0
- package/dist/files/components/viewers/AudioPlayer.js +4 -1
- package/dist/files/components/viewers/AudioPlayer.js.map +1 -1
- package/dist/files/components/viewers/CodeViewer.js +2 -0
- package/dist/files/components/viewers/CodeViewer.js.map +1 -1
- package/dist/files/components/viewers/ImageViewer.js +4 -0
- package/dist/files/components/viewers/ImageViewer.js.map +1 -1
- package/dist/files/components/viewers/PDFViewer.js +2 -0
- package/dist/files/components/viewers/PDFViewer.js.map +1 -1
- package/dist/files/components/viewers/TextViewer.js +4 -2
- package/dist/files/components/viewers/TextViewer.js.map +1 -1
- package/dist/files/components/viewers/VideoPlayer.js +5 -1
- package/dist/files/components/viewers/VideoPlayer.js.map +1 -1
- package/dist/files/hooks/useBatchOperations.js.map +1 -1
- package/dist/files/hooks/useCreateFolder.js +15 -7
- package/dist/files/hooks/useCreateFolder.js.map +1 -1
- package/dist/files/hooks/useFileVersions.js.map +1 -1
- package/dist/files/hooks/useMoveFile.js +1 -2
- package/dist/files/hooks/useMoveFile.js.map +1 -1
- package/dist/files/hooks/useMoveFolder.js +0 -2
- package/dist/files/hooks/useMoveFolder.js.map +1 -1
- package/dist/files/hooks/useStarredItems.js +4 -3
- package/dist/files/hooks/useStarredItems.js.map +1 -1
- package/dist/files/hooks/useToggleStar.js +10 -10
- package/dist/files/hooks/useToggleStar.js.map +1 -1
- package/dist/files/pages/BrowserPage.js +332 -302
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/pages/ShareAccessPage.js +6 -5
- package/dist/files/pages/ShareAccessPage.js.map +1 -1
- package/dist/files/utils/index.js +1 -1
- package/dist/files/utils/index.js.map +1 -1
- package/dist/files/utils/quotaUtils.js +14 -0
- package/dist/files/utils/quotaUtils.js.map +1 -0
- package/dist/files/utils/thumbnail.js.map +1 -1
- package/dist/files.js +2 -1
- package/dist/translations/en.js +259 -0
- package/dist/translations/en.js.map +1 -0
- package/package.json +2 -5
- package/dist/files/components/viewers/index.js +0 -6
|
@@ -39,29 +39,30 @@ import { MoveDialog as Ae } from "../components/MoveDialog.js";
|
|
|
39
39
|
import { CopyDialog as je } from "../components/CopyDialog.js";
|
|
40
40
|
import { ConfirmDialog as Me } from "../components/ConfirmDialog.js";
|
|
41
41
|
import { UploadQueue as Ne } from "../components/UploadQueue.js";
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
42
|
+
import { isQuotaExhaustedError as Pe } from "../utils/quotaUtils.js";
|
|
43
|
+
import { nativeImpact as Fe, nativeNotify as Ie, nativeOpenUrl as Le } from "../../utils/nativeBridge.js";
|
|
44
|
+
import { emitFilesEvent as Re } from "../utils/events.js";
|
|
45
|
+
import { useEffect as ze, useMemo as Be, useState as o } from "react";
|
|
46
|
+
import { FolderPlus as Ve, FolderUp as He, FolderX as Ue, Grid3x3 as We, Home as Ge, List as Ke, Loader2 as s, Search as qe, Trash2 as Je, Upload as Ye, X as Xe } from "lucide-react";
|
|
47
|
+
import { useFeatureFlagDetails as Ze } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
47
48
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
48
|
-
import { useNavigate as
|
|
49
|
-
import { useI18n as
|
|
49
|
+
import { useNavigate as Qe, useParams as $e } from "react-router-dom";
|
|
50
|
+
import { useI18n as et } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
50
51
|
//#region src/files/pages/BrowserPage.tsx
|
|
51
52
|
function d() {
|
|
52
|
-
let { t: d } =
|
|
53
|
+
let { t: d } = et(), { folderId: f } = $e(), p = Qe(), tt = e(), { workspaceId: m } = tt, { viewMode: nt, setViewMode: rt, breadcrumbs: it, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, at] = o("all"), ot = Ze("files.starred"), st = Ze("files.bin"), ct = ot ? !!ot.value : !1, lt = st ? !!st.value : !1, ut = Be(() => {
|
|
53
54
|
let e = ["all", "recent"];
|
|
54
55
|
return ct && e.push("starred"), lt && e.push("bin"), e;
|
|
55
56
|
}, [ct, lt]);
|
|
56
|
-
|
|
57
|
-
ut.includes(
|
|
58
|
-
}, [ut,
|
|
59
|
-
let [
|
|
57
|
+
ze(() => {
|
|
58
|
+
ut.includes(v) || at("all");
|
|
59
|
+
}, [ut, v]);
|
|
60
|
+
let [dt, ft] = o(""), [pt, mt] = o(), y = dt.trim().length >= 2, [ht, gt] = o(null), [b, _t] = o(null), x = be(), S = r({
|
|
60
61
|
folderId: f || void 0,
|
|
61
62
|
pageSize: 100,
|
|
62
|
-
skip:
|
|
63
|
-
}), C = i({ skip:
|
|
64
|
-
|
|
63
|
+
skip: v !== "all" || y
|
|
64
|
+
}), C = i({ skip: v !== "recent" || y }), w = ee({ skip: v !== "starred" || y || !ct }), T = te({ skip: v !== "bin" || y || !lt }), E = ye(dt, y, pt);
|
|
65
|
+
ze(() => {
|
|
65
66
|
if (f && S.data?.folderPath && S.data?.currentFolder) {
|
|
66
67
|
let e = S.data.folderPath.folders || [], n = S.data.currentFolder, r = [...e.map((e) => ({
|
|
67
68
|
id: e.id,
|
|
@@ -75,7 +76,7 @@ function d() {
|
|
|
75
76
|
}, [f, S.data]);
|
|
76
77
|
let D = [], O = [], k = !1, A = null, j = !1;
|
|
77
78
|
if (y && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
|
|
78
|
-
else switch (
|
|
79
|
+
else switch (v) {
|
|
79
80
|
case "all":
|
|
80
81
|
D = S.data?.filesList?.files || [], O = S.data?.foldersList?.folders || [], k = S.loading, A = S.error || null, j = !1;
|
|
81
82
|
break;
|
|
@@ -89,27 +90,27 @@ function d() {
|
|
|
89
90
|
D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
|
|
90
91
|
break;
|
|
91
92
|
}
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
if (!
|
|
96
|
-
let e =
|
|
97
|
-
|
|
98
|
-
...
|
|
93
|
+
let vt = v === "all" ? (S.data?.filesList?.total ?? D.length) + (S.data?.foldersList?.total ?? O.length) : null, M = h.size + g.size, [yt, N] = o(!1), [bt, xt] = o(!1), [St, P] = o(!1), [Ct, F] = o(!1), [wt, I] = o(!1), [Tt, Et] = o(!1), [Dt, L] = o(null), [R, z] = o(null), [B, Ot] = o(null), [V, H] = o(null), [U, W] = o(""), [G, K] = o(""), [kt, q] = o(!1), [At, J] = o([]), [jt, Y] = o(!1), [X, Z] = o(null), Q = (e, t) => {
|
|
94
|
+
Re(tt, e, t);
|
|
95
|
+
}, Mt = async () => {
|
|
96
|
+
if (!X || X.loading) return;
|
|
97
|
+
let e = X.onConfirm;
|
|
98
|
+
Z({
|
|
99
|
+
...X,
|
|
99
100
|
loading: !0
|
|
100
101
|
});
|
|
101
102
|
try {
|
|
102
|
-
await e(),
|
|
103
|
+
await e(), Z(null);
|
|
103
104
|
} catch (e) {
|
|
104
|
-
|
|
105
|
+
Q("files.api.failed", {
|
|
105
106
|
action: "confirmDialog",
|
|
106
107
|
message: e instanceof Error ? e.message : "Confirmed action failed"
|
|
107
|
-
}),
|
|
108
|
+
}), Z((e) => e && {
|
|
108
109
|
...e,
|
|
109
110
|
loading: !1
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
},
|
|
113
|
+
}, $ = ne(), Nt = re(), Pt = ie(), Ft = ae(), It = oe(), Lt = se(), Rt = ce(), zt = le(), Bt = ue(), Vt = de(), Ht = fe(), Ut = pe(), Wt = me(), Gt = he(), Kt = ge(), qt = _e(), Jt = ve(), Yt = () => {
|
|
113
114
|
let e = document.createElement("input");
|
|
114
115
|
e.type = "file", e.multiple = !0, e.onchange = async (e) => {
|
|
115
116
|
let t = e.target.files;
|
|
@@ -125,21 +126,21 @@ function d() {
|
|
|
125
126
|
thumbnailUrl: n ?? void 0
|
|
126
127
|
};
|
|
127
128
|
}));
|
|
128
|
-
|
|
129
|
-
for (let t of e) await
|
|
130
|
-
|
|
129
|
+
J((t) => [...t, ...e]), Y(!0), q(!0);
|
|
130
|
+
for (let t of e) await Xt(t);
|
|
131
|
+
q(!1);
|
|
131
132
|
}
|
|
132
133
|
}, e.click();
|
|
133
|
-
},
|
|
134
|
+
}, Xt = async (e) => {
|
|
134
135
|
let t = (t) => {
|
|
135
|
-
|
|
136
|
+
J((n) => n.map((n) => n.id === e.id ? {
|
|
136
137
|
...n,
|
|
137
138
|
...t
|
|
138
139
|
} : n));
|
|
139
140
|
};
|
|
140
141
|
t({ status: "uploading" });
|
|
141
142
|
try {
|
|
142
|
-
let n = await
|
|
143
|
+
let n = await Nt.mutateAsync({
|
|
143
144
|
file: e.file,
|
|
144
145
|
folderId: e.folderId,
|
|
145
146
|
onProgress: (e) => {
|
|
@@ -149,7 +150,7 @@ function d() {
|
|
|
149
150
|
t({
|
|
150
151
|
status: "completed",
|
|
151
152
|
progress: 100
|
|
152
|
-
}),
|
|
153
|
+
}), Q("files.file.uploaded", {
|
|
153
154
|
fileId: n.id,
|
|
154
155
|
fileName: n.name,
|
|
155
156
|
folderId: e.folderId
|
|
@@ -162,35 +163,35 @@ function d() {
|
|
|
162
163
|
}), x.error(a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded. Please upgrade your plan or delete files."))) : (t({
|
|
163
164
|
status: "failed",
|
|
164
165
|
error: r
|
|
165
|
-
}),
|
|
166
|
+
}), Q("files.api.failed", {
|
|
166
167
|
action: "uploadFile",
|
|
167
168
|
fileName: e.file.name,
|
|
168
169
|
message: r
|
|
169
170
|
}));
|
|
170
171
|
}
|
|
171
|
-
},
|
|
172
|
-
|
|
172
|
+
}, Zt = (e) => {
|
|
173
|
+
Nt.pause(), J((t) => t.map((t) => t.id === e ? {
|
|
173
174
|
...t,
|
|
174
175
|
status: "paused"
|
|
175
176
|
} : t));
|
|
176
|
-
},
|
|
177
|
-
let t =
|
|
178
|
-
t &&
|
|
179
|
-
},
|
|
180
|
-
let t =
|
|
181
|
-
t && (
|
|
177
|
+
}, Qt = (e) => {
|
|
178
|
+
let t = At.find((t) => t.id === e);
|
|
179
|
+
t && Xt(t);
|
|
180
|
+
}, $t = (e) => {
|
|
181
|
+
let t = At.find((t) => t.id === e);
|
|
182
|
+
t && (J((t) => t.map((t) => t.id === e ? {
|
|
182
183
|
...t,
|
|
183
184
|
status: "pending",
|
|
184
185
|
progress: 0,
|
|
185
186
|
error: void 0
|
|
186
|
-
} : t)),
|
|
187
|
-
},
|
|
188
|
-
|
|
187
|
+
} : t)), Xt(t));
|
|
188
|
+
}, en = (e) => {
|
|
189
|
+
J((t) => {
|
|
189
190
|
let n = t.filter((t) => t.id !== e);
|
|
190
|
-
return n.length === 0 && (
|
|
191
|
+
return n.length === 0 && (Y(!1), q(!1)), n;
|
|
191
192
|
});
|
|
192
|
-
},
|
|
193
|
-
if (!
|
|
193
|
+
}, tn = () => {
|
|
194
|
+
if (!m) {
|
|
194
195
|
x.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
@@ -209,11 +210,11 @@ function d() {
|
|
|
209
210
|
let t = e.split("/"), r = "", i = f || void 0;
|
|
210
211
|
for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
|
|
211
212
|
else try {
|
|
212
|
-
let t = await
|
|
213
|
+
let { data: t } = await $.mutateAsync({
|
|
213
214
|
name: e,
|
|
214
215
|
parentFolderId: i
|
|
215
216
|
});
|
|
216
|
-
n.set(r, t.id), i = t.id;
|
|
217
|
+
t?.id && (n.set(r, t.id), i = t.id);
|
|
217
218
|
} catch {}
|
|
218
219
|
}
|
|
219
220
|
let i = [], ee = 0;
|
|
@@ -231,38 +232,41 @@ function d() {
|
|
|
231
232
|
});
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
|
-
|
|
235
|
-
for (let e of i) await
|
|
236
|
-
|
|
235
|
+
J((e) => [...e, ...i]), Y(!0), q(!0);
|
|
236
|
+
for (let e of i) await Xt(e);
|
|
237
|
+
q(!1), x.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
|
|
237
238
|
count: i.length,
|
|
238
239
|
plural: i.length > 1 ? "s" : ""
|
|
239
240
|
}));
|
|
240
241
|
}
|
|
241
242
|
}, e.click();
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
},
|
|
245
|
-
if (
|
|
246
|
-
await
|
|
247
|
-
name:
|
|
248
|
-
parentFolderId: f
|
|
249
|
-
}), G(""), yt(!1), Z("files.folder.created", {
|
|
250
|
-
folderName: W,
|
|
243
|
+
}, nn = () => {
|
|
244
|
+
N(!0);
|
|
245
|
+
}, rn = async () => {
|
|
246
|
+
if (G.trim() && m) {
|
|
247
|
+
let { data: e, error: t } = await $.mutateAsync({
|
|
248
|
+
name: G,
|
|
251
249
|
parentFolderId: f
|
|
252
250
|
});
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
if (t) {
|
|
252
|
+
Pe(t) ? (N(!1), K(""), xt(!0)) : (x.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), Q("files.api.failed", {
|
|
253
|
+
action: "createFolder",
|
|
254
|
+
message: t instanceof Error ? t.message : "Folder creation failed"
|
|
255
|
+
}));
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
e && (K(""), N(!1), Q("files.folder.created", {
|
|
259
|
+
folderName: G,
|
|
260
|
+
parentFolderId: f
|
|
261
|
+
}));
|
|
258
262
|
}
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
},
|
|
263
|
+
}, an = (e) => {
|
|
264
|
+
_t(e);
|
|
265
|
+
}, on = (e) => {
|
|
266
|
+
L(e), F(!0);
|
|
267
|
+
}, sn = (e) => {
|
|
268
|
+
L(e), F(!0);
|
|
269
|
+
}, cn = async (e) => {
|
|
266
270
|
if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
|
|
267
271
|
let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
|
|
268
272
|
if (e.fileId) {
|
|
@@ -275,7 +279,7 @@ function d() {
|
|
|
275
279
|
shareType: t,
|
|
276
280
|
accessLevel: "DOWNLOAD"
|
|
277
281
|
};
|
|
278
|
-
n = (await
|
|
282
|
+
n = (await Ut.mutateAsync(r))?.token ?? "", Q("files.share.created", {
|
|
279
283
|
entityType: "file",
|
|
280
284
|
fileId: e.fileId,
|
|
281
285
|
shareType: t
|
|
@@ -290,7 +294,7 @@ function d() {
|
|
|
290
294
|
shareType: t,
|
|
291
295
|
accessLevel: "DOWNLOAD"
|
|
292
296
|
};
|
|
293
|
-
n = (await
|
|
297
|
+
n = (await Wt.mutateAsync(r))?.createFolderShare?.token ?? "", Q("files.share.created", {
|
|
294
298
|
entityType: "folder",
|
|
295
299
|
folderId: e.folderId,
|
|
296
300
|
shareType: t
|
|
@@ -300,21 +304,21 @@ function d() {
|
|
|
300
304
|
publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
|
|
301
305
|
token: n
|
|
302
306
|
};
|
|
303
|
-
},
|
|
304
|
-
|
|
307
|
+
}, ln = async (e) => {
|
|
308
|
+
Fe("medium"), Z({
|
|
305
309
|
title: a(d, "files.confirm.deleteFile.title", "Delete file"),
|
|
306
310
|
description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
|
|
307
311
|
confirmLabel: a(d, "files.common.actions.delete", "Delete"),
|
|
308
312
|
variant: "danger",
|
|
309
313
|
onConfirm: async () => {
|
|
310
314
|
try {
|
|
311
|
-
await
|
|
315
|
+
await Pt.mutateAsync({ id: e.id }), Ie("success"), x.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.file.deleted", {
|
|
312
316
|
fileId: e.id,
|
|
313
317
|
fileName: e.name,
|
|
314
318
|
permanent: !1
|
|
315
319
|
});
|
|
316
320
|
} catch (t) {
|
|
317
|
-
x.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })),
|
|
321
|
+
x.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Ie("error"), Q("files.api.failed", {
|
|
318
322
|
action: "deleteFile",
|
|
319
323
|
fileId: e.id,
|
|
320
324
|
message: t instanceof Error ? t.message : "Failed to delete file"
|
|
@@ -322,24 +326,24 @@ function d() {
|
|
|
322
326
|
}
|
|
323
327
|
}
|
|
324
328
|
});
|
|
325
|
-
},
|
|
329
|
+
}, un = async (e) => {
|
|
326
330
|
try {
|
|
327
|
-
await
|
|
331
|
+
await It.mutateAsync({ id: e.id }), x.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.file.restored", {
|
|
328
332
|
fileId: e.id,
|
|
329
333
|
fileName: e.name
|
|
330
334
|
});
|
|
331
335
|
} catch (e) {
|
|
332
336
|
x.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
|
|
333
337
|
}
|
|
334
|
-
},
|
|
335
|
-
|
|
338
|
+
}, dn = async (e) => {
|
|
339
|
+
Fe("heavy"), Z({
|
|
336
340
|
title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
|
|
337
341
|
description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
|
|
338
342
|
confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
339
343
|
variant: "danger",
|
|
340
344
|
onConfirm: async () => {
|
|
341
345
|
try {
|
|
342
|
-
await
|
|
346
|
+
await Rt.mutateAsync({ id: e.id }), x.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.file.deleted", {
|
|
343
347
|
fileId: e.id,
|
|
344
348
|
fileName: e.name,
|
|
345
349
|
permanent: !0
|
|
@@ -349,69 +353,69 @@ function d() {
|
|
|
349
353
|
}
|
|
350
354
|
}
|
|
351
355
|
});
|
|
352
|
-
},
|
|
356
|
+
}, fn = async (e) => {
|
|
353
357
|
try {
|
|
354
|
-
await
|
|
358
|
+
await Bt.mutateAsync({
|
|
355
359
|
id: e.id,
|
|
356
360
|
type: "file"
|
|
357
|
-
}),
|
|
361
|
+
}), Q("files.file.starred", {
|
|
358
362
|
fileId: e.id,
|
|
359
363
|
fileName: e.name,
|
|
360
364
|
starred: !e.starred
|
|
361
365
|
});
|
|
362
366
|
} catch {
|
|
363
|
-
x.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")),
|
|
367
|
+
x.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
|
|
364
368
|
action: "toggleFileStar",
|
|
365
369
|
fileId: e.id
|
|
366
370
|
});
|
|
367
371
|
}
|
|
368
|
-
},
|
|
369
|
-
|
|
372
|
+
}, pn = (e) => {
|
|
373
|
+
H({
|
|
370
374
|
id: e.id,
|
|
371
375
|
name: e.name,
|
|
372
376
|
type: "file"
|
|
373
|
-
}),
|
|
374
|
-
},
|
|
377
|
+
}), W(e.name), P(!0);
|
|
378
|
+
}, mn = async (e) => {
|
|
375
379
|
try {
|
|
376
380
|
let t = e.downloadUrl || e.url;
|
|
377
381
|
if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
|
|
378
382
|
let n = document.createElement("a");
|
|
379
|
-
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), x.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })),
|
|
383
|
+
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), x.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Q("files.file.downloaded", {
|
|
380
384
|
fileId: e.id,
|
|
381
385
|
fileName: e.name
|
|
382
386
|
});
|
|
383
387
|
} catch (e) {
|
|
384
388
|
x.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
|
|
385
389
|
}
|
|
386
|
-
},
|
|
387
|
-
|
|
390
|
+
}, hn = (e) => {
|
|
391
|
+
Ot({
|
|
388
392
|
item: e,
|
|
389
393
|
type: "file"
|
|
390
|
-
}),
|
|
391
|
-
},
|
|
392
|
-
|
|
394
|
+
}), Et(!0);
|
|
395
|
+
}, gn = (e) => {
|
|
396
|
+
z({
|
|
393
397
|
item: e,
|
|
394
398
|
type: "file"
|
|
395
|
-
}),
|
|
396
|
-
},
|
|
397
|
-
|
|
399
|
+
}), I(!0);
|
|
400
|
+
}, _n = (e) => {
|
|
401
|
+
gt({
|
|
398
402
|
item: e,
|
|
399
403
|
type: "file"
|
|
400
404
|
});
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
|
|
405
|
+
}, vn = (e) => {
|
|
406
|
+
p(`/files/browse/${e.id}`);
|
|
407
|
+
}, yn = async (e) => {
|
|
408
|
+
Fe("medium"), Z({
|
|
405
409
|
title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
|
|
406
410
|
description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
|
|
407
411
|
confirmLabel: a(d, "files.common.actions.delete", "Delete"),
|
|
408
412
|
variant: "danger",
|
|
409
413
|
onConfirm: async () => {
|
|
410
414
|
try {
|
|
411
|
-
await
|
|
415
|
+
await Ft.mutateAsync({
|
|
412
416
|
id: e.id,
|
|
413
417
|
recursive: !0
|
|
414
|
-
}), x.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })),
|
|
418
|
+
}), x.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.folder.deleted", {
|
|
415
419
|
folderId: e.id,
|
|
416
420
|
folderName: e.name,
|
|
417
421
|
permanent: !1
|
|
@@ -421,24 +425,24 @@ function d() {
|
|
|
421
425
|
}
|
|
422
426
|
}
|
|
423
427
|
});
|
|
424
|
-
},
|
|
428
|
+
}, bn = async (e) => {
|
|
425
429
|
try {
|
|
426
|
-
await
|
|
430
|
+
await Lt.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.folder.restored", {
|
|
427
431
|
folderId: e.id,
|
|
428
432
|
folderName: e.name
|
|
429
433
|
});
|
|
430
434
|
} catch (e) {
|
|
431
435
|
x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
|
|
432
436
|
}
|
|
433
|
-
},
|
|
434
|
-
|
|
437
|
+
}, xn = async (e) => {
|
|
438
|
+
Z({
|
|
435
439
|
title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
|
|
436
440
|
description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
|
|
437
441
|
confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
438
442
|
variant: "danger",
|
|
439
443
|
onConfirm: async () => {
|
|
440
444
|
try {
|
|
441
|
-
await
|
|
445
|
+
await zt.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.folder.deleted", {
|
|
442
446
|
folderId: e.id,
|
|
443
447
|
folderName: e.name,
|
|
444
448
|
permanent: !0
|
|
@@ -448,105 +452,105 @@ function d() {
|
|
|
448
452
|
}
|
|
449
453
|
}
|
|
450
454
|
});
|
|
451
|
-
},
|
|
452
|
-
|
|
455
|
+
}, Sn = (e) => {
|
|
456
|
+
H({
|
|
453
457
|
id: e.id,
|
|
454
458
|
name: e.name,
|
|
455
459
|
type: "folder"
|
|
456
|
-
}),
|
|
457
|
-
},
|
|
458
|
-
|
|
460
|
+
}), W(e.name), P(!0);
|
|
461
|
+
}, Cn = (e) => {
|
|
462
|
+
z({
|
|
459
463
|
item: e,
|
|
460
464
|
type: "folder"
|
|
461
|
-
}),
|
|
462
|
-
},
|
|
465
|
+
}), I(!0);
|
|
466
|
+
}, wn = async (e) => {
|
|
463
467
|
try {
|
|
464
|
-
await
|
|
468
|
+
await Bt.mutateAsync({
|
|
465
469
|
id: e.id,
|
|
466
470
|
type: "folder"
|
|
467
|
-
}),
|
|
471
|
+
}), Q("files.folder.starred", {
|
|
468
472
|
folderId: e.id,
|
|
469
473
|
folderName: e.name,
|
|
470
474
|
starred: !e.starred
|
|
471
475
|
});
|
|
472
476
|
} catch {
|
|
473
|
-
x.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")),
|
|
477
|
+
x.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
|
|
474
478
|
action: "toggleFolderStar",
|
|
475
479
|
folderId: e.id
|
|
476
480
|
});
|
|
477
481
|
}
|
|
478
|
-
},
|
|
479
|
-
|
|
482
|
+
}, Tn = (e) => {
|
|
483
|
+
gt({
|
|
480
484
|
item: e,
|
|
481
485
|
type: "folder"
|
|
482
486
|
});
|
|
483
|
-
},
|
|
484
|
-
if (
|
|
485
|
-
|
|
486
|
-
fileId:
|
|
487
|
+
}, En = async (e) => {
|
|
488
|
+
if (R) try {
|
|
489
|
+
R.type === "file" ? (await Kt.mutateAsync({
|
|
490
|
+
fileId: R.item.id,
|
|
487
491
|
targetFolderId: e || null
|
|
488
|
-
}), x.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name:
|
|
489
|
-
fileId:
|
|
490
|
-
fileName:
|
|
492
|
+
}), x.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.file.moved", {
|
|
493
|
+
fileId: R.item.id,
|
|
494
|
+
fileName: R.item.name,
|
|
491
495
|
destinationFolderId: e
|
|
492
|
-
})) : (await
|
|
493
|
-
folderId:
|
|
496
|
+
})) : (await qt.mutateAsync({
|
|
497
|
+
folderId: R.item.id,
|
|
494
498
|
targetParentFolderId: e
|
|
495
|
-
}), x.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name:
|
|
496
|
-
folderId:
|
|
497
|
-
folderName:
|
|
499
|
+
}), x.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.folder.moved", {
|
|
500
|
+
folderId: R.item.id,
|
|
501
|
+
folderName: R.item.name,
|
|
498
502
|
destinationFolderId: e
|
|
499
|
-
})),
|
|
503
|
+
})), I(!1), z(null);
|
|
500
504
|
} catch (e) {
|
|
501
|
-
x.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name:
|
|
502
|
-
action:
|
|
503
|
-
itemId:
|
|
504
|
-
itemType:
|
|
505
|
+
x.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Q("files.api.failed", {
|
|
506
|
+
action: R.type === "file" ? "moveFile" : "moveFolder",
|
|
507
|
+
itemId: R.item.id,
|
|
508
|
+
itemType: R.type,
|
|
505
509
|
message: e instanceof Error ? e.message : void 0
|
|
506
510
|
});
|
|
507
511
|
}
|
|
508
|
-
},
|
|
509
|
-
if (
|
|
510
|
-
if (
|
|
511
|
-
await
|
|
512
|
-
id:
|
|
513
|
-
newName: t || `Copy of ${
|
|
512
|
+
}, Dn = async (e, t) => {
|
|
513
|
+
if (B) try {
|
|
514
|
+
if (B.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
|
|
515
|
+
await Gt.mutateAsync({
|
|
516
|
+
id: B.item.id,
|
|
517
|
+
newName: t || `Copy of ${B.item.name}`,
|
|
514
518
|
targetFolderId: e || void 0
|
|
515
|
-
}), x.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name:
|
|
516
|
-
fileId:
|
|
517
|
-
fileName:
|
|
519
|
+
}), x.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: B.item.name })), Q("files.file.copied", {
|
|
520
|
+
fileId: B.item.id,
|
|
521
|
+
fileName: B.item.name,
|
|
518
522
|
destinationFolderId: e
|
|
519
|
-
}),
|
|
523
|
+
}), Et(!1), Ot(null);
|
|
520
524
|
} catch (e) {
|
|
521
|
-
x.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name:
|
|
525
|
+
x.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: B.item.name })), Q("files.api.failed", {
|
|
522
526
|
action: "copyFile",
|
|
523
|
-
fileId:
|
|
527
|
+
fileId: B.item.id,
|
|
524
528
|
message: e instanceof Error ? e.message : void 0
|
|
525
529
|
});
|
|
526
530
|
}
|
|
527
|
-
},
|
|
528
|
-
if (!(!
|
|
529
|
-
let e =
|
|
530
|
-
|
|
531
|
-
fileId:
|
|
531
|
+
}, On = async () => {
|
|
532
|
+
if (!(!V || !U.trim())) try {
|
|
533
|
+
let e = V.name, t = U.trim();
|
|
534
|
+
V.type === "file" ? (await Vt.mutateAsync({
|
|
535
|
+
fileId: V.id,
|
|
532
536
|
newName: t
|
|
533
|
-
}), x.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })),
|
|
534
|
-
fileId:
|
|
537
|
+
}), x.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.file.renamed", {
|
|
538
|
+
fileId: V.id,
|
|
535
539
|
previousName: e,
|
|
536
540
|
name: t
|
|
537
|
-
})) : (await
|
|
538
|
-
folderId:
|
|
541
|
+
})) : (await Ht.mutateAsync({
|
|
542
|
+
folderId: V.id,
|
|
539
543
|
newName: t
|
|
540
|
-
}), x.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })),
|
|
541
|
-
folderId:
|
|
544
|
+
}), x.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.folder.renamed", {
|
|
545
|
+
folderId: V.id,
|
|
542
546
|
previousName: e,
|
|
543
547
|
name: t
|
|
544
|
-
})),
|
|
548
|
+
})), P(!1), H(null), W("");
|
|
545
549
|
} catch (e) {
|
|
546
|
-
x.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type:
|
|
547
|
-
action:
|
|
548
|
-
itemId:
|
|
549
|
-
itemType:
|
|
550
|
+
x.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: V.type })), Q("files.api.failed", {
|
|
551
|
+
action: V.type === "file" ? "renameFile" : "renameFolder",
|
|
552
|
+
itemId: V.id,
|
|
553
|
+
itemType: V.type,
|
|
550
554
|
message: e instanceof Error ? e.message : void 0
|
|
551
555
|
});
|
|
552
556
|
}
|
|
@@ -554,20 +558,20 @@ function d() {
|
|
|
554
558
|
return n({
|
|
555
559
|
files: D,
|
|
556
560
|
folders: O,
|
|
557
|
-
onFilePreview:
|
|
558
|
-
onFileDelete:
|
|
559
|
-
onFolderOpen:
|
|
560
|
-
onFolderDelete:
|
|
561
|
-
activeTab:
|
|
562
|
-
}),
|
|
561
|
+
onFilePreview: an,
|
|
562
|
+
onFileDelete: ln,
|
|
563
|
+
onFolderOpen: vn,
|
|
564
|
+
onFolderDelete: yn,
|
|
565
|
+
activeTab: v
|
|
566
|
+
}), m === void 0 ? /* @__PURE__ */ u("div", {
|
|
563
567
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
564
568
|
children: [/* @__PURE__ */ l(s, { className: "h-8 w-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
565
569
|
className: "text-sm text-text-secondary max-w-md",
|
|
566
570
|
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.")
|
|
567
571
|
})]
|
|
568
|
-
}) :
|
|
572
|
+
}) : m === "" ? /* @__PURE__ */ u("div", {
|
|
569
573
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
570
|
-
children: [/* @__PURE__ */ l(
|
|
574
|
+
children: [/* @__PURE__ */ l(Ue, { className: "h-8 w-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
571
575
|
className: "text-sm text-text-secondary max-w-md",
|
|
572
576
|
children: a(d, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
|
|
573
577
|
})]
|
|
@@ -581,10 +585,11 @@ function d() {
|
|
|
581
585
|
children: /* @__PURE__ */ u("div", {
|
|
582
586
|
className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
|
|
583
587
|
children: [/* @__PURE__ */ u("button", {
|
|
584
|
-
|
|
588
|
+
type: "button",
|
|
589
|
+
onClick: () => p("/files/browse"),
|
|
585
590
|
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",
|
|
586
591
|
title: a(d, "files.browser.actions.goToRoot", "Go to root"),
|
|
587
|
-
children: [/* @__PURE__ */ l(
|
|
592
|
+
children: [/* @__PURE__ */ l(Ge, { className: "size-4" }), /* @__PURE__ */ l("span", {
|
|
588
593
|
className: "hidden sm:inline",
|
|
589
594
|
children: a(d, "files.browser.rootLabel", "My Drive")
|
|
590
595
|
})]
|
|
@@ -594,7 +599,8 @@ function d() {
|
|
|
594
599
|
className: "text-text-tertiary",
|
|
595
600
|
children: "/"
|
|
596
601
|
}), /* @__PURE__ */ l("button", {
|
|
597
|
-
|
|
602
|
+
type: "button",
|
|
603
|
+
onClick: () => p(`/files/browse/${e.id}`),
|
|
598
604
|
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === it.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
|
|
599
605
|
title: `Go to ${e.name}`,
|
|
600
606
|
children: e.name
|
|
@@ -604,7 +610,7 @@ function d() {
|
|
|
604
610
|
})
|
|
605
611
|
}),
|
|
606
612
|
/* @__PURE__ */ l(Ce, {
|
|
607
|
-
activeTab:
|
|
613
|
+
activeTab: v,
|
|
608
614
|
onTabChange: at,
|
|
609
615
|
tabs: ut
|
|
610
616
|
}),
|
|
@@ -619,10 +625,10 @@ function d() {
|
|
|
619
625
|
className: "relative w-full max-w-2xl",
|
|
620
626
|
children: /* @__PURE__ */ l(ke, {
|
|
621
627
|
onSearch: (e, t) => {
|
|
622
|
-
|
|
628
|
+
ft(e), mt(t);
|
|
623
629
|
},
|
|
624
630
|
placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
|
|
625
|
-
initialQuery:
|
|
631
|
+
initialQuery: dt,
|
|
626
632
|
showFilters: !0
|
|
627
633
|
})
|
|
628
634
|
})
|
|
@@ -630,6 +636,7 @@ function d() {
|
|
|
630
636
|
className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
|
|
631
637
|
children: [
|
|
632
638
|
!y && (D.length > 0 || O.length > 0) && /* @__PURE__ */ l("button", {
|
|
639
|
+
type: "button",
|
|
633
640
|
onClick: () => {
|
|
634
641
|
let e = D.map((e) => e.id), n = O.map((e) => e.id);
|
|
635
642
|
t.getState().selectAllFiles(e), n.forEach((e) => t.getState().selectFolder(e));
|
|
@@ -639,45 +646,50 @@ function d() {
|
|
|
639
646
|
}),
|
|
640
647
|
!y && /* @__PURE__ */ u(c, { children: [
|
|
641
648
|
/* @__PURE__ */ u("button", {
|
|
642
|
-
|
|
649
|
+
type: "button",
|
|
650
|
+
onClick: nn,
|
|
643
651
|
className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm",
|
|
644
|
-
children: [/* @__PURE__ */ l(
|
|
652
|
+
children: [/* @__PURE__ */ l(Ve, { className: "size-4" }), /* @__PURE__ */ l("span", {
|
|
645
653
|
className: "hidden sm:inline",
|
|
646
654
|
children: a(d, "files.browser.actions.newFolder", "New Folder")
|
|
647
655
|
})]
|
|
648
656
|
}),
|
|
649
657
|
/* @__PURE__ */ l("button", {
|
|
650
|
-
|
|
651
|
-
|
|
658
|
+
type: "button",
|
|
659
|
+
onClick: Yt,
|
|
660
|
+
disabled: kt,
|
|
652
661
|
className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
653
|
-
children:
|
|
662
|
+
children: kt ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), /* @__PURE__ */ l("span", {
|
|
654
663
|
className: "hidden sm:inline",
|
|
655
664
|
children: a(d, "files.browser.upload.uploading", "Uploading...")
|
|
656
|
-
})] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(
|
|
665
|
+
})] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ye, { className: "size-4" }), /* @__PURE__ */ l("span", {
|
|
657
666
|
className: "hidden sm:inline",
|
|
658
667
|
children: a(d, "files.browser.actions.uploadFiles", "Upload Files")
|
|
659
668
|
})] })
|
|
660
669
|
}),
|
|
661
670
|
/* @__PURE__ */ u("button", {
|
|
662
|
-
|
|
663
|
-
|
|
671
|
+
type: "button",
|
|
672
|
+
onClick: tn,
|
|
673
|
+
disabled: kt,
|
|
664
674
|
className: "hidden sm:flex items-center gap-2 px-4 py-2.5 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
665
675
|
title: a(d, "files.browser.actions.uploadFolderTitle", "Upload entire folder with structure"),
|
|
666
|
-
children: [/* @__PURE__ */ l(
|
|
676
|
+
children: [/* @__PURE__ */ l(He, { className: "size-4" }), a(d, "files.browser.actions.uploadFolder", "Upload Folder")]
|
|
667
677
|
})
|
|
668
678
|
] }),
|
|
669
679
|
/* @__PURE__ */ u("div", {
|
|
670
680
|
className: "flex items-center border border-border-default rounded-lg overflow-hidden",
|
|
671
681
|
children: [/* @__PURE__ */ l("button", {
|
|
682
|
+
type: "button",
|
|
672
683
|
onClick: () => rt("grid"),
|
|
673
684
|
className: `p-2 transition-colors duration-200 ${nt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
674
685
|
"aria-label": a(d, "files.browser.view.grid", "Grid view"),
|
|
675
|
-
children: /* @__PURE__ */ l(
|
|
686
|
+
children: /* @__PURE__ */ l(We, { className: "size-5" })
|
|
676
687
|
}), /* @__PURE__ */ l("button", {
|
|
688
|
+
type: "button",
|
|
677
689
|
onClick: () => rt("list"),
|
|
678
690
|
className: `p-2 transition-colors duration-200 ${nt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
679
691
|
"aria-label": a(d, "files.browser.view.list", "List view"),
|
|
680
|
-
children: /* @__PURE__ */ l(
|
|
692
|
+
children: /* @__PURE__ */ l(Ke, { className: "size-5" })
|
|
681
693
|
})]
|
|
682
694
|
})
|
|
683
695
|
]
|
|
@@ -687,11 +699,12 @@ function d() {
|
|
|
687
699
|
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",
|
|
688
700
|
children: [/* @__PURE__ */ u("span", {
|
|
689
701
|
className: "text-sm font-medium text-status-success-text",
|
|
690
|
-
children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query:
|
|
702
|
+
children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: dt }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
|
|
691
703
|
}), /* @__PURE__ */ u("button", {
|
|
692
|
-
|
|
704
|
+
type: "button",
|
|
705
|
+
onClick: () => ft(""),
|
|
693
706
|
className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
|
|
694
|
-
children: [/* @__PURE__ */ l(
|
|
707
|
+
children: [/* @__PURE__ */ l(Xe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
|
|
695
708
|
})]
|
|
696
709
|
}),
|
|
697
710
|
M > 0 && /* @__PURE__ */ u("div", {
|
|
@@ -706,12 +719,13 @@ function d() {
|
|
|
706
719
|
})
|
|
707
720
|
}), /* @__PURE__ */ l("div", {
|
|
708
721
|
className: "flex items-center gap-2",
|
|
709
|
-
children:
|
|
722
|
+
children: v === "bin" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("button", {
|
|
723
|
+
type: "button",
|
|
710
724
|
onClick: async () => {
|
|
711
725
|
try {
|
|
712
|
-
for (let e of Array.from(
|
|
713
|
-
for (let e of Array.from(
|
|
714
|
-
|
|
726
|
+
for (let e of Array.from(h)) await It.mutateAsync({ id: e });
|
|
727
|
+
for (let e of Array.from(g)) await Lt.mutateAsync({ id: e });
|
|
728
|
+
_(), x.success(`${M} item${M > 1 ? "s" : ""} restored`);
|
|
715
729
|
} catch (e) {
|
|
716
730
|
x.error(e instanceof Error ? e.message : "Failed to restore some items");
|
|
717
731
|
}
|
|
@@ -719,8 +733,9 @@ function d() {
|
|
|
719
733
|
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",
|
|
720
734
|
children: a(d, "files.browser.selection.actions.restore", "Restore")
|
|
721
735
|
}), /* @__PURE__ */ u("button", {
|
|
736
|
+
type: "button",
|
|
722
737
|
onClick: async () => {
|
|
723
|
-
|
|
738
|
+
Z({
|
|
724
739
|
title: a(d, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
|
|
725
740
|
description: a(d, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
|
|
726
741
|
count: M,
|
|
@@ -730,9 +745,9 @@ function d() {
|
|
|
730
745
|
variant: "danger",
|
|
731
746
|
onConfirm: async () => {
|
|
732
747
|
try {
|
|
733
|
-
for (let e of Array.from(
|
|
734
|
-
for (let e of Array.from(
|
|
735
|
-
|
|
748
|
+
for (let e of Array.from(h)) await Rt.mutateAsync({ id: e });
|
|
749
|
+
for (let e of Array.from(g)) await zt.mutateAsync({ id: e });
|
|
750
|
+
_(), x.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
|
|
736
751
|
count: M,
|
|
737
752
|
plural: M > 1 ? "s" : ""
|
|
738
753
|
}));
|
|
@@ -743,10 +758,11 @@ function d() {
|
|
|
743
758
|
});
|
|
744
759
|
},
|
|
745
760
|
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",
|
|
746
|
-
children: [/* @__PURE__ */ l(
|
|
761
|
+
children: [/* @__PURE__ */ l(Je, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
|
|
747
762
|
})] }) : /* @__PURE__ */ u("button", {
|
|
763
|
+
type: "button",
|
|
748
764
|
onClick: async () => {
|
|
749
|
-
|
|
765
|
+
Z({
|
|
750
766
|
title: a(d, "files.confirm.bulkDelete.title", "Delete selected items"),
|
|
751
767
|
description: a(d, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
|
|
752
768
|
count: M,
|
|
@@ -756,13 +772,13 @@ function d() {
|
|
|
756
772
|
variant: "danger",
|
|
757
773
|
onConfirm: async () => {
|
|
758
774
|
try {
|
|
759
|
-
let e = Array.from(
|
|
760
|
-
e.length > 0 && await
|
|
761
|
-
for (let e of t) await
|
|
775
|
+
let e = Array.from(h), t = Array.from(g);
|
|
776
|
+
e.length > 0 && await Jt.mutateAsync(e);
|
|
777
|
+
for (let e of t) await Ft.mutateAsync({
|
|
762
778
|
id: e,
|
|
763
779
|
recursive: !0
|
|
764
780
|
});
|
|
765
|
-
|
|
781
|
+
_(), x.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
|
|
766
782
|
count: M,
|
|
767
783
|
plural: M > 1 ? "s" : ""
|
|
768
784
|
}));
|
|
@@ -773,13 +789,14 @@ function d() {
|
|
|
773
789
|
});
|
|
774
790
|
},
|
|
775
791
|
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",
|
|
776
|
-
children: [/* @__PURE__ */ l(
|
|
792
|
+
children: [/* @__PURE__ */ l(Je, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
|
|
777
793
|
})
|
|
778
794
|
})]
|
|
779
795
|
}), /* @__PURE__ */ u("button", {
|
|
780
|
-
|
|
796
|
+
type: "button",
|
|
797
|
+
onClick: _,
|
|
781
798
|
className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
|
|
782
|
-
children: [/* @__PURE__ */ l(
|
|
799
|
+
children: [/* @__PURE__ */ l(Xe, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
|
|
783
800
|
})]
|
|
784
801
|
})
|
|
785
802
|
]
|
|
@@ -792,30 +809,30 @@ function d() {
|
|
|
792
809
|
loading: k,
|
|
793
810
|
error: A,
|
|
794
811
|
preserveSortOrder: j,
|
|
795
|
-
onFilePreview:
|
|
796
|
-
onFileShare:
|
|
797
|
-
onFileDelete:
|
|
798
|
-
onFileRestore:
|
|
799
|
-
onFileFavorite:
|
|
800
|
-
onFileRename:
|
|
801
|
-
onFileDownload:
|
|
802
|
-
onFileCopy:
|
|
803
|
-
onFileMove:
|
|
804
|
-
onFileInfo:
|
|
805
|
-
onFolderOpen:
|
|
806
|
-
onFolderShare:
|
|
807
|
-
onFolderDelete:
|
|
808
|
-
onFolderRestore:
|
|
809
|
-
onFolderRename:
|
|
810
|
-
onFolderFavorite:
|
|
811
|
-
onFolderMove:
|
|
812
|
-
onFolderInfo:
|
|
812
|
+
onFilePreview: an,
|
|
813
|
+
onFileShare: v === "bin" ? void 0 : on,
|
|
814
|
+
onFileDelete: v === "bin" ? dn : ln,
|
|
815
|
+
onFileRestore: v === "bin" ? un : void 0,
|
|
816
|
+
onFileFavorite: v === "bin" ? void 0 : fn,
|
|
817
|
+
onFileRename: v === "bin" ? void 0 : pn,
|
|
818
|
+
onFileDownload: mn,
|
|
819
|
+
onFileCopy: v === "bin" ? void 0 : hn,
|
|
820
|
+
onFileMove: v === "bin" ? void 0 : gn,
|
|
821
|
+
onFileInfo: _n,
|
|
822
|
+
onFolderOpen: vn,
|
|
823
|
+
onFolderShare: v === "bin" ? void 0 : sn,
|
|
824
|
+
onFolderDelete: v === "bin" ? xn : yn,
|
|
825
|
+
onFolderRestore: v === "bin" ? bn : void 0,
|
|
826
|
+
onFolderRename: v === "bin" ? void 0 : Sn,
|
|
827
|
+
onFolderFavorite: v === "bin" ? void 0 : wn,
|
|
828
|
+
onFolderMove: v === "bin" ? void 0 : Cn,
|
|
829
|
+
onFolderInfo: Tn
|
|
813
830
|
}), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
|
|
814
831
|
className: "mt-4 px-2 text-sm text-text-secondary",
|
|
815
|
-
children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y &&
|
|
832
|
+
children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y && v === "all" && vt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: vt })}`]
|
|
816
833
|
})]
|
|
817
834
|
}),
|
|
818
|
-
|
|
835
|
+
yt && /* @__PURE__ */ l("div", {
|
|
819
836
|
className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
|
|
820
837
|
role: "dialog",
|
|
821
838
|
"aria-modal": "true",
|
|
@@ -830,34 +847,35 @@ function d() {
|
|
|
830
847
|
}),
|
|
831
848
|
/* @__PURE__ */ l("input", {
|
|
832
849
|
type: "text",
|
|
833
|
-
value:
|
|
834
|
-
onChange: (e) =>
|
|
850
|
+
value: G,
|
|
851
|
+
onChange: (e) => K(e.target.value),
|
|
835
852
|
onKeyDown: (e) => {
|
|
836
|
-
e.key === "Enter" &&
|
|
853
|
+
e.key === "Enter" && rn(), e.key === "Escape" && (N(!1), K(""));
|
|
837
854
|
},
|
|
838
855
|
placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name"),
|
|
839
|
-
autoFocus: !0,
|
|
840
856
|
className: "w-full px-4 py-3 border-2 border-border-default rounded-lg focus:outline-none focus:border-action-primary-border text-sm transition-colors duration-200"
|
|
841
857
|
}),
|
|
842
858
|
/* @__PURE__ */ u("div", {
|
|
843
859
|
className: "flex justify-end gap-2 mt-6",
|
|
844
860
|
children: [/* @__PURE__ */ l("button", {
|
|
861
|
+
type: "button",
|
|
845
862
|
onClick: () => {
|
|
846
|
-
|
|
863
|
+
N(!1), K("");
|
|
847
864
|
},
|
|
848
865
|
className: "px-6 py-2.5 text-sm font-medium text-text-primary hover:bg-action-ghost-bg-hover rounded-lg transition-colors duration-200",
|
|
849
866
|
children: a(d, "files.common.actions.cancel", "Cancel")
|
|
850
867
|
}), /* @__PURE__ */ u("button", {
|
|
851
|
-
|
|
852
|
-
|
|
868
|
+
type: "button",
|
|
869
|
+
onClick: rn,
|
|
870
|
+
disabled: !G.trim() || $.isPending,
|
|
853
871
|
className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
|
|
854
|
-
children: [
|
|
872
|
+
children: [$.isPending && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), $.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
|
|
855
873
|
})]
|
|
856
874
|
})
|
|
857
875
|
]
|
|
858
876
|
})
|
|
859
877
|
}),
|
|
860
|
-
|
|
878
|
+
St && V && /* @__PURE__ */ l("div", {
|
|
861
879
|
className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
|
|
862
880
|
role: "dialog",
|
|
863
881
|
"aria-modal": "true",
|
|
@@ -868,101 +886,112 @@ function d() {
|
|
|
868
886
|
/* @__PURE__ */ l("h2", {
|
|
869
887
|
id: "files-rename-title",
|
|
870
888
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
871
|
-
children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type:
|
|
889
|
+
children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: V.type })
|
|
872
890
|
}),
|
|
873
891
|
/* @__PURE__ */ l("input", {
|
|
874
892
|
type: "text",
|
|
875
|
-
value:
|
|
876
|
-
onChange: (e) =>
|
|
893
|
+
value: U,
|
|
894
|
+
onChange: (e) => W(e.target.value),
|
|
877
895
|
onKeyDown: (e) => {
|
|
878
|
-
e.key === "Enter" &&
|
|
896
|
+
e.key === "Enter" && On(), e.key === "Escape" && (P(!1), H(null), W(""));
|
|
879
897
|
},
|
|
880
898
|
placeholder: a(d, "files.browser.renameDialog.placeholder", "New name"),
|
|
881
|
-
autoFocus: !0,
|
|
882
899
|
className: "w-full px-4 py-3 border-2 border-border-default rounded-lg focus:outline-none focus:border-action-primary-border text-sm transition-colors duration-200"
|
|
883
900
|
}),
|
|
884
901
|
/* @__PURE__ */ u("div", {
|
|
885
902
|
className: "flex justify-end gap-2 mt-6",
|
|
886
903
|
children: [/* @__PURE__ */ l("button", {
|
|
904
|
+
type: "button",
|
|
887
905
|
onClick: () => {
|
|
888
|
-
|
|
906
|
+
P(!1), H(null), W("");
|
|
889
907
|
},
|
|
890
908
|
className: "px-6 py-2.5 text-sm font-medium text-text-primary hover:bg-action-ghost-bg-hover rounded-lg transition-colors duration-200",
|
|
891
909
|
children: a(d, "files.common.actions.cancel", "Cancel")
|
|
892
910
|
}), /* @__PURE__ */ u("button", {
|
|
893
|
-
|
|
894
|
-
|
|
911
|
+
type: "button",
|
|
912
|
+
onClick: On,
|
|
913
|
+
disabled: !U.trim() || U.trim() === V.name || Vt.isPending || Ht.isPending,
|
|
895
914
|
className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
|
|
896
|
-
children: [(
|
|
915
|
+
children: [(Vt.isPending || Ht.isPending) && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), Vt.isPending || Ht.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
|
|
897
916
|
})]
|
|
898
917
|
})
|
|
899
918
|
]
|
|
900
919
|
})
|
|
901
920
|
}),
|
|
902
|
-
|
|
903
|
-
item:
|
|
904
|
-
itemType: "mimeType" in
|
|
921
|
+
Ct && Dt && /* @__PURE__ */ l(we, {
|
|
922
|
+
item: Dt,
|
|
923
|
+
itemType: "mimeType" in Dt ? "file" : "folder",
|
|
905
924
|
onClose: () => {
|
|
906
|
-
|
|
925
|
+
F(!1), L(null);
|
|
907
926
|
},
|
|
908
|
-
onCreateShare:
|
|
909
|
-
isLoading:
|
|
927
|
+
onCreateShare: cn,
|
|
928
|
+
isLoading: Ut.isPending
|
|
910
929
|
}),
|
|
911
|
-
|
|
912
|
-
title:
|
|
913
|
-
description:
|
|
914
|
-
confirmLabel:
|
|
930
|
+
X && /* @__PURE__ */ l(Me, {
|
|
931
|
+
title: X.title,
|
|
932
|
+
description: X.description,
|
|
933
|
+
confirmLabel: X.confirmLabel,
|
|
915
934
|
cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
|
|
916
|
-
variant:
|
|
917
|
-
loading:
|
|
918
|
-
onConfirm:
|
|
935
|
+
variant: X.variant,
|
|
936
|
+
loading: X.loading,
|
|
937
|
+
onConfirm: Mt,
|
|
919
938
|
onCancel: () => {
|
|
920
|
-
|
|
939
|
+
X.loading || Z(null);
|
|
921
940
|
}
|
|
922
941
|
}),
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
942
|
+
bt && /* @__PURE__ */ l(Me, {
|
|
943
|
+
title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
|
|
944
|
+
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."),
|
|
945
|
+
confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
|
|
946
|
+
cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
|
|
947
|
+
onConfirm: () => {
|
|
948
|
+
xt(!1), p("/billing");
|
|
949
|
+
},
|
|
950
|
+
onCancel: () => xt(!1)
|
|
951
|
+
}),
|
|
952
|
+
wt && R && /* @__PURE__ */ l(Ae, {
|
|
953
|
+
item: R.item,
|
|
954
|
+
type: R.type,
|
|
926
955
|
onClose: () => {
|
|
927
|
-
|
|
956
|
+
I(!1), z(null);
|
|
928
957
|
},
|
|
929
|
-
onMove:
|
|
930
|
-
isLoading:
|
|
958
|
+
onMove: En,
|
|
959
|
+
isLoading: Kt.isPending || qt.isPending
|
|
931
960
|
}),
|
|
932
|
-
|
|
933
|
-
item:
|
|
934
|
-
type:
|
|
961
|
+
Tt && B && /* @__PURE__ */ l(je, {
|
|
962
|
+
item: B.item,
|
|
963
|
+
type: B.type,
|
|
935
964
|
onClose: () => {
|
|
936
|
-
|
|
965
|
+
Et(!1), Ot(null);
|
|
937
966
|
},
|
|
938
|
-
onCopy:
|
|
939
|
-
isLoading:
|
|
967
|
+
onCopy: Dn,
|
|
968
|
+
isLoading: Gt.isPending
|
|
940
969
|
}),
|
|
941
970
|
b && /* @__PURE__ */ l(Te, {
|
|
942
971
|
file: b,
|
|
943
|
-
onClose: () =>
|
|
972
|
+
onClose: () => _t(null),
|
|
944
973
|
onDownload: () => {
|
|
945
|
-
|
|
974
|
+
Le(b.downloadUrl || b.url);
|
|
946
975
|
},
|
|
947
|
-
onShare:
|
|
948
|
-
|
|
976
|
+
onShare: v === "bin" ? void 0 : () => {
|
|
977
|
+
L(b), F(!0);
|
|
949
978
|
},
|
|
950
|
-
onStar:
|
|
951
|
-
onDelete: () =>
|
|
979
|
+
onStar: v === "bin" ? void 0 : () => fn(b),
|
|
980
|
+
onDelete: () => v === "bin" ? dn(b) : ln(b)
|
|
952
981
|
}),
|
|
953
|
-
|
|
954
|
-
item:
|
|
955
|
-
type:
|
|
956
|
-
onClose: () =>
|
|
982
|
+
ht && /* @__PURE__ */ l(Ee, {
|
|
983
|
+
item: ht.item,
|
|
984
|
+
type: ht.type,
|
|
985
|
+
onClose: () => gt(null)
|
|
957
986
|
}),
|
|
958
987
|
/* @__PURE__ */ l(Ne, {
|
|
959
|
-
items:
|
|
960
|
-
isOpen:
|
|
961
|
-
onClose: () =>
|
|
962
|
-
onPause:
|
|
963
|
-
onResume:
|
|
964
|
-
onRetry:
|
|
965
|
-
onCancel:
|
|
988
|
+
items: At,
|
|
989
|
+
isOpen: jt,
|
|
990
|
+
onClose: () => Y(!1),
|
|
991
|
+
onPause: Zt,
|
|
992
|
+
onResume: Qt,
|
|
993
|
+
onRetry: $t,
|
|
994
|
+
onCancel: en
|
|
966
995
|
}),
|
|
967
996
|
/* @__PURE__ */ l(Oe, {
|
|
968
997
|
toasts: x.toasts,
|
|
@@ -975,7 +1004,7 @@ function d() {
|
|
|
975
1004
|
children: [
|
|
976
1005
|
/* @__PURE__ */ l("div", {
|
|
977
1006
|
className: "inline-flex items-center justify-center size-16 bg-bg-muted rounded-full mb-4",
|
|
978
|
-
children: /* @__PURE__ */ l(
|
|
1007
|
+
children: /* @__PURE__ */ l(qe, { className: "size-8 text-text-tertiary" })
|
|
979
1008
|
}),
|
|
980
1009
|
/* @__PURE__ */ l("h3", {
|
|
981
1010
|
className: "text-lg font-medium text-text-primary mb-2",
|
|
@@ -986,17 +1015,18 @@ function d() {
|
|
|
986
1015
|
children: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters")
|
|
987
1016
|
}),
|
|
988
1017
|
/* @__PURE__ */ l("button", {
|
|
1018
|
+
type: "button",
|
|
989
1019
|
onClick: () => {
|
|
990
|
-
|
|
1020
|
+
ft(""), mt(void 0);
|
|
991
1021
|
},
|
|
992
1022
|
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover transition-colors duration-200",
|
|
993
1023
|
children: a(d, "files.browser.search.clear", "Clear search")
|
|
994
1024
|
})
|
|
995
1025
|
]
|
|
996
1026
|
}) : /* @__PURE__ */ l(De, {
|
|
997
|
-
type:
|
|
998
|
-
onUpload:
|
|
999
|
-
onNewFolder:
|
|
1027
|
+
type: v,
|
|
1028
|
+
onUpload: v === "all" ? Yt : void 0,
|
|
1029
|
+
onNewFolder: v === "all" ? nn : void 0
|
|
1000
1030
|
})
|
|
1001
1031
|
})
|
|
1002
1032
|
]
|