Add list timeline rendering functionality
the list name is missing; this is because the API request to get it is different to the API request for receiving the list timeline, and is not yet implemented.
This commit is contained in:
parent
c1a8dc34da
commit
d5d464a289
9 changed files with 62 additions and 11 deletions
23
src/components/list_timeline/list_timeline.js
Normal file
23
src/components/list_timeline/list_timeline.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import Timeline from '../timeline/timeline.vue'
|
||||
const ListTimeline = {
|
||||
data () {
|
||||
return {
|
||||
listId: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Timeline
|
||||
},
|
||||
computed: {
|
||||
timeline () { return this.$store.state.statuses.timelines.list }
|
||||
},
|
||||
created () {
|
||||
this.listId = this.$route.params.id
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: 'list', listId: this.listId })
|
||||
},
|
||||
unmounted () {
|
||||
this.$store.dispatch('stopFetchingTimeline', 'list')
|
||||
}
|
||||
}
|
||||
|
||||
export default ListTimeline
|
10
src/components/list_timeline/list_timeline.vue
Normal file
10
src/components/list_timeline/list_timeline.vue
Normal file
|
@ -0,0 +1,10 @@
|
|||
<template>
|
||||
<Timeline
|
||||
title="list.name"
|
||||
:timeline="timeline"
|
||||
:list-id="listId"
|
||||
timeline-name="list"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script src="./list_timeline.js"></script>
|
Loading…
Add table
Add a link
Reference in a new issue