pleroma-fe/src/components/side_drawer/side_drawer.js

26 lines
535 B
JavaScript
Raw Normal View History

const SideDrawer = {
2018-12-23 02:32:07 +11:00
props: [ 'activatePanel', 'closed', 'clickoutside', 'logout' ],
computed: {
currentUser () {
return this.$store.state.users.currentUser
2018-12-21 07:20:04 +11:00
}
},
methods: {
gotoPanel (panel) {
this.activatePanel(panel)
this.clickoutside && this.clickoutside()
},
2018-12-21 07:20:04 +11:00
clickedOutside () {
if (typeof this.clickoutside === 'function') {
this.clickoutside()
}
2018-12-23 02:32:07 +11:00
},
doLogout () {
this.logout()
this.gotoPanel('timeline')
}
}
}
export default SideDrawer