mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 01:05:15 +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..."
|
"message": "Calibrating..."
|
||||||
},
|
},
|
||||||
"initialSetupButtonReset": {
|
"initialSetupButtonReset": {
|
||||||
"message": "Reset Settings"
|
"message": "Erase Settings"
|
||||||
},
|
},
|
||||||
"initialSetupResetText": {
|
"initialSetupResetText": {
|
||||||
"message": "Reset the flight controller to an <strong>unconfigured state.</strong>"
|
"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"));
|
$("#arming-disable-flag").attr("title", i18n.getMessage("initialSetupArmingDisableFlagsTooltip"));
|
||||||
|
|
||||||
if (isExpertModeEnabled()) {
|
$(".initialSetupReset").toggle(isExpertModeEnabled());
|
||||||
$(".initialSetupRebootBootloader").show();
|
$(".initialSetupRebootBootloader").toggle(isExpertModeEnabled());
|
||||||
} else {
|
|
||||||
$(".initialSetupRebootBootloader").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("a.rebootBootloader").click(function () {
|
$("a.rebootBootloader").click(function () {
|
||||||
const buffer = [];
|
const buffer = [];
|
||||||
|
@ -595,6 +592,18 @@ setup.cleanup = function (callback) {
|
||||||
if (callback) 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;
|
TABS.setup = setup;
|
||||||
|
|
||||||
export { setup };
|
export { setup };
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-col col3">
|
<div class="grid-col col3">
|
||||||
<div class="default_btn">
|
<div class="default_btn initialSetupReset">
|
||||||
<a class="resetSettings" href="#" i18n="initialSetupButtonReset"></a>
|
<a class="resetSettings" href="#" i18n="initialSetupButtonReset"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-col col9">
|
<div class="grid-col col9">
|
||||||
<div class="cell_setup">
|
<div class="cell_setup initialSetupReset">
|
||||||
<span i18n="initialSetupResetText"></span>
|
<span i18n="initialSetupResetText"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue