Commit 993d664b authored by Sascha Silbe's avatar Sascha Silbe Committed by Juliusz Chroboczek

frontend: add support for showing raised hand

Show the "hand-paper" symbol instead of the "circle" symbol while a
user is raising their hand.
parent 39976d6d
...@@ -1204,6 +1204,10 @@ header .collapse { ...@@ -1204,6 +1204,10 @@ header .collapse {
font-weight: 900; font-weight: 900;
} }
#users > div.user-status-raisehand::before {
content: "\f256";
}
.close-icon { .close-icon {
font: normal 1em/1 Arial, sans-serif; font: normal 1em/1 Arial, sans-serif;
display: inline-block; display: inline-block;
......
...@@ -1997,15 +1997,19 @@ function addUser(id, name) { ...@@ -1997,15 +1997,19 @@ function addUser(id, name) {
/** /**
* @param {string} id * @param {string} id
* @param {string} name * @param {user} userinfo
*/ */
function changeUser(id, name) { function changeUser(id, userinfo) {
let user = document.getElementById('user-' + id); let user = document.getElementById('user-' + id);
if(!user) { if(!user) {
console.warn('Unknown user ' + id); console.warn('Unknown user ' + id);
return; return;
} }
user.textContent = name ? name : '(anon)'; user.textContent = userinfo.username ? userinfo.username : '(anon)';
if (userinfo.status.raisehand)
user.classList.add('user-status-raisehand');
else
user.classList.remove('user-status-raisehand');
} }
/** /**
...@@ -2034,7 +2038,7 @@ function gotUser(id, kind) { ...@@ -2034,7 +2038,7 @@ function gotUser(id, kind) {
scheduleReconsiderParameters(); scheduleReconsiderParameters();
break; break;
case 'change': case 'change':
changeUser(id, serverConnection.users[id].username); changeUser(id, serverConnection.users[id]);
break; break;
default: default:
console.warn('Unknown user kind', kind); console.warn('Unknown user kind', kind);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment