switching networks works, established server functions

This commit is contained in:
metacryst
2026-01-16 05:22:52 -06:00
parent d2982543d0
commit d3df5bb6cb
31 changed files with 410 additions and 310 deletions

View File

@@ -15,9 +15,9 @@ class AppMenu extends Shadow {
}
HStack(() => {
let currentNetwork = window.currentNetwork
let currentNetwork = global.currentNetwork
if(!currentNetwork) return
let currentApp = window.currentApp
let currentApp = global.currentApp
for(let i = 0; i < currentNetwork.apps.length; i++) {
let app = currentNetwork.apps[i]
@@ -27,7 +27,7 @@ class AppMenu extends Shadow {
.paddingBottom(currentApp === app ? 4 : 5, px)
.borderBottom(currentApp === app ? "1px solid var(--accent)" : "")
.onClick((done) => {
if(done) window.openApp(app)
if(done) global.openApp(app)
})
.onHover(function (hovering) {
if(hovering) {
@@ -49,6 +49,10 @@ class AppMenu extends Shadow {
// console.log("app hello?") // BUG: Quill is not acknowledging this event unless there is something else in the function body
this.rerender()
})
.onEvent("networkchange", () => {
// console.log(global.currentApp)
this.rerender()
})
.position("fixed")
.x(0).yBottom(0)
.width(100, vw)