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)
|
genPost(post, list.thread, isLoggedIn)
|
||||||
prevPost = some(post)
|
prevPost = some(post)
|
||||||
|
|
||||||
if list.moreCount > 0:
|
let hasMore = list.moreCount > 0
|
||||||
|
if hasMore:
|
||||||
genLoadMore(list.posts.len)
|
genLoadMore(list.posts.len)
|
||||||
elif prevPost.isSome:
|
elif prevPost.isSome:
|
||||||
genTimePassed(prevPost.get(), none[Post]())
|
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
|
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:
|
if not state.shown:
|
||||||
return buildHtml(tdiv(id="reply-box"))
|
return buildHtml(tdiv(id="reply-box"))
|
||||||
|
|
||||||
result = buildHtml():
|
result = buildHtml():
|
||||||
tdiv(class="information no-border", id="reply-box"):
|
tdiv(class=class({"no-border": hasMore}, "information"), id="reply-box"):
|
||||||
tdiv(class="information-icon"):
|
tdiv(class="information-icon"):
|
||||||
italic(class="fas fa-reply")
|
italic(class="fas fa-reply")
|
||||||
tdiv(class="information-main", style=style(StyleAttr.width, "100%")):
|
tdiv(class="information-main", style=style(StyleAttr.width, "100%")):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue