Ability to post in Forum
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user