|
|
@ -4,6 +4,7 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
system: (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "dark" : "light",
|
|
|
|
system: (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "dark" : "light",
|
|
|
|
userTheme: localStorage.theme,
|
|
|
|
userTheme: localStorage.theme,
|
|
|
|
|
|
|
|
userHeartbeatBar: localStorage.heartbeatBarTheme
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -13,6 +14,11 @@ export default {
|
|
|
|
this.userTheme = "light";
|
|
|
|
this.userTheme = "light";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Default Heartbeat Bar
|
|
|
|
|
|
|
|
if (! this.userHeartbeatBar) {
|
|
|
|
|
|
|
|
this.userHeartbeatBar = "normal";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
document.body.classList.add(this.theme);
|
|
|
|
document.body.classList.add(this.theme);
|
|
|
|
this.updateThemeColorMeta();
|
|
|
|
this.updateThemeColorMeta();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -35,6 +41,15 @@ export default {
|
|
|
|
document.body.classList.remove(from);
|
|
|
|
document.body.classList.remove(from);
|
|
|
|
document.body.classList.add(this.theme);
|
|
|
|
document.body.classList.add(this.theme);
|
|
|
|
this.updateThemeColorMeta();
|
|
|
|
this.updateThemeColorMeta();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userHeartbeatBar(to, from) {
|
|
|
|
|
|
|
|
localStorage.heartbeatBarTheme = to;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
heartbeatBarTheme(to, from) {
|
|
|
|
|
|
|
|
document.body.classList.remove(from);
|
|
|
|
|
|
|
|
document.body.classList.add(this.heartbeatBarTheme);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|