improving styling, fixing bugs with profile, login error handling

This commit is contained in:
metacryst
2026-03-19 07:41:18 -05:00
parent 3a5214ed45
commit 5a56dfa051
9 changed files with 107 additions and 45 deletions

View File

@@ -6,31 +6,26 @@ class Sidebar extends Shadow {
return p(text)
.fontSize(1.5, em)
.fontWeight("bold")
.fontFamily("Sedan SC")
.fontFamily("Arial")
.marginLeft(2, em)
.fontStyle("italic")
.onClick(function () { // BUG -- Fires twice every time
if(this.innerText === "Home") {
window.navigateTo("/")
return
} else if (this.innerText === "Logout") {
$("sidebar-").close()
global.onLogout()
return
} else if (this.innerText === "Profile") {
$("appwindowcontainer-").openProfile()
$("sidebar-").close()
return
.onClick(function (done) {
if(done) {
if (this.innerText === "Logout") {
$("sidebar-").close()
global.onLogout()
return
} else if (this.innerText === "Profile") {
$("appwindowcontainer-").openProfile()
$("sidebar-").close()
return
}
}
window.navigateTo(this.innerText.toLowerCase().replace(/\s+/g, ""))
})
}
render() {
VStack(() => {
this.SidebarItem("Profile")
this.SidebarItem("Home")
this.SidebarItem("Map")
this.SidebarItem("Logout")
})
.gap(2, em)