aboutsummaryrefslogtreecommitdiff
path: root/src/components/side_drawer/side_drawer.js
blob: 6541077b2031e0a0f1264f6ec3b5650a3b8eefb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const SideDrawer = {
  props: [ 'activatePanel', 'closed', 'clickoutside', 'logout' ],
  computed: {
    currentUser () {
      return this.$store.state.users.currentUser
    }
  },
  methods: {
    gotoPanel (panel) {
      this.activatePanel(panel)
      this.clickoutside && this.clickoutside()
    },
    clickedOutside () {
      if (typeof this.clickoutside === 'function') {
        this.clickoutside()
      }
    },
    doLogout () {
      this.logout()
      this.gotoPanel('timeline')
    }
  }
}

export default SideDrawer