making ready for production, fixing app menu spacing, some better icons

This commit is contained in:
metacryst
2026-03-15 08:13:44 -05:00
parent cb11d68fa7
commit fc2d9c2bc9
48 changed files with 53 additions and 36 deletions

View File

@@ -25,11 +25,24 @@ class AppMenu extends Shadow {
}
render() {
// let apps = global.currentNetwork.apps
let apps = [
"Dashboard", "Jobs", "Events", "People"
]
let appCount = apps.filter(a => a !== "Settings").length
let horizontalMargin = {
1: 50,
2: 10,
3: 2,
4: 1.5,
5: 0.5
}[appCount] ?? 4
HStack(() => {
let currentNetwork = global.currentNetwork
for(let i = 0; i < currentNetwork.apps.length; i++) {
let app = currentNetwork.apps[i]
for(let i = 0; i < apps.length; i++) {
let app = apps[i]
if (app === "Settings") continue;
img(util.cssVariable(global.currentApp() === app ? this.images[app].src[1] : this.images[app].src[0]), "1.3em")
.attr({app: app})
@@ -37,6 +50,7 @@ class AppMenu extends Shadow {
.borderBottom(global.currentApp() === app ? "1px solid var(--text)" : "1px solid transparent")
.onTouch(async (done, e) => {
if(done) {
console.log(e)
e.target.style.borderBottom = "1px solid var(--text)"
global.openApp(app)
this.onNewSelection()
@@ -45,16 +59,16 @@ class AppMenu extends Shadow {
})
}
})
.borderTop("1px solid var(--darkgrey)")
.display("grid")
.gridTemplateColumns(`repeat(${apps.filter(a => a !== "Settings").length}, 1fr)`)
.placeItems("center")
.borderTop("0.5px solid #783131")
.height("auto")
.zIndex(1)
.justifyContent("space-between")
.paddingHorizontal(4, em)
.paddingTop(0.5, em)
.paddingBottom(2, em)
.width(100, vw)
.boxSizing("border-box")
.flex("0 0 auto")
}
}