mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +01:00
Allow empty prompts; Allow collapsing a results box for an empty prompt
This commit is contained in:
parent
ac7a5488ee
commit
2f2bddf020
@ -984,12 +984,19 @@ function createTask(task) {
|
||||
imagePreview.insertBefore(taskEntry, previewTools.nextSibling)
|
||||
|
||||
task.previewPrompt.innerText = task.reqBody.prompt
|
||||
if (task.previewPrompt.innerText.trim() === '') {
|
||||
task.previewPrompt.innerHTML = ' ' // allows the results to be collapsed
|
||||
}
|
||||
|
||||
taskQueue.unshift(task)
|
||||
}
|
||||
|
||||
function getPrompts() {
|
||||
let prompts = promptField.value
|
||||
if (prompts.trim() === '') {
|
||||
return ['']
|
||||
}
|
||||
|
||||
prompts = prompts.split('\n')
|
||||
|
||||
let promptsToMake = []
|
||||
|
Loading…
Reference in New Issue
Block a user