mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
save last tab regardless of connection state
This commit is contained in:
parent
1488f1c6c0
commit
f71dcb9c3c
2 changed files with 8 additions and 8 deletions
|
@ -86,19 +86,19 @@ function startProcess() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#tabs ul.mode-connected li").click(function() {
|
||||||
|
// store the first class of the current tab (omit things like ".active")
|
||||||
|
chrome.storage.local.set({
|
||||||
|
lastTab: $(this).attr("class").split(' ')[0]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
GUI.tab_switch_in_progress = true;
|
GUI.tab_switch_in_progress = true;
|
||||||
|
|
||||||
GUI.tab_switch_cleanup(function () {
|
GUI.tab_switch_cleanup(function () {
|
||||||
// disable previously active tab highlight
|
// disable previously active tab highlight
|
||||||
$('li', ui_tabs).removeClass('active');
|
$('li', ui_tabs).removeClass('active');
|
||||||
|
|
||||||
// store last active tab only when connected
|
|
||||||
if (GUI.connected_to) {
|
|
||||||
chrome.storage.local.set({
|
|
||||||
lastTab: $(self).parent().attr("class")
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Highlight selected tab
|
// Highlight selected tab
|
||||||
$(self).parent().addClass('active');
|
$(self).parent().addClass('active');
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="mode-connected mode-connected-cli">
|
<ul class="mode-connected mode-connected-cli">
|
||||||
<li class="tab_cli">
|
<li class="tab_cli">
|
||||||
<a href="#" i18n="tabCLI" class="tabicon ic_cli" i18n_title="tabCLI" data-ignore-reopen="true"></a>
|
<a href="#" i18n="tabCLI" class="tabicon ic_cli" i18n_title="tabCLI"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue