feat: refactor to multi-track only editor with sidebar controls
Major refactor to simplify the editor and focus exclusively on multi-track editing: **AudioEditor Changes:** - Removed single-file waveform view and useAudioPlayer - Removed all single-file editing operations (cut, copy, paste, trim) - Simplified to multi-track only with track selection support - Added selectedTrackId state for track-specific effect chain - Reduced from ~1500 lines to ~290 lines **SidePanel Changes:** - Complete rewrite with 2 tabs: Tracks and Effect Chain - Tracks tab shows all tracks with inline controls (volume, pan, solo, mute) - Click tracks to select/deselect - Effect Chain tab shows effects for selected track - Removed old file/history/info/effects tabs - Sidebar now wider (320px) to accommodate inline track controls **TrackList/Track Changes:** - Added track selection support (isSelected/onSelect props) - Visual feedback with ring border when track is selected - Click anywhere on track to select it **Workflow:** 1. Import or add audio tracks 2. Select a track in the sidebar or main view 3. Apply effects to selected track via Effect Chain tab 4. Adjust track controls (volume, pan, solo, mute) in Tracks tab 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ export interface TrackListProps {
|
||||
zoom: number;
|
||||
currentTime: number;
|
||||
duration: number;
|
||||
selectedTrackId?: string | null;
|
||||
onSelectTrack?: (trackId: string | null) => void;
|
||||
onAddTrack: () => void;
|
||||
onImportTrack?: (buffer: AudioBuffer, name: string) => void;
|
||||
onRemoveTrack: (trackId: string) => void;
|
||||
@@ -24,6 +26,8 @@ export function TrackList({
|
||||
zoom,
|
||||
currentTime,
|
||||
duration,
|
||||
selectedTrackId,
|
||||
onSelectTrack,
|
||||
onAddTrack,
|
||||
onImportTrack,
|
||||
onRemoveTrack,
|
||||
@@ -78,6 +82,8 @@ export function TrackList({
|
||||
zoom={zoom}
|
||||
currentTime={currentTime}
|
||||
duration={duration}
|
||||
isSelected={selectedTrackId === track.id}
|
||||
onSelect={onSelectTrack ? () => onSelectTrack(track.id) : undefined}
|
||||
onToggleMute={() =>
|
||||
onUpdateTrack(track.id, { mute: !track.mute })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user