summaryrefslogtreecommitdiff
path: root/frontend/lib
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-08-12 16:16:11 +0100
committerdiogo464 <[email protected]>2025-08-12 16:16:11 +0100
commit519bb45b89591b78b3ef65e4b937c53482552887 (patch)
treef702af995eb5e5592b31d1a06d41936300012d1b /frontend/lib
parentd896aa6627ad5bdfca417c04cd340b517fe4398f (diff)
Implement /v2 prototype UI with page-based navigation
- Add /v2 route structure with dynamic nested directory pages - Create V2DirectoryView component with breadcrumb navigation - Add V2MoveDialog with directory search and flat list display - Implement single upload button for current directory context - Add /api/directories endpoint for move dialog directory picker - Fix breadcrumb decoding to show readable names instead of URL encoding - Add file sorting: directories first, then files, all alphabetically - Improve performance by loading only current directory contents - Add ScrollArea component and @radix-ui/react-scroll-area dependency - Ensure proper URL encoding/decoding flow to prevent malformed paths 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'frontend/lib')
-rw-r--r--frontend/lib/drive_server.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/lib/drive_server.ts b/frontend/lib/drive_server.ts
index 81e9321..992a287 100644
--- a/frontend/lib/drive_server.ts
+++ b/frontend/lib/drive_server.ts
@@ -174,6 +174,13 @@ export async function Drive_tree(): Promise<DriveTreeResponse> {
174 return { root: calculateSizesAndSort(rootNodes) }; 174 return { root: calculateSizesAndSort(rootNodes) };
175} 175}
176 176
177/// lists only directories (recursively) from the given path
178export async function Drive_ls_directories(path: string = '/'): Promise<DriveLsEntry[]> {
179 // Get all entries recursively and filter for directories
180 const allEntries = await Drive_ls(path, true)
181 return allEntries.filter(entry => entry.type === 'dir')
182}
183
177/// returns the log entries from the drive 184/// returns the log entries from the drive
178export async function Drive_log(): Promise<DriveLogEntry[]> { 185export async function Drive_log(): Promise<DriveLogEntry[]> {
179 const result = spawnSync('fctdrive', ['log'], { encoding: 'utf-8', maxBuffer: 50 * 1024 * 1024 }) 186 const result = spawnSync('fctdrive', ['log'], { encoding: 'utf-8', maxBuffer: 50 * 1024 * 1024 })