Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

ui: voice-suggestion pill drops the gradient for the theme primary-button pair (readable in all dark schemes), aligns name and percentage on one size, and uses a concentric 4px radius inside the 8px input (4px inset)

Murtaza Nasir5ba713ce6500
diff --git a/templates/modals/speaker-modal.html b/templates/modals/speaker-modal.html
index 07d33347..9737edab 100644
--- a/templates/modals/speaker-modal.html
+++ b/templates/modals/speaker-modal.html
@@ -133,19 +133,23 @@
:placeholder="speakerMap[speaker].isMe ? currentUserName : t('help.enterNameFor') + ' ' + (speakerDisplayMap[speaker] || speaker)"
autocomplete="off">
- <!-- Voice match suggestion pill — vibrant blue→purple
- gradient is the "AI suggestion" affordance used
- throughout the app; intentionally NOT theme-tinted
- so it stays a recognisable signal against any
- theme background. The white text contrasts cleanly
- against the saturated gradient in both light and
- dark modes. -->
+ <!-- Voice match suggestion pill. Uses the PRIMARY
+ BUTTON token pair (--bg-button/--text-button):
+ it is an actionable "apply this suggestion"
+ control, and the subtle --bg-accent tint is
+ indistinguishable from the input background in
+ the dark schemes. Geometry is concentric with
+ the input: the field's radius is 8px
+ (--radius-md) and the pill is inset 4px on all
+ sides (right-1 + h-5 in the 28px field--sm), so
+ its radius is 8-4=4px (rounded) — the
+ nested-corner rule. -->
<button v-if="shouldShowVoiceSuggestionPill(speaker)"
@click.stop="applyVoiceSuggestion(speaker, voiceSuggestions[speaker][0])"
- class="absolute right-1.5 top-1/2 -translate-y-1/2 px-2 py-0.5 bg-gradient-to-r from-blue-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 text-white text-[10px] rounded-full flex items-center gap-1 transition-all shadow-sm hover:shadow active:scale-95">
+ class="absolute right-1 top-1/2 -translate-y-1/2 h-5 px-2 bg-[var(--bg-button)] hover:bg-[var(--bg-button-hover)] text-[var(--text-button)] text-[10px] rounded flex items-center gap-1 transition-all shadow-sm active:scale-95">
<i class="fas fa-waveform-lines text-[9px]"></i>
<span class="font-medium truncate max-w-[50px] sm:max-w-[80px]">${ voiceSuggestions[speaker][0].name }</span>
- <span class="text-[9px] opacity-90">${ voiceSuggestions[speaker][0].similarity }%</span>
+ <span class="opacity-75">${ voiceSuggestions[speaker][0].similarity }%</span>
</button>
<!-- Loading indicator -->