From a9cf21e06670ab82d017feb91243992eb324b06b Mon Sep 17 00:00:00 2001 From: Brandan <32969563+dfault-user@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:19:21 -0500 Subject: [PATCH] Attempt 1 at indicating if user has turn or waiting for turn more vibrantly --- dist/style.css | 21 +++++++++++++++++++-- src/index.js | 4 +++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dist/style.css b/dist/style.css index 24c43e4..e5a85ef 100644 --- a/dist/style.css +++ b/dist/style.css @@ -19,6 +19,7 @@ display: block; margin-bottom: 10px; } + #vmlist > div.row > div { padding-bottom: 10px; } @@ -26,9 +27,11 @@ cursor: pointer; border-color: rgb(8, 121, 250); } + .vmtile > img { margin-bottom: 2px; -}*/ +} + .chat-table, .username-table { overflow-y: auto; border: 1px solid #575757; @@ -36,6 +39,7 @@ .chat-table { height: 30vh; } + .username-table { max-height: 30vh; } @@ -43,9 +47,22 @@ position: sticky; top: 0; } + #turnstatus { text-align: center; } #voteResetPanel { text-align: center; -} \ No newline at end of file +} + +.focused { + box-shadow: 0 0 9px 0 rgba(45,213,255,.75); + -moz-box-shadow: 0 0 9px 0 rgba(45,213,255,.75); + -webkit-box-shadow: 0 0 9px 0 rgba(45,213,255,.75) +} + +.waiting { + box-shadow: 0 0 9px 0 rgba(242,255,63,.75); + -moz-box-shadow: 0 0 9px 0 rgba(242,255,63,.75); + -webkit-box-shadow: 0 0 9px 0 rgba(242,255,63,.75) +} diff --git a/src/index.js b/src/index.js index b715436..3b80d69 100644 --- a/src/index.js +++ b/src/index.js @@ -182,13 +182,15 @@ class CollabVMClient { if (currentTurnUsername === window.username) { turn = 0; turnstatus.innerText = "You have the turn."; - } + vmview.class = "focused"; + } // Highlight all waiting users and set their status if (queuedUsers > 1) { for (var i = 1; i < queuedUsers; i++) { if (window.username === msgArr[i+3]) { turn = i; turnstatus.innerText = "Waiting for turn"; + vmview.class="waiting"; }; var user = users.find(u => u.username === msgArr[i+3]); user.turn = i;