Fix router links to use route objects

このコミットが含まれているのは:
tusooa 2023-08-18 20:39:14 -04:00
コミット 1c180ace0b
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 42AEC43D48433C51
2個のファイルの変更6行の追加3行の削除

ファイルの表示

@ -17,6 +17,9 @@ const ExtraNotifications = {
shouldShowCustomizationTip () {
return this.mergedConfig.showExtraNotificationsTip && this.hasAnythingToShow
},
currentUser () {
return this.$store.state.users.currentUser
},
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount', 'mergedConfig'])
},
methods: {

ファイルの表示

@ -3,21 +3,21 @@
<router-link
v-if="shouldShowChats"
class="button-unstyled -link extra-notification"
to="chats"
:to="{ name: 'chats', params: { username: currentUser.screen_name } }"
>
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
</router-link>
<router-link
v-if="shouldShowAnnouncements"
class="button-unstyled -link extra-notification"
to="announcements"
:to="{ name: 'announcements' }"
>
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
</router-link>
<router-link
v-if="shouldShowFollowRequests"
class="button-unstyled -link extra-notification"
to="friend-requests"
:to="{ name: 'friend-requests' }"
>
{{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
</router-link>