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

@@ -65,7 +65,7 @@ class Messages extends Shadow {
.fontSize(1, em)
.onKeyDown((e) => {
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 = ""
}
})
@@ -104,7 +104,7 @@ class Messages extends Shadow {
.color("var(--accent)")
.onKeyDown(function (e) {
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 = ""
}
})

View File

@@ -13,7 +13,7 @@ class MessagesPanel extends Shadow {
if(this.messages) {
for(let i=0; i<this.messages.length; i++) {
let message = this.messages[i]
let fromMe = window.profile.email === message.from.email
let fromMe = global.profile.email === message.from.email
VStack(() => {
HStack(() => {
p(message.from.firstName + " " + message.from.lastName)

View File

@@ -57,7 +57,7 @@ class MessagesSidebar extends Shadow {
let membersString = ""
for(let i=0; i<members.length; i++) {
let member = members[i]
if(member.email === window.profile.email) {
if(member.email === global.profile.email) {
continue;
}
if(members.length > 2) {