From 5869e1b1154c959f1a01a90926c35d9e293c8cfc Mon Sep 17 00:00:00 2001 From: Joao Santos Date: Sat, 2 Mar 2024 11:27:22 +0000 Subject: [PATCH] shake it --- public/full.js | 3 +++ public/styles.css | 11 +++++++++++ views/index.ejs | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 public/styles.css diff --git a/public/full.js b/public/full.js index 3521d36..81830af 100644 --- a/public/full.js +++ b/public/full.js @@ -351,6 +351,7 @@ function restoreUI() { btnAnswer.classList.add('d-none') btnReject.classList.add('d-none') tabs.classList.remove('d-none') + callConsole.classList.remove('ringing') connectStatus.innerHTML = 'Not Connected' inCallElements.forEach((button) => { @@ -509,6 +510,7 @@ function updateUIRinging() { btnConnect.classList.add('d-none') btnAnswer.classList.remove('d-none') btnReject.classList.remove('d-none') + callConsole.classList.add('ringing') connectStatus.innerHTML = 'Ringing' inCallElements.forEach((button) => { @@ -523,6 +525,7 @@ function updateUIConnected() { btnReject.classList.add('d-none') tabs.classList.add('d-none') btnDisconnect.classList.remove('d-none') + callConsole.classList.remove('ringing') connectStatus.innerHTML = 'Connected' inCallElements.forEach((button) => { diff --git a/public/styles.css b/public/styles.css new file mode 100644 index 0000000..ab23f28 --- /dev/null +++ b/public/styles.css @@ -0,0 +1,11 @@ +.ringing { +animation: tilt-n-move-shaking 0.35s infinite; +} + +@keyframes tilt-n-move-shaking { + 0% { transform: translate(0, 0) rotate(0deg); } + 25% { transform: translate(5px, 5px) rotate(5deg); } + 50% { transform: translate(0, 0) rotate(0eg); } + 75% { transform: translate(-5px, 5px) rotate(-5deg); } + 100% { transform: translate(0, 0) rotate(0deg); } +} \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index 8d0d1c6..7ef6092 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -14,7 +14,7 @@ - + @@ -49,7 +49,7 @@
-
+
Connect