Skip to content

Commit

Permalink
players: Add np_music_{playing,paused}
Browse files Browse the repository at this point in the history
  • Loading branch information
busybox11 committed Feb 27, 2024
1 parent d19caf8 commit 412dc76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/js/playing.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ document.addEventListener('alpine:init', x => {
this.targetImg = img.src;
}
}

// Set DOM classes
document.querySelector('body').classList.toggle('np_music_playing', this.playbackObj.is_playing);
document.querySelector('body').classList.toggle('np_music_paused', !this.playbackObj.is_playing);
}
})
})
2 changes: 1 addition & 1 deletion playing.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}"
x-init="handleMouseMove"
@mousemove.throttle="handleMouseMove"
class="flex h-screen w-screen overflow-hidden"
class="flex h-screen w-screen overflow-hidden np_music_paused"
:style="{
cursor: showOverlay ? 'default' : 'none'
}"
Expand Down

0 comments on commit 412dc76

Please sign in to comment.