Display follow requests in extra notifications
This commit is contained in:
parent
0d6a9e8a64
commit
c4549f0993
3 changed files with 21 additions and 4 deletions
|
|
@ -2,7 +2,16 @@ import { mapGetters } from 'vuex'
|
|||
|
||||
const ExtraNotifications = {
|
||||
computed: {
|
||||
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount'])
|
||||
shouldShowChats () {
|
||||
return this.unreadChatCount
|
||||
},
|
||||
shouldShowAnnouncements () {
|
||||
return this.unreadAnnouncementCount
|
||||
},
|
||||
shouldShowFollowRequests () {
|
||||
return this.followRequestCount
|
||||
},
|
||||
...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount'])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,26 @@
|
|||
<template>
|
||||
<div class="ExtraNotifications">
|
||||
<router-link
|
||||
v-if="unreadChatCount"
|
||||
v-if="shouldShowChats"
|
||||
class="button-unstyled -link extra-notification"
|
||||
to="chats"
|
||||
>
|
||||
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="unreadAnnouncementCount"
|
||||
v-if="shouldShowAnnouncements"
|
||||
class="button-unstyled -link extra-notification"
|
||||
to="announcements"
|
||||
>
|
||||
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="shouldShowFollowRequests"
|
||||
class="button-unstyled -link extra-notification"
|
||||
to="friend-requests"
|
||||
>
|
||||
{{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue