You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alert('Speech recognition not supported in this browser. Please use Google Chrome or Safari.');
460
+
setConfirmModal({
461
+
type: 'alert',
462
+
title: 'Speech Recognition Unsupported',
463
+
message: 'Speech recognition is not supported in this browser. Please use Google Chrome or Safari for the best experience.'
464
+
});
461
465
return;
462
-
}
463
466
464
467
window.speechSynthesis.cancel();
465
468
setIsAiSpeaking(false);
@@ -535,27 +538,30 @@ const AIInterview = () => {
535
538
};
536
539
537
540
consthandleExitSession=()=>{
538
-
constconfirmed=window.confirm("Warning: You are currently in an active interview session. Leaving will immediately terminate the interview, and all progress will be lost. Are you sure you want to exit?");
539
-
if(!confirmed)return;
540
-
541
-
window.speechSynthesis.cancel();
542
-
if(idleTimerRef.current){
543
-
clearTimeout(idleTimerRef.current);
544
-
idleTimerRef.current=null;
545
-
}
546
-
if(recognitionRef.current){
547
-
try{
548
-
recognitionRef.current.stop();
549
-
}catch(e){
550
-
console.error(e);
541
+
setConfirmModal({
542
+
title: 'End Active Interview?',
543
+
message: 'Warning: You are currently in an active interview session. Leaving will immediately terminate the interview, and all progress will be lost. Are you sure you want to exit?',
544
+
onConfirm: ()=>{
545
+
window.speechSynthesis.cancel();
546
+
if(idleTimerRef.current){
547
+
clearTimeout(idleTimerRef.current);
548
+
idleTimerRef.current=null;
549
+
}
550
+
if(recognitionRef.current){
551
+
try{
552
+
recognitionRef.current.stop();
553
+
}catch(e){
554
+
console.error(e);
555
+
}
556
+
recognitionRef.current=null;
557
+
}
558
+
setStage('idle');
559
+
setQuestion('');
560
+
setAnswer('');
561
+
setFeedback(null);
562
+
setSessionLogs([]);
551
563
}
552
-
recognitionRef.current=null;
553
-
}
554
-
setStage('idle');
555
-
setQuestion('');
556
-
setAnswer('');
557
-
setFeedback(null);
558
-
setSessionLogs([]);
564
+
});
559
565
};
560
566
561
567
constgenerateQuestion=async()=>{
@@ -1091,17 +1097,21 @@ JSON Evaluation:`;
1091
1097
};
1092
1098
1093
1099
constclearHistory=async()=>{
1094
-
if(window.confirm('Are you sure you want to clear your entire interview log history?')){
Copy file name to clipboardExpand all lines: client/src/pages/CollaborativeWorkspace.jsx
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -938,11 +938,15 @@ export default function CollaborativeWorkspace() {
938
938
{/* Exit Room */}
939
939
<button
940
940
onClick={()=>{
941
-
constconfirmed=window.confirm("Warning: Leaving this room will disconnect you from the editor, voice channel, and active workspace. Are you sure you want to exit?");
942
-
if(confirmed){
943
-
setInLobby(true);
944
-
navigate('/code-editor');
945
-
}
941
+
setModalConfig({
942
+
type: 'confirm',
943
+
title: 'Leave Workspace?',
944
+
message: 'Warning: Leaving this room will disconnect you from the editor, voice channel, and active workspace. Are you sure you want to exit?',
0 commit comments