From 23a4e468855127c1a04590b035c4f04eb3b513df Mon Sep 17 00:00:00 2001 From: D-Bao <49440133+D-Bao@users.noreply.github.com> Date: Sat, 22 Apr 2023 19:16:03 +0000 Subject: [PATCH] add option to show/hide stats in aliases page (#1697) --- static/js/index.js | 12 ++- templates/dashboard/index.html | 140 ++++++++++++++++++--------------- 2 files changed, 87 insertions(+), 65 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 3a557313..0fbc362e 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -256,17 +256,27 @@ new Vue({ el: '#filter-app', delimiters: ["[[", "]]"], // necessary to avoid conflict with jinja data: { - showFilter: false + showFilter: false, + showStats: false }, methods: { async toggleFilter() { let that = this; that.showFilter = !that.showFilter; store.set('showFilter', that.showFilter); + }, + + async toggleStats() { + let that = this; + that.showStats = !that.showStats; + store.set('showStats', that.showStats); } }, async mounted() { if (store.get("showFilter")) this.showFilter = true; + + if (store.get("showStats")) + this.showStats = true; } }); diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html index a3e24dff..82f7ad6b 100644 --- a/templates/dashboard/index.html +++ b/templates/dashboard/index.html @@ -31,63 +31,11 @@ {% block title %}Alias{% endblock %} {% block default_content %} - -