mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
ui: Use inline SVG icons for all spinners
Tests: - All the icons appear as before in both light/dark themes. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
928794ea1f
commit
53ee9c4ee2
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load plinth_extras %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
@ -31,7 +32,7 @@
|
|||||||
{% trans "never" %}
|
{% trans "never" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if device.scan_requested %}
|
{% if device.scan_requested %}
|
||||||
<span class="fa fa-spinner fa-spin"></span>
|
{% icon 'spinner' class='svg-icon spin' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
<div class="list-group list-group-two-column">
|
<div class="list-group list-group-two-column">
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load plinth_extras %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans "Distribution Update" %}</h3>
|
<h3>{% trans "Distribution Update" %}</h3>
|
||||||
@ -26,16 +27,16 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if status.running %}
|
{% if status.running %}
|
||||||
<div class="upgrades-dist-upgrade clearfix">
|
<div class="upgrades-dist-upgrade d-flex align-items-center">
|
||||||
<div class="upgrades-dist-upgrade-running-icon pull-left">
|
<div class="upgrades-dist-upgrade-running-icon">
|
||||||
<span class="fa fa-refresh fa-spin fa-3x fa-pull-left text-info"></span>
|
{% icon 'refresh' class='svg-icon spin text-info' %}
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
Distribution update is currently running. This operation may take
|
Distribution update is currently running. This operation may take
|
||||||
several hours. Most apps will be unavailable during this period.
|
several hours. Most apps will be unavailable during this period.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if not status.updates_enabled or not status.dist_upgrade_enabled or not status.has_free_space or not status.current_codename %}
|
{% if not status.updates_enabled or not status.dist_upgrade_enabled or not status.has_free_space or not status.current_codename %}
|
||||||
|
|||||||
@ -17,17 +17,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>{% trans "Status" %}</h3>
|
<h3>{% trans "Status" %}</h3>
|
||||||
<div class="upgrades-status-frame clearfix">
|
<div class="upgrades-status-frame d-flex align-items-center">
|
||||||
<div class="upgrade-status-icon pull-left">
|
<div class="upgrades-status-icon">
|
||||||
{% if is_busy %}
|
{% if is_busy %}
|
||||||
<span class="fa fa-refresh fa-spin fa-3x fa-pull-left text-info"></span>
|
{% icon 'refresh' class='svg-icon spin text-info' %}
|
||||||
{% elif new_version %}
|
{% elif new_version %}
|
||||||
<span class="fa fa-frown-o fa-3x fa-pull-left text-warning"></span>
|
{% icon 'frown-o' class='svg-icon text-warning' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="fa fa-smile-o fa-3x fa-pull-left text-body-tertiary"></span>
|
{% icon 'smile-o' class='svg-icon text-body-tertiary' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
You are running {{ os_release }} and {{ box_name }} version {{ version }}.
|
You are running {{ os_release }} and {{ box_name }} version {{ version }}.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
@ -41,7 +41,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% blocktrans %}{{ box_name }} is up to date.{% endblocktrans %}
|
{% blocktrans %}{{ box_name }} is up to date.{% endblocktrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load plinth_extras %}
|
||||||
|
|
||||||
{% block body_class %}
|
{% block body_class %}
|
||||||
no-brand
|
no-brand
|
||||||
@ -20,7 +21,7 @@ no-brand
|
|||||||
|
|
||||||
{% if is_first_setup_running %}
|
{% if is_first_setup_running %}
|
||||||
<p class="firstboot-spinner">
|
<p class="firstboot-spinner">
|
||||||
<span class="fa fa-refresh fa-spin fa-4x fa-pull-left processing"></span>
|
{% icon 'refresh' class='svg-icon spin' %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
{% if data.state == "waiting" %}
|
{% if data.state == "waiting" %}
|
||||||
{% icon 'clock-o' %}
|
{% icon 'clock-o' %}
|
||||||
{% elif data.state == "running" %}
|
{% elif data.state == "running" %}
|
||||||
<span class="fa fa-refresh fa-spin processing"></span>
|
{% icon 'refresh' class='svg-icon spin' %}
|
||||||
{% elif data.state == "completed" %}
|
{% elif data.state == "completed" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% load plinth_extras %}
|
||||||
|
|
||||||
{% for operation in operations %}
|
{% for operation in operations %}
|
||||||
<div class="app-operation">
|
<div class="app-operation">
|
||||||
<span class="fa fa-refresh fa-spin processing"></span>
|
{% icon 'refresh' class='svg-icon spin' %}
|
||||||
{{ operation.translated_message }}
|
{{ operation.translated_message }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -364,6 +364,24 @@ footer {
|
|||||||
margin: 0.125em 0.25em;
|
margin: 0.125em 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(1turn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-icon.spin {
|
||||||
|
animation: spin 2s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-icon[data-icon-name="spinner"].spin {
|
||||||
|
/* Spin in discrete steps of 8 */
|
||||||
|
animation: spin 1s infinite steps(8);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bootstrap extensions
|
* Bootstrap extensions
|
||||||
*/
|
*/
|
||||||
@ -675,11 +693,7 @@ footer {
|
|||||||
*/
|
*/
|
||||||
.firstboot-spinner {
|
.firstboot-spinner {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
font-size: 4em;
|
||||||
|
|
||||||
.firstboot-spinner span.fa {
|
|
||||||
float: none;
|
|
||||||
margin: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.next-steps {
|
.next-steps {
|
||||||
@ -1077,3 +1091,16 @@ textarea.log {
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Upgrades app pages
|
||||||
|
*/
|
||||||
|
.upgrades-status-icon,
|
||||||
|
.upgrades-dist-upgrade-running-icon {
|
||||||
|
font-size: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upgrades-status-icon svg,
|
||||||
|
.upgrades-dist-upgrade-running-icon svg {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user