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

@@ -15,9 +15,9 @@ class AppWindowContainer extends Shadow {
.width(100, pct)
.gap(0)
if (this.isProfileOpen) {
Profile()
}
Profile()
.display("none")
.zIndex(3)
})
.height(100, pct)
.overflowY("hidden")
@@ -26,13 +26,11 @@ class AppWindowContainer extends Shadow {
}
openProfile() {
this.isProfileOpen = true
this.rerender()
this.$("profile-").display("")
}
closeProfile() {
this.isProfileOpen = false
this.rerender()
this.$("profile-").display("none")
}
}

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)