mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Need expert mode for reset (#4357)
* Need expert mode for reset * Change verbiage and remove unused parameter
This commit is contained in:
parent
4bc6111058
commit
8dc2897a13
3 changed files with 17 additions and 8 deletions
|
@ -830,7 +830,7 @@
|
|||
"message": "Calibrating..."
|
||||
},
|
||||
"initialSetupButtonReset": {
|
||||
"message": "Reset Settings"
|
||||
"message": "Erase Settings"
|
||||
},
|
||||
"initialSetupResetText": {
|
||||
"message": "Reset the flight controller to an <strong>unconfigured state.</strong>"
|
||||
|
|
|
@ -73,11 +73,8 @@ setup.initialize = function (callback) {
|
|||
|
||||
$("#arming-disable-flag").attr("title", i18n.getMessage("initialSetupArmingDisableFlagsTooltip"));
|
||||
|
||||
if (isExpertModeEnabled()) {
|
||||
$(".initialSetupRebootBootloader").show();
|
||||
} else {
|
||||
$(".initialSetupRebootBootloader").hide();
|
||||
}
|
||||
$(".initialSetupReset").toggle(isExpertModeEnabled());
|
||||
$(".initialSetupRebootBootloader").toggle(isExpertModeEnabled());
|
||||
|
||||
$("a.rebootBootloader").click(function () {
|
||||
const buffer = [];
|
||||
|
@ -595,6 +592,18 @@ setup.cleanup = function (callback) {
|
|||
if (callback) callback();
|
||||
};
|
||||
|
||||
setup.expertModeChanged = function () {
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
setup.refresh = function () {
|
||||
const self = this;
|
||||
|
||||
GUI.tab_switch_cleanup(function () {
|
||||
self.initialize();
|
||||
});
|
||||
};
|
||||
|
||||
TABS.setup = setup;
|
||||
|
||||
export { setup };
|
||||
|
|
|
@ -45,12 +45,12 @@
|
|||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="grid-col col3">
|
||||
<div class="default_btn">
|
||||
<div class="default_btn initialSetupReset">
|
||||
<a class="resetSettings" href="#" i18n="initialSetupButtonReset"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-col col9">
|
||||
<div class="cell_setup">
|
||||
<div class="cell_setup initialSetupReset">
|
||||
<span i18n="initialSetupResetText"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue