From 1c052488297a8289df0fd81f7238687ac80a24b4 Mon Sep 17 00:00:00 2001 From: Michatec <121869403+Michatec@users.noreply.github.com> Date: Sun, 23 Nov 2025 12:58:22 +0100 Subject: [PATCH] Notifications Widget Added --- routes/notifications.py | 2 +- templates/base.html | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/notifications.py b/routes/notifications.py index 28227d8..346d7fc 100644 --- a/routes/notifications.py +++ b/routes/notifications.py @@ -44,7 +44,7 @@ def notifications_api(): { 'name': User.query.get(n.user_id).username, 'data': n.message, - 'timestamp': n.created_at + 'created_at': n.created_at } for n in notifications ] ) diff --git a/templates/base.html b/templates/base.html index 85992e1..25f4d27 100644 --- a/templates/base.html +++ b/templates/base.html @@ -102,9 +102,13 @@ {% if user.is_admin %}

{{ _('You are logged in as an admin.') }}

{% endif %} + {% if user.is_authenticated %} + {{ _('You don’t have any notifications.') }} + {% endif %} {% if SHOPITEM_ID_PREMIUM in user.shop_items | map(attribute='item_id') | list %} Premium {% endif %} +
{% block content %}{% endblock %}