From 7981f696fef8fc77593bd6c80e2ebe68a673003b Mon Sep 17 00:00:00 2001 From: Nazar Kanaev Date: Wed, 19 Aug 2020 12:43:08 +0100 Subject: [PATCH] move filter to top --- template/index.html | 56 ++++++++++++++--------------- template/static/javascripts/app.js | 11 +++--- template/static/stylesheets/app.css | 3 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/template/index.html b/template/index.html index c3fec04..009b168 100644 --- a/template/index.html +++ b/template/index.html @@ -14,9 +14,31 @@
{% inline "anchor.svg" %}
-
+
Refreshing ({{loading.feeds}} left)
+
+
+ + + +
+
-
- - - -
diff --git a/template/static/javascripts/app.js b/template/static/javascripts/app.js index 18d554a..0d7ed9c 100644 --- a/template/static/javascripts/app.js +++ b/template/static/javascripts/app.js @@ -201,12 +201,13 @@ var vm = new Vue({ return acc }, {}) }, - totalStats: function() { + filteredTotalStats: function() { + var filter = this.filterSelected + if (filter != 'unread' && filter != 'starred') return '' + return Object.values(this.feedStats).reduce(function(acc, stat) { - acc.unread += stat.unread - acc.starred += stat.starred - return acc - }, {unread: 0, starred: 0}) + return acc + stat[filter] + }, 0) }, itemSelectedContent: function() { if (!this.itemSelected) return '' diff --git a/template/static/stylesheets/app.css b/template/static/stylesheets/app.css index 9bbaf7d..7e4ac8a 100644 --- a/template/static/stylesheets/app.css +++ b/template/static/stylesheets/app.css @@ -446,7 +446,8 @@ select.form-control:not([multiple]):not([size]) { /* theme: light */ a, -.btn-link:hover { +.btn-link:hover, +.toolbar-item.active { color: #0080d4; }