dev/playlists #13
|
|
@ -92,6 +92,9 @@
|
||||||
// Play/pause button
|
// Play/pause button
|
||||||
M.$("#status-icon").onclick = togglePlayback;
|
M.$("#status-icon").onclick = togglePlayback;
|
||||||
|
|
||||||
|
// Expose jumpToTrack for double-click handling
|
||||||
|
M.jumpToTrack = jumpToTrack;
|
||||||
|
|
||||||
// Prev/next buttons
|
// Prev/next buttons
|
||||||
M.$("#btn-prev").onclick = () => jumpToTrack(M.currentIndex - 1);
|
M.$("#btn-prev").onclick = () => jumpToTrack(M.currentIndex - 1);
|
||||||
M.$("#btn-next").onclick = () => jumpToTrack(M.currentIndex + 1);
|
M.$("#btn-next").onclick = () => jumpToTrack(M.currentIndex + 1);
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,16 @@
|
||||||
render();
|
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
|
// Context menu
|
||||||
div.oncontextmenu = (e) => {
|
div.oncontextmenu = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue