aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 22:51:21 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 22:51:21 +0100
commit92bfcc102ce10ed5fe1915d0dd8e91fd0d85ad24 (patch)
treee80e747b4761b15db3786eeabca073dad5ca8038
parentImproved bar chart for the history of articles. (diff)
downloadnewspipe-92bfcc102ce10ed5fe1915d0dd8e91fd0d85ad24.tar.gz
newspipe-92bfcc102ce10ed5fe1915d0dd8e91fd0d85ad24.tar.bz2
newspipe-92bfcc102ce10ed5fe1915d0dd8e91fd0d85ad24.zip
added a spinner before the display of the bar chart
-rw-r--r--newspipe/templates/history.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/newspipe/templates/history.html b/newspipe/templates/history.html
index 6ff5b537..0bb8aa8d 100644
--- a/newspipe/templates/history.html
+++ b/newspipe/templates/history.html
@@ -29,6 +29,9 @@
{% if month == None %}
<div class="row">
<div class="col chart-container">
+ <div id="spinner" class="d-flex justify-content-center">
+ <div class="spinner-border" role="status"><span class="sr-only">{{ _('Loading...') }}</span></div>
+ </div>
<canvas id="stats-history"></canvas>
</div>
</div>
@@ -72,6 +75,9 @@
fetch("/stats/history.json" + period)
.then(response => response.json())
.then(result => {
+ var element = document.getElementById("spinner");
+ element.parentNode.removeChild(element);
+
if (period.split('/').length - 1 == 1) {
var labels = Object.keys(result).map(function(e){return months[e-1]});
} else {
bgstack15