[ADD] Refresh notification icon script

Similar to what we have in AAv3 for the notification count
This commit is contained in:
Peter Pfeufer
2023-10-31 21:45:52 +01:00
parent ee41d62c13
commit 2c5972d0ab
3 changed files with 89 additions and 4 deletions

View File

@@ -122,13 +122,14 @@
{% theme_js %}
{% if user.is_authenticated %}
<script type="application/javascript">
let notificationUPdateSettings = {
notificationsListViewUrl: "{% url 'notifications:list' %}",
notificationsRefreshTime: "{% notifications_refresh_time %}",
<script>
const notificationUpdateSettings = {
refreshTime: "{% notifications_refresh_time %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
};
</script>
{% include 'bundles/refresh-notification-icon-js.html' %}
{% endif %}
{% block extra_javascript %}

View File

@@ -0,0 +1,3 @@
{% load static %}
<script src="{% static 'allianceauth/js/refresh-notification-icon.js' %}"></script>