add a favorites "timeline" shortcut

This commit is contained in:
Henry Jameson 2022-08-30 00:53:20 +03:00
commit ec320e8fb6
2 changed files with 12 additions and 4 deletions

View file

@ -23,12 +23,14 @@ const NavigationEntry = {
computed: {
routeTo () {
if (!this.item.route && !this.item.routeObject) return null
let route
if (this.item.routeObject) {
return this.item.routeObject
route = this.item.routeObject
} else {
route = { name: (this.item.anon || this.currentUser) ? this.item.route : this.item.anonRoute }
}
const 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 }
route.params = { username: this.currentUser.screen_name, name: this.currentUser.screen_name }
}
return route
},