commit 45223ae57a072fce40da2a4391284d8157ee090c parent 8da450e2464dd8ec3dae20a594a6730384011751 Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Sun, 6 Oct 2024 19:49:06 -0700 Use ui.login in login page Diffstat:
| M | files/login/index.html | | | 14 | ++------------ |
| M | files/login/main.js | | | 2 | +- |
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/files/login/index.html b/files/login/index.html @@ -8,17 +8,7 @@ </head> <body> <h1>Login</h1> - - <form id="login" class="credentials"> - <aside>Don't have an account? <a href="/register">signup</a> now!</aside> - - <label for="username">Username:</label> - <input id="username" autocomplete="username" name="username" required/> - - <label for="password">Password:</label> - <input id="password" autocomplete="current-password" type="password" name="password" required/> - - <input type="submit" value="Login"/> - </form> + + <noscript><p>Unfortunately you must enable Javascript to login.</p></noscript> </body> </html> diff --git a/files/login/main.js b/files/login/main.js @@ -9,7 +9,7 @@ function init() { window.location.href = default_page } - let login = document.getElementById("login") + let login = document.body.appendChild(ui.login()) let username = document.getElementById("username") let password = document.getElementById("password") if (!login || !username || !password) {