add close button to capture frame overlay
This commit is contained in:
@@ -90,6 +90,10 @@
|
||||
async function openPicker() {
|
||||
try { await invoke("open_window_picker") } catch (err) { console.error(err) }
|
||||
}
|
||||
|
||||
async function closeOverlay() {
|
||||
try { await invoke("hide_overlay") } catch {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="overlay">
|
||||
@@ -104,6 +108,12 @@
|
||||
<rect x="7" y="7" width="4" height="4" rx="0.5"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button class="close-btn" onclick={closeOverlay} title="close frame" aria-label="close capture frame">
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round">
|
||||
<line x1="2" y1="2" x2="8" y2="8"/>
|
||||
<line x1="8" y1="2" x2="2" y2="8"/>
|
||||
</svg>
|
||||
</button>
|
||||
{#if phase !== "idle"}
|
||||
<span class="status" class:recording={phase === "recording"}>
|
||||
{phase === "recording" ? "REC" : "PAUSE"}
|
||||
@@ -170,6 +180,20 @@
|
||||
}
|
||||
.pick-btn:hover { background: rgba(20, 184, 166, 0.18); border-color: rgba(20, 184, 166, 0.5); color: #14B8A6; }
|
||||
|
||||
.close-btn {
|
||||
display: grid; place-items: center;
|
||||
width: 20px; height: 20px;
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border: 1px solid rgba(239, 68, 68, 0.25);
|
||||
color: rgba(239, 68, 68, 0.7);
|
||||
border-radius: var(--r-sm);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
transition: all 80ms;
|
||||
margin-left: auto;
|
||||
}
|
||||
.close-btn:hover { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.5); color: #EF4444; }
|
||||
|
||||
.status {
|
||||
margin-left: auto;
|
||||
font-family: var(--mono, 'JetBrains Mono', monospace);
|
||||
|
||||
Reference in New Issue
Block a user