Commit e17d9710 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fill login box after a reload.

parent b7aea3a4
......@@ -250,6 +250,14 @@ function closeVideoControls() {
document.getElementById('collapse-video').style.display = "";
}
function fillLogin() {
let userpass = getUserPass();
getInputElement('username').value =
userpass ? userpass.username : '';
getInputElement('password').value =
userpass ? userpass.password : '';
}
/**
* @param{boolean} connected
*/
......@@ -264,11 +272,7 @@ function setConnected(connected) {
displayUsername();
} else {
resetUsers();
let userpass = getUserPass();
getInputElement('username').value =
userpass ? userpass.username : '';
getInputElement('password').value =
userpass ? userpass.password : '';
fillLogin();
userbox.classList.add('invisible');
connectionbox.classList.remove('invisible');
displayError('Disconnected', 'error');
......@@ -2299,6 +2303,7 @@ function start() {
setMediaChoices(false).then(e => reflectSettings());
fillLogin();
document.getElementById("login-container").classList.remove('invisible');
}
......
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