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 1/4] 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; From a0f320868677bfb81cc604a18369f68dc5ea1949 Mon Sep 17 00:00:00 2001 From: Brandan <32969563+dfault-user@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:21:36 -0500 Subject: [PATCH 2/4] wrong thing, whoops Fuark --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 3b80d69..083afb6 100644 --- a/src/index.js +++ b/src/index.js @@ -182,7 +182,7 @@ class CollabVMClient { if (currentTurnUsername === window.username) { turn = 0; turnstatus.innerText = "You have the turn."; - vmview.class = "focused"; + display.class = "focused"; } // Highlight all waiting users and set their status if (queuedUsers > 1) { @@ -190,7 +190,7 @@ class CollabVMClient { if (window.username === msgArr[i+3]) { turn = i; turnstatus.innerText = "Waiting for turn"; - vmview.class="waiting"; + display.class="waiting"; }; var user = users.find(u => u.username === msgArr[i+3]); user.turn = i; From 27a878b6199593ad13197e142f359c93520b4796 Mon Sep 17 00:00:00 2001 From: Brandan <32969563+dfault-user@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:27:38 -0500 Subject: [PATCH 3/4] make it actually work this time todo: 'you have a turn' text doesn't move chat --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 083afb6..1c22d81 100644 --- a/src/index.js +++ b/src/index.js @@ -171,6 +171,7 @@ class CollabVMClient { buttons.takeTurn.innerText = "Take Turn"; turn = -1; turnstatus.innerText = ""; + display.className = ""; // Get the number of users queued for a turn var queuedUsers = Number(msgArr[2]); if (queuedUsers === 0) return; @@ -182,7 +183,7 @@ class CollabVMClient { if (currentTurnUsername === window.username) { turn = 0; turnstatus.innerText = "You have the turn."; - display.class = "focused"; + display.className = "focused"; } // Highlight all waiting users and set their status if (queuedUsers > 1) { @@ -190,7 +191,7 @@ class CollabVMClient { if (window.username === msgArr[i+3]) { turn = i; turnstatus.innerText = "Waiting for turn"; - display.class="waiting"; + display.className="waiting"; }; var user = users.find(u => u.username === msgArr[i+3]); user.turn = i; From d406522cce1d55c4e093c606f3f5e9151d8b11ae Mon Sep 17 00:00:00 2001 From: Brandan <32969563+dfault-user@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:30:25 -0500 Subject: [PATCH 4/4] peter the coding style is consistent --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 301b377..2601d0f 100644 --- a/src/index.js +++ b/src/index.js @@ -191,7 +191,7 @@ class CollabVMClient { if (window.username === msgArr[i+3]) { turn = i; turnstatus.innerText = "Waiting for turn"; - display.className="waiting"; + display.className = "waiting"; }; var user = users.find(u => u.username === msgArr[i+3]); user.turn = i;