diff options
-rw-r--r-- | src/components/TimelineEntry.vue | 19 | ||||
-rw-r--r-- | src/components/TimelineList.vue | 7 | ||||
-rw-r--r-- | src/components/TimelinePost.vue (renamed from src/components/TimelineContent.vue) | 2 | ||||
-rw-r--r-- | src/views/Timeline.vue | 4 |
4 files changed, 22 insertions, 10 deletions
diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue index a88147a3..c7ed03a2 100644 --- a/src/components/TimelineEntry.vue +++ b/src/components/TimelineEntry.vue @@ -1,6 +1,9 @@ <template> - <div v-if="noDuplicateBoost" class="timeline-entry"> - <div v-if="item.type === 'Announce'" class="boost"> + <div class="timeline-entry"> + <div v-if="item.type === 'SocialAppNotification'"> + {{ actionSummary }} + </div> + <div v-if="item.type === 'Announce' && noDuplicateBoost" class="boost"> <div class="container-icon-boost"> <span class="icon-boost" /> </div> @@ -16,17 +19,20 @@ </a> {{ boosted }} </div> - <timeline-content :item="entryContent" :parent-announce="isBoost" /> + <timeline-post v-if="noDuplicateBoost && item.type === 'Note | Announce'" :item="entryContent" :parent-announce="isBoost" /> + <user-entry v-if="item.type === 'SocialAppNotificationUser'" :key="user.id" :item="user" /> </div> </template> <script> -import TimelineContent from './TimelineContent.vue' +import TimelinePost from './TimelinePost' +import UserEntry from './UserEntry' export default { name: 'TimelineEntry', components: { - TimelineContent + TimelinePost, + UserEntry }, props: { item: { type: Object, default: () => {} } @@ -61,6 +67,9 @@ export default { } } return true + }, + actionSummary() { + return this.item.summary.replace('{account}', this.item.details.account) } }, methods: { diff --git a/src/components/TimelineList.vue b/src/components/TimelineList.vue index 9d405b16..b4c39e75 100644 --- a/src/components/TimelineList.vue +++ b/src/components/TimelineList.vue @@ -57,9 +57,9 @@ <script> import InfiniteLoading from 'vue-infinite-loading' -import TimelineEntry from './../components/TimelineEntry' +import TimelineEntry from './TimelineEntry' import CurrentUserMixin from './../mixins/currentUserMixin' -import EmptyContent from './../components/EmptyContent' +import EmptyContent from './EmptyContent' export default { name: 'Timeline', @@ -69,6 +69,9 @@ export default { EmptyContent }, mixins: [CurrentUserMixin], + props: { + type: { type: String, default: () => 'home' } + }, data: function() { return { infoHidden: false, diff --git a/src/components/TimelineContent.vue b/src/components/TimelinePost.vue index a1796f0c..a3f4d753 100644 --- a/src/components/TimelineContent.vue +++ b/src/components/TimelinePost.vue @@ -58,7 +58,7 @@ pluginTag(linkify) pluginMention(linkify) export default { - name: 'TimelineContent', + name: 'TimelinePost', components: { Avatar }, diff --git a/src/views/Timeline.vue b/src/views/Timeline.vue index 390b0adc..cf66c077 100644 --- a/src/views/Timeline.vue +++ b/src/views/Timeline.vue @@ -21,11 +21,11 @@ </div> </div> </transition> - <composer /> + <composer v-if="type !== 'notifications'" /> <h2 v-if="type === 'tags'"> #{{ this.$route.params.tag }} </h2> - <timeline-list /> + <timeline-list :type="type" /> </div> </template> |