diff --git a/components/utilities/files/FileBrowserPanel.tsx b/components/utilities/files/FileBrowserPanel.tsx index c0084c7b..3487187a 100644 --- a/components/utilities/files/FileBrowserPanel.tsx +++ b/components/utilities/files/FileBrowserPanel.tsx @@ -1,7 +1,15 @@ "use client"; import React, { useEffect, useMemo, useState, useCallback } from "react"; -import { Loader2, Download, Folder, FileText, RefreshCw, ArrowUp, Home } from "lucide-react"; +import { + Loader2, + Download, + Folder, + FileText, + RefreshCw, + ArrowUp, + Home, +} from "lucide-react"; type FileItem = { name: string; @@ -117,119 +125,131 @@ export default function FileBrowserPanel() { return (
-
- -
- - -
-
+ -
{path}
- - {/* Wider table, same preview: left has min 760px; table can scroll horizontally if cramped */} -
- {/* TABLE */} -
-
-
-
-
Name
-
Type
-
Size
-
Modified
-
Actions
-
- -
- {loading ? ( -
- Loading… +
+ +
+ +
- ) : error ? ( -
Error: {error}
- ) : items.length === 0 ? ( -
Empty folder.
- ) : ( - items.map((it) => ( -
- -
- {it.type} +
+ +
{path || "/"}
+ +
+ {/* TABLE */} +
+
+
+ {/* compact column plan: name grows; others stay tidy */} +
+
Name
+
Type
+
Size
+
Modified
+
Actions
+
+ +
+ {loading ? ( +
+ Loading…
-
{formatSize(it.size)}
-
- {it.mtimeMs ? new Date(it.mtimeMs).toLocaleString() : "—"} -
-
- {it.type === "file" && ( - - )} -
-
- )) - )} -
-
-
-
- - {/* PREVIEW (unchanged size) */} -
-
Preview
- {previewHref ? ( -
-