From 9edf6e3ec7b0e4a093e51a35826515028e7a36a9 Mon Sep 17 00:00:00 2001 From: cubicroot <github@cubicroot.xyz> Date: Wed, 25 Dec 2024 16:15:50 +0100 Subject: [PATCH] improve (not) recorded tags on events --- src/plainui/jinja2/plainui/components/list_events.html.j2 | 7 ++----- src/plainui/locale/en/LC_MESSAGES/django.po | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plainui/jinja2/plainui/components/list_events.html.j2 b/src/plainui/jinja2/plainui/components/list_events.html.j2 index 29ce7a65d..f68307330 100644 --- a/src/plainui/jinja2/plainui/components/list_events.html.j2 +++ b/src/plainui/jinja2/plainui/components/list_events.html.j2 @@ -7,6 +7,7 @@ {% import "plainui/components/function_btns.html.j2" as fbtns with context %} {% import "plainui/components/integrations.html.j2" as integrations %} {% import "plainui/components/tagbox.html.j2" as tagsMacro with context %} +{% import "plainui/components/event.html.j2" as eventMacro %} {% macro list( events, @@ -82,11 +83,7 @@ </div> <div class="hub-tags"> - {% if event.is_recorded is false %} - {{ tagsMacro.tag(_("Not recorded") , style="danger", icon="camera-video-off") }} - {% elif event.is_recorded is true %} - {{ tagsMacro.tag(_("Recorded") , style="success", icon="camera-video") }} - {% endif %} + {{ eventMacro.recorded_tag(event.is_recorded) }} {% if event.track and event.track.name %} <div class="hub-tag {% if event.track.color and calculate_luminance(event.track.color) <= 140 %} text-white {% else %} text-dark {% endif %}" diff --git a/src/plainui/locale/en/LC_MESSAGES/django.po b/src/plainui/locale/en/LC_MESSAGES/django.po index 64f61689e..6b8643742 100644 --- a/src/plainui/locale/en/LC_MESSAGES/django.po +++ b/src/plainui/locale/en/LC_MESSAGES/django.po @@ -935,7 +935,7 @@ msgid "Day %(n)s" msgstr "" msgid "Not recorded" -msgstr "This event is not going to be recorded" +msgstr "not recorded" msgid "Recorded" msgstr "" -- GitLab