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 {
|
.posts, .about {
|
||||||
@extend .grid-md;
|
@extend .grid-md;
|
||||||
@extend .container;
|
@extend .container;
|
||||||
|
|
|
||||||
|
|
@ -108,15 +108,20 @@ when defined(js):
|
||||||
|
|
||||||
proc genThread(thread: Thread, isNew: bool, noBorder: bool): VNode =
|
proc genThread(thread: Thread, isNew: bool, noBorder: bool): VNode =
|
||||||
let isOld = (getTime() - thread.creation.fromUnix).weeks > 2
|
let isOld = (getTime() - thread.creation.fromUnix).weeks > 2
|
||||||
|
let isBanned = thread.author.rank < Moderated
|
||||||
result = buildHtml():
|
result = buildHtml():
|
||||||
tr(class=class({"no-border": noBorder})):
|
tr(class=class({"no-border": noBorder, "banned": isBanned})):
|
||||||
td(class="thread-title"):
|
td(class="thread-title"):
|
||||||
if thread.isLocked:
|
if thread.isLocked:
|
||||||
italic(class="fas fa-lock fa-xs",
|
italic(class="fas fa-lock fa-xs",
|
||||||
title="Thread cannot be replied to")
|
title="Thread cannot be replied to")
|
||||||
if thread.isModerated:
|
if thread.isModerated:
|
||||||
italic(class="fas fa-eye-slash fa-xs",
|
if isBanned:
|
||||||
title="Thread is moderated")
|
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:
|
if thread.isSolved:
|
||||||
italic(class="fas fa-check-square fa-xs",
|
italic(class="fas fa-check-square fa-xs",
|
||||||
title="Thread has a solution")
|
title="Thread has a solution")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue