Fix progress bar when done processing
This commit is contained in:
parent
5b789f4674
commit
e11af67668
1 changed files with 4 additions and 0 deletions
|
|
@ -320,14 +320,18 @@
|
|||
// Handle status messages
|
||||
if (data.status === "cancelled") {
|
||||
progressText.textContent = "Processing cancelled.";
|
||||
progressBar.value = progressBar.max;
|
||||
} else if (data.status === "done") {
|
||||
progressText.textContent = "Processing complete!";
|
||||
progressBar.value = progressBar.max;
|
||||
} else if (data.status === "compiling_video") {
|
||||
progressText.textContent = "Images generated, creating video";
|
||||
} else if (data.status === "video_done") {
|
||||
progressText.textContent = "Video compilation complete!";
|
||||
progressBar.value = progressBar.max;
|
||||
} else if (data.status.startsWith("error:")) {
|
||||
progressText.textContent = data.status;
|
||||
progressBar.value = progressBar.max;
|
||||
} else if (data.total > 0) {
|
||||
progressBar.max = data.total;
|
||||
progressBar.value = data.completed;
|
||||
|
|
|
|||
Loading…
Reference in a new issue