From c34bf7252d1d5d785c1638330f99af0663dfd708 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 21 May 2025 12:57:29 +0200 Subject: [PATCH] route names on one place, refactor tab handling a bit --- .../Contributions/NavContributions.vue | 34 ++++++++------ frontend/src/pages/Contributions.vue | 45 ++++++++++++------- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/frontend/src/components/Contributions/NavContributions.vue b/frontend/src/components/Contributions/NavContributions.vue index acbddeb1a..3f119897c 100644 --- a/frontend/src/components/Contributions/NavContributions.vue +++ b/frontend/src/components/Contributions/NavContributions.vue @@ -4,8 +4,8 @@ class="nav-contributions-btn-wrapper bg-209 rounded-26 d-flex bd-highlight mx-xl-6 mx-lg-5 shadow justify-content-between" > [], + allContributions: { + type: String, + default: '', + }, + contribute: { + type: String, + default: '', + }, + ownContributions: { + type: String, + default: '', }, routeBase: { type: String, @@ -52,14 +60,14 @@ export default { }, methods: { - stateClasses(index) { - if (this.$route.path.includes(this.tabRoutes[index])) { + stateClasses(route) { + if (this.$route.path.includes(route)) { return 'router-link-active router-link-exact-active' } return '' }, - routeByIndex(index) { - return this.routeBase + this.tabRoutes[index] + routeToTab(route) { + return this.routeBase + route }, }, } diff --git a/frontend/src/pages/Contributions.vue b/frontend/src/pages/Contributions.vue index b35c2984b..71989e01f 100644 --- a/frontend/src/pages/Contributions.vue +++ b/frontend/src/pages/Contributions.vue @@ -1,7 +1,7 @@