2026-01-07 09:31:02 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Button } from '../ui/button';
|
2026-01-13 18:47:57 +00:00
|
|
|
import {
|
|
|
|
|
Wand2,
|
|
|
|
|
Mic2,
|
|
|
|
|
Layers,
|
|
|
|
|
Cloud,
|
|
|
|
|
Folder,
|
|
|
|
|
Settings,
|
|
|
|
|
Network,
|
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-02-05 18:04:03 +00:00
|
|
|
import { CloudFileBrowser } from '@/features/studio/components/cloud-file-browser';
|
2026-01-07 09:31:02 +00:00
|
|
|
import { AIToolsView } from '../studio/AIToolsView';
|
|
|
|
|
import { ConnectivityView } from '../studio/ConnectivityView';
|
|
|
|
|
import { CloudSettingsView } from '../studio/CloudSettingsView';
|
|
|
|
|
import { ProjectsManager } from '../studio/ProjectsManager';
|
|
|
|
|
|
|
|
|
|
interface StudioViewProps {
|
2026-01-13 18:47:57 +00:00
|
|
|
section?: 'cloud' | 'projects';
|
2026-01-07 09:31:02 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
export const StudioView: React.FC<StudioViewProps> = ({
|
|
|
|
|
section: initialSection = 'cloud',
|
|
|
|
|
}) => {
|
2026-01-07 09:31:02 +00:00
|
|
|
const { addToast } = useToast();
|
|
|
|
|
const [section, setSection] = useState<'cloud' | 'projects'>(initialSection);
|
2026-01-13 18:47:57 +00:00
|
|
|
const [activeTab, setActiveTab] = useState<
|
|
|
|
|
'files' | 'tools' | 'connect' | 'settings'
|
|
|
|
|
>('files');
|
2026-01-07 09:31:02 +00:00
|
|
|
|
|
|
|
|
// --- RENDER PROJECTS ---
|
|
|
|
|
if (section === 'projects') {
|
2026-01-13 18:47:57 +00:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<div className="flex justify-end mb-4">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
onClick={() => setSection('cloud')}
|
|
|
|
|
icon={<Cloud className="w-4 h-4" />}
|
|
|
|
|
>
|
|
|
|
|
Switch to Cloud Studio
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<ProjectsManager />
|
|
|
|
|
</>
|
|
|
|
|
);
|
2026-01-07 09:31:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --- RENDER CLOUD STUDIO ---
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col h-[calc(100vh-140px)] animate-fadeIn">
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Header */}
|
|
|
|
|
<div className="flex justify-between items-center mb-6 shrink-0">
|
|
|
|
|
<div>
|
|
|
|
|
<h2 className="text-3xl font-display font-bold text-white mb-2">
|
|
|
|
|
CLOUD STUDIO
|
|
|
|
|
</h2>
|
2026-01-16 00:46:02 +00:00
|
|
|
<p className="text-kodo-content-dim font-mono text-sm">
|
2026-01-13 18:47:57 +00:00
|
|
|
Manage assets, process audio, and sync devices.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex gap-2">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
onClick={() => setSection('projects')}
|
|
|
|
|
icon={<Layers className="w-4 h-4" />}
|
|
|
|
|
>
|
|
|
|
|
Switch to Projects
|
|
|
|
|
</Button>
|
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 className="px-4 py-2 bg-kodo-ink border border-kodo-steel rounded-lg flex items-center gap-4">
|
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
|
|
|
<Cloud className="w-4 h-4 text-kodo-steel" />
|
2026-01-16 00:46:02 +00:00
|
|
|
<div className="w-32 h-2 bg-kodo-steel rounded-full overflow-hidden">
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="w-[65%] h-full bg-kodo-cyan"></div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-16 00:46:02 +00:00
|
|
|
<span className="text-xs font-mono text-kodo-content-dim">
|
2026-01-13 18:47:57 +00:00
|
|
|
65GB / 100GB
|
|
|
|
|
</span>
|
|
|
|
|
</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
|
|
|
|
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="flex flex-1 gap-8 overflow-hidden">
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Sidebar Navigation */}
|
|
|
|
|
<div className="w-64 flex flex-col gap-2 shrink-0">
|
|
|
|
|
<NavButton
|
|
|
|
|
active={activeTab === 'files'}
|
|
|
|
|
onClick={() => setActiveTab('files')}
|
|
|
|
|
icon={<Folder className="w-4 h-4" />}
|
|
|
|
|
label="File Browser"
|
|
|
|
|
/>
|
|
|
|
|
<NavButton
|
|
|
|
|
active={activeTab === 'tools'}
|
|
|
|
|
onClick={() => setActiveTab('tools')}
|
|
|
|
|
icon={<Wand2 className="w-4 h-4" />}
|
|
|
|
|
label="AI Tools"
|
|
|
|
|
/>
|
|
|
|
|
<NavButton
|
|
|
|
|
active={activeTab === 'connect'}
|
|
|
|
|
onClick={() => setActiveTab('connect')}
|
|
|
|
|
icon={<Network className="w-4 h-4" />}
|
|
|
|
|
label="Connectivity"
|
|
|
|
|
/>
|
|
|
|
|
<NavButton
|
|
|
|
|
active={activeTab === 'settings'}
|
|
|
|
|
onClick={() => setActiveTab('settings')}
|
|
|
|
|
icon={<Settings className="w-4 h-4" />}
|
|
|
|
|
label="Storage Settings"
|
|
|
|
|
/>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="mt-auto p-4 bg-kodo-ink rounded-xl border border-kodo-steel">
|
2026-01-16 00:46:02 +00:00
|
|
|
<h4 className="text-xs font-bold text-kodo-content-dim uppercase mb-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
Quick Actions
|
|
|
|
|
</h4>
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
|
|
|
|
size="sm"
|
|
|
|
|
className="w-full text-xs justify-start"
|
|
|
|
|
icon={<Mic2 className="w-3 h-3" />}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setActiveTab('tools');
|
|
|
|
|
addToast('Vocal Remover Selected');
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Remove Vocals
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
|
|
|
|
size="sm"
|
|
|
|
|
className="w-full text-xs justify-start"
|
|
|
|
|
icon={<Layers className="w-3 h-3" />}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setActiveTab('tools');
|
|
|
|
|
addToast('Stem Splitter Selected');
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Split Stems
|
|
|
|
|
</Button>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Main Content Area */}
|
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="flex-1 bg-kodo-graphite/30 border border-kodo-steel/30 rounded-xl p-8 overflow-hidden">
|
2026-01-13 18:47:57 +00:00
|
|
|
{activeTab === 'files' && <CloudFileBrowser />}
|
|
|
|
|
{activeTab === 'tools' && <AIToolsView />}
|
|
|
|
|
{activeTab === 'connect' && <ConnectivityView />}
|
|
|
|
|
{activeTab === 'settings' && <CloudSettingsView />}
|
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
|
|
|
const NavButton: React.FC<{
|
|
|
|
|
active: boolean;
|
|
|
|
|
onClick: () => void;
|
|
|
|
|
icon: React.ReactNode;
|
|
|
|
|
label: string;
|
|
|
|
|
}> = ({ active, onClick, icon, label }) => (
|
|
|
|
|
<button
|
|
|
|
|
onClick={onClick}
|
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={`w-full flex items-center gap-4 px-4 py-4 rounded-lg text-sm font-medium transition-all ${active ? 'bg-kodo-cyan/10 text-kodo-cyan border border-kodo-cyan/30' : 'text-kodo-content-dim hover:text-white hover:bg-white/5 border border-transparent'}`}
|
2026-01-13 18:47:57 +00:00
|
|
|
>
|
|
|
|
|
{icon}
|
|
|
|
|
{label}
|
|
|
|
|
</button>
|
2026-01-07 09:31:02 +00:00
|
|
|
);
|