Skip to content

Commit

Permalink
loading spinner added
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Oct 6, 2023
1 parent 160d50a commit a7eab98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@
<div class="mr-auto">
<h6 class="m-0 font-weight-bold text-primary">Flasher</h6>
</div>
<div id="spinner" class="d-none clearfix">
<div class="spinner-border spinner-border-sm float-right" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="card-body">
<div>
Expand Down
4 changes: 4 additions & 0 deletions js/tool_patcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function loadFW(encoded_firmware)

function loadFirmwareFromUrl(theUrl)
{
$("#spinner").removeClass("d-none");

document.getElementById('console').value = "";
log("Loading file from url: "+ theUrl+'\n')
let res = null;
Expand All @@ -55,6 +57,8 @@ function loadFirmwareFromUrl(theUrl)
}).catch((error) => {
console.error(error);
log('Error while loading firmware, check log above or developer console for details.');
}).finally(()=>{
$("#spinner").addClass("d-none");
});
}

Expand Down

0 comments on commit a7eab98

Please sign in to comment.