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