aboutsummaryrefslogtreecommitdiff
path: root/src/components/navigation/navigation_entry.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2023-03-20 22:48:38 +0200
committerHenry Jameson <me@hjkos.com>2023-03-20 22:48:38 +0200
commit819cd41cf0c4b2140470bba2a36eb15ed811c5b7 (patch)
tree0608e5f10fa4028391e1100729e5fade4d3ba08c /src/components/navigation/navigation_entry.js
parent332ad77e3579d2b512ba236b3f2c94ad8875864d (diff)
parentfa532b1f005220743d036b7d103c47a043be7ae4 (diff)
Merge remote-tracking branch 'origin/develop' into improve_settings_reusability
* origin/develop: Translated using Weblate (Chinese (Simplified)) Generalize IntegerSetting into NumberSetting, add Integer/Float wrappers Allow custom emoji reactions: add option to scale reaction buttons Fix user-profile route crash on pinned favorites route Hide custom emoji in reaction picker when BE does not advertise pleroma_custom_emoji_reactions Allow custom emoji reactions
Diffstat (limited to 'src/components/navigation/navigation_entry.js')
-rw-r--r--src/components/navigation/navigation_entry.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/components/navigation/navigation_entry.js b/src/components/navigation/navigation_entry.js
index 81cc936a..22ed77d9 100644
--- a/src/components/navigation/navigation_entry.js
+++ b/src/components/navigation/navigation_entry.js
@@ -1,5 +1,5 @@
import { mapState } from 'vuex'
-import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
+import { routeTo } from 'src/components/navigation/navigation.js'
import OptionalRouterLink from 'src/components/optional_router_link/optional_router_link.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faThumbtack } from '@fortawesome/free-solid-svg-icons'
@@ -26,17 +26,7 @@ const NavigationEntry = {
},
computed: {
routeTo () {
- if (!this.item.route && !this.item.routeObject) return null
- let route
- if (this.item.routeObject) {
- route = this.item.routeObject
- } else {
- route = { name: (this.item.anon || this.currentUser) ? this.item.route : this.item.anonRoute }
- }
- if (USERNAME_ROUTES.has(route.name)) {
- route.params = { username: this.currentUser.screen_name, name: this.currentUser.screen_name }
- }
- return route
+ return routeTo(this.item, this.currentUser)
},
getters () {
return this.$store.getters