Hide banned threads in the thread list for now using CSS.
This commit is contained in:
parent
568e910040
commit
e78c509940
2 changed files with 12 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue