1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

Fix persistant settings after changing FC

This commit is contained in:
Mark Haslinghuis 2021-02-24 23:08:54 +01:00
parent 9cedeb23ca
commit d5553b2ee1
5 changed files with 138 additions and 62 deletions

View file

@ -151,7 +151,7 @@ Features.prototype.generateElements = function (featuresElements) {
if (listElements.length === 0) {
newElements.push($('<option class="feature" value="-1" i18n="featureNone" />'));
}
const newElement = $(`<option class="feature" id="feature-${i}" name="${rawFeatureName}" value="${featureBit}" i18n="feature${rawFeatureName}" />`);
const newElement = $(`<option class="feature" id="feature${i}" name="${rawFeatureName}" value="${featureBit}" i18n="feature${rawFeatureName}" />`);
newElements.push(newElement);
listElements.push(newElement);
@ -161,7 +161,7 @@ Features.prototype.generateElements = function (featuresElements) {
featureName = `<td><div>${rawFeatureName}</div></td>`;
}
let element = `<tr><td><input class="feature toggle" id="feature-${i}"`;
let element = `<tr><td><input class="feature toggle" id="feature${i}"`;
element += `name="${self._features[i].name}" title="${self._features[i].name}"`;
element += `type="checkbox"/></td><td><div>${featureName}</div>`;
element += `<span class="xs" i18n="feature${self._features[i].name}"></span></td>`;