add unread count to topnav and update subscription on thread view

This commit is contained in:
2026-05-20 14:07:15 +03:00
parent a5a3565496
commit daed16f099
3 changed files with 26 additions and 2 deletions

View File

@@ -3,10 +3,11 @@
<span>anti-social media</span>
{%- if is_logged_in() -%}
{%- with user = get_active_user() -%}
{%- set uc = user.get_unread_count() -%}
<ul class="horizontal wrap">
<li class="mobile-fill-flex">Welcome, <a href="{{url_for('users.user_page', username=user.username)}}">{{ user.get_readable_name() }}</a></li>
<li><a class="linkbutton" href="{{url_for('users.settings', username=user.username)}}">Settings</a></li>
<li><a class="linkbutton" href="{{url_for('users.inbox', username=user.username)}}">Inbox</a></li>
<li><a class="linkbutton" href="{{url_for('users.inbox', username=user.username)}}">Inbox{{' (%s)' % uc if uc else ''}}</a></li>
<li><a class="linkbutton" href="{{url_for('users.bookmarks', username=user.username)}}">Bookmarks</a></li>
{% if user.is_mod() -%}
<li><a class="linkbutton" href="{{url_for('mod.index')}}">Moderation</a></li>