mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Turn input tabs into progress bars
This commit is contained in:
parent
9d60ef5f72
commit
713f10e63a
@ -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",
|
||||
|
@ -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}%)`;
|
||||
|
Loading…
Reference in New Issue
Block a user