mic indicator during audio recording

This commit is contained in:
2026-05-12 00:23:15 +03:00
parent 297f307588
commit 72e7a0d33b
+34
View File
@@ -245,6 +245,17 @@
<div class="elapsed" class:paused={phase === "paused"}> <div class="elapsed" class:paused={phase === "paused"}>
{elapsed.toFixed(1)}s {elapsed.toFixed(1)}s
</div> </div>
{#if config?.capture.capture_audio}
<div class="mic" class:active={phase === "recording"} title="audio is being captured">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="3" width="6" height="12" rx="3"/>
<path d="M5 11a7 7 0 0 0 14 0"/>
<line x1="12" y1="18" x2="12" y2="22"/>
<line x1="8" y1="22" x2="16" y2="22"/>
</svg>
<span>audio</span>
</div>
{/if}
<div class="row recording-row"> <div class="row recording-row">
<button class="stop big" onclick={stopRec}>stop</button> <button class="stop big" onclick={stopRec}>stop</button>
{#if phase === "recording"} {#if phase === "recording"}
@@ -499,6 +510,29 @@
.recording-row { .recording-row {
justify-content: center; justify-content: center;
} }
.mic {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 999px;
background: #2a1818;
border: 1px solid #4a2222;
color: #b88;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.mic.active {
background: #3a1a1a;
border-color: #c33;
color: #f0c0c0;
animation: mic-pulse 1.8s ease-in-out infinite;
}
@keyframes mic-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(204, 51, 51, 0.5); }
50% { box-shadow: 0 0 0 6px rgba(204, 51, 51, 0); }
}
button { button {
font: inherit; font: inherit;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;