mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-01 06:44:56 +02:00
Merge pull request #412 from mdiller/mdiller_progressbar
Quick Fix for Progressbar Behavior
This commit is contained in:
commit
a09ce3e026
@ -565,7 +565,7 @@ async function doMakeImage(task) {
|
|||||||
if (percent == 100) {
|
if (percent == 100) {
|
||||||
task.progressBar.style.height = "0px"
|
task.progressBar.style.height = "0px"
|
||||||
task.progressBar.style.border = "0px solid var(--background-color3)"
|
task.progressBar.style.border = "0px solid var(--background-color3)"
|
||||||
task['progressBar'].classList.remove("active")
|
task.progressBar.classList.remove("active")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stepUpdate.output !== undefined) {
|
if (stepUpdate.output !== undefined) {
|
||||||
@ -718,6 +718,9 @@ async function checkTasks() {
|
|||||||
|
|
||||||
if (successCount === task.batchCount) {
|
if (successCount === task.batchCount) {
|
||||||
task.outputMsg.innerText = 'Processed ' + task.numOutputsTotal + ' images in ' + time + ' seconds'
|
task.outputMsg.innerText = 'Processed ' + task.numOutputsTotal + ' images in ' + time + ' seconds'
|
||||||
|
task.progressBar.style.height = "0px"
|
||||||
|
task.progressBar.style.border = "0px solid var(--background-color3)"
|
||||||
|
task.progressBar.classList.remove("active")
|
||||||
// setStatus('request', 'done', 'success')
|
// setStatus('request', 'done', 'success')
|
||||||
} else {
|
} else {
|
||||||
if (task.outputMsg.innerText.toLowerCase().indexOf('error') === -1) {
|
if (task.outputMsg.innerText.toLowerCase().indexOf('error') === -1) {
|
||||||
@ -856,7 +859,7 @@ function createTask(task) {
|
|||||||
task['stopTask'].addEventListener('click', async function() {
|
task['stopTask'].addEventListener('click', async function() {
|
||||||
if (task['isProcessing']) {
|
if (task['isProcessing']) {
|
||||||
task.isProcessing = false
|
task.isProcessing = false
|
||||||
task['progressBar'].classList.remove("active")
|
task.progressBar.classList.remove("active")
|
||||||
try {
|
try {
|
||||||
let res = await fetch('/image/stop?session_id=' + sessionId)
|
let res = await fetch('/image/stop?session_id=' + sessionId)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user