From 5afbea80d8dcd015b1075edc814ae282c94c7b45 Mon Sep 17 00:00:00 2001 From: Madis Kariler Date: Wed, 6 Apr 2022 21:18:42 +0300 Subject: [PATCH] Add function to toggle charts visibility --- src/www/js/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/www/js/app.js b/src/www/js/app.js index 137fb229..f25d2cdf 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -48,6 +48,7 @@ new Vue({ currentRelease: null, latestRelease: null, + chartsVisible: (localStorage.getItem('chartsVisible') ?? 'true') === 'true', chartOptions: { chart: { background: 'transparent', @@ -243,6 +244,10 @@ new Vue({ .catch(err => alert(err.message || err.toString())) .finally(() => this.refresh().catch(console.error)); }, + toggleCharts() { + this.chartsVisible = !this.chartsVisible; + localStorage.setItem('chartsVisible', this.chartsVisible); + }, }, filters: { bytes,