aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_notifications/extra_notifications.js
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-08-18 20:34:27 -0400
committertusooa <tusooa@kazv.moe>2023-08-18 22:25:32 -0400
commit7f51ea369eb4ae1252fcba9a82438fd00471e874 (patch)
treeef9effad7c02190a102c36dc90e84d26f4992a7e /src/components/extra_notifications/extra_notifications.js
parentc4549f0993dd2e176f6619694cfaa632d166f002 (diff)
Make extra notification display customizable
Diffstat (limited to 'src/components/extra_notifications/extra_notifications.js')
-rw-r--r--src/components/extra_notifications/extra_notifications.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/components/extra_notifications/extra_notifications.js b/src/components/extra_notifications/extra_notifications.js
index 1f3c6e6d..cd687eaf 100644
--- a/src/components/extra_notifications/extra_notifications.js
+++ b/src/components/extra_notifications/extra_notifications.js
@@ -3,15 +3,29 @@ import { mapGetters } from 'vuex'
const ExtraNotifications = {
computed: {
shouldShowChats () {
- return this.unreadChatCount
+ return this.mergedConfig.showExtraNotifications && this.mergedConfig.showChatsInExtraNotifications && this.unreadChatCount
},
shouldShowAnnouncements () {
- return this.unreadAnnouncementCount
+ return this.mergedConfig.showExtraNotifications && this.mergedConfig.showAnnouncementsInExtraNotifications && this.unreadAnnouncementCount
},
shouldShowFollowRequests () {
- return this.followRequestCount
+ return this.mergedConfig.showExtraNotifications && this.mergedConfig.showFollowRequestsInExtraNotifications && this.followRequestCount
},
- ...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount'])
+ hasAnythingToShow () {
+ return this.shouldShowChats || this.shouldShowAnnouncements || this.shouldShowFollowRequests
+ },
+ shouldShowCustomizationTip () {
+ return this.mergedConfig.showExtraNotificationsTip && this.hasAnythingToShow
+ },
+ ...mapGetters(['unreadChatCount', 'unreadAnnouncementCount', 'followRequestCount', 'mergedConfig'])
+ },
+ methods: {
+ openNotificationSettings () {
+ return this.$store.dispatch('openSettingsModalTab', 'notifications')
+ },
+ dismissConfigurationTip () {
+ return this.$store.dispatch('setOption', { name: 'showExtraNotificationsTip', value: false })
+ }
}
}