diff options
| author | diogo464 <[email protected]> | 2025-08-12 16:16:11 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-12 16:16:11 +0100 |
| commit | 519bb45b89591b78b3ef65e4b937c53482552887 (patch) | |
| tree | f702af995eb5e5592b31d1a06d41936300012d1b /frontend/app/api | |
| parent | d896aa6627ad5bdfca417c04cd340b517fe4398f (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/app/api')
| -rw-r--r-- | frontend/app/api/directories/route.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/app/api/directories/route.ts b/frontend/app/api/directories/route.ts new file mode 100644 index 0000000..b3515bb --- /dev/null +++ b/frontend/app/api/directories/route.ts | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | import { NextResponse } from 'next/server' | ||
| 2 | import { Drive_ls_directories } from '@/lib/drive_server' | ||
| 3 | |||
| 4 | export async function GET() { | ||
| 5 | try { | ||
| 6 | const directories = await Drive_ls_directories() | ||
| 7 | |||
| 8 | return NextResponse.json(directories) | ||
| 9 | } catch (error) { | ||
| 10 | console.error('Error fetching directories:', error) | ||
| 11 | return NextResponse.json( | ||
| 12 | { error: error instanceof Error ? error.message : 'Internal server error' }, | ||
| 13 | { status: 500 } | ||
| 14 | ) | ||
| 15 | } | ||
| 16 | } \ No newline at end of file | ||
