aboutsummaryrefslogtreecommitdiff
path: root/src/components/side_drawer/side_drawer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/side_drawer/side_drawer.js')
-rw-r--r--src/components/side_drawer/side_drawer.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
new file mode 100644
index 00000000..6541077b
--- /dev/null
+++ b/src/components/side_drawer/side_drawer.js
@@ -0,0 +1,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