Skip to content

Commit

Permalink
Fixed progress bar not updating on top header (betaflight#4137)
Browse files Browse the repository at this point in the history
  • Loading branch information
YarosMallorca authored Aug 18, 2024
1 parent 91ccf75 commit 837d6be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<div class="noflash_global" i18n="sensorDataFlashNotFound"></div>
<ul class="dataflash-contents_global">
<div class="legend" i18n="sensorDataFlashFreeSpace"></div>
<progress class="dataflash-progress_global" value="32" max="100"></progress>
<progress class="dataflash-progress_global" max="100"></progress>
</ul>
<div id="expertMode">
<label>
Expand Down
5 changes: 1 addition & 4 deletions src/js/update_dataflash_global.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export function update_dataflash_global() {
display: 'block',
});

$(".progress-bar__fill").css({
width: `${100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100}%`,
display: 'block',
});
$(".dataflash-progress_global").val(`${100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100}`);
$(".dataflash-contents_global div").text(`Dataflash: free ${formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize)}`);
} else {
$(".noflash_global").css({
Expand Down

0 comments on commit 837d6be

Please sign in to comment.