2026-01-07 09:31:02 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { Card } from '../ui/card';
|
|
|
|
|
import { Button } from '../ui/button';
|
|
|
|
|
import { Badge } from '../ui/badge';
|
|
|
|
|
import { FileNode } from '../../types';
|
2026-01-13 18:47:57 +00:00
|
|
|
import {
|
|
|
|
|
ArrowLeft,
|
|
|
|
|
Download,
|
|
|
|
|
Share2,
|
|
|
|
|
Trash2,
|
|
|
|
|
Edit3,
|
|
|
|
|
Music,
|
|
|
|
|
FileText,
|
|
|
|
|
Play,
|
|
|
|
|
Activity,
|
|
|
|
|
Layers,
|
|
|
|
|
HardDrive,
|
|
|
|
|
Info,
|
2026-01-07 09:31:02 +00:00
|
|
|
} from 'lucide-react';
|
2026-01-26 13:12:17 +00:00
|
|
|
import { useToast } from '../../components/feedback/ToastProvider';
|
2026-01-07 09:31:02 +00:00
|
|
|
|
|
|
|
|
// Extended Mock Data for Demo
|
|
|
|
|
const MOCK_ACTIVITY = [
|
2026-01-13 18:47:57 +00:00
|
|
|
{
|
|
|
|
|
id: 'a1',
|
|
|
|
|
user: 'Cyber_Producer',
|
|
|
|
|
action: 'uploaded',
|
|
|
|
|
timestamp: '2 days ago',
|
|
|
|
|
},
|
|
|
|
|
{ id: 'a2', user: 'Sarah Connor', action: 'viewed', timestamp: '1 day ago' },
|
|
|
|
|
{ id: 'a3', user: 'System', action: 'processed', timestamp: '2 days ago' },
|
2026-01-07 09:31:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const MOCK_VERSIONS = [
|
2026-01-13 18:47:57 +00:00
|
|
|
{
|
|
|
|
|
id: 'v1',
|
|
|
|
|
version: 'v1.0',
|
|
|
|
|
uploadedBy: 'Cyber_Producer',
|
|
|
|
|
timestamp: '2 days ago',
|
|
|
|
|
size: '24.5 MB',
|
|
|
|
|
url: '#',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'v2',
|
|
|
|
|
version: 'v1.1',
|
|
|
|
|
uploadedBy: 'Cyber_Producer',
|
|
|
|
|
timestamp: '5 hours ago',
|
|
|
|
|
size: '24.6 MB',
|
|
|
|
|
url: '#',
|
|
|
|
|
current: true,
|
|
|
|
|
},
|
2026-01-07 09:31:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
interface FileDetailsViewProps {
|
|
|
|
|
fileId: string;
|
|
|
|
|
onBack: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
export const FileDetailsView: React.FC<FileDetailsViewProps> = ({
|
|
|
|
|
fileId,
|
|
|
|
|
onBack,
|
|
|
|
|
}) => {
|
2026-01-07 09:31:02 +00:00
|
|
|
const { addToast } = useToast();
|
|
|
|
|
|
|
|
|
|
// Mock fetching logic based on ID
|
|
|
|
|
const file: FileNode = {
|
2026-01-13 18:47:57 +00:00
|
|
|
id: fileId,
|
|
|
|
|
name: 'Neon_Nights_Final_Master.wav',
|
|
|
|
|
type: 'audio',
|
|
|
|
|
size: '48.2 MB',
|
|
|
|
|
modified: '2 hours ago',
|
|
|
|
|
status: 'ready',
|
|
|
|
|
metadata: {
|
|
|
|
|
bpm: 128,
|
|
|
|
|
key: 'F# Minor',
|
|
|
|
|
genre: 'Synthwave',
|
|
|
|
|
duration: '3:45',
|
|
|
|
|
},
|
2026-01-07 09:31:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const isAudio = file.type === 'audio';
|
|
|
|
|
const isImage = file.type === 'image';
|
|
|
|
|
|
|
|
|
|
return (
|
aesthetic-improvements: apply design direction to pages batch 2 (Action 11.5.1.5)
- Pages: Updated padding (p-6 → p-8) and spacing (space-y-6 → space-y-8, gap-6 → gap-8) for 8px grid alignment
- LivePage, SocialPage, EducationPage, QueuePage, DeveloperPage, SettingsPage
- Views: Updated spacing and removed decorative effects
- ProfileView: Removed decorative hover scale (group-hover:scale-105), replaced decorative gradient with solid color (bg-gradient-to-r → bg-kodo-ink), updated spacing
- CheckoutView, FileDetailsView, AnalyticsView, GearView, DiscoverView, StudioView, SearchPageView, EducationView, CartView: Updated spacing (space-y-6 → space-y-8, gap-6 → gap-8, p-6 → p-8)
- Action 11.5.1.5: Apply direction to all pages - Batch 2 complete (6 pages + 10 views = 16 files)
2026-01-16 10:58:55 +00:00
|
|
|
<div className="animate-fadeIn space-y-8 pb-20">
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Header */}
|
|
|
|
|
<div className="flex items-center justify-between">
|
|
|
|
|
<div className="flex items-center gap-4">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
onClick={onBack}
|
|
|
|
|
aria-label="Retour"
|
|
|
|
|
>
|
|
|
|
|
<ArrowLeft className="w-5 h-5" />
|
|
|
|
|
</Button>
|
|
|
|
|
<div>
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<h2 className="text-2xl font-bold text-white flex items-center gap-4">
|
2026-01-13 18:47:57 +00:00
|
|
|
{file.name}
|
|
|
|
|
<Badge label={file.type} variant="terminal" />
|
|
|
|
|
</h2>
|
2026-01-16 00:42:21 +00:00
|
|
|
<p className="text-kodo-content-dim text-sm font-mono flex items-center gap-4 mt-1">
|
2026-01-13 18:47:57 +00:00
|
|
|
<span>{file.size}</span>
|
|
|
|
|
<span>•</span>
|
|
|
|
|
<span>Modified {file.modified}</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex gap-2">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
icon={<Share2 className="w-4 h-4" />}
|
|
|
|
|
onClick={() => addToast('Link copied')}
|
|
|
|
|
>
|
|
|
|
|
Share
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="primary"
|
|
|
|
|
icon={<Download className="w-4 h-4" />}
|
|
|
|
|
onClick={() => addToast('Downloading...')}
|
|
|
|
|
>
|
|
|
|
|
Download
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
className="text-kodo-red hover:bg-kodo-red/10"
|
|
|
|
|
icon={<Trash2 className="w-4 h-4" />}
|
|
|
|
|
>
|
|
|
|
|
Delete
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
|
|
|
|
{/* Left: Preview Area */}
|
aesthetic-improvements: apply design direction to pages batch 3 (Action 11.5.1.5)
- Pages: Updated remaining spacing issues (p-6 → p-8, space-y-6 → space-y-8, gap-6 → gap-8)
- DashboardPage, DeveloperPage, GearPage, DesignSystemDemoPage, MarketplaceHome
- Views: Updated spacing (space-y-6 → space-y-8, gap-6 → gap-8, p-6 → p-8)
- FileManagerView, NotificationsView, SocialView, FileDetailsView, UploadView, MarketplaceView, GearView, LiveView, ProfileView
- Action 11.5.1.5: Apply direction to all pages - Batch 3 complete (5 pages + 9 views = 14 files)
2026-01-16 11:00:50 +00:00
|
|
|
<div className="lg:col-span-2 space-y-8">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Card
|
|
|
|
|
variant="default"
|
|
|
|
|
className="min-h-[400px] flex items-center justify-center bg-black relative overflow-hidden group"
|
|
|
|
|
>
|
|
|
|
|
{isAudio && (
|
|
|
|
|
<div className="text-center w-full max-w-md">
|
2026-01-16 11:02:55 +00:00
|
|
|
<div className="w-32 h-32 bg-kodo-cyan/20 rounded-full mx-auto mb-8 flex items-center justify-center animate-pulse">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Music className="w-12 h-12 text-black" />
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="h-16 flex items-center justify-center gap-1 mb-8">
|
|
|
|
|
{Array.from({ length: 40 }).map((_, i) => (
|
|
|
|
|
<div
|
|
|
|
|
key={i}
|
|
|
|
|
className="w-1.5 bg-kodo-cyan rounded-full"
|
|
|
|
|
style={{ height: `${Math.random() * 100}%` }}
|
|
|
|
|
></div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
<Button
|
|
|
|
|
variant="primary"
|
|
|
|
|
size="lg"
|
|
|
|
|
className="rounded-full px-8"
|
|
|
|
|
icon={<Play className="w-5 h-5 fill-current" />}
|
|
|
|
|
>
|
|
|
|
|
PLAY PREVIEW
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{isImage && (
|
|
|
|
|
<img
|
|
|
|
|
src="https://picsum.photos/id/200/800/600"
|
|
|
|
|
className="w-full h-full object-contain"
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{!isAudio && !isImage && (
|
2026-01-16 00:42:21 +00:00
|
|
|
<div className="text-center text-kodo-content-dim">
|
2026-01-13 18:47:57 +00:00
|
|
|
<FileText className="w-24 h-24 mx-auto mb-4 opacity-50" />
|
|
|
|
|
<p>No preview available for this file type.</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
{/* Metadata Grid */}
|
|
|
|
|
<Card variant="default">
|
|
|
|
|
<div className="flex justify-between items-center mb-6">
|
|
|
|
|
<h3 className="font-bold text-white flex items-center gap-2">
|
aesthetic-improvements: reduce decorative cyan in player, library, and views (80/20 rule, batch 12)
- Player: VisualizerSettingsModal decorative icon (1 instance)
- Library: QueueView decorative artist text, AutoMetadataDetectionModal decorative icon and loading spinner border and fileName text and detected key text, SaveQueueAsPlaylistModal decorative icon, EditPlaylistModal decorative icon, PlaylistsView loading spinner, CreatePlaylistModal decorative icon (7 instances)
- Views: StudioView decorative icon, FileDetailsView decorative icon, GearView decorative icons and order number text, ProfileView loading spinner and social icons, AnalyticsView loading spinner and decorative chart legend dot and chart bars and device icon and revenue text, DiscoverView loading spinner and decorative icon and weekly mix text, FileManagerView decorative music icons (14 instances)
- Total: ~22 files, ~22 instances replaced
- Preserved: Active/selected states (LyricsPanel autoScroll active state, VisualizerSettingsModal selected mode, PlayerControls shuffle/repeatMode/showVisualizer active states, MiniPlayer isQueueOpen active state, AddToPlaylistModal selected playlist, PlaylistDetailView dragged item, StudioView active tab, SearchBar focused state, CheckoutView checkbox accents - focus/interaction, SearchPageView radio button accent - focus/interaction, FileManagerView selected files checkmarks - active states, ProfileView social links - functional links, LiveView links - functional links), primary actions, design system variants
- Action 11.3.1.3 in progress (twelfth batch: player, library, and views components)
2026-01-16 10:30:07 +00:00
|
|
|
<Info className="w-4 h-4 text-kodo-steel" /> Metadata
|
2026-01-13 18:47:57 +00:00
|
|
|
</h3>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="sm"
|
|
|
|
|
icon={<Edit3 className="w-3 h-3" />}
|
|
|
|
|
>
|
|
|
|
|
Edit
|
|
|
|
|
</Button>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
|
|
|
{Object.entries(file.metadata || {}).map(([key, val]) => (
|
|
|
|
|
<div
|
|
|
|
|
key={key}
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
className="bg-kodo-ink p-4 rounded border border-kodo-steel/50"
|
2026-01-13 18:47:57 +00:00
|
|
|
>
|
2026-01-16 00:42:21 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim uppercase font-bold mb-1">
|
2026-01-13 18:47:57 +00:00
|
|
|
{key}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="text-white font-medium">{String(val)}</div>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Right: Sidebar */}
|
2026-01-16 11:03:28 +00:00
|
|
|
<div className="space-y-8">
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Activity Feed */}
|
2026-01-26 13:12:17 +00:00
|
|
|
<Card variant="glass">
|
2026-01-13 18:47:57 +00:00
|
|
|
<h3 className="font-bold text-white mb-4 flex items-center gap-2 text-sm uppercase tracking-wider">
|
|
|
|
|
<Activity className="w-4 h-4 text-kodo-gold" /> Activity Log
|
|
|
|
|
</h3>
|
|
|
|
|
<div className="space-y-4 relative">
|
|
|
|
|
<div className="absolute left-3 top-2 bottom-2 w-px bg-kodo-steel"></div>
|
|
|
|
|
{MOCK_ACTIVITY.map((act) => (
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<div key={act.id} className="flex gap-4 relative">
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="w-6 h-6 rounded-full bg-kodo-graphite border border-kodo-steel flex items-center justify-center shrink-0 z-10">
|
|
|
|
|
<div className="w-2 h-2 rounded-full bg-kodo-gold"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-01-16 00:42:21 +00:00
|
|
|
<p className="text-sm text-kodo-text-main">
|
2026-01-13 18:47:57 +00:00
|
|
|
<span className="font-bold text-white">{act.user}</span>{' '}
|
|
|
|
|
{act.action} this file.
|
|
|
|
|
</p>
|
2026-01-16 00:42:21 +00:00
|
|
|
<p className="text-xs text-kodo-content-dim">{act.timestamp}</p>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Versions */}
|
|
|
|
|
<Card variant="default">
|
|
|
|
|
<h3 className="font-bold text-white mb-4 flex items-center gap-2 text-sm uppercase tracking-wider">
|
|
|
|
|
<Layers className="w-4 h-4 text-kodo-magenta" /> Version History
|
|
|
|
|
</h3>
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
|
{MOCK_VERSIONS.map((ver) => (
|
|
|
|
|
<div
|
|
|
|
|
key={ver.id}
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
className={`flex items-center justify-between p-4 rounded border ${ver.current ? 'bg-kodo-magenta/10 border-kodo-magenta/30' : 'bg-kodo-ink border-kodo-steel hover:bg-white/5'}`}
|
2026-01-13 18:47:57 +00:00
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="font-bold text-white text-sm">
|
|
|
|
|
{ver.version}
|
|
|
|
|
</span>
|
|
|
|
|
{ver.current && (
|
|
|
|
|
<span className="text-[10px] bg-kodo-magenta text-white px-1.5 rounded">
|
|
|
|
|
LATEST
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-16 00:42:21 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim">
|
2026-01-13 18:47:57 +00:00
|
|
|
{ver.timestamp} • {ver.uploadedBy}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
className="h-8 w-8"
|
|
|
|
|
aria-label="Télécharger"
|
|
|
|
|
>
|
|
|
|
|
<Download className="w-3 h-3" />
|
|
|
|
|
</Button>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
{/* Storage Info */}
|
|
|
|
|
<div className="bg-kodo-ink p-4 rounded-xl border border-kodo-steel flex items-center gap-4">
|
2026-01-16 00:42:21 +00:00
|
|
|
<div className="w-10 h-10 bg-kodo-slate rounded-lg flex items-center justify-center text-kodo-content-dim">
|
2026-01-13 18:47:57 +00:00
|
|
|
<HardDrive className="w-5 h-5" />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-01-16 00:42:21 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim uppercase">
|
2026-01-13 18:47:57 +00:00
|
|
|
Storage Location
|
|
|
|
|
</div>
|
|
|
|
|
<div className="text-sm font-bold text-white">
|
|
|
|
|
s3://veza-cloud/projects/alpha
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|