fix the failures that were failing quietly
This commit is contained in:
+11
-3
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user