mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +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
|
@ -219,9 +219,15 @@ function startProcess() {
|
|||
// Tabs
|
||||
$("#tabs ul.mode-connected li").click(function() {
|
||||
// store the first class of the current tab (omit things like ".active")
|
||||
ConfigStorage.set(
|
||||
{lastTab: $(this).attr("class").split(' ')[0]}
|
||||
);
|
||||
const tabName = $(this).attr("class").split(' ')[0];
|
||||
|
||||
const tabNameWithoutPrefix = tabName.substring(4);
|
||||
if (tabNameWithoutPrefix !== "cli") {
|
||||
// Don't store 'cli' otherwise you can never connect to another tab.
|
||||
ConfigStorage.set(
|
||||
{lastTab: tabName},
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
if (GUI.isCordova()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue