add confirmation dialogs

This commit is contained in:
dcore94 2023-04-21 15:41:21 +02:00
parent 77f6f49d6f
commit cb51f396fe
1 changed files with 7 additions and 3 deletions

View File

@ -187,8 +187,10 @@ class CCPExecutionHistory extends HTMLElement {
this.#archiveupload.addEventListener("click", ev=>{ this.#archiveupload.addEventListener("click", ev=>{
const link = ev.target.parentElement.querySelector("input").value const link = ev.target.parentElement.querySelector("input").value
if(link){ if(link){
if(confirm("Confirm importing of execution from link?")){
this.fromArchive(link) this.fromArchive(link)
} }
}
}) })
} }
@ -486,9 +488,11 @@ class CCPExecutionHistory extends HTMLElement {
this.reexecute(id, 1) this.reexecute(id, 1)
} }
if(ev.target.getAttribute("name") === "archive"){ if(ev.target.getAttribute("name") === "archive"){
if(confirm("Confirm aarchiving of execution to workspace?")){
const id = ev.currentTarget.getAttribute("data-index") const id = ev.currentTarget.getAttribute("data-index")
this.toArchive(id) this.toArchive(id)
} }
}
}, },
recurse : [ recurse : [
{ {