Skip to content

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

Python

Mobile: processing queue is a compact top-right notification instead of a bottom sheet that overlapped the player

Murtaza Nasir0ced0800535d
diff --git a/static/css/primitives.css b/static/css/primitives.css
index 4ace3b13..47b90b35 100644
--- a/static/css/primitives.css
+++ b/static/css/primitives.css
@@ -1914,31 +1914,56 @@ details.disclosure-card[open] {
}
@media (max-width: 640px) {
- /* !important wins against the base-rule values above — the base
- rule's left: 1rem + width: 20rem would otherwise leave the
- popup as a 320 px wide card pinned to the left edge with the
- rest of the screen empty (visible in the prior screenshot as
- the queue "touching the left side" rather than spanning the
- row). Bottom offset: 60 px player content + 56 px bottom nav
- + 12 px breathing room + safe-area inset. */
+ /* On phones the queue is a compact notification parked at the top
+ right, just below the header's metadata row — never the old
+ bottom-sheet, which overlapped the (now taller, video-capable)
+ audio player + bottom nav. Top offset clears the title row +
+ metadata row + safe-area. */
.progress-popup {
- bottom: calc(60px + 56px + 12px + env(safe-area-inset-bottom, 0px)) !important;
- left: 0 !important;
- right: 0 !important;
- width: 100vw !important;
- max-height: 60vh;
- animation: progressSheetUp 220ms cubic-bezier(0.16, 1, 0.3, 1);
+ top: calc(env(safe-area-inset-top, 0px) + 104px) !important;
+ right: 0.5rem !important;
+ left: auto !important;
+ bottom: auto !important;
+ width: auto !important;
+ max-width: min(20rem, calc(100vw - 1rem));
+ animation: progressPopIn 180ms ease;
}
+ /* Expanded: a top-right dropdown card, height-capped + scrollable so a
+ long queue can't run off-screen. */
.progress-popup__card {
- border-radius: 0.75rem 0.75rem 0 0;
- border-left-width: 0;
- border-right-width: 0;
- border-bottom-width: 0;
+ border-radius: 0.6rem;
+ max-height: 60vh;
+ display: flex;
+ flex-direction: column;
+ }
+ .progress-popup__card > .p-2 {
+ overflow-y: auto;
+ }
+
+ /* Minimized = super-compact pill: tasks icon + count + expand chevron
+ only. The desktop "slide down to show header" transform is dropped
+ (the pill IS the header), and the title text / summary line /
+ clear+close are hidden so it stays tiny and out of the way. Tap the
+ pill to expand. */
+ .progress-popup.minimized {
+ transform: none !important;
+ }
+ .progress-popup.minimized .progress-popup__title-text,
+ .progress-popup.minimized .progress-popup__summary,
+ .progress-popup.minimized .progress-popup__clear,
+ .progress-popup.minimized .progress-popup__close {
+ display: none;
+ }
+ .progress-popup.minimized .progress-popup__card {
+ max-height: none;
+ }
+ .progress-popup.minimized .progress-popup__header {
+ cursor: pointer;
}
}
-@keyframes progressSheetUp {
- from { opacity: 0; transform: translateY(100%); }
+@keyframes progressPopIn {
+ from { opacity: 0; transform: translateY(-6px); }
to { opacity: 1; transform: translateY(0); }
}
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 01a8d258..2bc42a54 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -3022,6 +3022,16 @@ document.addEventListener('DOMContentLoaded', async () => {
return unifiedProgressItems.value.length > 0;
});
+ // On phones the queue shows as a compact top-right pill by
+ // default — auto-minimize it when it first appears so it doesn't
+ // pop open over the content. The user can tap to expand. Desktop
+ // (and tablets ≥ 641 px) keep the existing expanded card.
+ watch(showProcessingPopup, (show) => {
+ if (show && windowWidth.value <= 640) {
+ progressPopupMinimized.value = true;
+ }
+ });
+
// All completed items count
const allCompletedCount = computed(() => {
return completedProgressItems.value.length + failedProgressItems.value.length;
diff --git a/templates/components/progress-popup.html b/templates/components/progress-popup.html
index 38ef637e..13c6706c 100644
--- a/templates/components/progress-popup.html
+++ b/templates/components/progress-popup.html
@@ -18,27 +18,30 @@
progressPopupMinimized ? 'minimized' : ''
]">
<div class="progress-popup__card bg-[var(--bg-secondary)] border border-[var(--bg-accent)] shadow-xl overflow-hidden backdrop-blur-sm bg-opacity-95">
- <!-- Compact Header -->
- <div class="bg-gradient-to-r from-[var(--bg-accent)] to-[var(--bg-accent-hover)] px-3 py-2">
+ <!-- Compact Header. On mobile, when minimized this collapses (via
+ CSS) to a compact pill — icon + count + expand chevron — and
+ tapping it expands. -->
+ <div class="progress-popup__header bg-gradient-to-r from-[var(--bg-accent)] to-[var(--bg-accent-hover)] px-3 py-2"
+ @click="progressPopupMinimized && (progressPopupMinimized = false)">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2 min-w-0">
<i class="fas fa-tasks text-sm text-gray-800 dark:text-white"></i>
- <span class="font-medium text-sm text-gray-800 dark:text-white">${ t('progressQueue.title') }</span>
+ <span class="progress-popup__title-text font-medium text-sm text-gray-800 dark:text-white">${ t('progressQueue.title') }</span>
<span class="text-xs bg-black dark:bg-white bg-opacity-20 dark:bg-opacity-20 px-1.5 py-0.5 rounded-full text-gray-800 dark:text-white font-medium">
${totalProcessingCount}
</span>
</div>
<div class="flex items-center gap-1 flex-shrink-0">
- <button v-if="allCompletedCount > 0" @click="clearAllCompleted()"
- class="px-1.5 py-0.5 text-xs bg-black dark:bg-white bg-opacity-10 dark:bg-opacity-20 hover:bg-opacity-20 dark:hover:bg-opacity-30 rounded transition-all text-gray-800 dark:text-white">
+ <button v-if="allCompletedCount > 0" @click.stop="clearAllCompleted()"
+ class="progress-popup__clear px-1.5 py-0.5 text-xs bg-black dark:bg-white bg-opacity-10 dark:bg-opacity-20 hover:bg-opacity-20 dark:hover:bg-opacity-30 rounded transition-all text-gray-800 dark:text-white">
${ t('progressQueue.clear') }
</button>
- <button @click="progressPopupMinimized = !progressPopupMinimized"
+ <button @click.stop="progressPopupMinimized = !progressPopupMinimized"
class="p-1 rounded hover:bg-black dark:hover:bg-white hover:bg-opacity-10 dark:hover:bg-opacity-20 transition-colors text-gray-800 dark:text-white">
<i :class="progressPopupMinimized ? 'fas fa-chevron-up text-xs' : 'fas fa-chevron-down text-xs'"></i>
</button>
- <button @click="progressPopupClosed = true"
- class="p-1 rounded hover:bg-red-500 hover:bg-opacity-30 text-gray-800 dark:text-white hover:text-red-600 dark:hover:text-red-400 transition-colors">
+ <button @click.stop="progressPopupClosed = true"
+ class="progress-popup__close p-1 rounded hover:bg-red-500 hover:bg-opacity-30 text-gray-800 dark:text-white hover:text-red-600 dark:hover:text-red-400 transition-colors">
<i class="fas fa-times text-xs"></i>
</button>
</div>
@@ -49,7 +52,7 @@
object literal like `{ count: ... }`, so we keep the count and
the localized noun as separate interpolations and translate the
label alone via progressQueue.*Short keys. -->
- <div v-if="activeProgressItems.length > 0" class="text-xs text-gray-800 dark:text-white opacity-70 mt-1">
+ <div v-if="activeProgressItems.length > 0" class="progress-popup__summary text-xs text-gray-800 dark:text-white opacity-70 mt-1">
<span v-if="activeProgressItems.filter(i => i.status === 'uploading').length > 0">
${ activeProgressItems.filter(i => i.status === 'uploading').length } ${ t('progressQueue.uploadingShort') }<span v-if="activeProgressItems.filter(i => i.status !== 'uploading').length > 0">, </span>
</span>