0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-27 06:03:52 +01:00

something

This commit is contained in:
2025-12-27 22:16:33 +01:00
parent c1e3452bb6
commit b83cd98b49

View File

@@ -117,9 +117,9 @@
<div class="listbox" id="subdir-box"></div> <div class="listbox" id="subdir-box"></div>
</div> </div>
</div> </div>
<div style="margin-top:8px"> <div style="margin-top:8px; display: flex; gap: 8px;">
<button id="add-to-queue-btn" class="btn primary" style="width:50%">Add Selected File to the bottom of the Queue</button> <button id="add-to-queue-btn" class="btn primary" style="flex: 1;">Add to Bottom of Queue</button>
<button id="add-to-queue2-btn" class="btn primary" style="width:50%">Add Selected File to the top of the Queue</button> <button id="add-to-queue2-btn" class="btn primary" style="flex: 1;">Add to Top of Queue</button>
</div> </div>
</div> </div>
</div> </div>
@@ -427,7 +427,7 @@
const selected = playlist[selectedPlaylistIndex]; const selected = playlist[selectedPlaylistIndex];
if(!selected) { alert("Invalid selection"); return; } if(!selected) { alert("Invalid selection"); return; }
const path = (selected.official ? "" : "!") + selected.path; const path = (selected.official ? "" : "!") + selected.path;
ws.send(JSON.stringify({action:"add_to_toplay", songs: [path]})) ws.send(JSON.stringify({action:"add_to_toplay", songs: [path], on_top: top}))
Array.from(document.getElementById("playlist-ul").children).forEach(c => c.classList.remove("selected")); Array.from(document.getElementById("playlist-ul").children).forEach(c => c.classList.remove("selected"));
selectedPlaylistIndex = null; selectedPlaylistIndex = null;
return; return;
@@ -458,8 +458,8 @@
return false; return false;
} }
document.getElementById("add-to-queue-btn").addEventListener("click", addSelectedFileToQueue, false); document.getElementById("add-to-queue-btn").addEventListener("click", () => addSelectedFileToQueue(false));
document.getElementById("add-to-queue2-btn").addEventListener("click", addSelectedFileToQueue, true); document.getElementById("add-to-queue2-btn").addEventListener("click", () => addSelectedFileToQueue(true));
function updateControls() { function updateControls() {
document.getElementById("clear-btn").disabled = document.getElementById("clear-btn").disabled =