1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45: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; return userpass.username;
} }
/**
* @param{boolean} connected
*/
function setConnected(connected) { function setConnected(connected) {
let statspan = document.getElementById('statspan'); let statspan = document.getElementById('statspan');
let userform = document.getElementById('userform'); let userform = document.getElementById('userform');
@ -48,6 +51,7 @@ function setConnected(connected) {
disconnectbutton.classList.remove('invisible'); disconnectbutton.classList.remove('invisible');
displayUsername(); displayUsername();
} else { } else {
resetUsers();
let userpass = getUserPass(); let userpass = getUserPass();
document.getElementById('username').value = document.getElementById('username').value =
userpass ? userpass.username : ''; userpass ? userpass.username : '';