Turn input tabs into progress bars

This commit is contained in:
j433866 2019-06-10 16:07:01 +01:00
parent 9d60ef5f72
commit 713f10e63a
2 changed files with 7 additions and 1 deletions

View File

@ -212,6 +212,12 @@ class InputWaiter {
handleLoaderMessage(e) {
const r = e.data;
if (r.hasOwnProperty("progress") && r.hasOwnProperty("inputNum")) {
this.manager.tabs.updateInputTabProgress(r.inputNum, r.progress, 100);
} else if (r.hasOwnProperty("fileBuffer")) {
this.manager.tabs.updateInputTabProgress(r.inputNum, 100, 100);
}
if (r.hasOwnProperty("fileBuffer")) {
this.inputWorker.postMessage({
action: "loaderWorkerMessage",

View File

@ -413,7 +413,7 @@ class TabWaiter {
if (tabItem === null) return;
const percentComplete = (progress / total) * 100;
if (percentComplete === 100 || progress === false) {
if (percentComplete >= 100 || progress === false) {
tabItem.style.background = "";
} else {
tabItem.style.background = `linear-gradient(to right, var(--title-background-colour) ${percentComplete}%, var(--primary-background-colour) ${percentComplete}%)`;