diff options
Diffstat (limited to 'frontend/components/drive/DriveDirectoryView.tsx')
| -rw-r--r-- | frontend/components/drive/DriveDirectoryView.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/components/drive/DriveDirectoryView.tsx b/frontend/components/drive/DriveDirectoryView.tsx index 20ed9d8..d93dce8 100644 --- a/frontend/components/drive/DriveDirectoryView.tsx +++ b/frontend/components/drive/DriveDirectoryView.tsx | |||
| @@ -1,9 +1,17 @@ | |||
| 1 | import { DriveLsEntry } from "@/lib/drive_types" | 1 | import { DriveLsEntry } from "@/lib/drive_types" |
| 2 | import { DriveDirectoryClient } from "./DriveDirectoryClient" | 2 | import { DriveDirectoryClient } from "./DriveDirectoryClient" |
| 3 | 3 | ||
| 4 | interface StorageData { | ||
| 5 | activeDriveUsage: number | ||
| 6 | totalDiskCapacity: number | ||
| 7 | totalDiskUsed: number | ||
| 8 | availableDisk: number | ||
| 9 | } | ||
| 10 | |||
| 4 | interface DriveDirectoryViewProps { | 11 | interface DriveDirectoryViewProps { |
| 5 | path: string | 12 | path: string |
| 6 | files: DriveLsEntry[] | 13 | files: DriveLsEntry[] |
| 14 | storageData: StorageData | ||
| 7 | } | 15 | } |
| 8 | 16 | ||
| 9 | // Generate breadcrumbs from path | 17 | // Generate breadcrumbs from path |
| @@ -41,7 +49,7 @@ function sortFiles(files: DriveLsEntry[]): DriveLsEntry[] { | |||
| 41 | }); | 49 | }); |
| 42 | } | 50 | } |
| 43 | 51 | ||
| 44 | export function DriveDirectoryView({ path, files }: DriveDirectoryViewProps) { | 52 | export function DriveDirectoryView({ path, files, storageData }: DriveDirectoryViewProps) { |
| 45 | const sortedFiles = sortFiles(files) | 53 | const sortedFiles = sortFiles(files) |
| 46 | const breadcrumbs = generateBreadcrumbs(path) | 54 | const breadcrumbs = generateBreadcrumbs(path) |
| 47 | 55 | ||
| @@ -50,6 +58,7 @@ export function DriveDirectoryView({ path, files }: DriveDirectoryViewProps) { | |||
| 50 | path={path} | 58 | path={path} |
| 51 | files={sortedFiles} | 59 | files={sortedFiles} |
| 52 | breadcrumbs={breadcrumbs} | 60 | breadcrumbs={breadcrumbs} |
| 61 | storageData={storageData} | ||
| 53 | /> | 62 | /> |
| 54 | ) | 63 | ) |
| 55 | } \ No newline at end of file | 64 | } \ No newline at end of file |
