@burdenoff/microfe-files 2026.527.1 → 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/FileBrowser.js +186 -170
- package/dist/files/components/FileBrowser.js.map +1 -1
- package/dist/files/components/FolderCard.js +147 -161
- package/dist/files/components/FolderCard.js.map +1 -1
- package/dist/files/components/MoveDialog.js +9 -12
- package/dist/files/components/MoveDialog.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/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 +314 -300
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/utils/quotaUtils.js +14 -0
- package/dist/files/utils/quotaUtils.js.map +1 -0
- package/package.json +2 -2
|
@@ -9,25 +9,25 @@ import { FolderCard as ie } from "./FolderCard.js";
|
|
|
9
9
|
import { ContextMenu as r } from "./ContextMenu.js";
|
|
10
10
|
import { createFileMenuItems as ae, createFolderMenuItems as i } from "./contextMenuItems.js";
|
|
11
11
|
import { useState as a } from "react";
|
|
12
|
-
import {
|
|
12
|
+
import { Folder as oe, Loader2 as se, Star as ce } from "lucide-react";
|
|
13
13
|
import { Fragment as le, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
14
14
|
import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
15
|
//#region src/files/components/FileBrowser.tsx
|
|
16
|
-
var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSortOrder: fe = !1, onFilePreview:
|
|
17
|
-
let { t:
|
|
16
|
+
var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSortOrder: fe = !1, onFilePreview: pe, onFileShare: d, onFileDelete: f, onFileRestore: p, onFileFavorite: m, onFileRename: h, onFileDownload: g, onFileCopy: _, onFileMove: v, onFileInfo: y, onFileActivity: b, onFolderOpen: x, onFolderShare: S, onFolderDelete: C, onFolderRestore: w, onFolderRename: T, onFolderFavorite: E, onFolderCopy: me, onFolderMove: D, onFolderInfo: O, onFolderActivity: he, onMoveFile: ge, onCopyFile: _e, onMoveFolder: ve, onCopyFolder: ye }) => {
|
|
17
|
+
let { t: k } = ue(), { viewMode: A, sortBy: j, sortDirection: be, selectedFiles: M, selectedFolders: N } = e(), [xe, Se] = a(null), [P, F] = a({
|
|
18
18
|
draggedItem: null,
|
|
19
19
|
dropTargetFolderId: null
|
|
20
|
-
}), [
|
|
21
|
-
onMoveFile:
|
|
22
|
-
onCopyFile:
|
|
23
|
-
onMoveFolder:
|
|
24
|
-
onCopyFolder:
|
|
25
|
-
}),
|
|
26
|
-
|
|
20
|
+
}), [I, L] = a(null), { draggedItem: R, startDrag: Ce, endDrag: we, handleDrop: Te } = te({
|
|
21
|
+
onMoveFile: ge,
|
|
22
|
+
onCopyFile: _e,
|
|
23
|
+
onMoveFolder: ve,
|
|
24
|
+
onCopyFolder: ye
|
|
25
|
+
}), Ee = (e, t) => {
|
|
26
|
+
Ce({
|
|
27
27
|
type: "file",
|
|
28
28
|
item: e,
|
|
29
29
|
operation: t
|
|
30
|
-
}),
|
|
30
|
+
}), F({
|
|
31
31
|
draggedItem: {
|
|
32
32
|
type: "file",
|
|
33
33
|
item: e,
|
|
@@ -35,12 +35,12 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
35
35
|
},
|
|
36
36
|
dropTargetFolderId: null
|
|
37
37
|
});
|
|
38
|
-
},
|
|
39
|
-
|
|
38
|
+
}, De = (e, t) => {
|
|
39
|
+
Ce({
|
|
40
40
|
type: "folder",
|
|
41
41
|
item: e,
|
|
42
42
|
operation: t
|
|
43
|
-
}),
|
|
43
|
+
}), F({
|
|
44
44
|
draggedItem: {
|
|
45
45
|
type: "folder",
|
|
46
46
|
item: e,
|
|
@@ -48,80 +48,80 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
48
48
|
},
|
|
49
49
|
dropTargetFolderId: null
|
|
50
50
|
});
|
|
51
|
-
},
|
|
52
|
-
|
|
51
|
+
}, z = () => {
|
|
52
|
+
we(), F({
|
|
53
53
|
draggedItem: null,
|
|
54
54
|
dropTargetFolderId: null
|
|
55
55
|
});
|
|
56
|
-
},
|
|
57
|
-
|
|
56
|
+
}, Oe = async (e) => {
|
|
57
|
+
R && (await Te(e.id), F({
|
|
58
58
|
draggedItem: null,
|
|
59
59
|
dropTargetFolderId: null
|
|
60
60
|
}));
|
|
61
|
-
},
|
|
62
|
-
|
|
61
|
+
}, ke = (e) => {
|
|
62
|
+
F((t) => ({
|
|
63
63
|
...t,
|
|
64
64
|
dropTargetFolderId: e
|
|
65
65
|
}));
|
|
66
|
-
},
|
|
67
|
-
|
|
66
|
+
}, Ae = () => {
|
|
67
|
+
F((e) => ({
|
|
68
68
|
...e,
|
|
69
69
|
dropTargetFolderId: null
|
|
70
70
|
}));
|
|
71
|
-
},
|
|
72
|
-
|
|
71
|
+
}, B = (e, t, n) => {
|
|
72
|
+
L({
|
|
73
73
|
item: e,
|
|
74
74
|
type: "file",
|
|
75
75
|
x: t,
|
|
76
76
|
y: n
|
|
77
77
|
});
|
|
78
|
-
},
|
|
79
|
-
|
|
78
|
+
}, V = (e, t, n) => {
|
|
79
|
+
L({
|
|
80
80
|
item: e,
|
|
81
81
|
type: "folder",
|
|
82
82
|
x: t,
|
|
83
83
|
y: n
|
|
84
84
|
});
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
if (!
|
|
89
|
-
if (
|
|
90
|
-
let e =
|
|
85
|
+
}, H = () => {
|
|
86
|
+
L(null);
|
|
87
|
+
}, U = (e) => e.canRead === !0 || e.canUpdate === !0 || e.canWrite === !0, W = (e) => e.canUpdate === !0 || e.canWrite === !0, G = (e) => e.canShare === !0 || W(e), K = (e) => e.canDelete === !0, q = (e) => e.canRead === !0 || e.permissions?.canRead === !0, J = (e) => e.canUpdate === !0 || e.permissions?.canWrite === !0, Y = (e) => e.permissions?.canShare === !0 || J(e), X = (e) => e.canDelete === !0 || e.permissions?.canDelete === !0, Z = () => {
|
|
88
|
+
if (!I) return [];
|
|
89
|
+
if (I.type === "file") {
|
|
90
|
+
let e = I.item;
|
|
91
91
|
return ae({
|
|
92
|
-
onShare:
|
|
93
|
-
onDownload:
|
|
94
|
-
onCopy:
|
|
95
|
-
onRename:
|
|
96
|
-
onStar:
|
|
97
|
-
onMove:
|
|
98
|
-
onInfo:
|
|
99
|
-
onActivity:
|
|
100
|
-
onDelete:
|
|
101
|
-
onRestore:
|
|
92
|
+
onShare: d && G(e) ? () => d(e) : void 0,
|
|
93
|
+
onDownload: g && U(e) ? () => g(e) : void 0,
|
|
94
|
+
onCopy: _ && U(e) ? () => _(e) : void 0,
|
|
95
|
+
onRename: h && W(e) ? () => h(e) : void 0,
|
|
96
|
+
onStar: m && W(e) ? () => m(e) : void 0,
|
|
97
|
+
onMove: v && W(e) ? () => v(e) : void 0,
|
|
98
|
+
onInfo: y ? () => y(e) : void 0,
|
|
99
|
+
onActivity: b ? () => b(e) : void 0,
|
|
100
|
+
onDelete: f && K(e) ? () => f(e) : void 0,
|
|
101
|
+
onRestore: p && W(e) ? () => p(e) : void 0,
|
|
102
102
|
isStarred: e.starred
|
|
103
|
-
},
|
|
103
|
+
}, k);
|
|
104
104
|
} else {
|
|
105
|
-
let e =
|
|
105
|
+
let e = I.item;
|
|
106
106
|
return i({
|
|
107
|
-
onShare:
|
|
108
|
-
onRename:
|
|
109
|
-
onStar:
|
|
110
|
-
onMove:
|
|
111
|
-
onInfo:
|
|
112
|
-
onDelete:
|
|
113
|
-
onRestore:
|
|
107
|
+
onShare: S && Y(e) ? () => S(e) : void 0,
|
|
108
|
+
onRename: T && J(e) ? () => T(e) : void 0,
|
|
109
|
+
onStar: E && J(e) ? () => E(e) : void 0,
|
|
110
|
+
onMove: D && J(e) ? () => D(e) : void 0,
|
|
111
|
+
onInfo: O ? () => O(e) : void 0,
|
|
112
|
+
onDelete: C && X(e) ? () => C(e) : void 0,
|
|
113
|
+
onRestore: w && J(e) ? () => w(e) : void 0,
|
|
114
114
|
isStarred: e.starred
|
|
115
|
-
},
|
|
115
|
+
}, k);
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, Q = fe ? c : t(c, j, be), $ = fe ? l : t(l, j, be);
|
|
118
118
|
return de ? /* @__PURE__ */ o("div", {
|
|
119
119
|
className: "flex items-center justify-center min-h-[500px]",
|
|
120
120
|
children: /* @__PURE__ */ s("div", {
|
|
121
121
|
className: "flex flex-col items-center gap-4",
|
|
122
122
|
children: [/* @__PURE__ */ o(se, { className: "size-10 animate-spin text-action-primary-bg" }), /* @__PURE__ */ o("span", {
|
|
123
123
|
className: "text-sm text-text-secondary",
|
|
124
|
-
children: n(
|
|
124
|
+
children: n(k, "files.browser.loading", "Loading files…")
|
|
125
125
|
})]
|
|
126
126
|
})
|
|
127
127
|
}) : u ? /* @__PURE__ */ o("div", {
|
|
@@ -131,26 +131,26 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
131
131
|
children: [
|
|
132
132
|
/* @__PURE__ */ o("div", {
|
|
133
133
|
className: "mb-3 text-xl font-semibold text-status-error-text",
|
|
134
|
-
children: n(
|
|
134
|
+
children: n(k, "files.browser.loadError", "Failed to load files")
|
|
135
135
|
}),
|
|
136
136
|
/* @__PURE__ */ o("p", {
|
|
137
137
|
className: "mb-6 text-sm text-text-secondary",
|
|
138
|
-
children: u.message || n(
|
|
138
|
+
children: u.message || n(k, "files.browser.unexpectedError", "An unexpected error occurred")
|
|
139
139
|
}),
|
|
140
140
|
/* @__PURE__ */ o("button", {
|
|
141
141
|
type: "button",
|
|
142
142
|
onClick: () => window.location.reload(),
|
|
143
143
|
className: "rounded-lg bg-action-primary-bg px-6 py-2.5 text-sm font-medium text-text-inverse transition-colors hover:bg-action-primary-bg-hover",
|
|
144
|
-
children: n(
|
|
144
|
+
children: n(k, "files.browser.retry", "Retry")
|
|
145
145
|
})
|
|
146
146
|
]
|
|
147
147
|
})
|
|
148
|
-
}) : c.length === 0 && l.length === 0 ? /* @__PURE__ */ o(le, { children:
|
|
149
|
-
x:
|
|
150
|
-
y:
|
|
151
|
-
onClose:
|
|
152
|
-
items:
|
|
153
|
-
}) }) :
|
|
148
|
+
}) : c.length === 0 && l.length === 0 ? /* @__PURE__ */ o(le, { children: I && /* @__PURE__ */ o(r, {
|
|
149
|
+
x: I.x,
|
|
150
|
+
y: I.y,
|
|
151
|
+
onClose: H,
|
|
152
|
+
items: Z()
|
|
153
|
+
}) }) : A === "list" ? A === "list" ? /* @__PURE__ */ s("div", {
|
|
154
154
|
className: "@container bg-bg-canvas",
|
|
155
155
|
children: [
|
|
156
156
|
/* @__PURE__ */ s("div", {
|
|
@@ -160,52 +160,52 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
160
160
|
/* @__PURE__ */ o("div", { className: "flex-shrink-0 w-6" }),
|
|
161
161
|
/* @__PURE__ */ o("div", {
|
|
162
162
|
className: "flex-1",
|
|
163
|
-
children: n(
|
|
163
|
+
children: n(k, "files.browser.name", "Name")
|
|
164
164
|
}),
|
|
165
165
|
/* @__PURE__ */ o("div", {
|
|
166
166
|
className: "hidden @lg:block flex-shrink-0 w-40",
|
|
167
|
-
children: n(
|
|
167
|
+
children: n(k, "files.browser.owner", "Owner")
|
|
168
168
|
}),
|
|
169
169
|
/* @__PURE__ */ o("div", {
|
|
170
170
|
className: "hidden @md:block flex-shrink-0 w-24 text-right",
|
|
171
|
-
children: n(
|
|
171
|
+
children: n(k, "files.browser.size", "Size")
|
|
172
172
|
}),
|
|
173
173
|
/* @__PURE__ */ o("div", {
|
|
174
174
|
className: "hidden @lg:block flex-shrink-0 w-32 text-right",
|
|
175
|
-
children: n(
|
|
175
|
+
children: n(k, "files.browser.modified", "Modified")
|
|
176
176
|
}),
|
|
177
177
|
/* @__PURE__ */ o("div", { className: "flex-shrink-0 w-32" })
|
|
178
178
|
]
|
|
179
179
|
}),
|
|
180
180
|
/* @__PURE__ */ s("div", {
|
|
181
181
|
className: "divide-y divide-border-subtle",
|
|
182
|
-
children: [
|
|
183
|
-
className: `group flex items-center gap-3 border-b border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-sunken focus-within:bg-bg-sunken ${
|
|
182
|
+
children: [$.map((t) => /* @__PURE__ */ s("div", {
|
|
183
|
+
className: `group flex items-center gap-3 border-b border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-sunken focus-within:bg-bg-sunken ${P.dropTargetFolderId === t.id && R?.item.id !== t.id ? "bg-action-primary-bg/10" : ""} ${R?.item.id === t.id ? "opacity-50" : ""}`,
|
|
184
184
|
onClick: () => {
|
|
185
|
-
|
|
185
|
+
q(t) && x?.(t);
|
|
186
186
|
},
|
|
187
187
|
onKeyDown: (e) => {
|
|
188
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
188
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), q(t) && x?.(t));
|
|
189
189
|
},
|
|
190
190
|
onDragOver: (e) => {
|
|
191
|
-
|
|
191
|
+
R && R.item.id !== t.id && J(t) && (e.preventDefault(), ke(t.id));
|
|
192
192
|
},
|
|
193
|
-
onDragLeave:
|
|
193
|
+
onDragLeave: Ae,
|
|
194
194
|
onDrop: async (e) => {
|
|
195
|
-
e.preventDefault(),
|
|
195
|
+
e.preventDefault(), R && R.item.id !== t.id && J(t) && await Oe(t);
|
|
196
196
|
},
|
|
197
197
|
onContextMenu: (e) => {
|
|
198
|
-
e.preventDefault(),
|
|
198
|
+
e.preventDefault(), V(t, e.clientX, e.clientY);
|
|
199
199
|
},
|
|
200
200
|
role: "button",
|
|
201
201
|
tabIndex: 0,
|
|
202
|
-
"aria-label": n(
|
|
202
|
+
"aria-label": n(k, "files.browser.openFolder", "Open folder"),
|
|
203
203
|
children: [
|
|
204
204
|
/* @__PURE__ */ o("div", {
|
|
205
205
|
className: "flex-shrink-0",
|
|
206
206
|
children: /* @__PURE__ */ o("input", {
|
|
207
207
|
type: "checkbox",
|
|
208
|
-
checked:
|
|
208
|
+
checked: N.has(t.id),
|
|
209
209
|
onChange: (n) => {
|
|
210
210
|
n.stopPropagation(), e.getState().toggleFolderSelection(t.id);
|
|
211
211
|
},
|
|
@@ -243,9 +243,9 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
243
243
|
children: /* @__PURE__ */ s("span", {
|
|
244
244
|
className: "font-text-sm text-text-secondary",
|
|
245
245
|
children: [
|
|
246
|
-
t.filesCount ?? 0,
|
|
246
|
+
(t.filesCount ?? 0) + (t.subfoldersCount ?? 0),
|
|
247
247
|
" ",
|
|
248
|
-
n(
|
|
248
|
+
n(k, "files.browser.items", "items")
|
|
249
249
|
]
|
|
250
250
|
})
|
|
251
251
|
}),
|
|
@@ -259,14 +259,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
259
259
|
/* @__PURE__ */ s("div", {
|
|
260
260
|
className: "flex w-32 flex-shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
|
|
261
261
|
children: [
|
|
262
|
-
|
|
262
|
+
Y(t) && S && /* @__PURE__ */ o("button", {
|
|
263
263
|
type: "button",
|
|
264
264
|
onClick: (e) => {
|
|
265
|
-
e.stopPropagation(),
|
|
265
|
+
e.stopPropagation(), S(t);
|
|
266
266
|
},
|
|
267
267
|
className: "p-1.5 hover:bg-action-ghost-bg-hover rounded transition-colors",
|
|
268
|
-
"aria-label": n(
|
|
269
|
-
title: n(
|
|
268
|
+
"aria-label": n(k, "files.browser.share", "Share"),
|
|
269
|
+
title: n(k, "files.browser.shareFolder", "Share folder"),
|
|
270
270
|
children: /* @__PURE__ */ o("svg", {
|
|
271
271
|
className: "size-4 text-text-primary",
|
|
272
272
|
fill: "none",
|
|
@@ -280,14 +280,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
280
280
|
})
|
|
281
281
|
})
|
|
282
282
|
}),
|
|
283
|
-
|
|
283
|
+
J(t) && T && /* @__PURE__ */ o("button", {
|
|
284
284
|
type: "button",
|
|
285
285
|
onClick: (e) => {
|
|
286
|
-
e.stopPropagation(),
|
|
286
|
+
e.stopPropagation(), T(t);
|
|
287
287
|
},
|
|
288
288
|
className: "hidden @md:block p-1.5 hover:bg-action-ghost-bg-hover rounded transition-colors",
|
|
289
|
-
"aria-label": n(
|
|
290
|
-
title: n(
|
|
289
|
+
"aria-label": n(k, "files.browser.rename", "Rename"),
|
|
290
|
+
title: n(k, "files.browser.rename", "Rename"),
|
|
291
291
|
children: /* @__PURE__ */ o("svg", {
|
|
292
292
|
className: "size-4 text-text-primary",
|
|
293
293
|
fill: "none",
|
|
@@ -301,14 +301,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
301
301
|
})
|
|
302
302
|
})
|
|
303
303
|
}),
|
|
304
|
-
|
|
304
|
+
X(t) && C && /* @__PURE__ */ o("button", {
|
|
305
305
|
type: "button",
|
|
306
306
|
onClick: (e) => {
|
|
307
|
-
e.stopPropagation(),
|
|
307
|
+
e.stopPropagation(), C(t);
|
|
308
308
|
},
|
|
309
309
|
className: "p-1.5 hover:bg-action-danger-bg-hover rounded transition-colors",
|
|
310
|
-
"aria-label": n(
|
|
311
|
-
title: n(
|
|
310
|
+
"aria-label": n(k, "files.browser.delete", "Delete"),
|
|
311
|
+
title: n(k, "files.browser.delete", "Delete"),
|
|
312
312
|
children: /* @__PURE__ */ o("svg", {
|
|
313
313
|
className: "size-4 text-status-error-text",
|
|
314
314
|
fill: "none",
|
|
@@ -326,98 +326,114 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
|
|
|
326
326
|
onClick: (e) => e.stopPropagation(),
|
|
327
327
|
children: /* @__PURE__ */ o(ee, {
|
|
328
328
|
items: i({
|
|
329
|
-
onShare:
|
|
330
|
-
onRename:
|
|
331
|
-
onStar:
|
|
332
|
-
onMove:
|
|
333
|
-
onInfo: () =>
|
|
334
|
-
onRestore:
|
|
335
|
-
onDelete:
|
|
329
|
+
onShare: Y(t) && S ? () => S(t) : void 0,
|
|
330
|
+
onRename: J(t) && T ? () => T(t) : void 0,
|
|
331
|
+
onStar: J(t) && E ? () => E(t) : void 0,
|
|
332
|
+
onMove: J(t) && D ? () => D(t) : void 0,
|
|
333
|
+
onInfo: () => O?.(t),
|
|
334
|
+
onRestore: J(t) && w ? () => w(t) : void 0,
|
|
335
|
+
onDelete: X(t) && C ? () => C(t) : void 0,
|
|
336
336
|
isStarred: t.starred
|
|
337
|
-
},
|
|
338
|
-
isOpen:
|
|
339
|
-
onToggle: (e) =>
|
|
337
|
+
}, k),
|
|
338
|
+
isOpen: xe === t.id,
|
|
339
|
+
onToggle: (e) => Se(e ? t.id : null)
|
|
340
340
|
})
|
|
341
341
|
})
|
|
342
342
|
]
|
|
343
343
|
})
|
|
344
344
|
]
|
|
345
|
-
}, t.id)),
|
|
345
|
+
}, t.id)), Q.map((e) => /* @__PURE__ */ o(re, {
|
|
346
346
|
file: e,
|
|
347
|
-
isSelected:
|
|
348
|
-
isDragging:
|
|
349
|
-
onPreview:
|
|
350
|
-
onShare:
|
|
351
|
-
onDelete:
|
|
352
|
-
onRestore:
|
|
353
|
-
onFavorite:
|
|
354
|
-
onRename:
|
|
355
|
-
onDownload:
|
|
356
|
-
onCopy:
|
|
357
|
-
onMove:
|
|
358
|
-
onInfo:
|
|
359
|
-
onActivity:
|
|
360
|
-
onDragStart:
|
|
361
|
-
onDragEnd:
|
|
362
|
-
onContextMenu:
|
|
347
|
+
isSelected: M.has(e.id),
|
|
348
|
+
isDragging: R?.item.id === e.id,
|
|
349
|
+
onPreview: U(e) ? pe : void 0,
|
|
350
|
+
onShare: G(e) ? d : void 0,
|
|
351
|
+
onDelete: K(e) ? f : void 0,
|
|
352
|
+
onRestore: W(e) ? p : void 0,
|
|
353
|
+
onFavorite: W(e) ? m : void 0,
|
|
354
|
+
onRename: W(e) ? h : void 0,
|
|
355
|
+
onDownload: U(e) ? g : void 0,
|
|
356
|
+
onCopy: U(e) ? _ : void 0,
|
|
357
|
+
onMove: W(e) ? v : void 0,
|
|
358
|
+
onInfo: y,
|
|
359
|
+
onActivity: b,
|
|
360
|
+
onDragStart: W(e) ? Ee : void 0,
|
|
361
|
+
onDragEnd: z,
|
|
362
|
+
onContextMenu: B
|
|
363
363
|
}, e.id))]
|
|
364
364
|
}),
|
|
365
|
-
|
|
366
|
-
x:
|
|
367
|
-
y:
|
|
368
|
-
onClose:
|
|
369
|
-
items:
|
|
365
|
+
I && /* @__PURE__ */ o(r, {
|
|
366
|
+
x: I.x,
|
|
367
|
+
y: I.y,
|
|
368
|
+
onClose: H,
|
|
369
|
+
items: Z()
|
|
370
370
|
})
|
|
371
371
|
]
|
|
372
372
|
}) : null : /* @__PURE__ */ s("div", {
|
|
373
373
|
className: "@container bg-bg-canvas p-page-padding",
|
|
374
|
-
children: [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
374
|
+
children: [
|
|
375
|
+
$.length > 0 && /* @__PURE__ */ s("div", {
|
|
376
|
+
className: Q.length > 0 ? "mb-6" : "",
|
|
377
|
+
children: [Q.length > 0 && /* @__PURE__ */ o("h2", {
|
|
378
|
+
className: "text-xs font-semibold text-text-tertiary uppercase tracking-wider mb-3 px-1",
|
|
379
|
+
children: n(k, "files.browser.section.folders", "Folders")
|
|
380
|
+
}), /* @__PURE__ */ o("div", {
|
|
381
|
+
className: "grid grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3 @xl:grid-cols-4 gap-2",
|
|
382
|
+
children: $.map((e) => /* @__PURE__ */ o(ie, {
|
|
383
|
+
folder: e,
|
|
384
|
+
isSelected: N.has(e.id),
|
|
385
|
+
isDragging: R?.item.id === e.id,
|
|
386
|
+
isDropTarget: P.dropTargetFolderId === e.id,
|
|
387
|
+
draggedItem: R,
|
|
388
|
+
onOpen: q(e) ? x : void 0,
|
|
389
|
+
onShare: Y(e) ? S : void 0,
|
|
390
|
+
onDelete: X(e) ? C : void 0,
|
|
391
|
+
onRestore: J(e) ? w : void 0,
|
|
392
|
+
onRename: J(e) ? T : void 0,
|
|
393
|
+
onFavorite: J(e) ? E : void 0,
|
|
394
|
+
onCopy: me,
|
|
395
|
+
onMove: J(e) ? D : void 0,
|
|
396
|
+
onInfo: O,
|
|
397
|
+
onActivity: he,
|
|
398
|
+
onDragStart: J(e) ? De : void 0,
|
|
399
|
+
onDragEnd: z,
|
|
400
|
+
onDrop: J(e) ? Oe : void 0,
|
|
401
|
+
onContextMenu: V
|
|
402
|
+
}, e.id))
|
|
403
|
+
})]
|
|
404
|
+
}),
|
|
405
|
+
Q.length > 0 && /* @__PURE__ */ s("div", { children: [$.length > 0 && /* @__PURE__ */ o("h2", {
|
|
406
|
+
className: "text-xs font-semibold text-text-tertiary uppercase tracking-wider mb-3 px-1",
|
|
407
|
+
children: n(k, "files.browser.section.files", "Files")
|
|
408
|
+
}), /* @__PURE__ */ o("div", {
|
|
409
|
+
className: "grid grid-cols-2 @md:grid-cols-3 @lg:grid-cols-4 @xl:grid-cols-5 gap-4",
|
|
410
|
+
children: Q.map((e) => /* @__PURE__ */ o(ne, {
|
|
411
|
+
file: e,
|
|
412
|
+
isSelected: M.has(e.id),
|
|
413
|
+
isDragging: R?.item.id === e.id,
|
|
414
|
+
onPreview: U(e) ? pe : void 0,
|
|
415
|
+
onShare: G(e) ? d : void 0,
|
|
416
|
+
onDelete: K(e) ? f : void 0,
|
|
417
|
+
onRestore: W(e) ? p : void 0,
|
|
418
|
+
onFavorite: W(e) ? m : void 0,
|
|
419
|
+
onRename: W(e) ? h : void 0,
|
|
420
|
+
onDownload: U(e) ? g : void 0,
|
|
421
|
+
onCopy: U(e) ? _ : void 0,
|
|
422
|
+
onMove: W(e) ? v : void 0,
|
|
423
|
+
onInfo: y,
|
|
424
|
+
onActivity: b,
|
|
425
|
+
onDragStart: W(e) ? Ee : void 0,
|
|
426
|
+
onDragEnd: z,
|
|
427
|
+
onContextMenu: B
|
|
428
|
+
}, e.id))
|
|
429
|
+
})] }),
|
|
430
|
+
I && /* @__PURE__ */ o(r, {
|
|
431
|
+
x: I.x,
|
|
432
|
+
y: I.y,
|
|
433
|
+
onClose: H,
|
|
434
|
+
items: Z()
|
|
435
|
+
})
|
|
436
|
+
]
|
|
421
437
|
});
|
|
422
438
|
};
|
|
423
439
|
//#endregion
|