add confirmation dialogue
This commit is contained in:
parent
8931a825f4
commit
9cc4974d23
|
@ -164,6 +164,8 @@ function selected_tab_id() {
|
|||
|
||||
function trash_prompt(_,_, is_img2img) {
|
||||
|
||||
if(!confirm("Delete prompt?")) return false
|
||||
|
||||
if(selected_tab_id() == "tab_txt2img") {
|
||||
pos_prompt = txt2img_textarea = gradioApp().querySelector("#txt2img_prompt > label > textarea");
|
||||
neg_prompt = txt2img_textarea = gradioApp().querySelector("#txt2img_neg_prompt > label > textarea");
|
||||
|
@ -177,6 +179,8 @@ function trash_prompt(_,_, is_img2img) {
|
|||
pos_prompt.value = ""
|
||||
neg_prompt.value = ""
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user