aboutsummaryrefslogtreecommitdiff
path: root/src/components/side_drawer/side_drawer.js
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2018-12-20 22:20:04 +0200
committershpuld <shp@cock.li>2018-12-20 22:20:04 +0200
commit67263cde05cacd6bf2a8941cce4c562ef88977e4 (patch)
treee2c16bcb643d6286752672ec92db73be7e86bb21 /src/components/side_drawer/side_drawer.js
parent640a28789222035f8d500b8dd4bfc4c9f0cdd1af (diff)
parent562c68a51c9746650fabfc5c641816396439c791 (diff)
works but hacky
Diffstat (limited to 'src/components/side_drawer/side_drawer.js')
-rw-r--r--src/components/side_drawer/side_drawer.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
index bf9df753..b1b7701c 100644
--- a/src/components/side_drawer/side_drawer.js
+++ b/src/components/side_drawer/side_drawer.js
@@ -1,11 +1,19 @@
const SideDrawer = {
- props: [ 'activatePanel', 'closed' ],
+ props: [ 'activatePanel', 'closed', 'clickoutside' ],
computed: {
currentUser () {
return this.$store.state.users.currentUser
+ }
+ },
+ methods: {
+ gotoPanel (panel) {
+ this.activatePanel(panel)
+ this.clickoutside && this.clickoutside()
},
- chat () {
- return this.$store.state.chat.channel
+ clickedOutside () {
+ if (typeof this.clickoutside === 'function') {
+ this.clickoutside()
+ }
}
}
}