Skip to content

Commit 59cb62f

Browse files
[mirotalkc2c] - add cancel btn to leavefeedback, update dep
1 parent 8bc2803 commit 59cb62f

5 files changed

Lines changed: 64 additions & 58 deletions

File tree

backend/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
1010
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
1111
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
12-
* @version 1.2.15
12+
* @version 1.2.16
1313
*/
1414

1515
require('dotenv').config();

frontend/css/client.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ th {
389389
# Swal custom
390390
--------------------------------------------------------------*/
391391

392+
.swal2-popup .swal2-styled:focus {
393+
box-shadow: none !important;
394+
}
395+
392396
.swal2-title,
393397
.swal2-content {
394398
background-color: var(--panel-color) !important;

frontend/js/client.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
1010
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
1111
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
12-
* @version 1.2.15
12+
* @version 1.2.16
1313
*/
1414

1515
const roomId = new URLSearchParams(window.location.search).get('room');
@@ -1312,42 +1312,44 @@ function loadLocalStorageConfig() {
13121312

13131313
function endCall() {
13141314
saveLocalStorageConfig();
1315-
signalingSocket.disconnect();
1316-
if (surveyURL) {
1317-
giveMeFeedback();
1318-
} else {
1319-
redirectOnLeave();
1320-
}
1315+
surveyURL ? giveMeFeedback() : redirectOnLeave();
13211316
}
13221317

13231318
function giveMeFeedback() {
13241319
Swal.fire({
13251320
allowOutsideClick: false,
13261321
allowEscapeKey: false,
13271322
showDenyButton: true,
1323+
showCancelButton: true,
1324+
confirmButtonColor: 'green',
1325+
denyButtonColor: 'red',
1326+
cancelButtonColor: 'gray',
13281327
background: swal.background,
13291328
imageUrl: image.feedback,
13301329
position: 'top',
13311330
title: 'Leave a feedback',
13321331
text: 'Do you want to rate your MiroTalk experience?',
13331332
confirmButtonText: `Yes`,
13341333
denyButtonText: `No`,
1334+
cancelButtonText: `Cancel`,
13351335
showClass: { popup: 'animate__animated animate__fadeInDown' },
13361336
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
13371337
}).then((result) => {
13381338
if (result.isConfirmed) {
13391339
redirectToSurvey();
1340-
} else {
1340+
} else if (result.isDenied) {
13411341
redirectOnLeave();
13421342
}
13431343
});
13441344
}
13451345

13461346
function redirectToSurvey() {
1347+
signalingSocket.disconnect();
13471348
surveyURL ? openURL(surveyURL) : openURL('/');
13481349
}
13491350

13501351
function redirectOnLeave() {
1352+
signalingSocket.disconnect();
13511353
redirectURL ? openURL(redirectURL) : openURL('/');
13521354
}
13531355

package-lock.json

Lines changed: 46 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mirotalkc2c",
3-
"version": "1.2.15",
3+
"version": "1.2.16",
44
"description": "A free WebRTC Cam-2-Cam browser-based video calls",
55
"main": "server.js",
66
"scripts": {
@@ -38,12 +38,12 @@
3838
"dependencies": {
3939
"@mattermost/client": "10.8.0",
4040
"@ngrok/ngrok": "1.5.1",
41-
"@sentry/node": "^9.36.0",
41+
"@sentry/node": "^9.37.0",
4242
"colors": "^1.4.0",
4343
"compression": "^1.8.0",
4444
"cors": "^2.8.5",
4545
"dompurify": "^3.2.6",
46-
"dotenv": "^17.1.0",
46+
"dotenv": "^17.2.0",
4747
"express": "^5.1.0",
4848
"express-openid-connect": "^2.18.1",
4949
"he": "^1.2.0",

0 commit comments

Comments
 (0)