mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-15 20:35:23 +03:00
chore: removenested template literals
This commit is contained in:
parent
8cf9473c88
commit
6e6c3f76ae
3 changed files with 10 additions and 3 deletions
|
@ -167,10 +167,11 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const messageKey = `controlAxisAux${aux_index++}`;
|
||||||
fullChannels_e.append(`\
|
fullChannels_e.append(`\
|
||||||
<div class="number">\
|
<div class="number">\
|
||||||
<div class="channelauxiliary">\
|
<div class="channelauxiliary">\
|
||||||
<span class="channelname">${ i18n.getMessage(`controlAxisAux${ aux_index++}`) }</span>\
|
<span class="channelname">${ i18n.getMessage(messageKey) }</span>\
|
||||||
${ auxAssignment[aux_assignment_index++] }\
|
${ auxAssignment[aux_assignment_index++] }\
|
||||||
</div>\
|
</div>\
|
||||||
<div class="cf_tip channelsetting" title="${ i18n.getMessage("failsafeChannelFallbackSettingsHold") }">\
|
<div class="cf_tip channelsetting" title="${ i18n.getMessage("failsafeChannelFallbackSettingsHold") }">\
|
||||||
|
|
|
@ -205,7 +205,12 @@ firmware_flasher.initialize = function (callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const date = new Date(release.published_at);
|
const date = new Date(release.published_at);
|
||||||
const formattedDate = `${(`0${ date.getDate()}`).slice(-2) }-${ (`0${ date.getMonth() + 1}`).slice(-2) }-${ date.getFullYear() } ${ (`0${ date.getHours()}`).slice(-2) }:${ (`0${ date.getMinutes()}`).slice(-2)}`;
|
const dayOfTheMonth = `0${date.getDate()}`.slice(-2);
|
||||||
|
const month = `0${date.getMonth() + 1}`.slice(-2);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const hours = `0${date.getHours()}`.slice(-2);
|
||||||
|
const minutes = `0${ date.getMinutes()}`.slice(-2);
|
||||||
|
const formattedDate = `${dayOfTheMonth}-${month}-${year} ${hours}:${minutes}`;
|
||||||
const descriptor = {
|
const descriptor = {
|
||||||
"releaseUrl": release.html_url,
|
"releaseUrl": release.html_url,
|
||||||
"name" : version,
|
"name" : version,
|
||||||
|
|
|
@ -233,7 +233,8 @@ TABS.receiver.initialize = function (callback) {
|
||||||
rssi_channel_e.append(`<option value="0">${i18n.getMessage("receiverRssiChannelDisabledOption")}</option>`);
|
rssi_channel_e.append(`<option value="0">${i18n.getMessage("receiverRssiChannelDisabledOption")}</option>`);
|
||||||
//1-4 reserved for Roll Pitch Yaw & Throttle, starting at 5
|
//1-4 reserved for Roll Pitch Yaw & Throttle, starting at 5
|
||||||
for (let i = 5; i < FC.RC.active_channels + 1; i++) {
|
for (let i = 5; i < FC.RC.active_channels + 1; i++) {
|
||||||
rssi_channel_e.append(`<option value="${i}">${i18n.getMessage(`controlAxisAux${ i-4}`)}</option>`);
|
const messageKey = `controlAxisAux${i-4}`;
|
||||||
|
rssi_channel_e.append(`<option value="${i}">${i18n.getMessage(messageKey)}</option>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('select[name="rssi_channel"]').val(FC.RSSI_CONFIG.channel);
|
$('select[name="rssi_channel"]').val(FC.RSSI_CONFIG.channel);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue