Add Jobs clear view, copy log, and latest local engine improvements

This commit is contained in:
justin committed 2026-09-20 16:11:33 -07:00
1 parent f09970fe68
commit 8dd632100c
3 files changed
+98 -33

No files matched your search

+20 -6
View File
@@ -77,7 +77,7 @@ a{color:#64b5f6}
<span class="hint" id="preview-msg"></span>
</div>
<div class="panel" id="trending-panel" style="display:none"><h3>Trending</h3><table id="trending"></table></div>
<div class="panel"><h3>Jobs</h3><table id="jobs"></table></div>
<div class="panel"><div class="row" style="justify-content:space-between"><h3 style="margin:0">Jobs</h3><button class="btn secondary" id="clear-jobs" style="padding:6px 12px;font-size:13px">Clear View</button></div><table id="jobs" style="margin-top:10px"></table></div>
</section>
<section id="settings" class="tab">
<div class="panel row">
@@ -93,8 +93,10 @@ a{color:#64b5f6}
<section id="logs" class="tab">
<div class="panel row">
<label style="margin:0;display:flex;gap:6px;align-items:center"><input type="checkbox" id="autoscroll" checked style="width:auto">Auto scroll</label>
<button class="btn secondary" id="clear">Clear view</button>
<button class="btn secondary" id="copy-log">Copy Log</button>
<button class="btn secondary" id="clear">Clear View</button>
<a href="/api/logs/download">Download full log</a>
<span class="hint" id="copy-msg"></span>
</div>
<div id="log"></div>
</section>
@@ -129,12 +131,12 @@ const FIELDS=[
["sd_model","Image model","text","Hugging Face model id, e.g. stabilityai/sdxl-turbo or stabilityai/stable-diffusion-xl-base-1.0","g"],
["sd_steps","Image steps","number","4 for turbo models, 20 to 30 for standard models","g"],
["sd_guidance","Image guidance","number","0 for turbo models, 7 for standard models","g"],
["sd_width","Image width","number","512 suits turbo. Larger is slower","g"],
["sd_height","Image height","number","896 suits turbo vertical","g"],
["tts_engine","Narration engine","select:auto=Auto|say=macOS say|espeak=espeak-ng|piper=Piper","Auto picks the best available for this machine","g"],
["sd_width","Image width","number","768 avoids duplicated subjects. Larger is slower","g"],
["sd_height","Image height","number","1344 is the correct vertical ratio for SDXL","g"],
["tts_engine","Narration engine","select:auto=Auto|piper=Piper (natural)|say=macOS say|espeak=espeak-ng","Auto uses Piper when a voice file is present, otherwise the system voice","g"],
["tts_voice","Narration voice","text","macOS: Samantha, Alex, Daniel. espeak: en-us","g"],
["tts_rate","Narration speed","number","macOS words per minute (170). espeak uses a similar scale","g"],
["piper_model","Piper voice file","wide","Full path to a .onnx voice, only needed for Piper","g"],
["piper_model","Piper voice file","wide","Blank uses the first voice found in the voices folder under Models","g"],
["gemini_api_key","Gemini API key (Veo)","password","Only needed for the Veo engine. Billing must be enabled","g"],
["veo_model","Veo model","text","e.g. veo-3.1-fast-generate-preview","g"],
["","Text and shared options","header","",""],
@@ -258,6 +260,18 @@ await api("/auth/unlink",{method:"POST"});await loadSettings();refresh()}
else{window.location.href="/auth/start"}};
$("#save").onclick=saveSettings;
$("#clear").onclick=()=>{$("#log").innerHTML=""};
$("#copy-log").onclick=async()=>{
const text=$("#log").innerText.trim();
if(!text){$("#copy-msg").textContent="Nothing to copy";return}
try{await navigator.clipboard.writeText(text);$("#copy-msg").textContent="Copied "+text.split("\n").length+" lines"}
catch(e){
const ta=document.createElement("textarea");ta.value=text;document.body.appendChild(ta);ta.select();
try{document.execCommand("copy");$("#copy-msg").textContent="Copied"}catch(err){$("#copy-msg").textContent="Could not copy"}
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)}};
$("#preview").onclick=async()=>{
$("#preview-msg").textContent="Loading...";
try{