diff --git a/app/src/server.js b/app/src/server.js index 71e2aa35..9bcceee3 100755 --- a/app/src/server.js +++ b/app/src/server.js @@ -39,7 +39,7 @@ dependencies: { * @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.4.49 + * @version 1.4.50 * */ diff --git a/package.json b/package.json index 1668a026..fabb0bf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalk", - "version": "1.4.49", + "version": "1.4.50", "description": "A free WebRTC browser-based video call", "main": "server.js", "scripts": { diff --git a/public/js/client.js b/public/js/client.js index a5059b87..bfa655d8 100644 --- a/public/js/client.js +++ b/public/js/client.js @@ -15,7 +15,7 @@ * @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.4.49 + * @version 1.4.50 * */ @@ -11036,7 +11036,7 @@ function showAbout() { Swal.fire({ background: swBg, position: 'center', - title: 'WebRTC P2P v1.4.49', + title: 'WebRTC P2P v1.4.50', imageAlt: 'mirotalk-about', imageUrl: images.about, customClass: { image: 'img-about' }, diff --git a/public/js/common.js b/public/js/common.js index 974bb912..68ed294d 100644 --- a/public/js/common.js +++ b/public/js/common.js @@ -225,7 +225,7 @@ function joinRoom() { window.location.href = '/join/' + roomName; window.localStorage.lastRoom = roomName; } else { - alert('Room name empty!\nPlease pick a room name.'); + popup('warning', 'Room name empty!\nPlease pick a room name.'); } } diff --git a/public/js/login.js b/public/js/login.js index 407af42e..7683f572 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -24,8 +24,8 @@ loginBtn.onclick = (e) => { }; function login() { - let username = filterXSS(document.getElementById('username').value); - let password = filterXSS(document.getElementById('password').value); + const username = filterXSS(document.getElementById('username').value); + const password = filterXSS(document.getElementById('password').value); // http://localhost:3000/join/?room=test // http://localhost:3000/join/?room=test&name=mirotalk&audio=0&video=0&screen=0¬ify=0 @@ -62,20 +62,20 @@ function login() { }) .catch(function (error) { console.error(error); - alert('Unauthorized'); + popup('warning', 'Invalid credentials. Please try again.'); }); return; } if (!username && !password) { - alert('Username and Password required'); + popup('warning', 'Username and Password required'); return; } if (!username) { - alert('Username required'); + popup('warning', 'Username required'); return; } if (!password) { - alert('Password required'); + popup('warning', 'Password required'); return; } } diff --git a/public/js/utils.js b/public/js/utils.js new file mode 100644 index 00000000..7388fbc0 --- /dev/null +++ b/public/js/utils.js @@ -0,0 +1,15 @@ +'use strict'; + +function popup(icon, text, position = 'center') { + Swal.fire({ + background: 'rgba(0, 0, 0, 0.7)', + position: position, + icon: icon, + text: text, + color: '#FFFFFF', + confirmButtonColor: '#1A84F5', + showClass: { popup: 'animate__animated animate__fadeInDown' }, + hideClass: { popup: 'animate__animated animate__fadeOutUp' }, + }); +} +//... \ No newline at end of file diff --git a/public/views/landing.html b/public/views/landing.html index 8816c07d..d7d5ff3d 100755 --- a/public/views/landing.html +++ b/public/views/landing.html @@ -47,6 +47,10 @@ + + + + @@ -55,6 +59,10 @@ + + + +
@@ -732,6 +740,7 @@ + diff --git a/public/views/login.html b/public/views/login.html index d28b3689..cf8eadae 100644 --- a/public/views/login.html +++ b/public/views/login.html @@ -36,6 +36,7 @@ + @@ -47,12 +48,13 @@ - - + + +