2026-01-07 09:31:02 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Button } from '../../ui/button';
|
|
|
|
|
import { Input } from '../../ui/input';
|
|
|
|
|
import { X, Layers } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
interface CreateProjectModalProps {
|
|
|
|
|
onClose: () => void;
|
|
|
|
|
onCreate: (project: any) => void;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
export const CreateProjectModal: React.FC<CreateProjectModalProps> = ({
|
|
|
|
|
onClose,
|
|
|
|
|
onCreate,
|
|
|
|
|
}) => {
|
2026-01-07 09:31:02 +00:00
|
|
|
const [formData, setFormData] = useState({
|
|
|
|
|
name: '',
|
|
|
|
|
daw: 'Ableton',
|
|
|
|
|
bpm: '128',
|
|
|
|
|
key: 'C Min',
|
2026-01-13 18:47:57 +00:00
|
|
|
description: '',
|
2026-01-07 09:31:02 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const handleSubmit = () => {
|
|
|
|
|
if (!formData.name) return;
|
|
|
|
|
onCreate({
|
|
|
|
|
...formData,
|
|
|
|
|
progress: 0,
|
|
|
|
|
status: 'Idea',
|
|
|
|
|
collaborators: [],
|
2026-01-13 18:47:57 +00:00
|
|
|
modified: 'Just now',
|
2026-01-07 09:31:02 +00:00
|
|
|
});
|
|
|
|
|
onClose();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4">
|
2026-01-13 18:47:57 +00:00
|
|
|
<div
|
|
|
|
|
className="absolute inset-0 bg-kodo-void/90 backdrop-blur-sm"
|
|
|
|
|
onClick={onClose}
|
|
|
|
|
></div>
|
2026-01-07 09:31:02 +00:00
|
|
|
<div className="relative w-full max-w-lg bg-kodo-graphite border border-kodo-steel rounded-xl shadow-2xl animate-scaleIn overflow-hidden">
|
|
|
|
|
<div className="p-4 border-b border-kodo-steel bg-kodo-ink flex justify-between items-center">
|
|
|
|
|
<h3 className="font-bold text-white flex items-center gap-2">
|
aesthetic-improvements: reduce decorative cyan across multiple component categories (80/20 rule, batch 11)
- Social: FeedView, ConnectionsView, GroupsView, ExploreView, GroupDetailView loading spinners and decorative text, CreatePostModal decorative select text and hashtag links, PostCard decorative tag links and waveform bars and view comments link, CreateGroupModal decorative icon (9 instances)
- Settings: DataExportModal decorative icon, LoginHistory decorative IP text, AppearanceSettingsView decorative icon and selected theme checkmark, BackupsView decorative icon, CloudIntegrationView decorative icon, AccessibilitySettingsView decorative icon, SecuritySettings decorative icon, PasskeyModal decorative icon and loading spinner (8 instances)
- Studio: ProjectsManager loading spinner and progress percentage text, CloudFileBrowser decorative music icons, AIToolsView decorative music icon, ConnectivityView decorative icon, CreateProjectModal decorative icon, CloudSettingsView decorative icon (6 instances)
- Admin: AdminDashboardView loading spinner and decorative chart bars and icon, AdminSettingsView decorative icon, AdminModerationView loading spinner, AdminUsersView loading spinner (5 instances)
- Inventory: InventoryView loading spinner, EquipmentCard decorative price icon, EquipmentDetailView loading spinner and decorative icons and price text, AddEquipmentView decorative icon (5 instances)
- Seller: CreateProductView decorative icon, SellerDashboardView loading spinner and decorative icon and sales text (3 instances)
- Live: LiveStreamDetailView decorative streamer name text (1 instance)
- Developer: DeveloperDashboardView loading spinner, WebhooksView decorative icon (2 instances)
- Upload: BulkUploadModal decorative icon, FilePreviewCard decorative audio file icon, MetadataForm decorative button text, CoverArtUploadModal decorative icon, LyricsEditorModal decorative icon (5 instances)
- Notifications: NotificationItem decorative follow icon and mark as read button, NotificationBell decorative mark all read link (3 instances)
- Total: ~46 files, ~46 instances replaced
- Preserved: Active/selected states (CloudFileBrowser selected files checkmarks, CreatePostModal post type active state, GroupCard/GroupDetailView public/private badges - semantic indicators, DataExportModal checkbox accents - focus/interaction, AppearanceSettingsView selected theme - active state, PasskeyModal checkbox accent - focus/interaction, LyricsEditorModal checkbox accent - focus/interaction, FileUploadZone drag active state - active state, EquipmentDetailView support link - functional link, FlashSaleModal link - functional link, EquipmentDetailView image indicator dots - active state), primary actions, design system variants
- Action 11.3.1.3 in progress (eleventh batch: social, settings, studio, admin, inventory, seller, live, developer, upload, notifications components)
2026-01-16 10:26:33 +00:00
|
|
|
<Layers className="w-5 h-5 text-kodo-steel" /> New Project
|
2026-01-07 09:31:02 +00:00
|
|
|
</h3>
|
2026-01-13 18:47:57 +00:00
|
|
|
<button onClick={onClose}>
|
2026-01-16 00:56:34 +00:00
|
|
|
<X className="w-5 h-5 text-kodo-content-dim hover:text-white" />
|
2026-01-13 18:47:57 +00:00
|
|
|
</button>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="p-6 space-y-6">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Input
|
|
|
|
|
label="Project Name"
|
|
|
|
|
placeholder="e.g. Neon Genesis"
|
|
|
|
|
value={formData.name}
|
|
|
|
|
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
|
|
|
|
autoFocus
|
|
|
|
|
/>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div>
|
2026-01-16 00:56:34 +00:00
|
|
|
<label className="block text-xs font-bold text-kodo-content-dim uppercase mb-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
Primary Workstation (DAW)
|
|
|
|
|
</label>
|
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="grid grid-cols-3 gap-4">
|
2026-01-13 18:47:57 +00:00
|
|
|
{['Ableton', 'FL Studio', 'Logic Pro'].map((daw) => (
|
|
|
|
|
<button
|
|
|
|
|
key={daw}
|
|
|
|
|
onClick={() => setFormData({ ...formData, daw })}
|
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={`p-4 rounded-lg border text-sm font-bold transition-all ${formData.daw === daw ? 'bg-kodo-cyan/10 border-kodo-cyan text-white' : 'bg-kodo-void border-kodo-steel text-kodo-content-dim hover:border-kodo-steel'}`}
|
2026-01-13 18:47:57 +00:00
|
|
|
>
|
|
|
|
|
{daw}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
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
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="grid grid-cols-2 gap-4">
|
|
|
|
|
<Input
|
|
|
|
|
label="BPM"
|
|
|
|
|
type="number"
|
|
|
|
|
placeholder="128"
|
|
|
|
|
value={formData.bpm}
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
setFormData({ ...formData, bpm: e.target.value })
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Input
|
|
|
|
|
label="Key"
|
|
|
|
|
placeholder="C Minor"
|
|
|
|
|
value={formData.key}
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
setFormData({ ...formData, key: e.target.value })
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div>
|
2026-01-16 00:56:34 +00:00
|
|
|
<label className="block text-xs font-bold text-kodo-content-dim uppercase mb-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
Description
|
|
|
|
|
</label>
|
|
|
|
|
<textarea
|
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 bg-kodo-void border border-kodo-steel rounded-lg p-4 text-white focus:border-kodo-steel outline-none text-sm resize-none h-24"
|
2026-01-13 18:47:57 +00:00
|
|
|
placeholder="Project goals, vibe, or reference tracks..."
|
|
|
|
|
value={formData.description}
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
setFormData({ ...formData, description: e.target.value })
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</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
|
|
|
<div className="p-4 border-t border-kodo-steel bg-kodo-ink flex justify-end gap-4">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Button variant="ghost" onClick={onClose}>
|
|
|
|
|
Cancel
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="primary"
|
|
|
|
|
onClick={handleSubmit}
|
|
|
|
|
disabled={!formData.name}
|
|
|
|
|
>
|
|
|
|
|
Create Project
|
|
|
|
|
</Button>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|