make nav bar slide, move mobile post status to mobile nav

This commit is contained in:
shpuld 2019-03-14 17:46:04 +02:00
parent 7ce8fe9214
commit f19284357e
6 changed files with 105 additions and 84 deletions

View file

@ -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()
}
}
}