Commit 378e04c3 authored by sajolida's avatar sajolida
Browse files

Add progress bar to download page

parent 7b5ec029
......@@ -18,8 +18,7 @@ document.addEventListener('DOMContentLoaded', function() {
showVerificationResult('successful');
}
else if (event.data.action === 'progress'){
var percentage = event.data.percentage;
console.log(percentage)
showVerificationProgress(percentage);
}
});
function showFloatingToggleableLinks() {
......@@ -135,6 +134,11 @@ document.addEventListener('DOMContentLoaded', function() {
show(document.getElementById('verifying-download'));
}
function showVerificationProgress(percentage) {
document.getElementById('progress-bar').style.width = percentage + '%';
document.getElementById('progress-bar').style.width = percentage;
}
function showVerificationResult(result) {
hide(document.getElementById('verify-download-wrapper'));
resetVerificationResult();
......
......@@ -51,7 +51,12 @@
Verify download…
<input id="verify-download" type="file"/>
</label>
<p id="verifying-download" class="block">Verifying $FILENAME&hellip;</p>
<div id="verifying-download">
<p>Verifying $FILENAME&hellip;</p>
<div class="progress">
<div id="progress-bar" class="progress-bar" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<p id="verification-successful" class="block">Verification successful!</p>
<div id="verification-failed">
<p><b>Verification failed!</b></p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment