Signed-off-by: marcin mikołajczak <git@mkljczk.pl>merge-requests/1931/head
parent
bdf46eca5a
commit
6c4c8fe51f
@ -0,0 +1 @@
|
|||||||
|
Display quotes count on posts and add quotes list page
|
@ -0,0 +1,26 @@
|
|||||||
|
import Timeline from '../timeline/timeline.vue'
|
||||||
|
|
||||||
|
const QuotesTimeline = {
|
||||||
|
created () {
|
||||||
|
this.$store.commit('clearTimeline', { timeline: 'quotes' })
|
||||||
|
this.$store.dispatch('startFetchingTimeline', { timeline: 'quotes', statusId: this.statusId })
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
Timeline
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
statusId () { return this.$route.params.id },
|
||||||
|
timeline () { return this.$store.state.statuses.timelines.quotes }
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
statusId () {
|
||||||
|
this.$store.commit('clearTimeline', { timeline: 'quotes' })
|
||||||
|
this.$store.dispatch('startFetchingTimeline', { timeline: 'quotes', statusId: this.statusId })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unmounted () {
|
||||||
|
this.$store.dispatch('stopFetchingTimeline', 'quotes')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default QuotesTimeline
|
@ -0,0 +1,10 @@
|
|||||||
|
<template>
|
||||||
|
<Timeline
|
||||||
|
:title="$t('nav.quotes')"
|
||||||
|
:timeline="timeline"
|
||||||
|
:timeline-name="'quotes'"
|
||||||
|
:status-id="statusId"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script src='./quotes_timeline.js'></script>
|
Loading…
Reference in new issue