Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Pass E content: mobile summary/notes/chat panels rebuilt with primitives — empty/spinner/banner states use the new components, action toolbars use btn--icon, inputs use field, send button is btn--primary --icon --lg, prose-flush replaces summary-box/notes-box card chrome so mobile content sits flush on the surface like desktop; same design language carried from desktop tabs through mobile content
Murtaza Nasirca8c18cf3f4d
diff --git a/templates/components/detail/mobile-chat-panel.html b/templates/components/detail/mobile-chat-panel.htmlindex 809fc375..eb6a3edb 100644--- a/templates/components/detail/mobile-chat-panel.html+++ b/templates/components/detail/mobile-chat-panel.html@@ -1,17 +1,19 @@-<!-- Mobile Chat Panel -->-<div v-if="mobileTab === 'chat'" class="h-full flex flex-col rounded-lg border border-[var(--border-primary)] overflow-hidden relative">- <!-- Clear button - fixed at top right -->+<!-- Mobile Chat Panel (design system v1) -->+<div v-if="mobileTab === 'chat'" class="h-full flex flex-col overflow-hidden relative">+ <!-- Clear button --><button v-if="chatMessages.length > 0"@click="clearChat"- class="absolute top-2 right-2 p-1 text-[var(--text-muted)] opacity-60 hover:opacity-100 hover:text-[var(--text-danger)] rounded transition-all duration-200 z-20"+ class="btn btn--icon btn--sm absolute"+ style="top: var(--sp-2); right: var(--sp-2); z-index: 20; color: var(--text-muted);"title="Clear chat">- <i class="fas fa-times text-xs"></i>+ <i class="fas fa-times"></i></button>- <div ref="chatMessagesRef" class="flex-1 overflow-y-auto p-4 space-y-4 bg-[var(--bg-secondary)]">- <div v-if="chatMessages.length === 0" class="text-center py-8">- <i class="fas fa-robot text-3xl text-[var(--text-muted)] mb-3"></i>- <p class="text-[var(--text-muted)]" v-text="t('help.askAboutTranscription')"></p>+ <div ref="chatMessagesRef" class="flex-1 overflow-y-auto px-3 py-3 space-y-4">+ <div v-if="chatMessages.length === 0" class="empty">+ <div class="empty__icon"><i class="fas fa-robot"></i></div>+ <div class="empty__title" v-text="t('help.askAboutTranscription')"></div>+ <div class="empty__body">Type a question below. Markdown supported.</div></div><div v-for="(message, index) in chatMessages" :key="index":class="['message relative group', message.role === 'user' ? 'user-message ml-auto' : 'ai-message',@@ -19,11 +21,12 @@<!-- Copy button for assistant messages --><button v-if="message.role === 'assistant'"@click="copyMessage(message.content, $event)"- class="absolute top-2 right-2 p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-tertiary)] rounded transition-all duration-200"+ class="btn btn--icon btn--sm absolute"+ style="top: var(--sp-2); right: var(--sp-2);":title="t('buttons.copyMessage')">- <i class="fas fa-copy text-sm"></i>+ <i class="fas fa-copy"></i></button>- <!-- Show thinking content if available -->+ <!-- Thinking content --><div v-if="message.thinking && message.role === 'assistant'" class="mb-2"><button @click="message.thinkingExpanded = !message.thinkingExpanded"class="text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] flex items-center gap-1">@@ -32,7 +35,7 @@<span class="text-[var(--text-muted)]">(${message.thinking.split('\n').length} lines)</span></button><div v-if="message.thinkingExpanded"- class="mt-2 p-3 bg-[var(--bg-tertiary)] border border-[var(--border-secondary)] rounded-lg text-xs text-[var(--text-muted)] max-h-64 overflow-y-auto">+ class="mt-2 p-3 bg-[var(--bg-tertiary)] border border-[var(--border-primary)] rounded-md text-xs text-[var(--text-muted)] max-h-64 overflow-y-auto"><pre class="whitespace-pre-wrap font-mono">${message.thinking}</pre></div></div>@@ -40,20 +43,30 @@<div v-if="message.html" v-html="message.html"></div><div v-else class="whitespace-pre-wrap">${message.content}</div></div>- <div v-if="isChatLoading" class="ai-message">- <i class="fas fa-spinner fa-spin mr-2"></i> ${ t('chat.thinking') }+ <div v-if="isChatLoading" class="ai-message flex items-center gap-2">+ <div class="spinner"></div>+ <span v-text="t('chat.thinking')"></span></div></div>- <div class="border-t border-[var(--border-primary)] p-4 bg-[var(--bg-tertiary)]">- <div class="flex gap-2">- <textarea v-model="chatInput" ref="chatInputRef" @keydown="handleChatKeydown" :disabled="selectedRecording.status !== 'COMPLETED' || processedTranscription.isError" :placeholder="t('chat.placeholder')" class="flex-1 px-3 py-2 bg-[var(--bg-input)] border border-[var(--border-secondary)] rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-[var(--ring-focus)] text-sm" rows="2"></textarea>- <button @click="sendChatMessage" :disabled="!chatInput.trim() || isChatLoading || selectedRecording.status !== 'COMPLETED' || processedTranscription.isError" class="px-4 py-2 bg-[var(--bg-button)] text-[var(--text-button)] rounded-lg hover:bg-[var(--bg-button-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed">+ <div class="border-t border-[var(--border-primary)] px-3 py-3">+ <div class="flex gap-2 items-end">+ <textarea v-model="chatInput"+ ref="chatInputRef"+ @keydown="handleChatKeydown"+ :disabled="selectedRecording.status !== 'COMPLETED' || processedTranscription.isError"+ :placeholder="t('chat.placeholder')"+ class="field"+ style="resize: none;"+ rows="2"></textarea>+ <button @click="sendChatMessage"+ :disabled="!chatInput.trim() || isChatLoading || selectedRecording.status !== 'COMPLETED' || processedTranscription.isError"+ class="btn btn--primary btn--icon btn--lg"><i class="fas fa-paper-plane"></i></button></div>- <p v-if="processedTranscription.isError" class="text-xs text-amber-500 mt-2">- <i class="fas fa-exclamation-triangle mr-1"></i>- ${ t('chat.cannotChatTranscriptionFailed') }- </p>+ <div v-if="processedTranscription.isError" class="t-meta mt-2 flex items-center gap-1.5" style="color: var(--text-danger);">+ <i class="fas fa-exclamation-triangle"></i>+ <span v-text="t('chat.cannotChatTranscriptionFailed')"></span>+ </div></div></div>diff --git a/templates/components/detail/mobile-notes-panel.html b/templates/components/detail/mobile-notes-panel.htmlindex 52152463..3e637dcb 100644--- a/templates/components/detail/mobile-notes-panel.html+++ b/templates/components/detail/mobile-notes-panel.html@@ -1,26 +1,28 @@-<!-- Mobile Notes Panel -->-<div v-if="mobileTab === 'notes'" class="h-full flex flex-col space-y-4">- <div class="flex items-center justify-end gap-2 flex-shrink-0 pr-3">- <button @click="copyNotes" class="copy-btn" :title="t('buttons.copyNotes')"><i class="fas fa-copy"></i></button>- <button @click="downloadNotes" class="copy-btn" :title="t('buttons.downloadAsWord')"><i class="fas fa-download"></i></button>- <button @click="toggleEditNotes" class="copy-btn" :title="t('buttons.editNotes')"><i class="fas fa-edit"></i></button>+<!-- Mobile Notes Panel (design system v1) -->+<div v-if="mobileTab === 'notes'" class="h-full flex flex-col">+ <div class="flex items-center justify-end gap-1 flex-shrink-0 px-3 py-2">+ <button v-if="selectedRecording.notes" @click="copyNotes" class="btn btn--icon" :title="t('buttons.copyNotes')"><i class="fas fa-copy"></i></button>+ <button v-if="selectedRecording.notes" @click="downloadNotes" class="btn btn--icon" :title="t('buttons.downloadAsWord')"><i class="fas fa-download"></i></button>+ <button @click="toggleEditNotes" class="btn btn--icon" :title="t('buttons.editNotes')"><i class="fas fa-pen"></i></button></div>- <div class="flex-grow overflow-y-auto mobile-content-box">+ <div class="flex-grow overflow-y-auto px-3 pb-3"><div v-if="editingNotes" class="h-full flex flex-col">- <div class="markdown-editor-container flex-1">- <textarea ref="notesMarkdownEditor" v-model="selectedRecording.notes"></textarea>- </div>+ <textarea ref="notesMarkdownEditor"+ v-model="selectedRecording.notes"+ class="field flex-1"+ style="resize: none; padding: var(--sp-3);"></textarea><div class="flex justify-end gap-2 mt-2">- <button @click="cancelEditNotes" class="px-3 py-1 text-sm bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-secondary)] rounded hover:bg-[var(--bg-tertiary)]" v-text="t('common.cancel')"></button>- <button @click="saveEditNotes" class="px-3 py-1 text-sm bg-[var(--bg-button)] text-[var(--text-button)] border border-transparent rounded hover:bg-[var(--bg-button-hover)]" v-text="t('common.save')"></button>+ <button @click="cancelEditNotes" class="btn btn--sm btn--ghost" v-text="t('common.cancel')"></button>+ <button @click="saveEditNotes" class="btn btn--sm btn--primary" v-text="t('common.save')"></button></div></div><div v-else @click="clickToEditNotes">- <div v-if="!selectedRecording.notes" class="text-center py-8 cursor-pointer hover:text-[var(--text-secondary)]">- <i class="fas fa-sticky-note text-3xl text-[var(--text-muted)] mb-3"></i>- <p class="text-[var(--text-muted)]" v-text="t('help.clickToAddNotes')"></p>+ <div v-if="!selectedRecording.notes" class="empty">+ <div class="empty__icon"><i class="fas fa-sticky-note"></i></div>+ <div class="empty__title" v-text="t('help.clickToAddNotes')"></div>+ <div class="empty__body">Markdown supported.</div></div>- <div v-else class="notes-box h-full" v-html="selectedRecording.notes_html || selectedRecording.notes"></div>+ <div v-else class="prose-flush h-full" v-html="selectedRecording.notes_html || selectedRecording.notes"></div></div></div></div>diff --git a/templates/components/detail/mobile-summary-panel.html b/templates/components/detail/mobile-summary-panel.htmlindex d0ddc96d..55d10913 100644--- a/templates/components/detail/mobile-summary-panel.html+++ b/templates/components/detail/mobile-summary-panel.html@@ -1,53 +1,50 @@-<!-- Mobile Summary Panel -->-<div v-if="mobileTab === 'summary'" class="h-full flex flex-col space-y-4">- <div class="flex items-center justify-end gap-2 flex-shrink-0 pr-3">- <button @click="copySummary" class="copy-btn" :title="t('buttons.copySummary')"><i class="fas fa-copy"></i></button>- <button @click="downloadSummary" class="copy-btn" :title="t('buttons.downloadAsWord')"><i class="fas fa-download"></i></button>- <button @click="toggleEditSummary" class="copy-btn" :title="t('buttons.editSummary')"><i class="fas fa-edit"></i></button>+<!-- Mobile Summary Panel (design system v1) -->+<div v-if="mobileTab === 'summary'" class="h-full flex flex-col">+ <!-- Action toolbar -->+ <div class="flex items-center justify-end gap-1 flex-shrink-0 px-3 py-2">+ <button v-if="selectedRecording.summary" @click="copySummary" class="btn btn--icon" :title="t('buttons.copySummary')"><i class="fas fa-copy"></i></button>+ <button v-if="selectedRecording.summary" @click="downloadSummary" class="btn btn--icon" :title="t('buttons.downloadAsWord')"><i class="fas fa-download"></i></button>+ <button @click="toggleEditSummary" class="btn btn--icon" :title="t('buttons.editSummary')"><i class="fas fa-pen"></i></button></div>- <div class="flex-grow overflow-y-auto mobile-content-box">+ <div class="flex-grow overflow-y-auto px-3 pb-3"><div v-if="editingSummary" class="h-full flex flex-col">- <div class="markdown-editor-container flex-1">- <textarea ref="summaryMarkdownEditor" v-model="selectedRecording.summary"></textarea>- </div>+ <textarea ref="summaryMarkdownEditor"+ v-model="selectedRecording.summary"+ class="field flex-1"+ style="resize: none; padding: var(--sp-3);"></textarea><div class="flex justify-end gap-2 mt-2">- <button @click="cancelEditSummary" class="px-3 py-1 text-sm bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-secondary)] rounded hover:bg-[var(--bg-tertiary)]" v-text="t('common.cancel')"></button>- <button @click="saveEditSummary" class="px-3 py-1 text-sm bg-[var(--bg-button)] text-[var(--text-button)] border border-transparent rounded hover:bg-[var(--bg-button-hover)]" v-text="t('common.save')"></button>+ <button @click="cancelEditSummary" class="btn btn--sm btn--ghost" v-text="t('common.cancel')"></button>+ <button @click="saveEditSummary" class="btn btn--sm btn--primary" v-text="t('common.save')"></button></div></div><div v-else>- <div v-if="selectedRecording.status === 'SUMMARIZING'" 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.generatingSummary')"></p>+ <div v-if="selectedRecording.status === 'SUMMARIZING'" class="empty">+ <div class="spinner spinner--lg"></div>+ <div class="empty__title" v-text="t('help.generatingSummary')"></div></div>- <div v-else-if="!selectedRecording.summary" class="text-center py-8">- <i class="fas fa-file-alt text-3xl text-[var(--text-muted)] mb-3"></i>- <p class="text-[var(--text-muted)] mb-4" v-text="t('summary.noSummary')"></p>- <!-- Show message if transcription is an error -->- <p v-if="processedTranscription.isError" class="text-sm text-amber-500 mb-2">- <i class="fas fa-exclamation-triangle mr-1"></i>- Cannot generate summary: transcription failed- </p>- <div :class="['inline-flex rounded-lg shadow-lg transition-all duration-200 overflow-hidden', processedTranscription.isError ? '' : 'hover:shadow-xl']">- <button @click="generateSummary()"- :disabled="processedTranscription.isError"- :class="[- 'px-6 py-3 font-medium transition-colors duration-200',- processedTranscription.isError- ? 'bg-gray-400 text-gray-200 cursor-not-allowed'- : 'bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-700 hover:to-purple-700'- ]">- <i class="fas fa-magic mr-2"></i>Generate Summary+ <div v-else-if="!selectedRecording.summary" class="empty">+ <div class="empty__icon"><i class="fas fa-file-alt"></i></div>+ <div class="empty__title" v-text="t('summary.noSummary')"></div>+ <div v-if="processedTranscription.isError" class="banner banner--warn">+ <i class="fas fa-exclamation-triangle"></i>+ <span>Cannot generate summary: transcription failed</span>+ </div>+ <div class="flex items-center gap-2" style="margin-top: var(--sp-3);">+ <button class="btn btn--primary"+ @click="generateSummary()"+ :disabled="processedTranscription.isError">+ <i class="fas fa-magic"></i>+ <span>Generate Summary</span></button><button v-if="!processedTranscription.isError"+ class="btn btn--ghost btn--icon"@click="openCustomizeSummaryModal"- title="Customise the summarisation prompt"- class="px-3 py-3 font-medium text-white bg-gradient-to-r from-purple-600 to-purple-700 hover:from-purple-700 hover:to-purple-800 transition-colors duration-200 border-l border-white/20">- <i class="fas fa-sliders-h text-sm"></i>+ title="Customise prompt">+ <i class="fas fa-sliders-h"></i></button></div></div>- <div v-else class="summary-box h-full" v-html="selectedRecording.summary_html || selectedRecording.summary"></div>+ <div v-else class="prose-flush h-full" v-html="selectedRecording.summary_html || selectedRecording.summary"></div></div></div></div>