mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Update RemotePost.vue
This commit is contained in:
parent
8c898a091c
commit
56a415ef45
1 changed files with 5 additions and 4 deletions
|
@ -170,7 +170,7 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="">
|
<p class="">
|
||||||
<a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(reply.created_at)" :href="purl(reply.account, false)"></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, false)"></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 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>
|
<span class="text-muted comment-reaction font-weight-bold cursor-pointer" v-on:click="replyFocus(reply, index)">Reply</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -1012,13 +1012,14 @@ export default {
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
},
|
},
|
||||||
|
|
||||||
purl(profile, showOrigin = false) {
|
permalinkUrl(reply, showOrigin = false) {
|
||||||
|
let profile = reply.account;
|
||||||
if(profile.local == true) {
|
if(profile.local == true) {
|
||||||
return profile.url;
|
return profile.url;
|
||||||
} else {
|
} else {
|
||||||
return showOrigin ?
|
return showOrigin ?
|
||||||
profile.url :
|
reply.url :
|
||||||
'/i/web/profile/_/' + profile.id;
|
'/i/web/post/_/' + profile.id + '/' + reply.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue