ui: Use Bootstrap 5 styling for all alerts

- Ensure that .sr-only is replaced with newer classes.

- Ensure that icons are present for all alerts.

- Use flex-box for display of icons on the left center of the alert.

- .close has been renamed to .btn-close.

- × is no longer required for close buttons.

Tests:

- Visually verify all the changes by triggering them with code changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2024-12-12 12:38:01 +02:00
1 parent ac6cca95e3
commit 62dad9336b
26 files changed
+390 -193

No files matched your search

+27 -15
View File
@@ -14,22 +14,34 @@
</p>
{% if version %}
<div class="alert {% if new_version %}alert-warning{% else %}alert-success{% endif %}">
{% blocktrans trimmed %}
You are running {{ os_release }} and {{ box_name }} version {{ version }}.
{% endblocktrans %}
<div class="alert {% if new_version %}alert-warning{% else %}alert-success{% endif %}
d-flex align-items-center">
<div class="me-2">
{% if new_version %}
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
<span class="visually-hidden">{% trans "Caution:" %}</span>
{% else %}
<span class="fa fa-check-circle" aria-hidden="true"></span>
<span class="visually-hidden">{% trans "Success:" %}</span>
{% endif %}
</div>
<div>
{% blocktrans trimmed %}
You are running {{ os_release }} and {{ box_name }} version {{ version }}.
{% endblocktrans %}
{% if new_version %}
{% url 'upgrades:index' as upgrades_url %}
{% blocktrans trimmed %}
There is a new {{ box_name }} version
<a href="{{ upgrades_url }}">available</a>.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
{{ box_name }} is up to date.
{% endblocktrans %}
{% endif %}
{% if new_version %}
{% url 'upgrades:index' as upgrades_url %}
{% blocktrans trimmed %}
There is a new {{ box_name }} version
<a href="{{ upgrades_url }}">available</a>.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
{{ box_name }} is up to date.
{% endblocktrans %}
{% endif %}
</div>
</div>
{% endif %}
+12 -8
View File
@@ -18,14 +18,18 @@
{% endblocktrans %}
</p>
<p class="alert alert-warning">
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
<span class="sr-only">{% trans "Caution:" %}</span>
{% blocktrans trimmed %}
Please remove any personal information from the log before submitting the
bug report.
{% endblocktrans %}
</p>
<div class="alert alert-warning d-flex align-items-center">
<div class="me-2">
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
<span class="visually-hidden">{% trans "Caution:" %}</span>
</div>
<div>
{% blocktrans trimmed %}
Please remove any personal information from the log before submitting
the bug report.
{% endblocktrans %}
</div>
</div>
<p>
<pre class="status-log">{{ data }}</pre>