From 4d71e80b1e75bd0e5d7b2fd3de9ce041fdf70ca7 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 13 Nov 2024 12:57:13 -0800 Subject: [PATCH] ui: Drop use of badge-* utility classes for newer replacements - Keep the badge-{severity} classes as they are meant for convenience of mapping severity to style. - Match bootstrap colors to maintain consistency and contrast. Tests: - Visually confirm that all the changes effective. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- .../templates/diagnostics_results.html | 8 ++++---- .../modules/dynamicdns/templates/dynamicdns.html | 4 ++-- plinth/modules/firewall/templates/firewall.html | 12 ++++++------ .../letsencrypt/templates/letsencrypt.html | 10 +++++----- .../networks/templates/connection_show.html | 14 +++++++------- .../networks/templates/connections_list.html | 4 ++-- plinth/modules/networks/templates/wifi_scan.html | 2 +- .../snapshot/templates/snapshot_manage.html | 4 ++-- plinth/templates/app-header.html | 4 ++-- plinth/templates/apps.html | 2 +- plinth/templates/notifications-dropdown.html | 9 ++++++++- plinth/tests/functional/__init__.py | 6 +++--- static/themes/default/css/main.css | 15 --------------- 13 files changed, 43 insertions(+), 51 deletions(-) diff --git a/plinth/modules/diagnostics/templates/diagnostics_results.html b/plinth/modules/diagnostics/templates/diagnostics_results.html index 1dcc0ba5b..a4e0749ef 100644 --- a/plinth/modules/diagnostics/templates/diagnostics_results.html +++ b/plinth/modules/diagnostics/templates/diagnostics_results.html @@ -18,13 +18,13 @@ {{ result.translated_description }} {% if result.result == 'passed' %} - {% trans result.result %} + {% trans result.result %} {% elif result.result == 'failed' %} - {% trans result.result %} + {% trans result.result %} {% elif result.result == 'error' or result.result == 'warning' %} - {% trans result.result %} + {% trans result.result %} {% elif result.result == 'skipped' %} - {% trans result.result %} + {% trans result.result %} {% else %} {{ result.result }} {% endif %} diff --git a/plinth/modules/dynamicdns/templates/dynamicdns.html b/plinth/modules/dynamicdns/templates/dynamicdns.html index 169420eb2..052f697a5 100644 --- a/plinth/modules/dynamicdns/templates/dynamicdns.html +++ b/plinth/modules/dynamicdns/templates/dynamicdns.html @@ -28,11 +28,11 @@ {{ domain.timestamp|timesince }} {% if domain.result %} - + {% trans "Success" %} {% else %} - + {% trans "Failed" %} {% endif %} diff --git a/plinth/modules/firewall/templates/firewall.html b/plinth/modules/firewall/templates/firewall.html index a9dc0eb9d..616b12d8b 100644 --- a/plinth/modules/firewall/templates/firewall.html +++ b/plinth/modules/firewall/templates/firewall.html @@ -36,10 +36,10 @@ {% if component.is_enabled %} - + {% trans "Enabled" %} {% else %} - + {% trans "Disabled" %} {% endif %} @@ -54,16 +54,16 @@ {% if port.name in internal_enabled_ports and port.name in external_enabled_ports %} - + {% trans "Permitted" %} {% elif port.name in internal_enabled_ports %} - + {% trans "Permitted (internal only)" %} {% elif port.name in external_enabled_ports %} - + {% trans "Permitted (external only)" %} {% else %} - + {% trans "Blocked" %} {% endif %} diff --git a/plinth/modules/letsencrypt/templates/letsencrypt.html b/plinth/modules/letsencrypt/templates/letsencrypt.html index 238c0b38e..5990d6b8a 100644 --- a/plinth/modules/letsencrypt/templates/letsencrypt.html +++ b/plinth/modules/letsencrypt/templates/letsencrypt.html @@ -33,13 +33,13 @@ {{ domain }} {% if domain_status.certificate_available and domain_status.validity == "valid" %} - + {% blocktrans trimmed with expiry_date=domain_status.expiry_date %} Valid, expires on {{ expiry_date }} {% endblocktrans %} {% elif domain_status.certificate_available and not domain_status.validity == "valid" %} - + {% if "revoked" in domain_status.validity %} {% blocktrans trimmed %} Revoked @@ -59,16 +59,16 @@ {% endif %} {% else %} - + {% trans "No certificate" %} {% endif %} {% if domain_status.web_enabled %} - {% trans "Enabled" %} + {% trans "Enabled" %} {% else %} - {% trans "Disabled" %} + {% trans "Disabled" %} {% endif %} diff --git a/plinth/modules/networks/templates/connection_show.html b/plinth/modules/networks/templates/connection_show.html index f08554218..67ce26336 100644 --- a/plinth/modules/networks/templates/connection_show.html +++ b/plinth/modules/networks/templates/connection_show.html @@ -62,7 +62,7 @@ {% if connection.primary %}
{% trans "Primary connection" %} - + {% trans "yes" %}
@@ -113,10 +113,10 @@
{% trans "Link state" %} {% if device.ethernet.carrier %} - + {% trans "cable is connected" %} {% else %} - + {% trans "please check cable" %} {% endif %}
@@ -152,7 +152,7 @@ {% if access_point.strength %}
{% trans "Signal strength" %} - + {{ access_point.strength }}%
@@ -273,7 +273,7 @@
{% trans "Firewall zone" %} - + {{ connection.zone_string }}
@@ -293,7 +293,7 @@
{% trans "Firewall zone" %} - + {{ connection.zone_string }}
@@ -312,7 +312,7 @@
{% trans "Firewall zone" %} - + {% trans "External" %}
diff --git a/plinth/modules/networks/templates/connections_list.html b/plinth/modules/networks/templates/connections_list.html index 50b43a119..83dd2a9e0 100644 --- a/plinth/modules/networks/templates/connections_list.html +++ b/plinth/modules/networks/templates/connections_list.html @@ -27,11 +27,11 @@ {% if connection.is_active %} - + {% trans "Active" %} {% else %} - + {% trans "Inactive" %} {% endif %} diff --git a/plinth/modules/networks/templates/wifi_scan.html b/plinth/modules/networks/templates/wifi_scan.html index 4fd667f2d..a1c4737a1 100644 --- a/plinth/modules/networks/templates/wifi_scan.html +++ b/plinth/modules/networks/templates/wifi_scan.html @@ -43,7 +43,7 @@ - + {{ access_point.strength }}%
diff --git a/plinth/modules/snapshot/templates/snapshot_manage.html b/plinth/modules/snapshot/templates/snapshot_manage.html index 20f14277f..ab7a5c670 100644 --- a/plinth/modules/snapshot/templates/snapshot_manage.html +++ b/plinth/modules/snapshot/templates/snapshot_manage.html @@ -36,12 +36,12 @@ {{ snapshot.number }} {% if snapshot.is_default %} - + {% trans "will be used at next boot" %} {% endif %} {% if snapshot.is_active %} - + {% trans "in use" %} {% endif %} diff --git a/plinth/templates/app-header.html b/plinth/templates/app-header.html index 73acd4e6b..3a9362eac 100644 --- a/plinth/templates/app-header.html +++ b/plinth/templates/app-header.html @@ -54,8 +54,8 @@ {% if app_info.tags %}
{% for tag in app_info.tags %} - + {% trans tag %} {% endfor %} diff --git a/plinth/templates/apps.html b/plinth/templates/apps.html index a9659c0dc..a84991f7e 100644 --- a/plinth/templates/apps.html +++ b/plinth/templates/apps.html @@ -15,7 +15,7 @@
{% for tag in tags %} - {% trans tag %}