diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
---|---|---|
committer | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
commit | f08ae961157d33051b5cd09ba5c77b779096ef69 (patch) | |
tree | 038e0f511d51816c0a971d6093da0420b5677ae0 /javascript/progressbar.js | |
parent | dff60e2e74964a8b02b75ecd8cf8007ef67a9712 (diff) | |
parent | 335428c2c8139dfe07ba096a6defa75036660244 (diff) | |
download | stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.gz stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.bz2 stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.zip |
resolve merge conflicts and swap to dev branch for now
Diffstat (limited to 'javascript/progressbar.js')
-rw-r--r-- | javascript/progressbar.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 4ac9b8db..8d2c3492 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -1,16 +1,15 @@ // code related to showing and updating progressbar shown as the image is being made -function rememberGallerySelection(id_gallery){ +function rememberGallerySelection(){ } -function getGallerySelectedIndex(id_gallery){ +function getGallerySelectedIndex(){ } function request(url, data, handler, errorHandler){ var xhr = new XMLHttpRequest(); - var url = url; xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/json"); xhr.onreadystatechange = function () { @@ -66,7 +65,7 @@ function randomId(){ // starts sending progress requests to "/internal/progress" uri, creating progressbar above progressbarContainer element and // preview inside gallery element. Cleans up all created stuff when the task is over and calls atEnd. // calls onProgress every time there is a progress update -function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgress){ +function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgress, inactivityTimeout=40){ var dateStart = new Date() var wasEverActive = false var parentProgressbar = progressbarContainer.parentNode @@ -107,7 +106,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre divProgress.style.width = rect.width + "px"; } - progressText = "" + let progressText = "" divInner.style.width = ((res.progress || 0) * 100.0) + '%' divInner.style.background = res.progress ? "" : "transparent" @@ -138,7 +137,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre return } - if(elapsedFromStart > 5 && !res.queued && !res.active){ + if(elapsedFromStart > inactivityTimeout && !res.queued && !res.active){ removeProgressBar() return } |