|
|
|
@ -100,8 +100,23 @@ if (getStorage("alertvolume") == null) {
|
|
|
|
|
setStorage("alertvolume", 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (getStorage("darktheme") == "true") {
|
|
|
|
|
$("#app").addClass("theme-dark");
|
|
|
|
|
function applyColorTheme() {
|
|
|
|
|
if (getStorage("apptheme") == "dark") {
|
|
|
|
|
// dark theme
|
|
|
|
|
$("#app").addClass("theme-dark");
|
|
|
|
|
} else if (getStorage("apptheme") == "light") {
|
|
|
|
|
// light theme
|
|
|
|
|
$("#app").removeClass("theme-dark");
|
|
|
|
|
} else {
|
|
|
|
|
// automatic theme, default light
|
|
|
|
|
if (typeof Framework7.device.prefersColorScheme() !== 'undefined' && Framework7.device.prefersColorScheme() == "dark") {
|
|
|
|
|
$("#app").addClass("theme-dark");
|
|
|
|
|
} else {
|
|
|
|
|
$("#app").removeClass("theme-dark");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
applyColorTheme();
|
|
|
|
|
|
|
|
|
|
router.navigate("/home");
|