diff --git a/public/js/app.js b/public/js/app.js index 4f13818..e775d0a 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -536,16 +536,7 @@ function exportToNextcloud(elementId, docType) { } function createSpeechRecognition() { - if (!(window.SpeechRecognition || window.webkitSpeechRecognition)) { - // Show notice once for browsers without Speech API (Firefox, Safari) - if (!window._speechNoticeShown) { - window._speechNoticeShown = true; - console.warn('[Speech] Browser does not support live transcription (Chrome/Edge required). Server-side transcription will still work.'); - document.addEventListener('recording-started', function() { - showToast('Live preview not available in this browser. Final transcription will work when you stop recording.', 'info'); - }, { once: true }); - } - return null; + if (!(window.SpeechRecognition || window.webkitSpeechRecognition)) return null; var SR = window.SpeechRecognition || window.webkitSpeechRecognition; var rec = new SR(); rec.continuous = true; diff --git a/public/js/auth.js b/public/js/auth.js index 14c53cb..db2dff8 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -68,9 +68,13 @@ document.addEventListener('DOMContentLoaded', function() { }) .catch(function() {}); - var savedToken = ssoToken || localStorage.getItem(TOKEN_KEY); - if (!ssoToken && savedToken) { - // Token exists — verify it silently; auth screen stays hidden during check + var savedToken = localStorage.getItem(TOKEN_KEY); + if (ssoToken) { + // SSO token handled above — do nothing here + } else if (ssoError) { + // SSO error handled above — auth screen already shown + } else if (savedToken) { + // Existing token — verify silently; auth screen stays hidden during check fetch('/api/auth/me', { headers: { 'Authorization': 'Bearer ' + savedToken } })