From 0038a9794b4f12f9f57a6739c43910b289d18fe4 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 10 Jul 2020 13:21:42 +0300 Subject: [PATCH] add simple red dot for chat notifs --- src/components/mobile_nav/mobile_nav.js | 4 +++- src/components/mobile_nav/mobile_nav.vue | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js index cc4d7e38..4613d090 100644 --- a/src/components/mobile_nav/mobile_nav.js +++ b/src/components/mobile_nav/mobile_nav.js @@ -2,6 +2,7 @@ import SideDrawer from '../side_drawer/side_drawer.vue' import Notifications from '../notifications/notifications.vue' import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils' import GestureService from '../../services/gesture_service/gesture_service' +import { mapGetters } from 'vuex' const MobileNav = { components: { @@ -33,7 +34,8 @@ const MobileNav = { sitename () { return this.$store.state.instance.name }, isChat () { return this.$route.name === 'chat' - } + }, + ...mapGetters(['unreadChatCount']) }, methods: { toggleMobileSidebar () { diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index e0620fce..abd95f09 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -16,6 +16,10 @@ @click.stop.prevent="toggleMobileSidebar()" > +