dev/playlists #13

Merged
peterino merged 19 commits from dev/playlists into integration 2026-02-09 18:58:41 +00:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 6901f75dfb - Show all commits

3
public/controls.js vendored
View File

@ -92,6 +92,9 @@
// Play/pause button
M.$("#status-icon").onclick = togglePlayback;
// Expose jumpToTrack for double-click handling
M.jumpToTrack = jumpToTrack;
// Prev/next buttons
M.$("#btn-prev").onclick = () => jumpToTrack(M.currentIndex - 1);
M.$("#btn-next").onclick = () => jumpToTrack(M.currentIndex + 1);

View File

@ -268,6 +268,16 @@
render();
};
// Double-click - queue: jump to track, library/playlist: add to queue
div.ondblclick = (e) => {
if (e.target.closest('.track-actions')) return;
if (type === 'queue') {
M.jumpToTrack(originalIndex);
} else {
addToQueue([trackId]);
}
};
// Context menu
div.oncontextmenu = (e) => {
e.preventDefault();