1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-26 02:25:58 +01:00

Clear user list upon disconnection.

This commit is contained in:
Juliusz Chroboczek 2020-09-05 12:59:28 +02:00
parent eac7a2afc4
commit 93f116021d

View file

@ -32,6 +32,9 @@ function getUsername() {
return userpass.username;
}
/**
* @param{boolean} connected
*/
function setConnected(connected) {
let statspan = document.getElementById('statspan');
let userform = document.getElementById('userform');
@ -48,6 +51,7 @@ function setConnected(connected) {
disconnectbutton.classList.remove('invisible');
displayUsername();
} else {
resetUsers();
let userpass = getUserPass();
document.getElementById('username').value =
userpass ? userpass.username : '';