adding error handling for signup, moving delete account button in sidebar to bottom

This commit is contained in:
metacryst
2026-03-25 23:41:45 -05:00
parent 1c61a4d202
commit 472e69d3c0
8 changed files with 27 additions and 16 deletions

View File

@@ -10,19 +10,18 @@ class Sidebar extends Shadow {
SidebarItem(text) {
return p(text)
.fontSize(1.5, em)
.fontSize(1.2, em)
.fontWeight("bold")
.color("var(--headertext)")
.fontFamily("Arial")
.marginLeft(1, em)
.marginLeft(3, em)
.marginTop(2, em)
.onTap(function (done) {
if (done) {
if (this.innerText === "Logout") {
global.onLogout()
$("home-").closeSidebar();
return
} else if (this.innerText === "Delete account") {
$("sidebar-").deleteAccount();
}
}
})
@@ -63,10 +62,21 @@ class Sidebar extends Shadow {
if(done)
this.openProfile()
})
.paddingBottom(1, em)
this.SidebarItem("Logout")
this.SidebarItem("Delete account")
})
button("Delete Account")
.fontSize(0.9, em)
.marginTop("auto")
.marginBottom(2, em)
.background("var(--darkred)")
.paddingVertical(1, em)
.border("none")
.outline("1px solid var(--divider)")
.color("var(--text)")
.onTap((done) => this.deleteAccount())
})
.gap(1, em)
.paddingTop(15, vh)
.paddingHorizontal(1, em)