[call-me] - improvements

This commit is contained in:
Miroslav Pejic
2024-09-22 20:43:45 +02:00
parent eb8f1a77f4
commit e5cc3d1b37
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "call-me",
"version": "1.0.14",
"version": "1.0.15",
"description": "Your Go-To for Instant Video Calls",
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
"license": "AGPLv3",
+8 -9
View File
@@ -230,8 +230,8 @@ function handleNotFound(data) {
function handleSignIn(data) {
const { success } = data;
if (!success) {
handleError('Username already in use. Try a different username.');
setTimeout(handleHangUpClick, 2000);
handleError('Username already in use.<br/>Please try a different one.');
setTimeout(handleHangUpClick, 3000);
} else {
githubDiv.style.display = 'none';
signInPage.style.display = 'none';
@@ -327,6 +327,8 @@ function offerAccept(data) {
showDenyButton: true,
confirmButtonText: `Yes`,
denyButtonText: `No`,
timerProgressBar: true,
timer: 10000,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
}).then((result) => {
@@ -415,15 +417,15 @@ function handleLeave() {
}
// Handle and display errors
function handleError(message, error = false, position = 'top') {
function handleError(message, error = false, position = 'center', timer = 4000) {
if (error) console.error(error);
sound('notify');
Swal.fire({
position,
title: 'Warning',
text: message,
icon: 'warning',
confirmButtonText: 'OK',
html: message,
timerProgressBar: true,
timer,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
});
@@ -433,10 +435,7 @@ function handleError(message, error = false, position = 'top') {
function popupMsg(message, position = 'top', timer = 4000) {
Swal.fire({
position,
title: 'Info',
html: message,
icon: 'info',
confirmButtonText: 'OK',
timerProgressBar: true,
timer,
showClass: { popup: 'animate__animated animate__fadeInDown' },
+1
View File
@@ -32,6 +32,7 @@ body {
padding: 5px;
top: 10px;
right: 20px;
font-size: 0.9rem;
font-weight: bold;
color: white;
background: rgba(0, 0, 0, 0.5);