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:
parent
e6cbc22f6b
commit
2a4deed7cf
15 changed files with 148 additions and 117 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue