diff --git a/resources/assets/js/components/RemotePost.vue b/resources/assets/js/components/RemotePost.vue index d653c6f68..5acefefcd 100644 --- a/resources/assets/js/components/RemotePost.vue +++ b/resources/assets/js/components/RemotePost.vue @@ -9,9 +9,20 @@
-More posts from {{this.statusUsername}}
- + {{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}} Reply
@@ -87,7 +87,7 @@ @@ -190,7 +190,20 @@ import ContextMenu from './ContextMenu.vue'; export default { - props: ['status', 'profile'], + props: { + 'status': { + type: Object + }, + + 'profile': { + type: Object + }, + + 'backToStatus': { + type: Boolean, + default: false + } + }, components: { "context-menu": ContextMenu @@ -249,6 +262,11 @@ methods: { commentNavigateBack(id) { + if(this.backToStatus) { + window.location.href = this.statusUrl(this.status); + return; + } + $('nav').show(); $('footer').show(); $('.mobile-footer-spacer').attr('style', 'display:block'); @@ -393,7 +411,23 @@ ctxMenu(status) { this.ctxMenuStatus = status; this.$refs.cMenu.open(); - } + }, + + statusUrl(status) { + if(status.local == true) { + return status.url; + } + + return '/i/web/post/_/' + status.account.id + '/' + status.id; + }, + + profileUrl(status) { + if(status.local == true) { + return status.account.url; + } + + return '/i/web/profile/_/' + status.account.id; + }, } }