nicer buttons

This commit is contained in:
metacryst
2026-02-28 04:56:19 -06:00
parent 21f654bbed
commit bdd260c2b5
5 changed files with 48 additions and 24 deletions

View File

@@ -14,7 +14,7 @@ class AppMenu extends Shadow {
.getPropertyValue("--" + value)
.trim();
}
HStack(() => {
let currentNetwork = global.currentNetwork
if(!currentNetwork) return
@@ -27,16 +27,22 @@ class AppMenu extends Shadow {
.padding(0.3, em)
.paddingBottom(currentApp === app ? 4 : 5, px)
.borderBottom(currentApp === app ? "1px solid var(--accent)" : "")
.onClick((done) => {
if(done) global.openApp(app)
.onClick(function (done) {
if(!done) {
this.style.transform = "translateY(10%)"
} else {
this.style.transform = ""
global.openApp(app)
}
})
.onHover(function (hovering) {
if(hovering) {
this.style.opacity = 0.8
this.style.translateY = -0.1
} else {
this.style.opacity = ""
this.style.translateY = ""
}
})
.cursor("pointer")
}
})
.justifyContent("center")