mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 04:45:20 +03:00
Fix cli output
Fix rememberLastTab Fix sonar issues
This commit is contained in:
parent
1c775439a1
commit
e85b706ad6
13 changed files with 23 additions and 42 deletions
|
@ -74,19 +74,7 @@ const GuiControl = function () {
|
|||
};
|
||||
|
||||
function GUI_checkOperatingSystem() {
|
||||
if (navigator.appVersion.indexOf("Win") !== -1) {
|
||||
return "Windows";
|
||||
} else if (navigator.appVersion.indexOf("Mac") !== -1) {
|
||||
return "MacOS";
|
||||
} else if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
return "Android";
|
||||
} else if (navigator.appVersion.indexOf("Linux") !== -1) {
|
||||
return "Linux";
|
||||
} else if (navigator.appVersion.indexOf("X11") !== -1) {
|
||||
return "UNIX";
|
||||
} else {
|
||||
return "Unknown";
|
||||
}
|
||||
return navigator.userAgentData.platform;
|
||||
}
|
||||
|
||||
// Timer managing methods
|
||||
|
@ -390,11 +378,9 @@ GuiControl.prototype.content_ready = function (callback) {
|
|||
|
||||
GuiControl.prototype.selectDefaultTabWhenConnected = function() {
|
||||
const result = ConfigStorage.get(['rememberLastTab', 'lastTab']);
|
||||
if (result.rememberLastTab && result.lastTab) {
|
||||
$(`#tabs ul.mode-connected .${result.lastTab} a`).click();
|
||||
} else {
|
||||
$('#tabs ul.mode-connected .tab_setup a').click();
|
||||
}
|
||||
const tab = result.rememberLastTab && result.lastTab ? result.lastTab : 'tab_setup';
|
||||
|
||||
$(`#tabs ul.mode-connected .${tab} a`).trigger('click');
|
||||
};
|
||||
|
||||
GuiControl.prototype.isNWJS = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue