1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-15 20:35:23 +03:00

Refactor config storage to use modules (#3189)

This commit is contained in:
Tomas Chmelevskij 2023-01-03 18:08:36 +01:00 committed by GitHub
parent e6cbc22f6b
commit 2a4deed7cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 148 additions and 117 deletions

View file

@ -1,3 +1,5 @@
import { get as getConfig } from './ConfigStorage';
window.TABS = {}; // filled by individual tab js file
const GUI_MODES = {
@ -358,7 +360,7 @@ class GuiControl {
}
}
selectDefaultTabWhenConnected() {
const result = ConfigStorage.get(['rememberLastTab', 'lastTab']);
const result = getConfig(['rememberLastTab', 'lastTab']);
const tab = result.rememberLastTab && result.lastTab ? result.lastTab : 'tab_setup';
$(`#tabs ul.mode-connected .${tab} a`).trigger('click');