Commit 93f11602 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Clear user list upon disconnection.

parent eac7a2af
...@@ -32,6 +32,9 @@ function getUsername() { ...@@ -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) { ...@@ -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 : '';
......
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