diff --git a/app/client-nav.tsx b/app/client-nav.tsx index 5afce48..52e240f 100644 --- a/app/client-nav.tsx +++ b/app/client-nav.tsx @@ -9,7 +9,7 @@ const examples = [ { name: "Chat", href: "/chat", color: "#25D366" }, // WhatsApp green { name: "Dashboard", href: "/dashboard", color: "#6366F1" }, // Indigo { name: "Mail", href: "/mail", color: "#FFD700" }, // Outlook yellow - { name: "Tree", href: "/tree", color: "#10B981" }, // Emerald green + { name: "Drive", href: "/drive", color: "#10B981" }, // Emerald green { name: "Editor", href: "/editor", color: "#2563EB" }, // Word blue { name: "Tables", href: "/table", color: "#8B5CF6" }, // Purple { name: "Meet", href: "/meet", color: "#059669" }, // Google Meet green diff --git a/app/tree/components/FileBrowser.tsx b/app/drive/components/FileBrowser.tsx similarity index 100% rename from app/tree/components/FileBrowser.tsx rename to app/drive/components/FileBrowser.tsx diff --git a/app/tree/components/FileOperations.tsx b/app/drive/components/FileOperations.tsx similarity index 100% rename from app/tree/components/FileOperations.tsx rename to app/drive/components/FileOperations.tsx diff --git a/app/tree/components/FileTree.tsx b/app/drive/components/FileTree.tsx similarity index 100% rename from app/tree/components/FileTree.tsx rename to app/drive/components/FileTree.tsx diff --git a/app/drive/page.tsx b/app/drive/page.tsx new file mode 100644 index 0000000..edcf46c --- /dev/null +++ b/app/drive/page.tsx @@ -0,0 +1,585 @@ +"use client"; +import React, { useState, useEffect, useMemo } from 'react'; +import { Search, Plus, Upload, Download, Trash2, Copy, Move, Share, Star, Grid, List, Filter, SortAsc, Eye, Edit3, Archive, Clock, Users, Lock, Folder, File, Image, Video, Music, FileText, Code, Database, Package } from 'lucide-react'; + +// Enhanced file system with realistic data structure +const fileSystemData = { + "": { + name: "Root", + path: "", + is_dir: true, + children: ["projects", "documents", "media", "shared", "archives", "templates"] + }, + "projects": { + name: "Projects", + path: "projects", + is_dir: true, + size: null, + modified: "2025-01-15T10:30:00Z", + created: "2024-12-01T09:00:00Z", + starred: true, + shared: false, + tags: ["work", "development"], + children: ["web-apps", "mobile-apps", "data-science", "ai-research", "blockchain"] + }, + "projects/web-apps": { + name: "Web Applications", + path: "projects/web-apps", + is_dir: true, + size: null, + modified: "2025-01-14T16:45:00Z", + created: "2024-12-01T09:15:00Z", + starred: false, + shared: true, + tags: ["frontend", "backend", "fullstack"], + children: ["dashboard-pro", "e-commerce-platform", "social-media-app", "file-manager"] + }, + "projects/web-apps/dashboard-pro": { + name: "Dashboard Pro", + path: "projects/web-apps/dashboard-pro", + is_dir: true, + size: null, + modified: "2025-01-13T14:20:00Z", + created: "2024-12-10T11:00:00Z", + starred: true, + shared: true, + tags: ["react", "typescript", "tailwind"], + children: ["src", "components", "styles", "tests", "package.json", "README.md", "deployment.yaml"] + }, + "projects/web-apps/dashboard-pro/package.json": { + name: "package.json", + path: "projects/web-apps/dashboard-pro/package.json", + is_dir: false, + size: 2048, + type: "json", + modified: "2025-01-13T14:20:00Z", + created: "2024-12-10T11:00:00Z", + starred: false, + shared: false, + tags: ["config", "dependencies"] + }, + "projects/web-apps/dashboard-pro/README.md": { + name: "README.md", + path: "projects/web-apps/dashboard-pro/README.md", + is_dir: false, + size: 5120, + type: "markdown", + modified: "2025-01-12T09:30:00Z", + created: "2024-12-10T11:05:00Z", + starred: false, + shared: true, + tags: ["documentation"] + }, + "documents": { + name: "Documents", + path: "documents", + is_dir: true, + size: null, + modified: "2025-01-14T12:00:00Z", + created: "2024-11-01T08:00:00Z", + starred: false, + shared: false, + tags: ["personal", "work"], + children: ["proposals", "contracts", "presentations", "reports", "spreadsheets"] + }, + "documents/proposals": { + name: "Proposals", + path: "documents/proposals", + is_dir: true, + size: null, + modified: "2025-01-10T15:30:00Z", + created: "2024-11-15T10:00:00Z", + starred: true, + shared: true, + tags: ["business", "client"], + children: ["Q1-2025-Strategy.pdf", "AI-Integration-Proposal.docx", "Budget-Proposal-2025.xlsx"] + }, + "documents/proposals/Q1-2025-Strategy.pdf": { + name: "Q1 2025 Strategy.pdf", + path: "documents/proposals/Q1-2025-Strategy.pdf", + is_dir: false, + size: 1048576, + type: "pdf", + modified: "2025-01-10T15:30:00Z", + created: "2025-01-08T14:00:00Z", + starred: true, + shared: true, + tags: ["strategy", "quarterly", "important"] + }, + "media": { + name: "Media", + path: "media", + is_dir: true, + size: null, + modified: "2025-01-13T18:45:00Z", + created: "2024-10-01T12:00:00Z", + starred: false, + shared: false, + tags: ["photos", "videos", "audio"], + children: ["photos", "videos", "audio", "graphics"] + }, + "media/photos": { + name: "Photos", + path: "media/photos", + is_dir: true, + size: null, + modified: "2025-01-13T18:45:00Z", + created: "2024-10-01T12:15:00Z", + starred: false, + shared: false, + tags: ["photography"], + children: ["vacation-2024.jpg", "team-photo.jpg", "product-shots.jpg", "nature-landscape.jpg"] + }, + "media/photos/vacation-2024.jpg": { + name: "vacation-2024.jpg", + path: "media/photos/vacation-2024.jpg", + is_dir: false, + size: 3145728, + type: "image", + modified: "2024-12-25T20:00:00Z", + created: "2024-12-25T20:00:00Z", + starred: true, + shared: false, + tags: ["vacation", "memories"] + }, + "shared": { + name: "Shared", + path: "shared", + is_dir: true, + size: null, + modified: "2025-01-12T11:20:00Z", + created: "2024-11-01T08:30:00Z", + starred: false, + shared: true, + tags: ["collaboration", "team"], + children: ["team-resources", "client-deliverables", "public-assets"] + } +}; + +const getFileIcon = (item) => { + if (item.is_dir) { + return item.starred ? : ; + } + + const iconMap = { + pdf: , + docx: , + xlsx: , + json: , + markdown: , + md: , + jpg: , + jpeg: , + png: , + mp4: