FIX: Change the empty content's text on profile pages when they are

accessed by a public (non-authenticated) user.

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/775/head
Cyrille Bollu 2019-10-02 11:23:33 +02:00
rodzic 7c4925da7a
commit 0ad91d78eb
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -123,8 +123,14 @@ export default {
return this.emptyContent[this.$route.params.type]
}
if (typeof this.emptyContent[this.$route.name] !== 'undefined') {
return this.$route.name === 'timeline' ? this.emptyContent['default'] : this.emptyContent[this.$route.name]
let content = this.emptyContent[this.$route.name]
// Change text on profile page when accessed by a public (non-authenticated) user
if (this.$route.name === 'profile' && this.serverData.public) {
content.title = this.$route.params.account + ' ' + t('social', 'hasn\'t tooted yet')
}
return this.$route.name === 'timeline' ? this.emptyContent['default'] : content
}
// Fallback
return this.emptyContent.default
},
timeline: function() {