Skip to content
Snippets Groups Projects

Use self-background image on someone's profile

Closed Edijs Bov requested to merge edijs/pleroma-fe:profile-theme into develop
Files
2
+ 18
1
@@ -40,7 +40,9 @@ export default {
this.$i18n.locale = this.$store.state.config.interfaceLanguage
},
computed: {
currentUser () { return this.$store.state.users.currentUser },
currentUser () {
return this.selectedUser || this.$store.state.users.currentUser
},
background () {
return this.currentUser.background_image || this.$store.state.instance.background
},
@@ -86,6 +88,21 @@ export default {
unseenNotificationsCount () {
return this.unseenNotifications.length
},
selectedUser () {
if (this.isExternalProfile) {
return this.$store.getters.userById(this.$route.params.id)
}
if (this.isLocalProfile) {
return this.$store.getters.userByName(this.$route.params.name)
}
return null
},
isExternalProfile () {
return this.$route.name === 'external-user-profile'
},
isLocalProfile () {
return this.$route.name === 'user-profile'
},
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }
},
methods: {
Loading