Display user timeline
This commit is contained in:
parent
090148ef60
commit
2e7029b670
@ -1,13 +1,15 @@
|
||||
import UserCardContent from '../user_card_content/user_card_content.vue'
|
||||
import Timeline from '../timeline/timeline.vue'
|
||||
|
||||
const UserProfile = {
|
||||
created () {
|
||||
this.$store.dispatch('startFetching', ['user', this.userId])
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('stopFetching', ['user', this.userId])
|
||||
this.$store.dispatch('stopFetching', 'user')
|
||||
},
|
||||
computed: {
|
||||
timeline () { return this.$store.state.statuses.timelines.user },
|
||||
userId () {
|
||||
return this.$route.params.id
|
||||
},
|
||||
@ -16,7 +18,8 @@ const UserProfile = {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
UserCardContent
|
||||
UserCardContent,
|
||||
Timeline
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div v-if="user" class="user-profile panel panel-default base00-background">
|
||||
<user-card-content :user="user"></user-card-content>
|
||||
<div>
|
||||
<div v-if="user" class="user-profile panel panel-default base00-background">
|
||||
<user-card-content :user="user"></user-card-content>
|
||||
</div>
|
||||
<Timeline :title="'User Timeline'" v-bind:timeline="timeline" v-bind:timeline-name="'user'"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -113,11 +113,11 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
|
||||
let params = []
|
||||
|
||||
if (since) {
|
||||
params.push('since_id', since)
|
||||
params.push(['since_id', since])
|
||||
}
|
||||
|
||||
if (until) {
|
||||
params.push('max_id', until)
|
||||
params.push(['max_id', until])
|
||||
}
|
||||
|
||||
if (userId) {
|
||||
|
Loading…
Reference in New Issue
Block a user