mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 05:15:21 +03:00
Add switchable dark mode
This commit is contained in:
parent
dbb7769184
commit
5a5715fa7f
34 changed files with 1524 additions and 1 deletions
|
@ -379,6 +379,15 @@ function startProcess() {
|
|||
CliAutoComplete.setEnabled(checked);
|
||||
}).change();
|
||||
|
||||
$('div.darkTheme input')
|
||||
.prop('checked', DarkTheme.configEnabled)
|
||||
.change(function () {
|
||||
var checked = $(this).is(':checked');
|
||||
|
||||
chrome.storage.local.set({'darkTheme': checked});
|
||||
DarkTheme.setConfig(checked);
|
||||
}).change();
|
||||
|
||||
chrome.storage.local.get('userLanguageSelect', function (result) {
|
||||
|
||||
var userLanguage_e = $('div.userLanguage select');
|
||||
|
@ -543,6 +552,10 @@ function startProcess() {
|
|||
chrome.storage.local.get('cliAutoComplete', function (result) {
|
||||
CliAutoComplete.setEnabled(typeof result.cliAutoComplete == 'undefined' || result.cliAutoComplete); // On by default
|
||||
});
|
||||
|
||||
chrome.storage.local.get('darkTheme', function (result) {
|
||||
DarkTheme.setConfig(result.darkTheme);
|
||||
});
|
||||
};
|
||||
|
||||
function checkForConfiguratorUpdates() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue