aboutsummaryrefslogtreecommitdiff
path: root/src/components/side_drawer
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2022-03-17 17:51:39 -0400
committertusooa <tusooa@kazv.moe>2022-11-24 18:27:14 -0500
commitb4a7e58bec86205e23adda2b0625d237acd5aa91 (patch)
tree29bfe9e2e646932f21728f2fd92d08d27886759c /src/components/side_drawer
parentfe1d01ec9a799f438828c6c957a5664d7f954f3e (diff)
Show badges for unread announcements
Diffstat (limited to 'src/components/side_drawer')
-rw-r--r--src/components/side_drawer/side_drawer.js2
-rw-r--r--src/components/side_drawer/side_drawer.vue6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
index bb22446b..680216dd 100644
--- a/src/components/side_drawer/side_drawer.js
+++ b/src/components/side_drawer/side_drawer.js
@@ -97,7 +97,7 @@ const SideDrawer = {
...mapState({
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
}),
- ...mapGetters(['unreadChatCount'])
+ ...mapGetters(['unreadChatCount', 'unreadAnnouncementCount'])
},
methods: {
toggleDrawer () {
diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue
index dccb8ab7..4101cb03 100644
--- a/src/components/side_drawer/side_drawer.vue
+++ b/src/components/side_drawer/side_drawer.vue
@@ -202,6 +202,12 @@
class="fa-scale-110 fa-old-padding"
icon="bullhorn"
/> {{ $t("nav.announcements") }}
+ <span
+ v-if="unreadAnnouncementCount"
+ class="badge badge-notification"
+ >
+ {{ unreadAnnouncementCount }}
+ </span>
</router-link>
</li>
<li