diff options
| author | shpuld <shp@cock.li> | 2019-03-14 17:46:04 +0200 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-03-14 17:46:04 +0200 |
| commit | f19284357e94968cdc9d4034c5e33ef9d6f6d9d7 (patch) | |
| tree | 81ba0e1f4b06aac964daa7b2d55babeb767bd73b /src/components/mobile_nav/mobile_nav.js | |
| parent | 7ce8fe92141cde52e3f47d555bd6c604e1a673ed (diff) | |
make nav bar slide, move mobile post status to mobile nav
Diffstat (limited to 'src/components/mobile_nav/mobile_nav.js')
| -rw-r--r-- | src/components/mobile_nav/mobile_nav.js | 14 |
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() } } } |
