FIX: Changes empty content message for single-post timelines.

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/793/head
Cyrille Bollu 2019-10-07 10:18:58 +02:00 zatwierdzone przez Robin Appelman
rodzic 4f438c2591
commit b5e374f3a3
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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() {