[mirotalk] - leave room on click without confirm

This commit is contained in:
Miroslav Pejic
2022-06-01 17:26:42 +02:00
parent 5ec65385bc
commit 419566759a
3 changed files with 9 additions and 30 deletions
+1 -2
View File
@@ -210,9 +210,8 @@ body {
transition: all 0.3s ease-in-out;
}
#buttonsBar #leaveRoomBtn:hover {
#buttonsBar #leaveRoomBtn {
color: #ff2d00;
transform: var(--btns-hover-scale);
}
.fa-microphone-slash,
+8 -28
View File
@@ -4408,7 +4408,7 @@ function handleRoomStatus(config) {
* Room is locked you provide a wrong password, can't access!
*/
function handleRoomLocked() {
playSound('kickedOut');
playSound('eject');
console.log('Room is Locked, try with another one');
Swal.fire({
@@ -5420,7 +5420,7 @@ function kickOut(peer_id) {
function handleKickedOut(config) {
let peer_name = config.peer_name;
playSound('kickedOut');
playSound('eject');
let timerInterval;
@@ -5496,32 +5496,12 @@ function showAbout() {
* Leave the Room and create a new one
*/
function leaveRoom() {
playSound('newMessage');
Swal.fire({
background: swalBackground,
position: 'center',
imageAlt: 'mirotalk-leave',
imageUrl: leaveRoomImg,
title: 'Leave this room?',
showDenyButton: true,
confirmButtonText: `Yes`,
denyButtonText: `No`,
showClass: {
popup: 'animate__animated animate__fadeInDown',
},
hideClass: {
popup: 'animate__animated animate__fadeOutUp',
},
}).then((result) => {
if (result.isConfirmed) {
if (surveyActive) {
openURL(surveyURL);
} else {
openURL('/newcall');
}
}
});
playSound('eject');
if (surveyActive) {
openURL(surveyURL);
} else {
openURL('/newcall');
}
}
/**