1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

DarkTheme auto change when prefers color scheme change

This commit is contained in:
WalcoFPV 2020-06-18 10:08:02 +02:00
parent a52efd7ec8
commit e91c76f89b
2 changed files with 22 additions and 9 deletions

View file

@ -595,6 +595,9 @@ function startProcess() {
setDarkTheme(result.darkTheme);
}
});
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", function() {
DarkTheme.autoSet();
});
}
function setDarkTheme(enabled) {