switching networks works, established server functions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user