Only hide category on category page for testing purposes

This commit is contained in:
Joey Yakimowich-Payne 2020-02-18 13:54:49 -07:00 • committed by Andreas Rumpf
commit 5fc811e797

View file

@ -109,9 +109,8 @@ when defined(js):
a(href=makeUri("/t/" & $thread.id), a(href=makeUri("/t/" & $thread.id),
onClick=anchorCB): onClick=anchorCB):
text thread.topic text thread.topic
if displayCategory: td(class=class({"d-none": not displayCategory})):
td(): render(thread.category)
render(thread.category)
genUserAvatars(thread.users) genUserAvatars(thread.users)
td(): text $thread.replies td(): text $thread.replies
td(class=class({ td(class=class({
@ -187,6 +186,8 @@ when defined(js):
return buildHtml(tdiv(class="loading loading-lg")) return buildHtml(tdiv(class="loading loading-lg"))
let displayCategory = true
let list = state.list.get() let list = state.list.get()
result = buildHtml(): result = buildHtml():
section(class="thread-list"): section(class="thread-list"):
@ -194,8 +195,8 @@ when defined(js):
thead(): thead():
tr: tr:
th(text "Topic") th(text "Topic")
if categoryId == -1: th(class=class({"d-none": not displayCategory})):
th(text "Category") text "Category"
th(style=style((StyleAttr.width, kstring"8rem"))): text "Users" th(style=style((StyleAttr.width, kstring"8rem"))): text "Users"
th(text "Replies") th(text "Replies")
th(text "Views") th(text "Views")
@ -209,7 +210,7 @@ when defined(js):
let (isLastUnseen, isNew) = getInfo(list.threads, i, currentUser) let (isLastUnseen, isNew) = getInfo(list.threads, i, currentUser)
genThread(thread, isNew, genThread(thread, isNew,
noBorder=isLastUnseen or isLastThread, noBorder=isLastUnseen or isLastThread,
displayCategory=categoryId == -1) displayCategory=displayCategory)
if isLastUnseen and (not isLastThread): if isLastUnseen and (not isLastThread):
tr(class="last-visit-separator"): tr(class="last-visit-separator"):
td(colspan="6"): td(colspan="6"):