web: Fix progress bar overflowing
This commit is contained in:
parent
baaf84298c
commit
be0e50f983
9
dist/web/source/wasm-config.js
vendored
9
dist/web/source/wasm-config.js
vendored
@ -41,9 +41,12 @@ function monkeyPatch(progressFun) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
monkeyPatch((file, done, total) => {
|
monkeyPatch((file, done, total) => {
|
||||||
let percent = ((done / total) * 100).toFixed(0);
|
if (total === 0 || done > total)
|
||||||
let mibNow = (done / 1024**2).toFixed(1);
|
return;
|
||||||
let mibTotal = (total / 1024**2).toFixed(1);
|
|
||||||
|
const percent = ((done / total) * 100).toFixed(0);
|
||||||
|
const mibNow = (done / 1024**2).toFixed(1);
|
||||||
|
const mibTotal = (total / 1024**2).toFixed(1);
|
||||||
|
|
||||||
let root = document.querySelector(':root');
|
let root = document.querySelector(':root');
|
||||||
root.style.setProperty("--progress", `${percent}%`)
|
root.style.setProperty("--progress", `${percent}%`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user