From a636377b561ded20a17913ac79aae7e4a7437880 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Thu, 9 Apr 2020 16:37:47 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=91=F0=9F=8F=8F=20Checkpoint=20./publi?= =?UTF-8?q?c/style.css:530995/304=20./views/room.handlebars:530995/22=20./?= =?UTF-8?q?room.js:530995/139?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/style.css | 19 +++++++++++++++++++ room.js | 2 ++ views/room.handlebars | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/public/style.css b/public/style.css index 471333b..2d1bca2 100644 --- a/public/style.css +++ b/public/style.css @@ -114,4 +114,23 @@ figure.participant figcaption { 40%, 60% { transform: scale(1.3) rotate(30deg); } +} + +#messageBox { + position: fixed; + left: 0; + right: 0; + top: 50%; + transform: translateY(-50%); + height:100px; + background: #bbbbf2; + border: 3px solid black; +} + +#messageBox img { + max-height: 90%; +} + +.hide { + display: none; } \ No newline at end of file diff --git a/room.js b/room.js index b3a5e1b..28f5423 100644 --- a/room.js +++ b/room.js @@ -50,6 +50,8 @@ function addAudienceWS(roomId, ws) { function buzz(roomId, participant) { let room = getOrCreateRoom(roomId); + participant = room.participants.find(p => p.participantId === participant.participantId); + room.participants.forEach(p => { if (p.ws && p.participantId !== participant.participantId) { p.ws.send(JSON.stringify({ diff --git a/views/room.handlebars b/views/room.handlebars index 6d4bbed..aea5519 100644 --- a/views/room.handlebars +++ b/views/room.handlebars @@ -23,7 +23,7 @@ -
+
@@ -53,7 +53,7 @@ })); }); - showMessage(msg) { + function showMessage(msg) { let mb = document.getElementById('messageBox'); mb.innerHTML = msg; mb.classList.remove('hide');