feat: zmiana ikony play/pause w dashboardzie zależnie od stanu odtwarzania
This commit is contained in:
1 file changed
+8
-6
+8
-6
@@ -358,12 +358,14 @@ function updateUI(status) {
|
||||
}
|
||||
|
||||
// 3. Play/Pause Button State
|
||||
if (status.playing) {
|
||||
playPauseIcon.setAttribute('data-lucide', 'pause');
|
||||
btnPlayPause.title = "Wstrzymaj";
|
||||
} else {
|
||||
playPauseIcon.setAttribute('data-lucide', 'play');
|
||||
btnPlayPause.title = "Odtwarzaj";
|
||||
const targetIcon = status.playing ? 'pause' : 'play';
|
||||
if (btnPlayPause.dataset.state !== targetIcon) {
|
||||
btnPlayPause.dataset.state = targetIcon;
|
||||
btnPlayPause.innerHTML = `<i data-lucide="${targetIcon}"></i>`;
|
||||
btnPlayPause.title = status.playing ? "Wstrzymaj" : "Odtwarzaj";
|
||||
if (window.lucide) {
|
||||
lucide.createIcons();
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Volume State
|
||||
|
||||
Reference in new issue
Block a user