Store plays at/in in cookie

Closes #73
This commit is contained in:
2024-02-27 11:41:17 +01:00
parent 5acf553269
commit 08cd59ce09

View File

@ -284,11 +284,15 @@
playsIn: {
handler(val, oldVal) {
this.update_infobar();
setCookie("PLAYS_IN", this.playsIn, 14);
}
},
},
mounted() {
this.clockInterval = setInterval(this.update_song_times, 1000);
const stored_playsIn = getCookie("PLAYS_IN");
this.playsIn = (stored_playsIn !== "false");
},
unmounted() {
clearInterval(this.clockInterval);