Fix router links to use route objects
This commit is contained in:
parent
7f51ea369e
commit
1c180ace0b
|
@ -17,6 +17,9 @@ const ExtraNotifications = {
|
||||||
shouldShowCustomizationTip () {
|
shouldShowCustomizationTip () {
|
||||||
return this.mergedConfig.showExtraNotificationsTip && this.hasAnythingToShow
|
return this.mergedConfig.showExtraNotificationsTip && this.hasAnythingToShow
|
||||||
},
|
},
|
||||||
|
currentUser () {
|
||||||
|
return this.$store.state.users.currentUser
|
||||||
|
},
|
||||||
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount', 'mergedConfig'])
|
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount', 'mergedConfig'])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -3,21 +3,21 @@
|
||||||
<router-link
|
<router-link
|
||||||
v-if="shouldShowChats"
|
v-if="shouldShowChats"
|
||||||
class="button-unstyled -link extra-notification"
|
class="button-unstyled -link extra-notification"
|
||||||
to="chats"
|
:to="{ name: 'chats', params: { username: currentUser.screen_name } }"
|
||||||
>
|
>
|
||||||
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
|
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="shouldShowAnnouncements"
|
v-if="shouldShowAnnouncements"
|
||||||
class="button-unstyled -link extra-notification"
|
class="button-unstyled -link extra-notification"
|
||||||
to="announcements"
|
:to="{ name: 'announcements' }"
|
||||||
>
|
>
|
||||||
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
|
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="shouldShowFollowRequests"
|
v-if="shouldShowFollowRequests"
|
||||||
class="button-unstyled -link extra-notification"
|
class="button-unstyled -link extra-notification"
|
||||||
to="friend-requests"
|
:to="{ name: 'friend-requests' }"
|
||||||
>
|
>
|
||||||
{{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
|
{{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
Loading…
Reference in New Issue