feat: zmiana ikony play/pause w dashboardzie zależnie od stanu odtwarzania

This commit is contained in:
mmacierzanka committed 2026-07-04 16:38:12 +02:00
1 parent 55c9b7207f
commit 2a399364d8
1 file changed
+8 -6
+8 -6
View File
@@ -358,12 +358,14 @@ function updateUI(status) {
} }
// 3. Play/Pause Button State // 3. Play/Pause Button State
if (status.playing) { const targetIcon = status.playing ? 'pause' : 'play';
playPauseIcon.setAttribute('data-lucide', 'pause'); if (btnPlayPause.dataset.state !== targetIcon) {
btnPlayPause.title = "Wstrzymaj"; btnPlayPause.dataset.state = targetIcon;
} else { btnPlayPause.innerHTML = `<i data-lucide="${targetIcon}"></i>`;
playPauseIcon.setAttribute('data-lucide', 'play'); btnPlayPause.title = status.playing ? "Wstrzymaj" : "Odtwarzaj";
btnPlayPause.title = "Odtwarzaj"; if (window.lucide) {
lucide.createIcons();
}
} }
// 4. Volume State // 4. Volume State