Display follow requests in extra notifications
This commit is contained in:
parent
0d6a9e8a64
commit
c4549f0993
@ -2,7 +2,16 @@ import { mapGetters } from 'vuex'
|
|||||||
|
|
||||||
const ExtraNotifications = {
|
const ExtraNotifications = {
|
||||||
computed: {
|
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>
|
<template>
|
||||||
<div class="ExtraNotifications">
|
<div class="ExtraNotifications">
|
||||||
<router-link
|
<router-link
|
||||||
v-if="unreadChatCount"
|
v-if="shouldShowChats"
|
||||||
class="button-unstyled -link extra-notification"
|
class="button-unstyled -link extra-notification"
|
||||||
to="chats"
|
to="chats"
|
||||||
>
|
>
|
||||||
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
|
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="unreadAnnouncementCount"
|
v-if="shouldShowAnnouncements"
|
||||||
class="button-unstyled -link extra-notification"
|
class="button-unstyled -link extra-notification"
|
||||||
to="announcements"
|
to="announcements"
|
||||||
>
|
>
|
||||||
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
|
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
|
||||||
</router-link>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -207,7 +207,8 @@
|
|||||||
"submitted_report": "submitted a report",
|
"submitted_report": "submitted a report",
|
||||||
"poll_ended": "poll has ended",
|
"poll_ended": "poll has ended",
|
||||||
"unread_announcements": "{num} unread announcement | {num} unread announcements",
|
"unread_announcements": "{num} unread announcement | {num} unread announcements",
|
||||||
"unread_chats": "{num} unread chat | {num} unread chats"
|
"unread_chats": "{num} unread chat | {num} unread chats",
|
||||||
|
"unread_follow_requests": "{num} new follow request | {num} new follow requests"
|
||||||
},
|
},
|
||||||
"polls": {
|
"polls": {
|
||||||
"add_poll": "Add poll",
|
"add_poll": "Add poll",
|
||||||
|
Loading…
Reference in New Issue
Block a user