Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shake it! #67

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand Down
11 changes: 11 additions & 0 deletions public/styles.css
Original file line number Diff line number Diff line change
@@ -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); }
}
4 changes: 2 additions & 2 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">

<link rel="stylesheet" href="/styles.css">
</head>

<body class="bg-light">
Expand Down Expand Up @@ -49,7 +49,7 @@
<div class="row py-3">
<!-- Connect options -->
<div class="col-12 col-md-4">
<div class="card">
<div id="callConsole" class="card">
<div class="card-body">
<h5>Connect</h5>
<div class="form-group">
Expand Down