1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 06:15:13 +03:00

Fix forced dark mode if dark mode on OS level

This commit is contained in:
IvoFPV 2019-09-24 12:14:09 +02:00
parent 2395c7a216
commit f397cbcd2d
6 changed files with 33 additions and 37 deletions

View file

@ -27,14 +27,14 @@ var css_dark = [
]
var DarkTheme = {
configEnabled: false,
configEnabled: undefined,
};
DarkTheme.setConfig = function(result) {
if (this.configEnabled != result) {
this.configEnabled = result;
if (this.configEnabled) {
if (this.configEnabled === 0 || this.configEnabled === 2 && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
this.applyDark();
} else {
this.applyNormal();