Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Upload modal: Input devices as a disclosure-card, move disable-echo inside it with themed checkbox; outline the open Advanced ASR header
Murtaza Nasir4844d01b8516
diff --git a/static/css/primitives.css b/static/css/primitives.cssindex 3c58d5d7..45ebb650 100644--- a/static/css/primitives.css+++ b/static/css/primitives.css@@ -1680,6 +1680,11 @@ textarea:focus-visible {top, and the panel hangs flush beneath with a shared border. */.disclosure-trigger.is-open {border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;+ /* Outline the header too so it matches the panel below — without+ this the panel had side/bottom borders but the header floated+ with no outline. The header keeps its bottom border, which+ doubles as the divider line to the panel. */+ border: 1px solid var(--border-secondary);}.disclosure-panel {border-radius: 0 0 var(--radius-sm) var(--radius-sm);@@ -1688,6 +1693,78 @@ textarea:focus-visible {}+/* ---- Themed checkbox ---------------------------------------------------+ Reusable accent-filled checkbox with a white tick — the same look as+ the speaker modal's .speaker-checkbox, promoted to a primitive so any+ form can use one consistent themed control instead of the raw browser+ checkbox. Put .checkbox on an <input type="checkbox">. */+input[type="checkbox"].checkbox {+ -webkit-appearance: none;+ -moz-appearance: none;+ appearance: none;+ width: 1.125rem;+ height: 1.125rem;+ border: 2px solid var(--border-secondary);+ border-radius: 0.25rem;+ background-color: var(--bg-input);+ cursor: pointer;+ position: relative;+ transition: all 0.15s ease;+ flex-shrink: 0;+}+input[type="checkbox"].checkbox:hover {+ border-color: var(--text-accent);+ background-color: var(--bg-secondary);+}+input[type="checkbox"].checkbox:focus {+ outline: none;+ border-color: var(--text-accent);+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);+}+input[type="checkbox"].checkbox:checked {+ background-color: var(--text-accent);+ border-color: var(--text-accent);+}+input[type="checkbox"].checkbox:checked::after {+ content: '';+ position: absolute;+ left: 50%;+ top: 50%;+ width: 0.25rem;+ height: 0.5rem;+ border: solid white;+ border-width: 0 2px 2px 0;+ transform: translate(-50%, -60%) rotate(45deg);+}+input[type="checkbox"].checkbox:disabled {+ opacity: 0.5;+ cursor: not-allowed;+}+++/* ---- Generic <details> disclosure card ---------------------------------+ Same idea as .upload-options-group but reusable on any <details>:+ when open the whole element is one bordered card with the summary as+ its header and the body padded inside. Put .disclosure-card on the+ <details> and .disclosure-card-body on the body wrapper. */+details.disclosure-card[open] {+ border: 1px solid var(--border-secondary);+ border-radius: var(--radius-md);+ background: var(--bg-secondary);+}+details.disclosure-card[open] > summary {+ border-radius: var(--radius-md) var(--radius-md) 0 0;+ border-bottom: 1px solid var(--border-secondary);+}+details.disclosure-card[open] > .disclosure-card-body {+ padding: var(--sp-2) var(--sp-3) var(--sp-3);+ margin-top: 0;+}+details.disclosure-card[open] > .disclosure-card-body > *:first-child {+ margin-top: 0;+}++/* ---- Mobile editor flat corners ----------------------------------------On phones the EasyMDE editor spans screen-edge to screen-edge insidethe mobile-summary-panel / mobile-notes-panel editing shells (nodiff --git a/templates/components/upload-view.html b/templates/components/upload-view.htmlindex 3398521d..63e2f434 100644--- a/templates/components/upload-view.html+++ b/templates/components/upload-view.html@@ -294,22 +294,6 @@</span></div>- <!-- Audio-processing opt-out. Chrome's getUserMedia- applies echoCancellation + noiseSuppression +- autoGainControl by default, which is correct for- voice but kills sustained speech / music coming- in through a monitor source or virtual audio- device (the suppressor classifies it as noise- after about a second). Persisted to localStorage. -->- <label class="flex items-start gap-2 mt-2 px-2 py-1.5 rounded-md cursor-pointer hover:bg-[var(--bg-tertiary)] transition-colors">- <input type="checkbox" v-model="disableAudioProcessing"- class="mt-0.5 h-3.5 w-3.5 rounded border-[var(--border-secondary)]">- <span class="text-[11px] flex-1" style="color: var(--text-secondary);">- <strong>${ t('recording.disableAudioProcessingTitle') }</strong>- ${ t('recording.disableAudioProcessingHelp') }- </span>- </label>-<!-- Input device picker (collapsed by default). Letsthe user pick the primary input AND an optionalsecondary input which Speakr mixes in via Web@@ -318,15 +302,17 @@macOS / Linux where the browser can't capture fullOS audio natively. Pre-permission the devicelabels are empty; the inline button calls- getUserMedia briefly to populate them. -->- <details class="text-[11px] mt-1 group">- <summary class="cursor-pointer flex items-center gap-1 px-2 py-1 rounded-md hover:bg-[var(--bg-tertiary)] transition-colors" style="color: var(--text-muted); list-style: none;">+ getUserMedia briefly to populate them. The+ audio-processing opt-out lives inside this group+ too since it's a device-level capture setting. -->+ <details class="disclosure-card text-[11px] mt-1 group">+ <summary class="cursor-pointer flex items-center gap-1 px-2 py-1.5 rounded-md hover:bg-[var(--bg-tertiary)] transition-colors" style="color: var(--text-muted); list-style: none;"><i class="fas fa-sliders-h"></i><span>${ t('recording.inputDevices') }</span><span v-if="selectedSecondaryDeviceId" class="text-green-500 font-medium">· ${ t('recording.mixingTwoInputs') }</span><i class="fas fa-chevron-down ml-auto text-[10px] transition-transform group-open:rotate-180"></i></summary>- <div class="mt-2 space-y-2 px-2 py-2 rounded-md" style="background: var(--bg-tertiary);">+ <div class="disclosure-card-body space-y-2"><div v-if="!inputAudioDevices || inputAudioDevices.length === 0 || !(inputAudioDevices[0] && inputAudioDevices[0].label)"class="text-[11px]" style="color: var(--text-muted);"><i class="fas fa-info-circle mr-1"></i>@@ -378,6 +364,23 @@</p></div></template>++ <!-- Audio-processing opt-out. Chrome's getUserMedia+ applies echoCancellation + noiseSuppression ++ autoGainControl by default, which is correct for+ voice but kills sustained speech / music coming+ in through a monitor source or virtual audio+ device (the suppressor classifies it as noise+ after about a second). It's a device-level+ capture setting so it lives in this group.+ Persisted to localStorage. -->+ <label class="flex items-start gap-2 pt-2 mt-1 border-t border-[var(--border-secondary)] cursor-pointer">+ <input type="checkbox" v-model="disableAudioProcessing" class="checkbox mt-0.5">+ <span class="text-[11px] flex-1" style="color: var(--text-secondary);">+ <strong>${ t('recording.disableAudioProcessingTitle') }</strong>+ ${ t('recording.disableAudioProcessingHelp') }+ </span>+ </label></div></details>