Fixes reply box's border.
This commit is contained in:
parent
9f059bfade
commit
6fe8286509
2 changed files with 6 additions and 4 deletions
|
|
@ -174,9 +174,10 @@ when defined(js):
|
|||
genPost(post, list.thread, isLoggedIn)
|
||||
prevPost = some(post)
|
||||
|
||||
if list.moreCount > 0:
|
||||
let hasMore = list.moreCount > 0
|
||||
if hasMore:
|
||||
genLoadMore(list.posts.len)
|
||||
elif prevPost.isSome:
|
||||
genTimePassed(prevPost.get(), none[Post]())
|
||||
|
||||
render(state.replyBox, list.thread, state.replyingTo)
|
||||
render(state.replyBox, list.thread, state.replyingTo, hasMore)
|
||||
|
|
@ -31,12 +31,13 @@ when defined(js):
|
|||
|
||||
state.shown = true
|
||||
|
||||
proc render*(state: ReplyBox, thread: Thread, post: Option[Post]): VNode =
|
||||
proc render*(state: ReplyBox, thread: Thread, post: Option[Post],
|
||||
hasMore: bool): VNode =
|
||||
if not state.shown:
|
||||
return buildHtml(tdiv(id="reply-box"))
|
||||
|
||||
result = buildHtml():
|
||||
tdiv(class="information no-border", id="reply-box"):
|
||||
tdiv(class=class({"no-border": hasMore}, "information"), id="reply-box"):
|
||||
tdiv(class="information-icon"):
|
||||
italic(class="fas fa-reply")
|
||||
tdiv(class="information-main", style=style(StyleAttr.width, "100%")):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue