mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-11 16:58:31 +01:00
updated progressbar to end more consistently
This commit is contained in:
parent
ae553dfed3
commit
7d29b9901c
@ -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