From 4576da47e11c8ff30294faa1fe5779213d61478e Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Mon, 16 Nov 2020 22:32:17 +0100 Subject: [PATCH] [bug][header] fix issues with marking active route --- components/Header.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Header.vue b/components/Header.vue index 60f77de54..9df38edc9 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -62,7 +62,7 @@ icon: 'home', text: this.$t('home.header'), textLong: this.$t('home.headerLong'), - extra: ['all', this.config.pronouns.any], + extra: ['/' + this.config.pronouns.any], }); if (this.config.sources.enabled) { @@ -142,7 +142,7 @@ icon: 'user', text: this.user ? '@' + this.user.username : this.$t('user.header'), textLong: this.user ? '@' + this.user.username : this.$t('user.headerLong'), - extra: ['/' + this.config.user.profileEditorRoute, this.$user() ? '/@' + this.$user().username : null], + extra: ['/editor', this.$user() ? '/@' + this.$user().username : null], }); } @@ -151,9 +151,9 @@ }, methods: { isActiveRoute(link) { - return this.$route.path === link.link + return decodeURIComponent(this.$route.path) === link.link || (link.extra || []).includes(this.$route.name) - || (link.extra || []).includes(this.$route.path); + || (link.extra || []).includes(decodeURIComponent(this.$route.path)); }, }, }