Show category column if not on mobile

This commit is contained in:
Joey Yakimowich-Payne 2020-03-06 13:15:17 -07:00 • committed by Dominik Picheta
commit 3db01a1d44

View file

@ -116,7 +116,10 @@ when defined(js):
title="Thread has a solution") title="Thread has a solution")
a(href=makeUri("/t/" & $thread.id), onClick=anchorCB): a(href=makeUri("/t/" & $thread.id), onClick=anchorCB):
text thread.topic text thread.topic
tdiv(class=class({"d-none": not displayCategory})): tdiv(class="show-sm" & class({"d-none": not displayCategory})):
render(thread.category)
td(class="hide-sm" & class({"d-none": not displayCategory})):
render(thread.category) render(thread.category)
genUserAvatars(thread.users) genUserAvatars(thread.users)
td(class="thread-replies"): text $thread.replies td(class="thread-replies"): text $thread.replies
@ -199,7 +202,7 @@ when defined(js):
return buildHtml(tdiv(class="loading loading-lg")) return buildHtml(tdiv(class="loading loading-lg"))
let displayCategory = true let displayCategory = categoryId.isNone
let list = state.list.get() let list = state.list.get()
result = buildHtml(): result = buildHtml():
@ -208,6 +211,7 @@ when defined(js):
thead(): thead():
tr: tr:
th(text "Topic") th(text "Topic")
th(class="hide-sm" & class({"d-none": not displayCategory})): text "Category"
th(class="centered-header"): text "Users" th(class="centered-header"): text "Users"
th(class="centered-header"): text "Replies" th(class="centered-header"): text "Replies"
th(class="hide-sm centered-header"): text "Views" th(class="hide-sm centered-header"): text "Views"