diff options
| author | tusooa <tusooa@kazv.moe> | 2023-08-18 20:02:58 -0400 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2023-08-18 22:25:32 -0400 |
| commit | c4549f0993dd2e176f6619694cfaa632d166f002 (patch) | |
| tree | b27b52a6a3bcd17ca85384dce15ed4f7efa63f6a /src | |
| parent | 0d6a9e8a647be860b10506aecaafb4ff0f10150f (diff) | |
Display follow requests in extra notifications
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/extra_notifications/extra_notifications.js | 11 | ||||
| -rw-r--r-- | src/components/extra_notifications/extra_notifications.vue | 11 | ||||
| -rw-r--r-- | src/i18n/en.json | 3 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/components/extra_notifications/extra_notifications.js b/src/components/extra_notifications/extra_notifications.js index 0bf904ba..1f3c6e6d 100644 --- a/src/components/extra_notifications/extra_notifications.js +++ b/src/components/extra_notifications/extra_notifications.js @@ -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']) } } diff --git a/src/components/extra_notifications/extra_notifications.vue b/src/components/extra_notifications/extra_notifications.vue index 11eeb937..f5cf1661 100644 --- a/src/components/extra_notifications/extra_notifications.vue +++ b/src/components/extra_notifications/extra_notifications.vue @@ -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> diff --git a/src/i18n/en.json b/src/i18n/en.json index d58fd2fa..62e80ce3 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -207,7 +207,8 @@ "submitted_report": "submitted a report", "poll_ended": "poll has ended", "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": { "add_poll": "Add poll", |
