Update Karax and small frontend fixes.

This commit is contained in:
Dominik Picheta 2018-05-24 12:00:06 +01:00
commit c566b05347
3 changed files with 5 additions and 6 deletions

View file

@ -19,7 +19,7 @@ requires "hmac#9c61ebe2fd134cf97"
requires "recaptcha 1.0.2"
requires "sass#649e0701fa5c"
requires "https://github.com/dom96/karax#7a884fb"
requires "karax#9882d1aec2bb"
requires "webdriver#a2be578"
@ -58,4 +58,4 @@ task test, "Runs tester":
exec "nimble c -y -r tests/browsertester"
task fasttest, "Runs tester without recompiling backend":
exec "nimble c -r tests/browsertester"
exec "nimble c -r tests/browsertester"

View file

@ -24,7 +24,7 @@
</head>
<body>
<div id="ROOT" />
<div id="ROOT"></div>
<script type="text/javascript" src="/js/forum.js?t=$timestamp"></script>
</body>

View file

@ -88,9 +88,8 @@ when defined(js):
state.shown = false
proc onChange(e: Event, n: VNode, state: ReplyBox) =
# TODO: There should be a karax-way to do this. I guess I can just call
# `value` on the node? We need to document this better :)
state.text = cast[dom.TextAreaElement](n.dom).value
# TODO: Please document this better in Karax.
state.text = n.value
proc renderContent*(state: ReplyBox, thread: Option[Thread],
post: Option[Post]): VNode =