From 8428fc6cf668a6a7b6bdedd73430aebb3f1ed017 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Mon, 12 May 2025 14:17:22 -0500 Subject: [PATCH] fix: adds status badges --- src/Twig/Components/StatusBadge.php | 10 ++++++++++ templates/components/Card.html.twig | 6 +++--- templates/components/DownloadList.html.twig | 4 +--- templates/components/MonitorList.html.twig | 12 +++--------- templates/components/StatusBadge.html.twig | 3 +++ templates/partial/alert-status.html.twig | 5 +++++ 6 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 src/Twig/Components/StatusBadge.php create mode 100644 templates/components/StatusBadge.html.twig create mode 100644 templates/partial/alert-status.html.twig diff --git a/src/Twig/Components/StatusBadge.php b/src/Twig/Components/StatusBadge.php new file mode 100644 index 0000000..04b179e --- /dev/null +++ b/src/Twig/Components/StatusBadge.php @@ -0,0 +1,10 @@ + -
-

+

{{ title }}

diff --git a/templates/components/DownloadList.html.twig b/templates/components/DownloadList.html.twig index e31078c..fa682d6 100644 --- a/templates/components/DownloadList.html.twig +++ b/templates/components/DownloadList.html.twig @@ -26,9 +26,7 @@ {{ download.progress }} {% else %} - - Complete - + {% endif %} diff --git a/templates/components/MonitorList.html.twig b/templates/components/MonitorList.html.twig index 51da7ad..aa3474b 100644 --- a/templates/components/MonitorList.html.twig +++ b/templates/components/MonitorList.html.twig @@ -43,17 +43,11 @@ {% if monitor.status == "New" %} - - {{ monitor.status }} - + {% elseif monitor.status == "In Progress" or monitor.status == "Active" %} - - {{ monitor.status }} - + {% else %} - - {{ monitor.status }} - + {% endif %} diff --git a/templates/components/StatusBadge.html.twig b/templates/components/StatusBadge.html.twig new file mode 100644 index 0000000..2e5b5e9 --- /dev/null +++ b/templates/components/StatusBadge.html.twig @@ -0,0 +1,3 @@ + + {{ status }} + \ No newline at end of file diff --git a/templates/partial/alert-status.html.twig b/templates/partial/alert-status.html.twig new file mode 100644 index 0000000..9ea8ebc --- /dev/null +++ b/templates/partial/alert-status.html.twig @@ -0,0 +1,5 @@ +{# The status indicator for the Alert button. Rendering this will add a small colored span + to the Alert button, indicating there are unread alerts. +#} + +