72 lines
1.7 KiB
JavaScript
72 lines
1.7 KiB
JavaScript
import './ForumPanel.js'
|
|
|
|
css(`
|
|
forum- {
|
|
font-family: 'Bona';
|
|
}
|
|
|
|
forum- input::placeholder {
|
|
font-family: 'Bona Nova';
|
|
font-size: 0.9em;
|
|
color: var(--accent);
|
|
}
|
|
|
|
input::placeholder {
|
|
font-family: Arial;
|
|
}
|
|
|
|
input[type="checkbox"] {
|
|
appearance: none; /* remove default style */
|
|
-webkit-appearance: none;
|
|
width: 1em;
|
|
height: 1em;
|
|
border: 1px solid var(--accent);
|
|
}
|
|
|
|
input[type="checkbox"]:checked {
|
|
background-color: var(--red);
|
|
}
|
|
`)
|
|
|
|
class Forum extends Shadow {
|
|
|
|
selectedForum = "HY"
|
|
|
|
render() {
|
|
ZStack(() => {
|
|
VStack(() => {
|
|
|
|
ForumPanel()
|
|
|
|
input("Message", "70%")
|
|
.paddingVertical(0.75, em)
|
|
.paddingLeft(2, em)
|
|
.color("var(--accent)")
|
|
.background("#fff1dd")
|
|
.marginBottom(5.5, em)
|
|
.border("1px solid black")
|
|
.borderRadius(100, px)
|
|
.fontFamily("Arial")
|
|
.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(0.5, em)
|
|
.width(100, pct)
|
|
.height(100, vh)
|
|
.horizontalAlign("center")
|
|
.verticalAlign("end")
|
|
})
|
|
.backgroundColor("var(--main)")
|
|
.width(100, pct)
|
|
.height(100, pct)
|
|
}
|
|
|
|
|
|
}
|
|
|
|
register(Forum) |