aboutsummaryrefslogtreecommitdiff
path: root/src/components/mobile_nav/mobile_nav.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mobile_nav/mobile_nav.js')
-rw-r--r--src/components/mobile_nav/mobile_nav.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js
index a79aa636..88fab656 100644
--- a/src/components/mobile_nav/mobile_nav.js
+++ b/src/components/mobile_nav/mobile_nav.js
@@ -1,11 +1,13 @@
import SideDrawer from '../side_drawer/side_drawer.vue'
import Notifications from '../notifications/notifications.vue'
+import MobilePostStatusModal from '../mobile_post_status_modal/mobile_post_status_modal.vue'
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
const MobileNav = {
components: {
SideDrawer,
- Notifications
+ Notifications,
+ MobilePostStatusModal
},
data: () => ({
notificationsOpen: false
@@ -25,9 +27,19 @@ const MobileNav = {
},
toggleMobileNotifications () {
this.notificationsOpen = !this.notificationsOpen
+ if (!this.notificationsOpen) {
+ this.markNotificationsAsSeen()
+ }
},
scrollToTop () {
window.scrollTo(0, 0)
+ },
+ logout () {
+ this.$router.replace('/main/public')
+ this.$store.dispatch('logout')
+ },
+ markNotificationsAsSeen () {
+ this.$refs.notifications.markAsSeen()
}
}
}