mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 04:45:20 +03:00
Merge pull request #2302 from spracing/rework-last-tab
Allows the user to always open the last tab that was used *before* the CLI tab.
This commit is contained in:
commit
de071bc136
2 changed files with 12 additions and 8 deletions
|
@ -388,13 +388,11 @@ GuiControl.prototype.content_ready = function (callback) {
|
|||
|
||||
GuiControl.prototype.selectDefaultTabWhenConnected = function() {
|
||||
ConfigStorage.get(['rememberLastTab', 'lastTab'], function (result) {
|
||||
if (!(result.rememberLastTab
|
||||
&& !!result.lastTab
|
||||
&& result.lastTab.substring(4) !== "cli")) {
|
||||
if (result.rememberLastTab && result.lastTab) {
|
||||
$(`#tabs ul.mode-connected .${result.lastTab} a`).click();
|
||||
} else {
|
||||
$('#tabs ul.mode-connected .tab_setup a').click();
|
||||
return;
|
||||
}
|
||||
$(`#tabs ul.mode-connected .${result.lastTab} a`).click();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue