2018-03-08 10:36:09 +01:00
|
|
|
<template>
|
|
|
|
<div id="timeline_space">
|
2018-03-09 07:21:25 +01:00
|
|
|
<side-menu></side-menu>
|
|
|
|
<div class="content">
|
|
|
|
<router-view></router-view>
|
|
|
|
</div>
|
2018-03-08 10:36:09 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-03-09 07:21:25 +01:00
|
|
|
import SideMenu from './TimelineSpace/SideMenu'
|
|
|
|
|
2018-03-08 10:36:09 +01:00
|
|
|
export default {
|
2018-03-08 16:24:18 +01:00
|
|
|
name: 'timeline-space',
|
2018-03-09 07:21:25 +01:00
|
|
|
components: { SideMenu },
|
2018-03-08 16:24:18 +01:00
|
|
|
created () {
|
2018-03-11 17:20:08 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/fetchAccount', this.$route.params.id)
|
|
|
|
.then((account) => {
|
2018-03-12 09:17:41 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/fetchHomeTimeline', account)
|
2018-03-12 08:42:05 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/startUserStreaming', account)
|
2018-03-11 17:20:08 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/username', account)
|
2018-03-12 14:35:31 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/fetchNotifications', account)
|
2018-03-12 17:00:19 +01:00
|
|
|
this.$store.dispatch('TimelineSpace/watchShortcutEvents', account)
|
2018-03-11 17:20:08 +01:00
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
this.$message({
|
|
|
|
message: 'Could not find account',
|
|
|
|
type: 'error'
|
|
|
|
})
|
|
|
|
})
|
2018-03-12 08:47:27 +01:00
|
|
|
},
|
|
|
|
beforeDestroy () {
|
|
|
|
this.$store.dispatch('TimelineSpace/stopUserStreaming')
|
2018-03-08 16:24:18 +01:00
|
|
|
}
|
2018-03-08 10:36:09 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2018-03-09 07:21:25 +01:00
|
|
|
|
|
|
|
.content {
|
2018-03-09 09:36:57 +01:00
|
|
|
margin-left: 180px;
|
2018-03-09 07:21:25 +01:00
|
|
|
}
|
2018-03-08 10:36:09 +01:00
|
|
|
</style>
|