Skip to content

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

Python

Add collapsible floating indicator for transcription reprocessing

Murtaza Nasir9586612a1aeb
diff --git a/static/css/styles.css b/static/css/styles.css
index 3d4ba9ea..12368d41 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -1318,6 +1318,104 @@ body {
margin-left: 0.25rem;
}
+/* Floating Processing Indicator */
+.processing-indicator-floating {
+ position: sticky;
+ top: 0;
+ z-index: 15;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: var(--bg-secondary);
+ border: 1px solid var(--border-accent);
+ border-radius: 0.5rem;
+ padding: 0.625rem 0.875rem;
+ margin-bottom: 0.75rem;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ animation: slideDown 0.3s ease-out;
+}
+
+.dark .processing-indicator-floating {
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
+}
+
+@keyframes slideDown {
+ from {
+ opacity: 0;
+ transform: translateY(-10px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.processing-indicator-floating.minimized {
+ position: sticky;
+ top: 0;
+ right: 0;
+ width: auto;
+ padding: 0;
+ background: transparent;
+ border: none;
+ box-shadow: none;
+ justify-content: flex-end;
+ margin-bottom: 0.5rem;
+}
+
+.processing-indicator-content {
+ display: flex;
+ align-items: center;
+ gap: 0.625rem;
+}
+
+.processing-indicator-content i {
+ font-size: 1rem;
+}
+
+.processing-indicator-minimize {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 1.5rem;
+ height: 1.5rem;
+ border: none;
+ background: transparent;
+ color: var(--text-muted);
+ cursor: pointer;
+ border-radius: 0.25rem;
+ transition: all 0.2s ease;
+}
+
+.processing-indicator-minimize:hover {
+ background: var(--bg-tertiary);
+ color: var(--text-primary);
+}
+
+.processing-indicator-expand {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 2rem;
+ height: 2rem;
+ border: 1px solid var(--border-accent);
+ background: var(--bg-secondary);
+ color: var(--text-accent);
+ cursor: pointer;
+ border-radius: 50%;
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
+ transition: all 0.2s ease;
+}
+
+.dark .processing-indicator-expand {
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
+}
+
+.processing-indicator-expand:hover {
+ background: var(--bg-tertiary);
+ transform: scale(1.1);
+}
+
/* Enhanced transcription display with speaker bubbles */
.transcription-with-speakers {
line-height: 1.6;
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 2b8d54ec..51262ea7 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -309,6 +309,7 @@ document.addEventListener('DOMContentLoaded', async () => {
const showDownloadMenu = ref(false);
const currentPlayingSegmentIndex = ref(null);
const followPlayerMode = ref(false);
+ const processingIndicatorMinimized = ref(false);
// --- Chat State ---
const showChat = ref(false);
@@ -462,7 +463,7 @@ document.addEventListener('DOMContentLoaded', async () => {
// Transcription
transcriptionViewMode, legendExpanded, highlightedSpeaker, showDownloadMenu,
- currentPlayingSegmentIndex, followPlayerMode,
+ currentPlayingSegmentIndex, followPlayerMode, processingIndicatorMinimized,
// Chat
showChat, isChatMaximized, chatMessages, chatInput, isChatLoading, chatMessagesRef,
diff --git a/static/js/modules/state/ui.js b/static/js/modules/state/ui.js
index 7ac6689e..58ff0082 100644
--- a/static/js/modules/state/ui.js
+++ b/static/js/modules/state/ui.js
@@ -30,6 +30,7 @@ export function createUIState(ref, computed) {
const transcriptionViewMode = ref('simple');
const legendExpanded = ref(false);
const highlightedSpeaker = ref(null);
+ const processingIndicatorMinimized = ref(false);
// --- Computed Properties ---
const isMobileScreen = computed(() => {
@@ -84,6 +85,7 @@ export function createUIState(ref, computed) {
transcriptionViewMode,
legendExpanded,
highlightedSpeaker,
+ processingIndicatorMinimized,
// Computed
isMobileScreen,
diff --git a/static/locales/de.json b/static/locales/de.json
index 9e6edf87..d0462f96 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -1061,6 +1061,8 @@
"deleteTeam": "Gruppe Löschen",
"removeFromTeam": "Aus Team entfernen",
"followPlayerDisabled": "Automatisches Scrollen aktivieren - Transkript folgt der Audiowiedergabe",
- "followPlayerEnabled": "Automatisches Scrollen deaktivieren - Transkript bleibt an Ort und Stelle"
+ "followPlayerEnabled": "Automatisches Scrollen deaktivieren - Transkript bleibt an Ort und Stelle",
+ "minimize": "Minimieren",
+ "expand": "Erweitern"
}
}
diff --git a/static/locales/en.json b/static/locales/en.json
index ed850698..daab6e94 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -1070,6 +1070,8 @@
"deleteTeam": "Delete Group",
"removeFromTeam": "Remove from team",
"followPlayerDisabled": "Enable auto-scroll - transcript follows audio playback",
- "followPlayerEnabled": "Disable auto-scroll - transcript stays in place"
+ "followPlayerEnabled": "Disable auto-scroll - transcript stays in place",
+ "minimize": "Minimize",
+ "expand": "Expand"
}
}
\ No newline at end of file
diff --git a/static/locales/es.json b/static/locales/es.json
index 4acf67ae..66f08198 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -1067,6 +1067,8 @@
"deleteTeam": "Eliminar Grupo",
"removeFromTeam": "Eliminar del equipo",
"followPlayerDisabled": "Activar desplazamiento automático - la transcripción sigue la reproducción de audio",
- "followPlayerEnabled": "Desactivar desplazamiento automático - la transcripción permanece en su lugar"
+ "followPlayerEnabled": "Desactivar desplazamiento automático - la transcripción permanece en su lugar",
+ "minimize": "Minimizar",
+ "expand": "Expandir"
}
}
\ No newline at end of file
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 0eef8f2d..a28779b7 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -1067,6 +1067,8 @@
"deleteTeam": "Supprimer le Groupe",
"removeFromTeam": "Retirer de l'équipe",
"followPlayerDisabled": "Activer le défilement automatique - la transcription suit la lecture audio",
- "followPlayerEnabled": "Désactiver le défilement automatique - la transcription reste en place"
+ "followPlayerEnabled": "Désactiver le défilement automatique - la transcription reste en place",
+ "minimize": "Réduire",
+ "expand": "Développer"
}
}
\ No newline at end of file
diff --git a/static/locales/zh.json b/static/locales/zh.json
index 6686744b..e65e43c7 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -1215,6 +1215,8 @@
"deleteTeam": "删除群组",
"removeFromTeam": "从团队中移除",
"followPlayerDisabled": "启用自动滚动 - 文字记录跟随音频播放",
- "followPlayerEnabled": "禁用自动滚动 - 文字记录保持位置"
+ "followPlayerEnabled": "禁用自动滚动 - 文字记录保持位置",
+ "minimize": "最小化",
+ "expand": "展开"
}
}
\ No newline at end of file
diff --git a/templates/components/detail/desktop-transcription-panel.html b/templates/components/detail/desktop-transcription-panel.html
index 00f2c3c8..5b40b659 100644
--- a/templates/components/detail/desktop-transcription-panel.html
+++ b/templates/components/detail/desktop-transcription-panel.html
@@ -72,13 +72,32 @@
</div>
<!-- Transcription Content -->
- <div class="flex-1 overflow-y-auto p-4">
- <div v-if="selectedRecording.status === 'PROCESSING'" class="text-center py-8">
- <i class="fas fa-spinner fa-spin text-2xl text-[var(--text-muted)]"></i>
- <p class="mt-2 text-[var(--text-muted)]" v-text="t('help.processingTranscription')"></p>
+ <div class="flex-1 overflow-y-auto p-4 relative">
+ <!-- Floating Processing Indicator -->
+ <div v-if="selectedRecording.status === 'PROCESSING'"
+ :class="['processing-indicator-floating', processingIndicatorMinimized ? 'minimized' : '']">
+ <template v-if="!processingIndicatorMinimized">
+ <div class="processing-indicator-content">
+ <i class="fas fa-spinner fa-spin text-[var(--text-accent)]"></i>
+ <span class="text-sm text-[var(--text-secondary)]" v-text="t('help.processingTranscription')"></span>
+ </div>
+ <button @click="processingIndicatorMinimized = true"
+ class="processing-indicator-minimize"
+ :title="t('tooltips.minimize')">
+ <i class="fas fa-chevron-up"></i>
+ </button>
+ </template>
+ <template v-else>
+ <button @click="processingIndicatorMinimized = false"
+ class="processing-indicator-expand"
+ :title="t('help.processingTranscription')">
+ <i class="fas fa-spinner fa-spin"></i>
+ </button>
+ </template>
</div>
- <div v-else-if="!selectedRecording.transcription" class="text-center py-8">
+ <!-- No transcription state (only show if not processing and no transcription) -->
+ <div v-if="selectedRecording.status !== 'PROCESSING' && !selectedRecording.transcription" class="text-center py-8">
<i class="fas fa-file-text text-3xl text-[var(--text-muted)] mb-3"></i>
<p class="text-[var(--text-muted)]" v-text="t('transcription.noTranscription')"></p>
</div>
diff --git a/templates/components/detail/mobile-transcript-panel.html b/templates/components/detail/mobile-transcript-panel.html
index be1918b5..5b8fe694 100644
--- a/templates/components/detail/mobile-transcript-panel.html
+++ b/templates/components/detail/mobile-transcript-panel.html
@@ -21,16 +21,37 @@
<button @click="openTranscriptionEditor" v-if="selectedRecording && selectedRecording.transcription" class="copy-btn" :title="t('tooltips.editTranscript')"><i class="fas fa-edit"></i></button>
</div>
</div>
- <div class="flex-grow overflow-y-auto mobile-content-box">
- <div v-if="selectedRecording.status === 'PROCESSING'" class="text-center py-8">
- <i class="fas fa-spinner fa-spin text-2xl text-[var(--text-muted)]"></i>
- <p class="mt-2 text-[var(--text-muted)]" v-text="t('help.processingTranscription')"></p>
+ <div class="flex-grow overflow-y-auto mobile-content-box relative">
+ <!-- Floating Processing Indicator (Mobile) -->
+ <div v-if="selectedRecording.status === 'PROCESSING'"
+ :class="['processing-indicator-floating', processingIndicatorMinimized ? 'minimized' : '']">
+ <template v-if="!processingIndicatorMinimized">
+ <div class="processing-indicator-content">
+ <i class="fas fa-spinner fa-spin text-[var(--text-accent)]"></i>
+ <span class="text-sm text-[var(--text-secondary)]" v-text="t('help.processingTranscription')"></span>
+ </div>
+ <button @click="processingIndicatorMinimized = true"
+ class="processing-indicator-minimize"
+ :title="t('tooltips.minimize')">
+ <i class="fas fa-chevron-up"></i>
+ </button>
+ </template>
+ <template v-else>
+ <button @click="processingIndicatorMinimized = false"
+ class="processing-indicator-expand"
+ :title="t('help.processingTranscription')">
+ <i class="fas fa-spinner fa-spin"></i>
+ </button>
+ </template>
</div>
- <div v-else-if="!selectedRecording.transcription" class="text-center py-8">
+
+ <!-- No transcription state (only show if not processing and no transcription) -->
+ <div v-if="!selectedRecording.transcription && selectedRecording.status !== 'PROCESSING'" class="text-center py-8">
<i class="fas fa-file-text text-3xl text-[var(--text-muted)] mb-3"></i>
<p class="text-[var(--text-muted)]" v-text="t('transcription.noTranscription')"></p>
</div>
- <div v-else>
+ <!-- Transcription content (show regardless of processing state if transcription exists) -->
+ <div v-if="selectedRecording.transcription">
<div v-if="!processedTranscription.hasDialogue || transcriptionViewMode === 'simple'" class="transcription-simple-view">
<div v-if="processedTranscription.hasDialogue">
<div v-for="(segment, index) in processedTranscription.simpleSegments" :key="segment.startTime || Math.random()" :class="['speaker-segment', { 'active-playing-segment': currentPlayingSegmentIndex === index }]" @click="seekAudioFromEvent" :data-start-time="segment.startTime" :data-segment-index="index">