commit 869a086124d4bccc5017de65d7b2958007cd7768
parent 96ea779e63f037f98a97539213a212099eb5977f
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Thu, 10 Oct 2024 12:58:08 -0700
Add bar to login and register pages
Really just to give a link to the homepage. Also stop script execution
when redirecting.
Diffstat:
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/files/login/main.js b/files/login/main.js
@@ -7,8 +7,10 @@ let default_page = "/floorplans"
function init() {
if (api.authorized()) {
window.location.href = default_page
+ return
}
+ etc.bar()
document.body.appendChild(ui.login({ callback: function() { window.location.href = default_page } }))
}
diff --git a/files/register/main.js b/files/register/main.js
@@ -6,8 +6,11 @@ function init() {
if (api.authorized()) {
// Maybe don't do this?
window.location.href = "/floorplans"
+ return
}
+ etc.bar()
+
let email_input = document.getElementById("email")
let email_strict_input = document.getElementById("email-strict")