mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 06:15:13 +03:00
chore: add template-curly-spacing
This commit is contained in:
parent
6e6c3f76ae
commit
5be4a4596a
31 changed files with 253 additions and 252 deletions
|
@ -789,17 +789,17 @@ function bit_clear(num, bit) {
|
|||
function update_dataflash_global() {
|
||||
function formatFilesize(bytes) {
|
||||
if (bytes < 1024) {
|
||||
return `${bytes }B`;
|
||||
return `${bytes}B`;
|
||||
}
|
||||
const kilobytes = bytes / 1024;
|
||||
|
||||
if (kilobytes < 1024) {
|
||||
return `${Math.round(kilobytes) }kB`;
|
||||
return `${Math.round(kilobytes)}kB`;
|
||||
}
|
||||
|
||||
const megabytes = kilobytes / 1024;
|
||||
|
||||
return `${megabytes.toFixed(1) }MB`;
|
||||
return `${megabytes.toFixed(1)}MB`;
|
||||
}
|
||||
|
||||
const supportsDataflash = FC.DATAFLASH.totalSize > 0;
|
||||
|
@ -817,7 +817,7 @@ function update_dataflash_global() {
|
|||
width: `${100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100}%`,
|
||||
display: 'block',
|
||||
});
|
||||
$(".dataflash-free_global div").text(`Dataflash: free ${ formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize)}`);
|
||||
$(".dataflash-free_global div").text(`Dataflash: free ${formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize)}`);
|
||||
} else {
|
||||
$(".noflash_global").css({
|
||||
display: 'block',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue