fix the failures that were failing quietly

This commit is contained in:
2026-09-21 06:22:44 +03:00
parent 371c910068
commit b33ce5bf77
8 changed files with 110 additions and 35 deletions
+11 -3
View File
@@ -62,6 +62,10 @@
try { diagnostics = await api.diagnosticsInfo() } catch { diagnostics = null }
}
function openLogFolder() {
void api.openLogDir().catch(e => console.warn("could not open the log folder:", e))
}
async function save() {
if (!cfg) return
@@ -94,8 +98,12 @@
async function pickOutputDir() {
if (!cfg) return
const picked = await open({ directory: true, defaultPath: cfg.output_dir ?? undefined })
if (typeof picked === "string") cfg.output_dir = picked
try {
const picked = await open({ directory: true, defaultPath: cfg.output_dir ?? undefined })
if (typeof picked === "string") cfg.output_dir = picked
} catch (e) {
console.warn("directory picker failed:", e)
}
}
</script>
@@ -288,7 +296,7 @@
<div class="diag-row">
<span class="field-label">Log folder</span>
<span class="diag-val mono">{diagnostics ? diagnostics.log_dir : "..."}</span>
<button class="btn-ghost compact" onclick={() => api.openLogDir()} disabled={!diagnostics}>Open</button>
<button class="btn-ghost compact" onclick={openLogFolder} disabled={!diagnostics}>Open</button>
</div>
<div class="diag-tail-wrap">
<div class="diag-tail-head">