[mirotalksfu] - ask for feedback when room exit

هذا الالتزام موجود في:
Miroslav Pejic
2022-09-13 16:52:46 +02:00
الأصل 453ff2d55d
التزام 455418af4f

عرض الملف

@@ -1193,7 +1193,7 @@ function handleRoomClientEvents() {
rc.on(RoomClient.EVENTS.exitRoom, () => {
console.log('Room Client leave room');
if (surveyActive) {
openURL(url.survey);
leaveFeedback();
} else {
openURL('/newroom');
}
@@ -1204,6 +1204,31 @@ function handleRoomClientEvents() {
// UTILITY
// ####################################################
function leaveFeedback() {
Swal.fire({
allowOutsideClick: false,
allowEscapeKey: false,
showDenyButton: true,
background: swalBackground,
title: 'Leave a feedback',
text: 'Do you want to rate your MiroTalk experience?',
confirmButtonText: `Yes`,
denyButtonText: `No`,
showClass: {
popup: 'animate__animated animate__fadeInDown',
},
hideClass: {
popup: 'animate__animated animate__fadeOutUp',
},
}).then((result) => {
if (result.isConfirmed) {
openURL(url.survey);
} else {
openURL('/newroom');
}
});
}
function userLog(icon, message, position, timer = 3000) {
const Toast = Swal.mixin({
background: swalBackground,