From f61fd2684f89af9bcdda9117adbf70dd926551a0 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 17 Jul 2020 15:34:40 +0900 Subject: [PATCH] Highlight current page in the side bar --- .../components/organisms/layout/TheSideBar.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/components/organisms/layout/TheSideBar.vue b/frontend/components/organisms/layout/TheSideBar.vue index e5506540..1f9f87b7 100644 --- a/frontend/components/organisms/layout/TheSideBar.vue +++ b/frontend/components/organisms/layout/TheSideBar.vue @@ -10,11 +10,14 @@ Start annotation - + @@ -50,6 +53,7 @@ export default { data() { return { + selected: 0, items: [ { icon: 'mdi-home', text: 'Home', link: '', adminOnly: false }, { icon: 'mdi-database', text: 'Dataset', link: 'dataset', adminOnly: true }, @@ -62,7 +66,10 @@ export default { }, computed: { - ...mapGetters('projects', ['loadSearchOptions']) + ...mapGetters('projects', ['loadSearchOptions']), + filteredItems() { + return this.items.filter(item => this.isVisible(item)) + } }, methods: {