feat(pref): add ability to hide NSFW content

This commit is contained in:
2025-11-19 12:28:26 -03:00
parent 644cda63a0
commit 5a79ec025a
8 changed files with 19 additions and 2 deletions

View File

@@ -56,7 +56,8 @@ proc renderThread(thread: Tweets; prefs: Prefs; path: string): VNode =
index=i, last=(i == thread.high), showThread=show)
proc renderUser(user: User; prefs: Prefs): VNode =
buildHtml(tdiv(class="timeline-item")):
let class = if user.sensitive: "timeline-item nsfw" else: "timeline-item"
buildHtml(tdiv(class=class)):
a(class="tweet-link", href=("/" & user.username))
tdiv(class="tweet-body profile-result"):
tdiv(class="tweet-header"):