Ability to post in Forum

This commit is contained in:
metacryst
2025-11-25 10:17:01 -06:00
parent 7f4a9a8b18
commit 89702efa3a
27 changed files with 494 additions and 254 deletions

View File

@@ -1,3 +1,5 @@
import './MessagesPanel.js'
css(`
forum- {
font-family: 'Bona';
@@ -23,8 +25,6 @@ css(`
`)
class Forum extends Shadow {
friends = []
conversations = []
render() {
ZStack(() => {
@@ -46,13 +46,25 @@ class Forum extends Shadow {
.gap(0, em)
VStack(() => {
input("Message Hyperia", "80%")
MessagesPanel()
input("Message Hyperia", "93%")
.paddingVertical(1, em)
.paddingHorizontal(2, em)
.color("var(--accent)")
.background("var(--darkbrown)")
.marginBottom(6, em)
.border("none")
.fontSize(1, em)
.onKeyDown(function (e) {
if (e.key === "Enter") {
window.Socket.send({app: "FORUM", operation: "SEND", msg: {forum: "HY", text: this.value }})
this.value = ""
}
})
})
.gap(1, em)
.width(100, pct)
.alignHorizontal("center")
.alignVertical("end")
@@ -120,6 +132,8 @@ class Forum extends Shadow {
.width(100, pct)
.height(100, pct)
}
}
register(Forum)