diff options
| author | diogo464 <[email protected]> | 2025-08-14 15:26:24 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-14 15:26:24 +0100 |
| commit | a9f1dbeed109b175fbf78e18a1ede3eba44924f8 (patch) | |
| tree | c1d64649b86d57511de2a46d361c13976d657848 /frontend/components/drive | |
| parent | 42bbccc7f067c76f9827c04178ee9b1ebba2f590 (diff) | |
feat: optimize mobile navigation and storage display
- Stack breadcrumbs above action buttons on mobile screens
- Move storage usage component above navigation for better hierarchy
- Make Create Folder and Upload buttons full-width on mobile with proper spacing
- Maintain desktop horizontal layout for larger screens
- Improve information architecture and mobile usability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'frontend/components/drive')
| -rw-r--r-- | frontend/components/drive/DriveDirectoryClient.tsx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/frontend/components/drive/DriveDirectoryClient.tsx b/frontend/components/drive/DriveDirectoryClient.tsx index 3058a68..7c5827b 100644 --- a/frontend/components/drive/DriveDirectoryClient.tsx +++ b/frontend/components/drive/DriveDirectoryClient.tsx | |||
| @@ -366,33 +366,35 @@ export function DriveDirectoryClient({ path, files, breadcrumbs, storageData, us | |||
| 366 | 366 | ||
| 367 | return ( | 367 | return ( |
| 368 | <div className="space-y-6"> | 368 | <div className="space-y-6"> |
| 369 | {/* Storage Info */} | ||
| 370 | <StorageUsage data={storageData} /> | ||
| 371 | |||
| 369 | {/* Navigation and Actions */} | 372 | {/* Navigation and Actions */} |
| 370 | <div className="flex items-center justify-between"> | 373 | <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"> |
| 371 | <div className="flex items-center gap-4"> | 374 | {/* Breadcrumbs */} |
| 372 | {/* Breadcrumbs */} | 375 | <nav className="flex items-center gap-1 text-sm text-muted-foreground"> |
| 373 | <nav className="flex items-center gap-1 text-sm text-muted-foreground"> | 376 | {breadcrumbs.map((crumb, index) => ( |
| 374 | {breadcrumbs.map((crumb, index) => ( | 377 | <div key={crumb.path} className="flex items-center gap-1"> |
| 375 | <div key={crumb.path} className="flex items-center gap-1"> | 378 | {index > 0 && <ChevronRight className="h-3 w-3" />} |
| 376 | {index > 0 && <ChevronRight className="h-3 w-3" />} | 379 | {index === breadcrumbs.length - 1 ? ( |
| 377 | {index === breadcrumbs.length - 1 ? ( | 380 | <span className="text-foreground font-medium">{crumb.name}</span> |
| 378 | <span className="text-foreground font-medium">{crumb.name}</span> | 381 | ) : ( |
| 379 | ) : ( | 382 | <Link |
| 380 | <Link | 383 | href={crumb.path} |
| 381 | href={crumb.path} | 384 | className="hover:text-foreground transition-colors" |
| 382 | className="hover:text-foreground transition-colors" | 385 | > |
| 383 | > | 386 | {crumb.name} |
| 384 | {crumb.name} | 387 | </Link> |
| 385 | </Link> | 388 | )} |
| 386 | )} | 389 | </div> |
| 387 | </div> | 390 | ))} |
| 388 | ))} | 391 | </nav> |
| 389 | </nav> | ||
| 390 | </div> | ||
| 391 | 392 | ||
| 392 | <div className="flex items-center gap-2"> | 393 | <div className="flex items-center gap-2 sm:gap-2"> |
| 393 | <Button | 394 | <Button |
| 394 | variant="secondary" | 395 | variant="secondary" |
| 395 | onClick={() => setCreateFolderDialogOpen(true)} | 396 | onClick={() => setCreateFolderDialogOpen(true)} |
| 397 | className="flex-1 sm:flex-none" | ||
| 396 | > | 398 | > |
| 397 | <FolderPlus className="mr-2 h-4 w-4" /> | 399 | <FolderPlus className="mr-2 h-4 w-4" /> |
| 398 | Create Folder | 400 | Create Folder |
| @@ -400,6 +402,7 @@ export function DriveDirectoryClient({ path, files, breadcrumbs, storageData, us | |||
| 400 | <Button | 402 | <Button |
| 401 | onClick={() => fileInputRef.current?.click()} | 403 | onClick={() => fileInputRef.current?.click()} |
| 402 | disabled={uploading} | 404 | disabled={uploading} |
| 405 | className="flex-1 sm:flex-none" | ||
| 403 | > | 406 | > |
| 404 | <Upload className="mr-2 h-4 w-4" /> | 407 | <Upload className="mr-2 h-4 w-4" /> |
| 405 | {uploading ? "Uploading..." : "Upload Files"} | 408 | {uploading ? "Uploading..." : "Upload Files"} |
| @@ -407,9 +410,6 @@ export function DriveDirectoryClient({ path, files, breadcrumbs, storageData, us | |||
| 407 | </div> | 410 | </div> |
| 408 | </div> | 411 | </div> |
| 409 | 412 | ||
| 410 | {/* Storage Info */} | ||
| 411 | <StorageUsage data={storageData} /> | ||
| 412 | |||
| 413 | {/* Bulk Actions */} | 413 | {/* Bulk Actions */} |
| 414 | {selectedFiles.size > 0 && ( | 414 | {selectedFiles.size > 0 && ( |
| 415 | <div className="bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-center justify-between"> | 415 | <div className="bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-center justify-between"> |
