@@ -64,7 +64,7 @@ class ApiClient {
6464 const errorText = await response . text ( ) ;
6565 console . warn ( `Logout failed: ${ response . status } - ${ errorText } ` ) ;
6666 } else {
67- console . warn ( `Logout succesful.` ) ;
67+ console . log ( `Logout succesful.` ) ;
6868 }
6969
7070 return await response . json ( ) ;
@@ -221,12 +221,12 @@ function toggleReadOutLoud() {
221221 // Update the button icon based on the read out loud status
222222 if ( isReadOutLoudEnabled ) {
223223 // speakerIcon.src = "speaker-enabled.png"; // Speaker image
224- readOutLoudBtnEnabled . display = "flex" ;
225- readOutLoudBtnDisabled . display = "none" ;
224+ readOutLoudBtnEnabled . style . display = "flex" ;
225+ readOutLoudBtnDisabled . style . display = "none" ;
226226 } else {
227227 //speakerIcon.src = "speaker-disabled.png"; // Crossed-out speaker image
228- readOutLoudBtnEnabled . display = "none" ;
229- readOutLoudBtnDisabled . display = "flex" ;
228+ readOutLoudBtnEnabled . style . display = "none" ;
229+ readOutLoudBtnDisabled . style . display = "flex" ;
230230 }
231231
232232 // Optionally, stop any current speech when toggling
@@ -246,7 +246,7 @@ const chat = document.getElementById('chat');
246246const input = document . getElementById ( 'message-input' ) ;
247247const sendBtn = document . getElementById ( 'send-btn' ) ;
248248const readOutLoudBtn = document . getElementById ( 'read-out-loud-btn' ) ;
249- const voiceBtn = document . getElementById ( 'voice-btn' ) ;
249+
250250const voiceSpinner = document . getElementById ( "voiceSpinner" ) ;
251251
252252
@@ -347,7 +347,7 @@ readOutLoudBtn.addEventListener('click', function () {
347347
348348document . addEventListener ( "DOMContentLoaded" , ( ) => {
349349 const messageInput = document . getElementById ( "message-input" ) ;
350-
350+ const voiceBtn = document . getElementById ( 'voice-btn' ) ;
351351
352352 // Check if SpeechRecognition is available
353353 const SpeechRecognition = window . SpeechRecognition || window . webkitSpeechRecognition ;
0 commit comments