Display public favorites on user profiles
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
6391a6a4ea
commit
6f452d672f
5 changed files with 15 additions and 1 deletions
|
|
@ -80,6 +80,9 @@ const UserProfile = {
|
|||
followersTabVisible () {
|
||||
return this.isUs || !this.user.hide_followers
|
||||
},
|
||||
favoritesTabVisible () {
|
||||
return this.isUs || !this.user.hide_favorites
|
||||
},
|
||||
formattedBirthday () {
|
||||
const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale)
|
||||
return this.user.birthday && new Date(Date.parse(this.user.birthday)).toLocaleDateString(browserLocale, { timeZone: 'UTC', day: 'numeric', month: 'long', year: 'numeric' })
|
||||
|
|
@ -103,6 +106,8 @@ const UserProfile = {
|
|||
startFetchingTimeline('user', userId)
|
||||
startFetchingTimeline('media', userId)
|
||||
if (this.isUs) {
|
||||
startFetchingTimeline('favorites')
|
||||
} else if (!this.user.hide_favorites) {
|
||||
startFetchingTimeline('favorites', userId)
|
||||
}
|
||||
// Fetch all pinned statuses immediately
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
<Timeline
|
||||
v-if="isUs"
|
||||
v-if="favoritesTabVisible"
|
||||
key="favorites"
|
||||
:label="$t('user_card.favorites')"
|
||||
:disabled="!favorites.visibleStatuses.length"
|
||||
|
|
@ -117,6 +117,7 @@
|
|||
:title="$t('user_card.favorites')"
|
||||
timeline-name="favorites"
|
||||
:timeline="favorites"
|
||||
:user-id="userId"
|
||||
:in-profile="true"
|
||||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue