|
|
@ -108,13 +108,19 @@ function setAppTheme(theme) {
|
|
|
|
StatusBar.styleDefault();
|
|
|
|
StatusBar.styleDefault();
|
|
|
|
StatusBar.backgroundColorByHexString("#E0E0E0");
|
|
|
|
StatusBar.backgroundColorByHexString("#E0E0E0");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (theme == "dark") {
|
|
|
|
} else if (theme == "dark" || theme == "oleddark") {
|
|
|
|
$("#app").addClass("theme-dark");
|
|
|
|
$("#app").addClass("theme-dark");
|
|
|
|
if (platform_type == "cordova" && cordova.platformId == 'android' && typeof StatusBar !== 'undefined') {
|
|
|
|
if (platform_type == "cordova" && cordova.platformId == 'android' && typeof StatusBar !== 'undefined') {
|
|
|
|
StatusBar.styleLightContent();
|
|
|
|
StatusBar.styleLightContent();
|
|
|
|
StatusBar.backgroundColorByHexString("#000000");
|
|
|
|
StatusBar.backgroundColorByHexString("#000000");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (theme == "oleddark") {
|
|
|
|
|
|
|
|
$("#app").addClass("oled-burn-in");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#app").removeClass("oled-burn-in");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function applyColorTheme() {
|
|
|
|
function applyColorTheme() {
|
|
|
@ -122,6 +128,8 @@ function applyColorTheme() {
|
|
|
|
setAppTheme("dark");
|
|
|
|
setAppTheme("dark");
|
|
|
|
} else if (getStorage("apptheme") == "light") {
|
|
|
|
} else if (getStorage("apptheme") == "light") {
|
|
|
|
setAppTheme("light");
|
|
|
|
setAppTheme("light");
|
|
|
|
|
|
|
|
} else if (getStorage("apptheme") == "oleddark") {
|
|
|
|
|
|
|
|
setAppTheme("oleddark");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// automatic theme, default light
|
|
|
|
// automatic theme, default light
|
|
|
|
if (typeof Framework7.device.prefersColorScheme() !== 'undefined' && Framework7.device.prefersColorScheme() == "dark") {
|
|
|
|
if (typeof Framework7.device.prefersColorScheme() !== 'undefined' && Framework7.device.prefersColorScheme() == "dark") {
|
|
|
|