2018-03-09 07:21:25 +01:00
|
|
|
<template>
|
|
|
|
<div id="home">
|
2018-03-20 14:21:16 +01:00
|
|
|
<div class="home-timeline" v-for="(message, index) in timeline" v-bind:key="index">
|
2018-03-12 08:42:05 +01:00
|
|
|
<toot :message="message"></toot>
|
|
|
|
</div>
|
2018-03-09 07:21:25 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-03-12 08:42:05 +01:00
|
|
|
import { mapState } from 'vuex'
|
2018-03-12 15:13:55 +01:00
|
|
|
import Toot from './Cards/Toot'
|
2018-03-12 08:42:05 +01:00
|
|
|
|
2018-03-09 07:21:25 +01:00
|
|
|
export default {
|
2018-03-12 08:42:05 +01:00
|
|
|
name: 'home',
|
|
|
|
components: { Toot },
|
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
timeline: state => state.TimelineSpace.homeTimeline
|
|
|
|
})
|
2018-03-26 14:58:58 +02:00
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
|
|
|
},
|
|
|
|
beforeUpdate () {
|
|
|
|
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline) {
|
|
|
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
|
|
|
}
|
2018-03-27 06:58:20 +02:00
|
|
|
},
|
|
|
|
destroyed () {
|
|
|
|
this.$store.commit('TimelineSpace/archiveHomeTimeline')
|
2018-03-12 08:42:05 +01:00
|
|
|
}
|
2018-03-09 07:21:25 +01:00
|
|
|
}
|
|
|
|
</script>
|
2018-03-12 08:42:05 +01:00
|
|
|
|