From 1ff6617ff268a250ab78ca54edcb599c4fd9bbeb Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Tue, 14 Sep 2021 01:26:08 +0800 Subject: [PATCH] * Update app to hide top nav filter panel on page change (#1479) --- src/renderer/App.js | 7 ++++++- src/renderer/components/top-nav/top-nav.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 375ac41b..33af3ec8 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -99,7 +99,12 @@ export default Vue.extend({ } }, watch: { - windowTitle: 'setWindowTitle' + windowTitle: 'setWindowTitle', + $route () { + // react to route changes... + // Hide top nav filter panel on page change + this.$refs.topNav.hideFilters() + } }, created () { this.setWindowTitle() diff --git a/src/renderer/components/top-nav/top-nav.js b/src/renderer/components/top-nav/top-nav.js index 4dbc9f06..36175a51 100644 --- a/src/renderer/components/top-nav/top-nav.js +++ b/src/renderer/components/top-nav/top-nav.js @@ -280,6 +280,9 @@ export default Vue.extend({ navigate: function (route) { this.$router.push('/' + route) }, + hideFilters: function () { + this.showFilters = false + }, ...mapActions([ 'showToast', 'getYoutubeUrlInfo',