fix: move code to not render html when not needed

This commit is contained in:
2023-11-29 16:10:55 +01:00
parent 6dc0293455
commit d5e692449b
2 changed files with 13 additions and 8 deletions

View File

@ -35,15 +35,17 @@ export default class extends AbstractView {
async postInit()
{
let login_button = document.getElementById("button")
if (login_button != null)
login_button.onclick = login;
}
async getHtml() {
if (await client.isAuthentificate())
{
navigateTo("/home")
return;
}
document.getElementById("button").onclick = login;
}
async getHtml() {
return `
<div class=form>
<label>Login</label>