added some attributes for themes

https://docs.cider.sh/themes/available-attributes
This commit is contained in:
booploops 2022-05-10 02:17:44 -07:00
parent 44160dc104
commit b432fa4d6b
2 changed files with 7 additions and 2 deletions

View file

@ -828,8 +828,9 @@ const app = new Vue({
}
});
this.mk.addEventListener(MusicKit.Events.playbackStateDidChange, () => {
this.mk.addEventListener(MusicKit.Events.playbackStateDidChange, (event) => {
ipcRenderer.send('wsapi-updatePlaybackState', wsapi.getAttributes());
document.body.setAttribute("playback-state", event.state == 2 ? "playing" : "paused")
})
this.mk.addEventListener(MusicKit.Events.playbackTimeDidChange, (a) => {
@ -887,8 +888,10 @@ const app = new Vue({
if (type.includes("musicVideo") || type.includes("uploadedVideo") || type.includes("music-movie")) {
document.getElementById("apple-music-video-container").style.display = "block";
document.body.setAttribute("video-playing", "true")
// app.chrome.topChromeVisible = false
} else {
document.body.removeAttribute("video-playing")
document.getElementById("apple-music-video-container").style.display = "none";
// app.chrome.topChromeVisible = true
}
@ -3869,12 +3872,14 @@ const app = new Vue({
el.play()
})
document.querySelector("body").classList.remove("stopanimation")
document.body.setAttribute("focus-state", "focused")
this.animateBackground = true
} else {
document.querySelectorAll(".animated-artwork-video").forEach(el => {
el.pause()
})
document.querySelector("body").classList.add("stopanimation")
document.body.setAttribute("focus-state", "blurred")
this.animateBackground = false
}
},