Fixed serverFunctions naming issue

This commit is contained in:
2026-04-06 12:25:47 -04:00
parent d0df371a3c
commit 422e89caee
4 changed files with 8 additions and 8 deletions

View File

@@ -52,7 +52,7 @@
// forum: global.currentNetwork.abbreviation, // forum: global.currentNetwork.abbreviation,
// text: this.value // text: this.value
// } // }
// await global.Socket.send({ // await global.socket.send({
// app: "FORUM", // app: "FORUM",
// operation: "SEND", // operation: "SEND",
// msg: msg // msg: msg

View File

@@ -93,7 +93,7 @@
// id: message.id, // id: message.id,
// text: "EDITED TEXT TEST!" // text: "EDITED TEXT TEST!"
// } // }
// await global.Socket.send({ // await global.socket.send({
// app: "FORUM", // app: "FORUM",
// operation: "PUT", // operation: "PUT",
// msg: msg // msg: msg
@@ -121,7 +121,7 @@
// }); // });
// if (!this.isSending) { // if (!this.isSending) {
// this.isSending = true // this.isSending = true
// let res = await global.Socket.send({ // let res = await global.socket.send({
// app: "FORUM", // app: "FORUM",
// operation: "GET", // operation: "GET",
// msg: { // msg: {

View File

@@ -65,7 +65,7 @@ class Messages extends Shadow {
.fontSize(1, em) .fontSize(1, em)
.onKeyDown((e) => { .onKeyDown((e) => {
if (e.key === "Enter") { if (e.key === "Enter") {
window.Socket.send({app: "MESSAGES", operation: "SEND", msg: { conversation: `CONVERSATION-${this.selectedConvoID}`, text: e.target.value }}) global.socket.send({app: "MESSAGES", operation: "SEND", msg: { conversation: `CONVERSATION-${this.selectedConvoID}`, text: e.target.value }})
e.target.value = "" e.target.value = ""
} }
}) })
@@ -76,7 +76,7 @@ class Messages extends Shadow {
.verticalAlign("end") .verticalAlign("end")
}) })
.onAppear(async () => { .onAppear(async () => {
let res = await global.Socket.send({app: "MESSAGES", operation: "GET"}) let res = await global.socket.send({app: "MESSAGES", operation: "GET"})
if(!res) console.error("failed to get messages") if(!res) console.error("failed to get messages")
if(res.msg.length > 0 && this.conversations.length === 0) { if(res.msg.length > 0 && this.conversations.length === 0) {
@@ -104,7 +104,7 @@ class Messages extends Shadow {
.color("var(--accent)") .color("var(--accent)")
.onKeyDown(function (e) { .onKeyDown(function (e) {
if (e.key === "Enter") { if (e.key === "Enter") {
window.Socket.send({app: "MESSAGES", operation: "ADDCONVERSATION", msg: {email: this.value }}) global.socket.send({app: "MESSAGES", operation: "ADDCONVERSATION", msg: {email: this.value }})
this.value = "" this.value = ""
} }
}) })

View File

@@ -7,7 +7,7 @@ import util from "./util.js"
const env = import.meta.env const env = import.meta.env
let Global = class { let Global = class {
Socket = new Socket() socket = new Socket()
profile = null profile = null
currentNetwork = "" currentNetwork = ""
lastApp = "" lastApp = ""
@@ -195,7 +195,7 @@ let Global = class {
} else if(status === 500) { } else if(status === 500) {
ConnectionError() ConnectionError()
} else { } else {
await this.Socket.init() await this.socket.init()
await this.setupPushNotifications() await this.setupPushNotifications()
await this.onNavigate() await this.onNavigate()
Home() Home()