diff options
author | Cyrille Bollu <cyrpub@bollu.be> | 2019-10-07 10:18:58 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-10-13 23:50:27 +0200 |
commit | b5e374f3a3c14a13c68e4e6e1d1458637956eb19 (patch) | |
tree | 4b1146eac62d528c1fe363efc0bc0ae69e82c5f7 | |
parent | 4f438c2591cfd43649bc7a47bee58dc24ccbb88c (diff) |
FIX: Changes empty content message for single-post timelines.
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
-rw-r--r-- | src/components/EmptyContent.vue | 5 | ||||
-rw-r--r-- | src/components/TimelineList.vue | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/components/EmptyContent.vue b/src/components/EmptyContent.vue index 82e62ef0..db76d4e7 100644 --- a/src/components/EmptyContent.vue +++ b/src/components/EmptyContent.vue @@ -22,7 +22,10 @@ <template> <div class="emptycontent"> - <img :src="imageUrl" class="icon-illustration" alt=""> + <img v-if="item.image" + :src="imageUrl" + class="icon-illustration" + alt=""> <h2>{{ item.title }}</h2> <p>{{ item.description }}</p> </div> diff --git a/src/components/TimelineList.vue b/src/components/TimelineList.vue index f42edb4b..9e86912a 100644 --- a/src/components/TimelineList.vue +++ b/src/components/TimelineList.vue @@ -60,6 +60,7 @@ import InfiniteLoading from 'vue-infinite-loading' import TimelineEntry from './TimelineEntry.vue' import CurrentUserMixin from './../mixins/currentUserMixin' import EmptyContent from './EmptyContent.vue' +import Logger from '../logger.js' export default { name: 'Timeline', @@ -113,6 +114,9 @@ export default { tags: { image: 'img/undraw/profile.svg', title: t('social', 'No posts found for this tag') + }, + 'single-post': { + title: t('social', 'No replies found') } } } @@ -122,6 +126,7 @@ export default { if (typeof this.emptyContent[this.$route.params.type] !== 'undefined') { return this.emptyContent[this.$route.params.type] } + if (typeof this.emptyContent[this.$route.name] !== 'undefined') { let content = this.emptyContent[this.$route.name] // Change text on profile page when accessed by another user or a public (non-authenticated) user @@ -130,7 +135,9 @@ export default { } return this.$route.name === 'timeline' ? this.emptyContent['default'] : content } + // Fallback + Logger.log('Did not find any empty content for this route', { 'routeType': this.$route.params.type, 'routeName': this.$route.name }) return this.emptyContent.default }, timeline: function() { |