From 0ad91d78eb9d4fa969c1700f451946ef92408455 Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Wed, 2 Oct 2019 11:23:33 +0200 Subject: [PATCH] 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 --- src/components/TimelineList.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/TimelineList.vue b/src/components/TimelineList.vue index 4d58b486..7ca9b73e 100644 --- a/src/components/TimelineList.vue +++ b/src/components/TimelineList.vue @@ -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() {