2016-10-27 09:01:48 -07:00
|
|
|
import UserPanel from './components/user_panel/user_panel.vue'
|
2016-11-06 11:11:23 -08:00
|
|
|
import NavPanel from './components/nav_panel/nav_panel.vue'
|
2016-11-27 10:44:56 -08:00
|
|
|
import Notifications from './components/notifications/notifications.vue'
|
2016-10-26 10:03:55 -07:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'app',
|
|
|
|
components: {
|
2016-11-06 11:11:23 -08:00
|
|
|
UserPanel,
|
2016-11-27 10:44:56 -08:00
|
|
|
NavPanel,
|
2017-02-16 13:25:41 -08:00
|
|
|
Notifications
|
2016-11-03 08:58:32 -07:00
|
|
|
},
|
2017-01-17 08:27:39 -08:00
|
|
|
data: () => ({
|
|
|
|
mobileActivePanel: 'timeline'
|
|
|
|
}),
|
2016-11-03 08:58:32 -07:00
|
|
|
computed: {
|
2016-11-27 10:44:56 -08:00
|
|
|
currentUser () { return this.$store.state.users.currentUser },
|
2017-02-16 07:59:06 -08:00
|
|
|
background () {
|
|
|
|
return this.currentUser.background_image || this.$store.state.config.background
|
|
|
|
},
|
2017-02-16 08:44:36 -08:00
|
|
|
logoStyle () { return { 'background-image': `url(${this.$store.state.config.logo})` } },
|
2017-02-16 07:59:06 -08:00
|
|
|
style () { return { 'background-image': `url(${this.background})` } },
|
2017-02-14 13:21:23 -08:00
|
|
|
sitename () { return this.$store.state.config.name }
|
2017-01-17 08:27:39 -08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
activatePanel (panelName) {
|
|
|
|
this.mobileActivePanel = panelName
|
2017-02-18 12:55:16 -08:00
|
|
|
},
|
|
|
|
scrollToTop () {
|
|
|
|
window.scrollTo(0, 0)
|
2017-01-17 08:27:39 -08:00
|
|
|
}
|
2016-10-26 10:03:55 -07:00
|
|
|
}
|
|
|
|
}
|