Skip to content

Commit 42cd7b6

Browse files
bug fixes
1 parent 083a2a0 commit 42cd7b6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

chat-ui-quince/src/code.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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');
246246
const input = document.getElementById('message-input');
247247
const sendBtn = document.getElementById('send-btn');
248248
const readOutLoudBtn = document.getElementById('read-out-loud-btn');
249-
const voiceBtn = document.getElementById('voice-btn');
249+
250250
const voiceSpinner = document.getElementById("voiceSpinner");
251251

252252

@@ -347,7 +347,7 @@ readOutLoudBtn.addEventListener('click', function () {
347347

348348
document.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

Comments
 (0)