summaryrefslogtreecommitdiff
path: root/frontend/app
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/app
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/app')
-rw-r--r--frontend/app/api/directories/route.ts16
-rw-r--r--frontend/app/v2/[...path]/page.tsx12
-rw-r--r--frontend/app/v2/page.tsx5
3 files changed, 33 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 @@
1import { NextResponse } from 'next/server'
2import { Drive_ls_directories } from '@/lib/drive_server'
3
4export 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
diff --git a/frontend/app/v2/[...path]/page.tsx b/frontend/app/v2/[...path]/page.tsx
new file mode 100644
index 0000000..4af0167
--- /dev/null
+++ b/frontend/app/v2/[...path]/page.tsx
@@ -0,0 +1,12 @@
1import { V2DirectoryView } from "@/components/v2/V2DirectoryView"
2
3export default async function V2DirectoryPage({
4 params,
5}: {
6 params: Promise<{ path: string[] }>
7}) {
8 const { path: pathSegments } = await params
9 const currentPath = '/' + (pathSegments?.join('/') || '')
10
11 return <V2DirectoryView path={currentPath} />
12} \ No newline at end of file
diff --git a/frontend/app/v2/page.tsx b/frontend/app/v2/page.tsx
new file mode 100644
index 0000000..e693c77
--- /dev/null
+++ b/frontend/app/v2/page.tsx
@@ -0,0 +1,5 @@
1import { V2DirectoryView } from "@/components/v2/V2DirectoryView"
2
3export default function V2RootPage() {
4 return <V2DirectoryView path="/" />
5} \ No newline at end of file