add: live browser notifications

This commit is contained in:
trisua 2025-05-02 20:08:35 -04:00
parent 58d206eb81
commit 98d6f21e6e
18 changed files with 291 additions and 15 deletions

View file

@ -51,9 +51,12 @@
class="button {% if selected == 'requests' %}active{% endif %}"
title="Requests"
>
{{ icon "inbox" }} {% if user.request_count > 0 %}
<span class="notification tr">{{ user.request_count }}</span>
{% endif %}
{{ icon "inbox" }}
<span
class="notification tr {% if user.request_count <= 0 %}hidden{% endif %}"
id="requests_span"
>{{ user.request_count }}</span
>
</a>
<a
@ -61,11 +64,12 @@
class="button {% if selected == 'notifications' %}active{% endif %}"
title="Notifications"
>
{% if user.notification_count > 0 %} {{ icon "bell-dot" }}
<span class="notification tr"
{{ icon "bell" }}
<span
class="notification tr {% if user.notification_count <= 0 %}hidden{% endif %}"
id="notifications_span"
>{{ user.notification_count }}</span
>
{% else %} {{ icon "bell" }} {% endif %}
</a>
<div class="dropdown">