feat: add click-to-load audio on empty track waveform

Changes:
- Empty tracks now show upload icon and "Click to load audio file" message
- Clicking the placeholder opens native file dialog
- Automatically decodes audio file and updates track with AudioBuffer
- Auto-renames track to filename if track name is still default
- Hover effect with background color change for better UX
- Message about drag & drop coming soon

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-18 07:06:46 +01:00
parent 8ffa8e8b81
commit 889b2b91ae
2 changed files with 54 additions and 4 deletions

View File

@@ -104,6 +104,9 @@ export function TrackList({
onUpdateTrack(track.id, { name })
}
onSeek={onSeek}
onLoadAudio={(buffer) =>
onUpdateTrack(track.id, { audioBuffer: buffer })
}
/>
))}
</div>