displaying rudimentary logs

This commit is contained in:
metacryst
2025-12-26 06:55:32 -06:00
parent b4d0d77b91
commit a76e975601
15 changed files with 243 additions and 212 deletions

View File

@@ -1,7 +1,29 @@
class LogTable extends Shadow {
state = {
logs: []
}
render() {
VStack(() => {
this.state.logs.forEach((log) => {
HStack(() => {
p(log.time)
p(log.ip)
p(log.host)
p(log.path)
.maxWidth(50, vw)
})
.gap(1, em)
})
})
.onAppear(async () => {
let logs = await ServerClient.send("GET")
this.state.logs = logs
})
.onEvent("log", (e) => {
console.log(e.detail)
this.state.logs.push(e.detail)
console.log(this.state.logs)
})
}
}