mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 00:35:26 +03:00
(rebase) change firmware flasher to button and change name
This commit is contained in:
parent
0e0b7476d1
commit
b4f5b46335
5 changed files with 108 additions and 2 deletions
|
@ -78,6 +78,7 @@ function setupAnalytics(result) {
|
|||
}
|
||||
|
||||
$('.connect_b a.connect').removeClass('disabled');
|
||||
$('.firmware_b a.connect').removeClass('disabled');
|
||||
}
|
||||
|
||||
//Process to execute to real start the app
|
||||
|
@ -149,7 +150,13 @@ function startProcess() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (GUI.allowedTabs.indexOf(tab) < 0) {
|
||||
if (GUI.allowedTabs.indexOf(tab) < 0 && tabName == "Firmware Flasher") {
|
||||
if (GUI.connected_to || GUI.connecting_to) {
|
||||
$('a.connect').click();
|
||||
} else {
|
||||
self.disconnect();
|
||||
}
|
||||
} else if (GUI.allowedTabs.indexOf(tab) < 0) {
|
||||
GUI.log(i18n.getMessage('tabSwitchUpgradeRequired', [tabName]));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,11 @@ function initializeSerialBackend() {
|
|||
}
|
||||
});
|
||||
|
||||
$('div.open_firmware_flasher a.connect').click(function () {
|
||||
$('#tabs ul.mode-disconnected .tab_firmware_flasher a').click();
|
||||
$('div.open_firmware_flasher a.flash_state').text(i18n.getMessage('flashTab'));
|
||||
});
|
||||
|
||||
// auto-connect
|
||||
chrome.storage.local.get('auto_connect', function (result) {
|
||||
if (result.auto_connect === 'undefined' || result.auto_connect) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue