mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update PostComponent, fix remote urls
This commit is contained in:
parent
c6185ceea1
commit
42716ccc45
1 changed files with 12 additions and 1 deletions
|
@ -173,7 +173,7 @@
|
|||
</span>
|
||||
</p>
|
||||
<p class="">
|
||||
<a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(reply.created_at)" :href="reply.url"></a>
|
||||
<a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(reply.created_at)" :href="permalinkUrl(reply.url)"></a>
|
||||
<span v-if="reply.favourites_count" class="text-muted comment-reaction font-weight-bold mr-3">{{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}}</span>
|
||||
<span class="text-muted comment-reaction font-weight-bold cursor-pointer" v-on:click="replyFocus(reply, index)">Reply</span>
|
||||
</p>
|
||||
|
@ -1210,6 +1210,17 @@ export default {
|
|||
this.$refs.embedModal.hide();
|
||||
},
|
||||
|
||||
permalinkUrl(reply, showOrigin = false) {
|
||||
let profile = reply.account;
|
||||
if(profile.local == true) {
|
||||
return profile.url;
|
||||
} else {
|
||||
return showOrigin ?
|
||||
reply.url :
|
||||
'/i/web/post/_/' + profile.id + '/' + reply.id;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue