Only log job list clears that removed something

This commit is contained in:
justin committed 2026-09-20 18:47:04 -07:00
1 parent 71730bc6a7
commit 68df7cfb3c
2 files changed
+12 -6

No files matched your search

+5 -2
View File
@@ -290,8 +290,11 @@ try{document.execCommand("copy");$("#copy-msg").textContent="Copied"}catch(err){
ta.remove()}
setTimeout(()=>{$("#copy-msg").textContent=""},3000)};
$("#clear-jobs").onclick=async()=>{
if(!confirm("Clear the job list? Videos on disk and on YouTube are not touched."))return;
try{await api("/api/history/clear",{method:"POST"});refresh()}catch(e){alert(e.message)}};
const b=$("#clear-jobs");
if(b.disabled)return;
b.disabled=true;
try{await api("/api/history/clear",{method:"POST"});await refresh()}catch(e){alert(e.message)}
b.disabled=false};
$("#preview").onclick=async()=>{
$("#preview-msg").textContent="Loading...";
try{