Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Standardize modal close behavior and fix processing queue cleanup on delete
Murtaza Nasire1b6d4310fbe
diff --git a/static/js/app.modular.js b/static/js/app.modular.jsindex a050b6f8..43b62cb1 100644--- a/static/js/app.modular.js+++ b/static/js/app.modular.js@@ -126,6 +126,7 @@ document.addEventListener('DOMContentLoaded', async () => {// --- Upload State ---const uploadQueue = ref([]);+ const allJobs = ref([]); // Backend job queue (queued, processing, completed, failed)const currentlyProcessingFile = ref(null);const processingProgress = ref(0);const processingMessage = ref('');@@ -409,7 +410,7 @@ document.addEventListener('DOMContentLoaded', async () => {colorSchemes, isMobileScreen, isMobileDevice,// Upload- uploadQueue, currentlyProcessingFile, processingProgress, processingMessage,+ uploadQueue, allJobs, currentlyProcessingFile, processingProgress, processingMessage,isProcessingActive, pollInterval, progressPopupMinimized, progressPopupClosed,maxFileSizeMB, chunkingEnabled, chunkingMode, chunkingLimit, chunkingLimitDisplay,recordingDisclaimer, showRecordingDisclaimerModal, pendingRecordingMode,@@ -1103,8 +1104,7 @@ document.addEventListener('DOMContentLoaded', async () => {return recordings.value.filter(r => ['PENDING', 'PROCESSING', 'SUMMARIZING', 'QUEUED'].includes(r.status));});- // All jobs from backend (queued, processing, completed, failed)- const allJobs = ref([]);+ // Job queue polling statelet jobQueuePollInterval = null;let lastJobQueueFetch = 0; // Timestamp of last fetchconst JOB_QUEUE_POLL_INTERVAL = 5000; // Poll every 5 seconds when active@@ -1517,6 +1517,14 @@ document.addEventListener('DOMContentLoaded', async () => {return availableTags.value.filter(tag => tag.custom_prompt && tag.custom_prompt.trim() !== '');});+ // Recording disclaimer parsed as markdown+ const recordingDisclaimerHtml = computed(() => {+ if (!recordingDisclaimer.value || recordingDisclaimer.value.trim() === '') {+ return '';+ }+ return marked.parse(recordingDisclaimer.value);+ });+// Get tag prompt previewconst getTagPromptPreview = (tagId) => {const tag = availableTags.value.find(t => t.id == tagId);@@ -1837,6 +1845,7 @@ document.addEventListener('DOMContentLoaded', async () => {retryProgressItem,hasSpeakerNames,tagsWithCustomPrompts,+ recordingDisclaimerHtml,getTagPromptPreview,// Utilitiesdiff --git a/static/js/modules/composables/modals.js b/static/js/modules/composables/modals.jsindex 0400385f..555911e0 100644--- a/static/js/modules/composables/modals.js+++ b/static/js/modules/composables/modals.js@@ -12,7 +12,7 @@ export function useModals(state, utils) {showShareDeleteModal, showUnifiedShareModal, showColorSchemeModal,showSystemAudioHelpModal, editingRecording, recordingToDelete, recordingToReset,selectedRecording, recordings, selectedNewTagId, tagSearchFilter,- availableTags, currentView, totalRecordings, toasts, uploadQueue+ availableTags, currentView, totalRecordings, toasts, uploadQueue, allJobs} = state;const { showToast, setGlobalError } = utils;@@ -94,14 +94,22 @@ export function useModals(state, utils) {const data = await response.json();if (!response.ok) throw new Error(data.error || 'Failed to delete recording');+ // Remove from recordings listrecordings.value = recordings.value.filter(r => r.id !== deletedId);totalRecordings.value--;- // Also remove from upload queue if present (clears processing queue entry)+ // Remove from upload queue if present (frontend tracking)if (uploadQueue?.value) {uploadQueue.value = uploadQueue.value.filter(item => item.recordingId !== deletedId);}+ // Remove from backend job queue if present (backend processing tracking)+ // This is critical - without this, deleted recordings remain in processing queue+ if (allJobs?.value) {+ allJobs.value = allJobs.value.filter(job => job.recording_id !== deletedId);+ }++ // Clear selected recording if it's the one being deletedif (selectedRecording.value?.id === deletedId) {selectedRecording.value = null;currentView.value = 'upload';diff --git a/templates/modals/add-speaker-modal.html b/templates/modals/add-speaker-modal.htmlindex 0ebe5ce8..6a19611e 100644--- a/templates/modals/add-speaker-modal.html+++ b/templates/modals/add-speaker-modal.html@@ -1,7 +1,15 @@<!-- Add Speaker Modal -->-<div v-if="showAddSpeakerModal" @click="closeAddSpeakerModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md p-6">- <h3 class="text-xl font-bold text-[var(--text-primary)] mb-4" v-text="t('modal.addSpeaker')"></h3>+<div v-if="showAddSpeakerModal" @click.self="closeAddSpeakerModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md">+ <div class="p-6 border-b border-[var(--border-primary)]">+ <div class="flex items-center justify-between mb-4">+ <h3 class="text-xl font-bold text-[var(--text-primary)]" v-text="t('modal.addSpeaker')"></h3>+ <button @click="closeAddSpeakerModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div>+ </div>+ <div class="p-6"><!-- "This is Me" checkbox --><div class="mb-4">@@ -64,5 +72,6 @@<button @click="addNewSpeaker" class="px-4 py-2 bg-[var(--bg-accent)] text-[var(--text-accent)] rounded-lg hover:bg-[var(--bg-accent-hover)] transition-colors" v-text="t('buttons.addSpeaker')"></button></div>+ </div></div></div>diff --git a/templates/modals/asr-editor-modal.html b/templates/modals/asr-editor-modal.htmlindex 1bfabf60..c64ecd5d 100644--- a/templates/modals/asr-editor-modal.html+++ b/templates/modals/asr-editor-modal.html@@ -1,5 +1,5 @@<!-- ASR Editor Modal -->-<div v-if="showAsrEditorModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showAsrEditorModal" @click.self="closeAsrEditorModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div @click="closeAllSpeakerSuggestions" class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-6xl flex flex-col max-h-[90vh]"><div class="p-5 border-b border-[var(--border-primary)] flex-shrink-0 flex justify-between items-center"><h3 class="text-xl font-bold text-[var(--text-primary)]" v-text="t('modal.editAsrTranscription')"></h3>diff --git a/templates/modals/color-scheme-modal.html b/templates/modals/color-scheme-modal.htmlindex e331ab27..82dded7c 100644--- a/templates/modals/color-scheme-modal.html+++ b/templates/modals/color-scheme-modal.html@@ -2,10 +2,15 @@<div v-if="showColorSchemeModal" class="color-scheme-modal" @click.self="closeColorSchemeModal"><div class="color-scheme-modal-content"><div class="color-scheme-header">- <h2 class="color-scheme-title">- <i class="fas fa-palette"></i>- <span v-text="t('colorScheme.title')"></span>- </h2>+ <div class="flex items-center justify-between mb-2">+ <h2 class="color-scheme-title">+ <i class="fas fa-palette"></i>+ <span v-text="t('colorScheme.title')"></span>+ </h2>+ <button @click="closeColorSchemeModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div><p class="color-scheme-subtitle" v-text="t('colorScheme.subtitle')"></p></div>diff --git a/templates/modals/delete-modal.html b/templates/modals/delete-modal.htmlindex 19fac012..679d1e78 100644--- a/templates/modals/delete-modal.html+++ b/templates/modals/delete-modal.html@@ -1,13 +1,18 @@<!-- Delete Confirmation Modal -->-<div v-if="showDeleteModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showDeleteModal" @click.self="cancelDelete" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-md"><div class="p-6">- <div class="flex items-center gap-4 mb-4">- <i class="fas fa-exclamation-triangle text-3xl text-[var(--text-danger)]"></i>- <div>- <h3 class="text-lg font-semibold" v-text="t('modal.deleteRecording')"></h3>- <p class="text-[var(--text-muted)]" v-text="t('help.thisActionCannotBeUndone')"></p>+ <div class="flex items-center justify-between mb-4">+ <div class="flex items-center gap-4">+ <i class="fas fa-exclamation-triangle text-3xl text-[var(--text-danger)]"></i>+ <div>+ <h3 class="text-lg font-semibold" v-text="t('modal.deleteRecording')"></h3>+ <p class="text-[var(--text-muted)]" v-text="t('help.thisActionCannotBeUndone')"></p>+ </div></div>+ <button @click="cancelDelete" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div><p class="text-[var(--text-secondary)] mb-6">Are you sure you want to delete "${recordingToDelete?.title || 'this recording'}"?diff --git a/templates/modals/edit-modal.html b/templates/modals/edit-modal.htmlindex a74686ed..02601127 100644--- a/templates/modals/edit-modal.html+++ b/templates/modals/edit-modal.html@@ -1,8 +1,11 @@<!-- Edit Modal -->-<div v-if="showEditModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showEditModal" @click.self="cancelEdit" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-lg">- <div class="p-6 border-b border-[var(--border-primary)]">+ <div class="p-6 border-b border-[var(--border-primary)] flex items-center justify-between"><h3 class="text-lg font-semibold" v-text="t('modal.editRecording')"></h3>+ <button @click="cancelEdit" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div><div class="p-6 space-y-4"><div>diff --git a/templates/modals/edit-participants-modal.html b/templates/modals/edit-participants-modal.htmlindex a55faea4..e38cd863 100644--- a/templates/modals/edit-participants-modal.html+++ b/templates/modals/edit-participants-modal.html@@ -1,8 +1,13 @@<!-- Edit Participants Modal -->-<div v-if="showEditParticipantsModal" @click="closeEditParticipantsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop="closeAllParticipantSuggestions" class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col">+<div v-if="showEditParticipantsModal" @click.self="closeEditParticipantsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div @click="closeAllParticipantSuggestions" class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col"><div class="p-6 border-b border-[var(--border-primary)] flex-shrink-0">- <h3 class="text-lg font-semibold" v-text="t('modal.editParticipants')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-lg font-semibold" v-text="t('modal.editParticipants')"></h3>+ <button @click="closeEditParticipantsModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="p-6 overflow-y-auto flex-1" @scroll="closeAllParticipantSuggestions"><p class="text-sm text-[var(--text-muted)] mb-4">Manage participants for this recording.</p>diff --git a/templates/modals/edit-speakers-modal.html b/templates/modals/edit-speakers-modal.htmlindex aaf3bc2c..4a150c5b 100644--- a/templates/modals/edit-speakers-modal.html+++ b/templates/modals/edit-speakers-modal.html@@ -1,8 +1,13 @@<!-- Edit Speakers Modal -->-<div v-if="showEditSpeakersModal" @click="closeEditSpeakersModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col">+<div v-if="showEditSpeakersModal" @click.self="closeEditSpeakersModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col"><div class="p-6 border-b border-[var(--border-primary)] flex-shrink-0">- <h3 class="text-lg font-semibold" v-text="t('modal.editSpeakers')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-lg font-semibold" v-text="t('modal.editSpeakers')"></h3>+ <button @click="closeEditSpeakersModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="p-6 overflow-y-auto flex-1"><p class="text-sm text-[var(--text-muted)] mb-4">Rename speakers in the transcript.</p>diff --git a/templates/modals/edit-tags-modal.html b/templates/modals/edit-tags-modal.htmlindex e9012a31..baa84c7c 100644--- a/templates/modals/edit-tags-modal.html+++ b/templates/modals/edit-tags-modal.html@@ -1,8 +1,13 @@<!-- Edit Tags Modal -->-<div v-if="showEditTagsModal" @click="closeEditTagsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col">+<div v-if="showEditTagsModal" @click.self="closeEditTagsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col"><div class="p-6 border-b border-[var(--border-primary)] flex-shrink-0">- <h3 class="text-lg font-semibold" v-text="t('modal.editTags')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-lg font-semibold" v-text="t('modal.editTags')"></h3>+ <button @click="closeEditTagsModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="p-6 overflow-y-auto flex-1"><!-- Current Tags -->diff --git a/templates/modals/edit-text-modal.html b/templates/modals/edit-text-modal.htmlindex 6ad03c0e..e4bf55d6 100644--- a/templates/modals/edit-text-modal.html+++ b/templates/modals/edit-text-modal.html@@ -1,7 +1,15 @@<!-- Edit Text Modal -->-<div v-if="showEditTextModal" @click="closeEditTextModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-2xl p-6">- <h3 class="text-xl font-bold text-[var(--text-primary)] mb-4">Edit Transcript Text</h3>+<div v-if="showEditTextModal" @click.self="closeEditTextModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-2xl">+ <div class="p-6 border-b border-[var(--border-primary)]">+ <div class="flex items-center justify-between">+ <h3 class="text-xl font-bold text-[var(--text-primary)]">Edit Transcript Text</h3>+ <button @click="closeEditTextModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div>+ </div>+ <div class="p-6"><!-- Text editor --><div class="mb-6">@@ -25,5 +33,6 @@Save Changes</button></div>+ </div></div></div>diff --git a/templates/modals/recording-disclaimer-modal.html b/templates/modals/recording-disclaimer-modal.htmlindex f25bb723..bbed85f4 100644--- a/templates/modals/recording-disclaimer-modal.html+++ b/templates/modals/recording-disclaimer-modal.html@@ -1,17 +1,22 @@<!-- Recording Disclaimer Modal -->-<div v-if="showRecordingDisclaimerModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showRecordingDisclaimerModal" @click.self="cancelRecordingDisclaimer" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col overflow-hidden"><div class="flex-shrink-0 p-6 border-b border-[var(--border-primary)]">- <div class="flex items-center gap-3">- <i class="fas fa-info-circle text-2xl text-[var(--text-accent)]"></i>- <h3 class="text-xl font-semibold text-[var(--text-primary)]" v-text="t('modal.recordingNotice')"></h3>+ <div class="flex items-center justify-between">+ <div class="flex items-center gap-3">+ <i class="fas fa-info-circle text-2xl text-[var(--text-accent)]"></i>+ <h3 class="text-xl font-semibold text-[var(--text-primary)]" v-text="t('modal.recordingNotice')"></h3>+ </div>+ <button @click="cancelRecordingDisclaimer" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div></div><div class="flex-1 overflow-y-auto p-6"><!-- Render markdown content -->- <div class="prose prose-sm max-w-none text-[var(--text-secondary)]"- style="color: var(--text-secondary); line-height: 1.6;">- <div v-html="recordingDisclaimer"></div>+ <div class="ai-message text-[var(--text-secondary)]"+ style="line-height: 1.6;">+ <div v-html="recordingDisclaimerHtml"></div></div></div><div class="flex-shrink-0 p-6 border-t border-[var(--border-primary)] bg-[var(--bg-tertiary)] rounded-b-lg">diff --git a/templates/modals/recording-recovery-modal.html b/templates/modals/recording-recovery-modal.htmlindex fc2aa235..ad4261b4 100644--- a/templates/modals/recording-recovery-modal.html+++ b/templates/modals/recording-recovery-modal.html@@ -1,10 +1,15 @@<!-- Recording Recovery Modal -->-<div v-if="showRecoveryModal" @click="cancelRecovery" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md">+<div v-if="showRecoveryModal" @click.self="cancelRecovery" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md"><div class="p-6 border-b border-[var(--border-primary)]">- <div class="flex items-center gap-3">- <i class="fas fa-history text-2xl text-blue-500"></i>- <h3 class="text-lg font-semibold" v-text="t('recording.recoveryTitle')"></h3>+ <div class="flex items-center justify-between">+ <div class="flex items-center gap-3">+ <i class="fas fa-history text-2xl text-blue-500"></i>+ <h3 class="text-lg font-semibold" v-text="t('recording.recoveryTitle')"></h3>+ </div>+ <button @click="cancelRecovery" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div></div>diff --git a/templates/modals/reprocess-modal.html b/templates/modals/reprocess-modal.htmlindex b910b9a4..0aba4594 100644--- a/templates/modals/reprocess-modal.html+++ b/templates/modals/reprocess-modal.html@@ -1,16 +1,21 @@<!-- Reprocess Modal -->-<div v-if="showReprocessModal" @click="cancelReprocess" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm transition-all duration-300 ease-in-out">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md transform transition-all duration-300 ease-in-out">+<div v-if="showReprocessModal" @click.self="cancelReprocess" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm transition-all duration-300 ease-in-out">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md transform transition-all duration-300 ease-in-out"><!-- Header with gradient background -->- <div class="bg-gradient-to-r from-[var(--bg-accent)] to-[var(--bg-secondary)] p-5 rounded-t-xl flex items-center">- <div class="flex items-center">- <div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center mr-4 shadow-lg">- <i class="fas fa-sync-alt text-white text-lg"></i>- </div>- <div>- <h3 class="text-xl font-bold text-[var(--text-primary)] mb-1" v-text="t('help.confirmReprocessingTitle')"></h3>- <p class="text-sm text-[var(--text-muted)] capitalize">${ reprocessType } reprocessing</p>+ <div class="bg-gradient-to-r from-[var(--bg-accent)] to-[var(--bg-secondary)] p-5 rounded-t-xl">+ <div class="flex items-center justify-between">+ <div class="flex items-center">+ <div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center mr-4 shadow-lg">+ <i class="fas fa-sync-alt text-white text-lg"></i>+ </div>+ <div>+ <h3 class="text-xl font-bold text-[var(--text-primary)] mb-1" v-text="t('help.confirmReprocessingTitle')"></h3>+ <p class="text-sm text-[var(--text-muted)] capitalize">${ reprocessType } reprocessing</p>+ </div></div>+ <button @click="cancelReprocess" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div></div>diff --git a/templates/modals/reset-modal.html b/templates/modals/reset-modal.htmlindex d982888c..6acba421 100644--- a/templates/modals/reset-modal.html+++ b/templates/modals/reset-modal.html@@ -1,11 +1,20 @@<!-- Reset Status Confirmation Modal -->-<div v-if="showResetModal" @click="cancelReset" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md">- <div class="p-6 text-center">- <div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-orange-100 dark:bg-orange-800 mb-4">- <i class="fas fa-exclamation-triangle text-2xl text-orange-500 dark:text-orange-300"></i>+<div v-if="showResetModal" @click.self="cancelReset" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md">+ <div class="p-6">+ <div class="flex items-start justify-between mb-4">+ <div class="flex items-start gap-3">+ <div class="flex items-center justify-center h-12 w-12 rounded-full bg-orange-100 dark:bg-orange-800">+ <i class="fas fa-exclamation-triangle text-2xl text-orange-500 dark:text-orange-300"></i>+ </div>+ <div>+ <h3 class="text-lg font-semibold text-[var(--text-primary)] mb-2" v-text="t('modal.resetStatus')"></h3>+ </div>+ </div>+ <button @click="cancelReset" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div>- <h3 class="text-lg font-semibold text-[var(--text-primary)] mb-2" v-text="t('modal.resetStatus')"></h3><p class="text-sm text-[var(--text-muted)] mb-6">This will mark the recording as 'Failed'. This is useful if processing is stuck. You will be able to reprocess it afterwards.</p>diff --git a/templates/modals/share-delete-modal.html b/templates/modals/share-delete-modal.htmlindex e2ed495c..1f543971 100644--- a/templates/modals/share-delete-modal.html+++ b/templates/modals/share-delete-modal.html@@ -1,16 +1,21 @@<!-- Share Delete Confirmation Modal -->-<div v-if="showShareDeleteModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showShareDeleteModal" @click.self="cancelDeleteShare" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-md transform transition-all duration-300 ease-in-out"><!-- Header with gradient background --><div class="bg-gradient-to-r from-red-500 to-red-600 p-5 rounded-t-xl">- <div class="flex items-center">- <div class="w-12 h-12 bg-white/20 backdrop-blur rounded-full flex items-center justify-center mr-4">- <i class="fas fa-trash-alt text-white text-lg"></i>- </div>- <div>- <h3 class="text-lg font-bold text-white">Delete Shared Link</h3>- <p class="text-red-100 text-sm mt-1">This action cannot be undone</p>+ <div class="flex items-center justify-between">+ <div class="flex items-center">+ <div class="w-12 h-12 bg-white/20 backdrop-blur rounded-full flex items-center justify-center mr-4">+ <i class="fas fa-trash-alt text-white text-lg"></i>+ </div>+ <div>+ <h3 class="text-lg font-bold text-white">Delete Shared Link</h3>+ <p class="text-red-100 text-sm mt-1">This action cannot be undone</p>+ </div></div>+ <button @click="cancelDeleteShare" class="text-white/80 hover:text-white transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button></div></div>diff --git a/templates/modals/share-modal.html b/templates/modals/share-modal.htmlindex 0371efba..1a4b8cfa 100644--- a/templates/modals/share-modal.html+++ b/templates/modals/share-modal.html@@ -1,5 +1,5 @@<!-- Share Modal -->-<div v-if="showShareModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showShareModal" @click.self="closeShareModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col"><div class="px-6 py-4 border-b border-[var(--border-primary)] flex justify-between items-center"><h3 class="text-lg font-semibold" v-text="t('modal.shareRecording')"></h3>diff --git a/templates/modals/shares-list-modal.html b/templates/modals/shares-list-modal.htmlindex 1da2e7f4..b765e51c 100644--- a/templates/modals/shares-list-modal.html+++ b/templates/modals/shares-list-modal.html@@ -1,5 +1,5 @@<!-- Shares List Modal -->-<div v-if="showSharesListModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showSharesListModal" @click.self="closeSharesList" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col"><div class="p-6 border-b border-[var(--border-primary)] flex justify-between items-center"><h3 class="text-lg font-semibold" v-text="t('modal.sharedTranscripts')"></h3>diff --git a/templates/modals/speaker-modal.html b/templates/modals/speaker-modal.htmlindex 1f957fdf..6ed579ef 100644--- a/templates/modals/speaker-modal.html+++ b/templates/modals/speaker-modal.html@@ -1,9 +1,14 @@<!-- Speaker Identification Modal -->-<div v-if="showSpeakerModal" @click="closeSpeakerModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-2 sm:p-4 backdrop-blur-sm">- <div @click.stop @click="closeSpeakerSuggestionsOnClick" class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-4xl flex flex-col h-[95vh] sm:h-[85vh]">+<div v-if="showSpeakerModal" @click.self="closeSpeakerModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-2 sm:p-4 backdrop-blur-sm">+ <div @click="closeSpeakerSuggestionsOnClick" class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-4xl flex flex-col h-[95vh] sm:h-[85vh]"><!-- Header --><div class="p-3 sm:p-5 border-b border-[var(--border-primary)] flex-shrink-0">- <h3 class="text-base sm:text-xl font-bold text-[var(--text-primary)]" v-text="t('modal.identifySpeakers')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-base sm:text-xl font-bold text-[var(--text-primary)]" v-text="t('modal.identifySpeakers')"></h3>+ <button @click="closeSpeakerModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div><!-- Warning for too many speakers --><div v-if="modalSpeakers.length > 8" class="mt-3 p-3 bg-[var(--bg-warn-light)] border border-amber-300 dark:border-amber-800 rounded-lg"><div class="flex items-start">diff --git a/templates/modals/system-audio-help-modal.html b/templates/modals/system-audio-help-modal.htmlindex ceaf1f85..84ee3aa9 100644--- a/templates/modals/system-audio-help-modal.html+++ b/templates/modals/system-audio-help-modal.html@@ -1,8 +1,13 @@<!-- System Audio Help Modal -->-<div v-if="showSystemAudioHelp" @click="showSystemAudioHelp = false" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-lg max-h-[80vh] overflow-y-auto">+<div v-if="showSystemAudioHelp" @click.self="showSystemAudioHelp = false" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-lg max-h-[80vh] overflow-y-auto"><div class="p-6 border-b border-[var(--border-primary)]">- <h3 class="text-lg font-semibold" v-text="t('help.systemAudioHelp')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-lg font-semibold" v-text="t('help.systemAudioHelp')"></h3>+ <button @click="showSystemAudioHelp = false" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="p-6 space-y-4"><div class="p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg">diff --git a/templates/modals/text-editor-modal.html b/templates/modals/text-editor-modal.htmlindex 108d967d..00d71b41 100644--- a/templates/modals/text-editor-modal.html+++ b/templates/modals/text-editor-modal.html@@ -1,8 +1,13 @@<!-- Simple Transcription Editor Modal -->-<div v-if="showTextEditorModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+<div v-if="showTextEditorModal" @click.self="closeTextEditorModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm"><div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] flex flex-col"><div class="p-6 border-b border-[var(--border-primary)]">- <h3 class="text-lg font-semibold" v-text="t('modal.editTranscription')"></h3>+ <div class="flex items-center justify-between">+ <h3 class="text-lg font-semibold" v-text="t('modal.editTranscription')"></h3>+ <button @click="closeTextEditorModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="p-6 space-y-4 overflow-y-auto flex-1"><div>diff --git a/templates/modals/unified-share-modal.html b/templates/modals/unified-share-modal.htmlindex d7c71550..769718a6 100644--- a/templates/modals/unified-share-modal.html+++ b/templates/modals/unified-share-modal.html@@ -1,9 +1,16 @@<!-- Unified Share Modal (Public + Internal Sharing) -->-<div v-if="showUnifiedShareModal" @click="closeUnifiedShareModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">- <div @click.stop class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col">+<div v-if="showUnifiedShareModal" @click.self="closeUnifiedShareModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">+ <div class="bg-[var(--bg-secondary)] rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col"><div class="px-6 py-4 border-b border-[var(--border-primary)] flex-shrink-0">- <h3 class="text-lg font-semibold" v-text="t('modal.shareRecording')"></h3>- <p class="text-sm text-[var(--text-muted)] mt-0.5">${internalShareRecording?.title}</p>+ <div class="flex items-center justify-between">+ <div class="flex-1">+ <h3 class="text-lg font-semibold" v-text="t('modal.shareRecording')"></h3>+ <p class="text-sm text-[var(--text-muted)] mt-0.5">${internalShareRecording?.title}</p>+ </div>+ <button @click="closeUnifiedShareModal" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors ml-4">+ <i class="fas fa-times text-xl"></i>+ </button>+ </div></div><div class="flex-1 overflow-y-auto">