0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00

only one selected

This commit is contained in:
2025-12-27 22:06:19 +01:00
parent 5124765131
commit 8a3c5b2ee8

View File

@@ -340,6 +340,7 @@
const ul = document.getElementById("playlist-ul");
Array.from(ul.children).forEach(c => c.classList.remove("selected"));
Array.from(document.getElementById("dirs-box").children).forEach(c => c.classList.remove("selected"));
Array.from(document.getElementById("subdir-box").children).forEach(c => c.classList.remove("selected"));
el.classList.add("selected");
selectedPlaylistIndex = i;
updateControls()
@@ -373,6 +374,7 @@
}
Array.from(dirsBox.children).forEach(c=>c.classList.remove("selected"));
Array.from(document.getElementById("playlist-ul").children).forEach(c => c.classList.remove("selected"));
Array.from(document.getElementById("subdir-box").children).forEach(c => c.classList.remove("selected"));
node.classList.add("selected");
selectedDir = null;
selectedSubFile = null;
@@ -436,6 +438,7 @@
if (selectedSubFile && selectedDir) {
fullPath = subbasePath.replace(/\/$/, '') + '/' + selectedSubFile;
Array.from(document.getElementById("subdir-box").children).forEach(c => c.classList.remove("selected"));
Array.from(document.getElementById("playlist-ul").children).forEach(c => c.classList.remove("selected"));
selectedSubFile = null;
}
// Priority 2: selected main directory file