Skip to content

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

Python

Three small mobile fixes — (a) folder picker on mobile-header switched from a <div class='btn'> wrapper to a <label> with explicit position: relative inline-style; the previous wrapper inherited display: inline-flex from .btn which broke the absolute-positioned hidden <select>'s anchoring on some mobile browsers, so the native dropdown materialised at viewport (0,0) instead of next to the folder icon (visible in the screenshot as the 'No Folder / BSB Work / Custom Prompts' list painted to the top-left edge of the screen); using <label> also lets the entire wrapper be the click target for the hidden select so taps land reliably; (b) inbox + highlight buttons on both mobile-header.html and the global header.html now use :style for the active colour instead of :class — primitives.css's .btn--icon:not(.btn--primary):not(.btn--danger):not(.btn--ghost):not(.btn--quiet) rule has higher specificity than a single Tailwind text-blue-500 / text-yellow-500 utility, so the conditional class never won the cascade and the icons stayed grey regardless of state; inline :style on the button itself sidesteps the specificity contest with the same hex codes Tailwind would have applied (#3b82f6 blue-500, #eab308 yellow-500); (c) empty-state.html gained min-h-[60vh] so the empty/landing surface has visible height on mobile even though its parent <main> has overflow-y: auto and doesn't propagate a flex-stretch context down — without this the flex-1 collapsed to 0 px tall and the user saw a blank screen under the global header when no recording was selected

Murtaza Nasirc65eb7d31ab5
diff --git a/templates/components/detail/empty-state.html b/templates/components/detail/empty-state.html
index 54469be7..a5d7b0c2 100644
--- a/templates/components/detail/empty-state.html
+++ b/templates/components/detail/empty-state.html
@@ -10,8 +10,13 @@
Sits as the landing surface of the main column. The detail view
(its sibling) has its own v-if for the populated state. -->
+<!-- min-h-[60vh] ensures the empty-state has visible height on mobile
+ even when its parent (<main>) has overflow-y: auto and no
+ explicit child-stretching context — without this the flex-1
+ collapsed to 0 height on phones (visible as a blank screen
+ under the global header when no recording is selected). -->
<div v-if="!selectedRecording && currentView !== 'recording'"
- class="flex-1 flex items-center justify-center p-6">
+ class="flex-1 flex items-center justify-center p-6 min-h-[60vh]">
<div class="max-w-md w-full text-center">
<!-- TRULY EMPTY (no recordings at all) -->
<template v-if="!recordings || recordings.length === 0">
diff --git a/templates/components/detail/mobile-header.html b/templates/components/detail/mobile-header.html
index 1b738d4d..9b000c56 100644
--- a/templates/components/detail/mobile-header.html
+++ b/templates/components/detail/mobile-header.html
@@ -166,12 +166,22 @@
<div class="rounded-md overflow-hidden" style="background: var(--bg-tertiary);">
<div class="flex items-center gap-0.5 overflow-x-auto px-1 py-1">
<template v-if="!selectedRecording.incognito">
- <div v-if="foldersEnabled && selectedRecording.can_edit !== false"
- class="btn btn--icon btn--sm relative flex-shrink-0"
- :title="selectedRecording.folder_id ? getFolderName(selectedRecording.folder_id) : 'Assign Folder'">
+ <!-- Folder picker: the wrapper uses display: block
+ + position: relative so the native <select>'s
+ absolute-positioned dropdown anchors to the
+ folder icon button visually, not to (0,0) of
+ the viewport (which was the symptom on mobile
+ when the wrapper inherited inline-flex from
+ .btn). The select is visually invisible via
+ opacity but receives clicks; native OS picker
+ handles the dropdown UI. -->
+ <label v-if="foldersEnabled && selectedRecording.can_edit !== false"
+ class="btn btn--icon btn--sm flex-shrink-0 cursor-pointer"
+ style="position: relative;"
+ :title="selectedRecording.folder_id ? getFolderName(selectedRecording.folder_id) : 'Assign Folder'">
<select @change.stop="assignFolderToRecording(selectedRecording.id, $event.target.value || null)"
:value="selectedRecording.folder_id || ''"
- class="absolute inset-0 w-full h-full opacity-0 cursor-pointer">
+ style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; background: transparent;">
<option value="">No Folder</option>
<option v-for="folder in availableFolders" :key="folder.id" :value="folder.id">
${ folder.name }
@@ -179,14 +189,22 @@
</select>
<i class="fas fa-folder"
:style="{ color: selectedRecording.folder_id ? getFolderColor(selectedRecording.folder_id) : '' }"></i>
- </div>
+ </label>
+ <!-- Inbox / highlight active state uses :style not
+ :class because primitives.css's
+ .btn--icon:not(.btn--primary):not(.btn--danger):not(.btn--ghost):not(.btn--quiet)
+ rule for default colour has higher specificity
+ than a single Tailwind text-* utility, so the
+ conditional text-blue-500 / text-yellow-500
+ classes never won — inline style sidesteps the
+ specificity contest. -->
<button @click.stop="toggleInbox(selectedRecording)"
class="btn btn--icon btn--sm flex-shrink-0"
- :class="selectedRecording.is_inbox ? 'text-blue-500' : ''"
+ :style="selectedRecording.is_inbox ? 'color: #3b82f6;' : ''"
title="Inbox"><i class="fas fa-inbox"></i></button>
<button @click.stop="toggleHighlight(selectedRecording)"
class="btn btn--icon btn--sm flex-shrink-0"
- :class="selectedRecording.is_highlighted ? 'text-yellow-500' : ''"
+ :style="selectedRecording.is_highlighted ? 'color: #eab308;' : ''"
title="Highlight"><i class="fas fa-star"></i></button>
<button @click.stop="editRecordingTags(selectedRecording)"
class="btn btn--icon btn--sm flex-shrink-0"
diff --git a/templates/components/header.html b/templates/components/header.html
index 595f7914..d2510e8d 100644
--- a/templates/components/header.html
+++ b/templates/components/header.html
@@ -101,12 +101,12 @@
:style="{ color: selectedRecording.folder_id ? getFolderColor(selectedRecording.folder_id) : '' }"></i>
</div>
<button @click="toggleInbox(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
- :class="selectedRecording.is_inbox ? 'text-blue-500' : ''"
+ :style="selectedRecording.is_inbox ? 'color: #3b82f6;' : ''"
:title="selectedRecording.is_inbox ? 'Mark as Read' : 'Move to Inbox'">
<i class="fas fa-inbox"></i>
</button>
<button @click="toggleHighlight(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
- :class="selectedRecording.is_highlighted ? 'text-yellow-500' : ''"
+ :style="selectedRecording.is_highlighted ? 'color: #eab308;' : ''"
:title="selectedRecording.is_highlighted ? 'Remove Highlight' : 'Highlight'">
<i class="fas fa-star"></i>
</button>