some initial work to make it possible to use "unregistered" timelines, i.e. not

reserving a timeline by name, instead just passing timeline object itself.
This commit is contained in:
Henry Jameson 2019-01-12 23:33:45 +03:00
parent 1fb9ceb59b
commit 039a407400
7 changed files with 43 additions and 31 deletions

View file

@ -1,6 +1,7 @@
import UserCardContent from '../user_card_content/user_card_content.vue'
import UserCard from '../user_card/user_card.vue'
import Timeline from '../timeline/timeline.vue'
import { emptyTl } from '../../modules/statuses.js'
const UserProfile = {
created () {
@ -13,6 +14,11 @@ const UserProfile = {
destroyed () {
this.$store.dispatch('stopFetching', 'user')
},
data () {
return {
favorites: emptyTl({ type: 'favorites', userId: this.userId })
}
},
computed: {
timeline () {
return this.$store.state.statuses.timelines.user

View file

@ -20,6 +20,7 @@
<i class="icon-spin3 animate-spin"></i>
</div>
</div>
<Timeline :label="$t('user_card.favorites')" :embedded="true" :title="$t('user_profile.favorites_title')" :timeline="favorites"/>
</tab-switcher>
</div>
<div v-else class="panel user-profile-placeholder">