2018-03-09 07:21:25 +01:00
|
|
|
<template>
|
|
|
|
<div id="local">
|
2018-03-14 04:24:54 +01:00
|
|
|
<div class="local-timeline" v-for="message in timeline" v-bind:key="message.id">
|
|
|
|
<toot :message="message"></toot>
|
|
|
|
</div>
|
2018-03-09 07:21:25 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-03-14 04:24:54 +01:00
|
|
|
import { mapState } from 'vuex'
|
|
|
|
import Toot from './Cards/Toot'
|
|
|
|
|
2018-03-09 07:21:25 +01:00
|
|
|
export default {
|
2018-03-14 04:24:54 +01:00
|
|
|
name: 'local',
|
|
|
|
components: { Toot },
|
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
account: state => state.TimelineSpace.account,
|
|
|
|
timeline: state => state.TimelineSpace.Local.timeline
|
|
|
|
})
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
this.$store.dispatch('TimelineSpace/Local/startLocalStreaming', this.account)
|
|
|
|
},
|
|
|
|
beforeDestroy () {
|
|
|
|
this.$store.dispatch('TimelineSpace/Local/stopLocalStreaming')
|
|
|
|
}
|
2018-03-09 07:21:25 +01:00
|
|
|
}
|
|
|
|
</script>
|
2018-03-14 04:24:54 +01:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
#local {
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
|
|
|
</style>
|