Attempt 1 at indicating if user has turn or waiting for turn more vibrantly

This commit is contained in:
Brandan 2023-01-26 16:19:21 -05:00
parent bf43f2533d
commit a9cf21e066
2 changed files with 22 additions and 3 deletions

21
dist/style.css vendored
View file

@ -19,6 +19,7 @@
display: block; display: block;
margin-bottom: 10px; margin-bottom: 10px;
} }
#vmlist > div.row > div { #vmlist > div.row > div {
padding-bottom: 10px; padding-bottom: 10px;
} }
@ -26,9 +27,11 @@
cursor: pointer; cursor: pointer;
border-color: rgb(8, 121, 250); border-color: rgb(8, 121, 250);
} }
.vmtile > img { .vmtile > img {
margin-bottom: 2px; margin-bottom: 2px;
}*/ }
.chat-table, .username-table { .chat-table, .username-table {
overflow-y: auto; overflow-y: auto;
border: 1px solid #575757; border: 1px solid #575757;
@ -36,6 +39,7 @@
.chat-table { .chat-table {
height: 30vh; height: 30vh;
} }
.username-table { .username-table {
max-height: 30vh; max-height: 30vh;
} }
@ -43,9 +47,22 @@
position: sticky; position: sticky;
top: 0; top: 0;
} }
#turnstatus { #turnstatus {
text-align: center; text-align: center;
} }
#voteResetPanel { #voteResetPanel {
text-align: center; text-align: center;
} }
.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)
}

View file

@ -182,13 +182,15 @@ class CollabVMClient {
if (currentTurnUsername === window.username) { if (currentTurnUsername === window.username) {
turn = 0; turn = 0;
turnstatus.innerText = "You have the turn."; turnstatus.innerText = "You have the turn.";
} vmview.class = "focused";
}
// Highlight all waiting users and set their status // Highlight all waiting users and set their status
if (queuedUsers > 1) { if (queuedUsers > 1) {
for (var i = 1; i < queuedUsers; i++) { for (var i = 1; i < queuedUsers; i++) {
if (window.username === msgArr[i+3]) { if (window.username === msgArr[i+3]) {
turn = i; turn = i;
turnstatus.innerText = "Waiting for turn"; turnstatus.innerText = "Waiting for turn";
vmview.class="waiting";
}; };
var user = users.find(u => u.username === msgArr[i+3]); var user = users.find(u => u.username === msgArr[i+3]);
user.turn = i; user.turn = i;