fix batch: missing cancel_export, overlay lifecycle, audio safety, gif encoding, UI polish

- add cancel_export command with AtomicBool flag
- shut down overlay clickthrough poll thread on app exit
- move set_overlay_clickthrough after capture starts (not before)
- add fps filter to capture pipeline to avoid bloated intermediate files
- add scale.max(0.1) floor in gif balanced mode
- warn when gif encode can't meet target after retries
- increase update apply script timeout and add retry loop
- add SAFETY comments to all 21 unsafe blocks in audio.rs
- remove dead output_path variable in capture.rs
- remove no-op gif_colors.min() call in encode retry
- add error toast dismiss button with 8-second auto-dismiss
- remove test fps values (1,2,5,10) from idle screen
- add duplicate hotkey validation in settings
- change picker window to 2560x1440
- add gitignore exception for src-tauri/gen/schemas/
This commit is contained in:
2026-05-29 23:23:02 +03:00
parent 9e52750a71
commit e9005415c4
8 changed files with 111 additions and 23 deletions
+29 -2
View File
@@ -380,6 +380,14 @@
}
})
// Auto-dismiss error toast
$effect(() => {
if (errMsg) {
const timer = setTimeout(() => { errMsg = null }, 8000)
return () => clearTimeout(timer)
}
})
// Phase label
let phaseLabel = $derived(
phase === "idle" ? "READY" :
@@ -482,7 +490,7 @@
<div class="idle-fps">
<span class="switch-label">Capture FPS</span>
<select bind:value={fps}>
{#each [1, 2, 5, 10, 15, 24, 30, 60] as f}<option value={f}>{f}</option>{/each}
{#each [15, 24, 30, 60] as f}<option value={f}>{f}</option>{/each}
</select>
</div>
</div>
@@ -722,7 +730,7 @@
<label class="control">
<span class="control-label">FPS</span>
<select bind:value={fps} onchange={refreshPreview}>
{#each [1, 2, 5, 10, 15, 24, 30, 60] as f}<option value={f}>{f}</option>{/each}
{#each [15, 24, 30, 60] as f}<option value={f}>{f}</option>{/each}
</select>
</label>
{#if format !== "gif"}
@@ -840,6 +848,12 @@
<circle cx="7" cy="7" r="6"/><line x1="7" y1="4" x2="7" y2="7.5"/><circle cx="7" cy="10" r="0.5" fill="currentColor"/>
</svg>
{errMsg}
<button class="err-dismiss" onclick={() => errMsg = null} aria-label="dismiss error">
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
<line x1="2" y1="2" x2="8" y2="8"/>
<line x1="8" y1="2" x2="2" y2="8"/>
</svg>
</button>
</div>
{/if}
</div>
@@ -1570,6 +1584,19 @@
from { opacity: 0; transform: translateX(-50%) translateY(8px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.err-dismiss {
background: none;
border: none;
color: var(--err);
cursor: pointer;
padding: 0;
display: grid;
place-items: center;
margin-left: 4px;
opacity: 0.6;
transition: opacity 80ms;
}
.err-dismiss:hover { opacity: 1; }
.mono { font-family: var(--mono); }