forked from AkkomaGang/akkoma-fe
Display user timeline
This commit is contained in:
parent
090148ef60
commit
2e7029b670
3 changed files with 12 additions and 6 deletions
|
@ -1,13 +1,15 @@
|
||||||
import UserCardContent from '../user_card_content/user_card_content.vue'
|
import UserCardContent from '../user_card_content/user_card_content.vue'
|
||||||
|
import Timeline from '../timeline/timeline.vue'
|
||||||
|
|
||||||
const UserProfile = {
|
const UserProfile = {
|
||||||
created () {
|
created () {
|
||||||
this.$store.dispatch('startFetching', ['user', this.userId])
|
this.$store.dispatch('startFetching', ['user', this.userId])
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
this.$store.dispatch('stopFetching', ['user', this.userId])
|
this.$store.dispatch('stopFetching', 'user')
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
timeline () { return this.$store.state.statuses.timelines.user },
|
||||||
userId () {
|
userId () {
|
||||||
return this.$route.params.id
|
return this.$route.params.id
|
||||||
},
|
},
|
||||||
|
@ -16,7 +18,8 @@ const UserProfile = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UserCardContent
|
UserCardContent,
|
||||||
|
Timeline
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="user" class="user-profile panel panel-default base00-background">
|
<div>
|
||||||
<user-card-content :user="user"></user-card-content>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -113,11 +113,11 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
|
||||||
let params = []
|
let params = []
|
||||||
|
|
||||||
if (since) {
|
if (since) {
|
||||||
params.push('since_id', since)
|
params.push(['since_id', since])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (until) {
|
if (until) {
|
||||||
params.push('max_id', until)
|
params.push(['max_id', until])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userId) {
|
if (userId) {
|
||||||
|
|
Loading…
Reference in a new issue