remote url changed

This commit is contained in:
metacryst
2026-04-04 01:41:35 -05:00
parent 2592137fa3
commit 3fe1386415
5 changed files with 169 additions and 14 deletions

View File

@@ -32,14 +32,6 @@ let Global = class {
window.dispatchEvent(event)
}
async fetchAppData() {
let personalSpace = this.currentNetwork === this.profile
if (personalSpace) { return {} }
let appData = await fetch(`${util.HOST}/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
let json = await appData.json()
return json
}
onNavigate = async () => {
if(!global.profile) return
let selectedNetwork = this.networkFromPath()
@@ -72,10 +64,6 @@ let Global = class {
window.dispatchEvent(event)
}
if(!this.currentNetwork?.data) {
this.currentNetwork.data = await this.fetchAppData()
}
if(appChanged && !networkChanged) {
const event = new CustomEvent('appchange', {
detail: { name: this.currentApp() }