Sunil Mohan Adapa 4d71e80b1e
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 <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:30:28 +02:00

62 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% block content %}
<h3>{{ title }}</h3>
{% if not device_access_points %}
<p>{% trans "No Wi-Fi device detected." %}</p>
{% else %}
<div class="row">
<div class="col-md-6">
{% for device in device_access_points %}
{% if device_access_points|length > 1 %}
<h4>
{% blocktrans trimmed with interface_name=device.interface_name %}
Device: {{ interface_name }}
{% endblocktrans %}
</h4>
{% endif %}
<p>
{% trans "Last scanned: " %}
{% if device.last_scan_time %}
{{ device.last_scan_time|timesince }}
{% else %}
{% trans "never" %}
{% endif %}
{% if device.scan_requested %}
<span class="fa fa-spinner fa-spin"></span>
{% endif %}
</p>
<div class="list-group list-group-two-column">
{% for access_point in device.access_points %}
<div class="list-group-item">
<span class="primary">
<a href="{% url 'networks:add_wifi' access_point.ssid_string device.interface_name %}">
{{ access_point.ssid_string }}
</a>
</span>
<span class="badge text-bg-secondary secondary">
{{ access_point.strength }}%
</span>
</div>
{% empty %}
<p>
{% trans "No Wi-Fi networks found." %}
</p>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}