Additional drag and drop refinements

This commit is contained in:
riversedge
2026-02-05 12:57:33 -05:00
parent 00c783eea9
commit 9c3a3d7515
4 changed files with 139 additions and 63 deletions
+22
View File
@@ -1081,6 +1081,26 @@ export default function App() {
setMobileShowList(false);
};
const handleUseUploadAsReference = (track: { audio_url: string; filename: string }) => {
setPendingAudioSelection({
target: 'reference',
url: track.audio_url,
title: track.filename.replace(/\.[^/.]+$/, ''),
});
setCurrentView('create');
setMobileShowList(false);
};
const handleCoverUpload = (track: { audio_url: string; filename: string }) => {
setPendingAudioSelection({
target: 'source',
url: track.audio_url,
title: track.filename.replace(/\.[^/.]+$/, ''),
});
setCurrentView('create');
setMobileShowList(false);
};
const handleBackFromPlaylist = () => {
setViewingPlaylistId(null);
setCurrentView('library');
@@ -1232,6 +1252,8 @@ export default function App() {
onDeleteMany={handleDeleteSongs}
onUseAsReference={handleUseAsReference}
onCoverSong={handleCoverSong}
onUseUploadAsReference={handleUseUploadAsReference}
onCoverUpload={handleCoverUpload}
/>
</div>