apply review comments

This commit is contained in:
imperosol
2026-05-20 10:39:52 +02:00
parent 57a422de8c
commit 204e4e97bd
4 changed files with 25 additions and 27 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
x-init='$notifications.addMany([
{%- for message in messages -%}
{%- if not message.extra_tags -%}
{ tag: {{ message.tags|string|tojson }}, text: {{ message|string|tojson }} },
{ tag: "{{ message.tags }}", text: {{ message|string|tojson }} },
{%- endif -%}
{%- endfor -%}
])'
+7 -3
View File
@@ -237,14 +237,18 @@
clear : optional boolean that controls if notifications should be cleared first. True is the default
#}
{% if messages %}
<div x-init="() => {
<div x-init='() => {
{%- if clear -%}
$notifications.clear();
{%- endif -%}
$notifications.addMany([
{%- for message in messages -%}
$notifications.{{ message.tags }}('{{ message }}');
{%- if not message.extra_tags -%}
{ tag: "{{ message.tags }}", text: {{ message|string|tojson }} },
{%- endif -%}
{%- endfor -%}
}"></div>
])
}'></div>
{% endif %}
{% endmacro %}