Hide banned threads in the thread list for now using CSS.

This commit is contained in:
Dominik Picheta 2018-05-22 20:20:02 +01:00
commit e78c509940
2 changed files with 12 additions and 3 deletions

View file

@ -248,6 +248,10 @@ $threads-meta-color: #545d70;
}
#threads-list tr.banned {
display: none; // TODO: Fix server so that it doesn't send banned threads.
}
.posts, .about {
@extend .grid-md;
@extend .container;

View file

@ -108,15 +108,20 @@ when defined(js):
proc genThread(thread: Thread, isNew: bool, noBorder: bool): VNode =
let isOld = (getTime() - thread.creation.fromUnix).weeks > 2
let isBanned = thread.author.rank < Moderated
result = buildHtml():
tr(class=class({"no-border": noBorder})):
tr(class=class({"no-border": noBorder, "banned": isBanned})):
td(class="thread-title"):
if thread.isLocked:
italic(class="fas fa-lock fa-xs",
title="Thread cannot be replied to")
if thread.isModerated:
italic(class="fas fa-eye-slash fa-xs",
title="Thread is moderated")
if isBanned:
italic(class="fas fa-ban fa-xs",
title="Thread author is banned")
else:
italic(class="fas fa-eye-slash fa-xs",
title="Thread is moderated")
if thread.isSolved:
italic(class="fas fa-check-square fa-xs",
title="Thread has a solution")