forked from extern/easydiffusion
Show the number of images it'll make in the Make Image button
This commit is contained in:
parent
eb1a276e60
commit
329360aa5b
@ -267,7 +267,7 @@
|
|||||||
<script src="media/js/inpainting-editor.js?v=1"></script>
|
<script src="media/js/inpainting-editor.js?v=1"></script>
|
||||||
<script src="media/js/image-modifiers.js?v=3"></script>
|
<script src="media/js/image-modifiers.js?v=3"></script>
|
||||||
<script src="media/js/auto-save.js?v=1"></script>
|
<script src="media/js/auto-save.js?v=1"></script>
|
||||||
<script src="media/js/main.js?v=3"></script>
|
<script src="media/js/main.js?v=4"></script>
|
||||||
<script src="media/js/themes.js?v=1"></script>
|
<script src="media/js/themes.js?v=1"></script>
|
||||||
<script>
|
<script>
|
||||||
async function init() {
|
async function init() {
|
||||||
|
@ -711,7 +711,7 @@ async function checkTasks() {
|
|||||||
setStatus('request', 'done', 'success')
|
setStatus('request', 'done', 'success')
|
||||||
setTimeout(checkTasks, 500)
|
setTimeout(checkTasks, 500)
|
||||||
stopImageBtn.style.display = 'none'
|
stopImageBtn.style.display = 'none'
|
||||||
makeImageBtn.innerHTML = 'Make Image'
|
renameMakeImageButton()
|
||||||
|
|
||||||
currentTask = null
|
currentTask = null
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ async function checkTasks() {
|
|||||||
setStatus('request', 'fetching..')
|
setStatus('request', 'fetching..')
|
||||||
|
|
||||||
stopImageBtn.style.display = 'block'
|
stopImageBtn.style.display = 'block'
|
||||||
makeImageBtn.innerHTML = 'Enqueue Next Image'
|
renameMakeImageButton()
|
||||||
bellPending = true
|
bellPending = true
|
||||||
|
|
||||||
previewTools.style.display = 'block'
|
previewTools.style.display = 'block'
|
||||||
@ -1123,6 +1123,21 @@ diskPathField.addEventListener('change', handleStringSettingChange(DISK_PATH_KEY
|
|||||||
widthField.addEventListener('change', onDimensionChange)
|
widthField.addEventListener('change', onDimensionChange)
|
||||||
heightField.addEventListener('change', onDimensionChange)
|
heightField.addEventListener('change', onDimensionChange)
|
||||||
|
|
||||||
|
function renameMakeImageButton() {
|
||||||
|
let totalImages = Math.max(parseInt(numOutputsTotalField.value), parseInt(numOutputsParallelField.value))
|
||||||
|
let imageLabel = 'Image'
|
||||||
|
if (totalImages > 1) {
|
||||||
|
imageLabel = totalImages + ' Images'
|
||||||
|
}
|
||||||
|
if (taskQueue.length == 0) {
|
||||||
|
makeImageBtn.innerText = 'Make ' + imageLabel
|
||||||
|
} else {
|
||||||
|
makeImageBtn.innerText = 'Enqueue Next ' + imageLabel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
numOutputsTotalField.addEventListener('change', renameMakeImageButton)
|
||||||
|
numOutputsParallelField.addEventListener('change', renameMakeImageButton)
|
||||||
|
|
||||||
function onDimensionChange() {
|
function onDimensionChange() {
|
||||||
if (!maskSetting.checked) {
|
if (!maskSetting.checked) {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user