Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
<!-- Single adaptive top header.
In list view: shows Speakr logo + name.
In recording-detail view: title + inline meta + recording action
icons take that slot, so the separate detail header is no longer
needed (it used to add ~72px of vertical chrome). -->
<header class="bg-[var(--bg-secondary)] border-b border-[var(--border-primary)] px-3 sm:px-4 py-2 flex items-center justify-between flex-shrink-0 z-50 gap-3" style="min-height: 56px;">
<!-- Left side: Menu toggle + (logo OR recording title+meta+actions) -->
<div class="flex items-center gap-2 sm:gap-3 min-w-0 flex-1">
<!-- Menu Toggle Button -->
<!-- -mr-2 / sm:-mr-1.5: the button is a 40 / 36 px box around a 16 px
glyph, so its padding reads as extra space before the logo.
Pulling the logo in balances bars, logo and title (12 and 10 px
on phones, 16 and 14 px from sm up). -->
<button @click="toggleSidebar"
class="btn btn--icon header-action flex-shrink-0 -mr-2 sm:-mr-1.5"
:title="isSidebarCollapsed ? t('tooltips.showSidebar') : t('tooltips.hideSidebar')">
<i class="fas fa-bars text-lg"></i>
</button>
<!-- LIST VIEW (or any non-detail screen): Speakr logo + name -->
<div v-if="currentView !== 'detail' || !selectedRecording"
class="flex items-center gap-2.5 sm:gap-3.5 min-w-0">
<img src="{{ url_for('static', filename='img/icon-64.png') }}" srcset="{{ url_for('static', filename='img/icon-64.png') }} 1x, {{ url_for('static', filename='img/icon-128.png') }} 2x" alt="Speakr" class="app-logo w-7 h-7 sm:w-8 sm:h-8 flex-shrink-0">
<h1 class="text-lg sm:text-xl font-bold text-[var(--text-primary)] truncate">Speakr</h1>
</div>
<!-- DETAIL VIEW: recording title + inline meta + action icons.
Replaces the separate desktop-header.html for desktop.
On narrower screens (mobile) we still rely on mobile-header.html
below the global header for full metadata. -->
<template v-else>
<!-- Recording title. The wrapper uses flex-1 + min-w-0 so
the title (h1 or input) can take all remaining
horizontal space in the header row; the previous
flex-shrink without flex-grow sized the wrapper to
content, which made the input collapse to a few dozen
pixels in edit mode. -->
<div class="flex items-center gap-2 min-w-0 flex-1">
<a href="/" class="flex-shrink-0 hidden sm:block sm:mr-1.5" :title="t('tooltips.backToHome')">
<img src="{{ url_for('static', filename='img/icon-64.png') }}" srcset="{{ url_for('static', filename='img/icon-64.png') }} 1x, {{ url_for('static', filename='img/icon-128.png') }} 2x" alt="Speakr" class="app-logo w-7 h-7">
</a>
<h1 v-if="!editingTitle"
@dblclick="selectedRecording.can_edit !== false ? toggleEditTitle() : null"
:class="[
'text-base sm:text-lg font-semibold truncate transition-opacity min-w-0',
selectedRecording.is_shared ? 'text-[var(--text-accent)]' : 'text-[var(--text-primary)]',
selectedRecording.can_edit !== false ? 'cursor-text hover:opacity-80' : ''
]"
dir="auto"
:title="selectedRecording.title || t('help.untitled')">
${selectedRecording.title || t('help.untitled')}
</h1>
<input v-else
v-model="selectedRecording.title"
@blur="saveTitle"
@keyup.enter="saveTitle"
@keyup.esc="cancelEditTitle"
ref="titleInput"
class="text-base sm:text-lg font-semibold bg-transparent border-b border-[var(--border-focus)] focus:outline-none text-[var(--text-primary)] flex-1 px-1 min-w-0"
:placeholder="t('help.untitled')">
<button v-if="!editingTitle && selectedRecording.can_edit !== false"
@click="toggleEditTitle"
class="btn btn--icon btn--sm flex-shrink-0"
:title="t('tooltips.editTitle')">
<i class="fas fa-pen text-xs"></i>
</button>
<!-- Regenerate title (AI). Shown only for completed
recordings, hidden while editing. Re-added per
queue item #4 — was lost when the bespoke
desktop-header.html merged into this adaptive
header. -->
<button v-if="!editingTitle && selectedRecording.can_edit !== false && selectedRecording.status === 'COMPLETED'"
@click="regenerateTitle"
:disabled="regeneratingTitle"
class="btn btn--icon btn--sm flex-shrink-0"
:title="t('tooltips.regenerateTitle')">
<i class="fas fa-sync-alt text-xs" :class="{ 'fa-spin': regeneratingTitle }"></i>
</button>
<!-- Status badge for non-completed recordings -->
<span v-if="!editingTitle && selectedRecording.status !== 'COMPLETED'"
:class="getStatusClass(selectedRecording.status)"
class="inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full whitespace-nowrap flex-shrink-0">
${formatStatus(selectedRecording.status)}
</span>
</div>
</template>
</div>
<!-- Right side: detail-view action icons (when applicable) +
token budget + new recording + user menu -->
<div class="flex items-center gap-1 sm:gap-2 flex-shrink-0">
<!-- DETAIL VIEW: action icons inline in the header bar. Hidden
on narrow screens; mobile-header.html surfaces them in the
expanded meta panel. -->
<template v-if="currentView === 'detail' && selectedRecording && !selectedRecording.incognito">
<!-- Action groups (#394): organize (inbox, star, archive), then
place (folder, tags), then process (a Reprocess menu and
speakers), then share and a More menu holding both deletes. -->
<button @click="toggleInbox(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
:style="selectedRecording.is_inbox ? 'color: #3b82f6;' : ''"
:title="selectedRecording.is_inbox ? t('tooltips.markAsRead') : t('tooltips.moveToInbox')">
<i class="fas fa-inbox"></i>
</button>
<button @click="toggleHighlight(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
:style="selectedRecording.is_highlighted ? 'color: #eab308;' : ''"
:title="selectedRecording.is_highlighted ? t('tooltips.removeHighlight') : t('tooltips.highlight')">
<i class="fas fa-star"></i>
</button>
<button @click="toggleArchive(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
:style="selectedRecording.is_archived ? 'color: var(--text-accent);' : ''"
:aria-pressed="!!selectedRecording.is_archived"
:title="selectedRecording.is_archived ? t('archive.unarchive') : t('archive.archive')">
<i class="fas fa-box-archive"></i>
</button>
<div class="hidden md:block w-px h-5 bg-[var(--border-primary)] mx-0.5"></div>
<!-- Assign-folder dropdown. A custom themed menu, not a raw
<select> (whose OS-rendered option list ignored the app
theme — looked out of place against the dark UI). -->
<div v-if="foldersEnabled && selectedRecording.can_edit !== false" class="relative hidden md:inline-flex">
<button @click.stop="showHeaderFolderMenu = !showHeaderFolderMenu"
data-header-folder-toggle
class="btn btn--icon"
:title="selectedRecording.folder_id ? getFolderName(selectedRecording.folder_id) : t('tooltips.assignFolder')">
<i class="fas fa-folder"
:style="{ color: selectedRecording.folder_id ? getFolderColor(selectedRecording.folder_id) : '' }"></i>
</button>
<div v-if="showHeaderFolderMenu"
data-header-folder-dropdown
class="absolute left-0 mt-2 min-w-[12rem] max-h-72 overflow-y-auto surface-raised z-50 py-1">
<button @click="assignFolderToRecording(selectedRecording.id, null); showHeaderFolderMenu = false"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors"
:class="!selectedRecording.folder_id ? 'text-[var(--text-accent)] font-medium' : ''">
<i class="fas fa-ban w-4 text-center text-[var(--text-muted)]"></i>
<span class="flex-1 truncate">${ t('folderManagement.noFolder') }</span>
<i v-if="!selectedRecording.folder_id" class="fas fa-check text-xs text-[var(--text-accent)]"></i>
</button>
<button v-for="folder in availableFolders" :key="folder.id"
@click="assignFolderToRecording(selectedRecording.id, folder.id); showHeaderFolderMenu = false"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors"
:class="selectedRecording.folder_id == folder.id ? 'font-medium' : ''">
<span class="w-2.5 h-2.5 rounded-full flex-shrink-0" :style="{ backgroundColor: getFolderColor(folder.id) }"></span>
<span class="flex-1 truncate">${ folder.name }</span>
<i v-if="selectedRecording.folder_id == folder.id" class="fas fa-check text-xs text-[var(--text-accent)]"></i>
</button>
</div>
</div>
<button @click="editRecordingTags(selectedRecording)" class="btn btn--icon hidden md:inline-flex"
:title="t('buttons.editTags')">
<i class="fas fa-tags"></i>
</button>
<div class="hidden md:block w-px h-5 bg-[var(--border-primary)] mx-0.5"></div>
<!-- Reprocess menu: transcription and summary for settled
recordings, reset for stuck ones. Transcription needs the
audio, so it is left out once the audio is removed. -->
<div v-if="(selectedRecording.can_edit !== false && (selectedRecording.status === 'COMPLETED' || selectedRecording.status === 'FAILED')) || ['PENDING', 'QUEUED', 'PROCESSING', 'SUMMARIZING', 'FAILED'].includes(selectedRecording.status)"
class="relative hidden md:inline-flex" data-header-reprocess-menu>
<button @click.stop="showHeaderReprocessMenu = !showHeaderReprocessMenu; showHeaderMoreMenu = false"
class="btn btn--icon" :aria-expanded="showHeaderReprocessMenu" aria-haspopup="menu"
:style="['PENDING', 'PROCESSING', 'SUMMARIZING'].includes(selectedRecording.status) ? 'color: rgb(249, 115, 22);' : ''"
:title="t('headerActions.reprocess')" :aria-label="t('headerActions.reprocess')">
<i class="fas fa-redo-alt"></i>
<i class="fas fa-caret-down text-[10px] ml-0.5"></i>
</button>
<div v-if="showHeaderReprocessMenu" role="menu" class="absolute right-0 top-full mt-2 min-w-[15rem] surface-raised z-50 py-1">
<button v-if="selectedRecording.can_edit !== false && (selectedRecording.status === 'COMPLETED' || selectedRecording.status === 'FAILED') && !selectedRecording.audio_deleted_at"
role="menuitem" @click="showHeaderReprocessMenu = false; confirmReprocess('transcription', selectedRecording)"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors whitespace-nowrap">
<i class="fas fa-redo-alt w-4 text-center text-[var(--text-muted)]"></i>
<span v-text="useAsrEndpoint ? t('tooltips.reprocessWithAsr') : t('tooltips.reprocessTranscription')"></span>
</button>
<button v-if="selectedRecording.can_edit !== false && (selectedRecording.status === 'COMPLETED' || selectedRecording.status === 'FAILED')"
role="menuitem" @click="showHeaderReprocessMenu = false; confirmReprocess('summary', selectedRecording)"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors whitespace-nowrap">
<i class="fas fa-sync-alt w-4 text-center text-[var(--text-muted)]"></i>
<span v-text="t('buttons.reprocessSummary')"></span>
</button>
<button v-if="['PENDING', 'QUEUED', 'PROCESSING', 'SUMMARIZING', 'FAILED'].includes(selectedRecording.status)"
role="menuitem" @click="showHeaderReprocessMenu = false; confirmReset(selectedRecording)"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors whitespace-nowrap" style="color: rgb(249, 115, 22);">
<i class="fas fa-undo w-4 text-center"></i>
<span v-text="t('buttons.resetStuckProcessing')"></span>
</button>
</div>
</div>
<button @click="openSpeakerModal" v-if="processedTranscription.hasDialogue"
class="btn btn--icon hidden md:inline-flex"
:title="t('buttons.identifySpeakers')">
<i class="fas fa-user-tag"></i>
</button>
<div class="hidden md:block w-px h-5 bg-[var(--border-primary)] mx-0.5"></div>
<button v-if="!selectedRecording.is_shared || (selectedRecording.share_info && selectedRecording.share_info.can_reshare)"
@click="openUnifiedShareModal(selectedRecording)"
class="btn btn--icon hidden md:inline-flex"
:title="t('buttons.shareRecording')">
<i class="fas fa-share-alt"></i>
</button>
<!-- More menu: the destructive actions, kept one click further away. -->
<div v-if="canDeleteRecordings && selectedRecording.can_delete !== false"
class="relative hidden md:inline-flex" data-header-more-menu>
<button @click.stop="showHeaderMoreMenu = !showHeaderMoreMenu; showHeaderReprocessMenu = false"
class="btn btn--icon" :aria-expanded="showHeaderMoreMenu" aria-haspopup="menu"
:title="t('headerActions.more')" :aria-label="t('headerActions.more')">
<i class="fas fa-ellipsis-vertical"></i>
</button>
<div v-if="showHeaderMoreMenu" role="menu" class="absolute right-0 top-full mt-2 min-w-[15rem] surface-raised z-50 py-1">
<button v-if="!selectedRecording.audio_deleted_at && (selectedRecording.status === 'COMPLETED' || selectedRecording.status === 'FAILED')"
role="menuitem" @click="showHeaderMoreMenu = false; confirmDeleteAudio(selectedRecording)"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors whitespace-nowrap">
<i class="fas fa-volume-xmark w-4 text-center text-[var(--text-muted)]"></i>
<span v-text="((selectedRecording.mime_type && selectedRecording.mime_type.startsWith('video/')) ? t('deleteAudio.actionVideo') : t('deleteAudio.action'))"></span>
</button>
<div v-if="!selectedRecording.audio_deleted_at && (selectedRecording.status === 'COMPLETED' || selectedRecording.status === 'FAILED')"
class="my-1 border-t border-[var(--border-primary)]"></div>
<button role="menuitem" @click="showHeaderMoreMenu = false; confirmDelete(selectedRecording)"
class="w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--bg-tertiary)] transition-colors whitespace-nowrap" style="color: var(--text-danger);">
<i class="fas fa-trash w-4 text-center"></i>
<span v-text="t('headerActions.deleteRecording')"></span>
</button>
</div>
</div>
<!-- Vertical divider between action icons and global controls -->
<div class="hidden md:block w-px h-6 bg-[var(--border-primary)] mx-1"></div>
</template>
{% include 'components/header-controls.html' %}
</div>
</header>