mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
frontend: add support for showing raised hand
Show the "hand-paper" symbol instead of the "circle" symbol while a user is raising their hand.
This commit is contained in:
parent
39976d6d0d
commit
993d664ba2
2 changed files with 12 additions and 4 deletions
|
@ -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) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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) {
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue