mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update LoopComponent.vue
This commit is contained in:
parent
a4c6acf7e4
commit
6b50afd140
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="username font-weight-bolder lead d-flex justify-content-between"><a :href="loop.account.url">{{loop.account.acct}}</a> <a :href="loop.url">{{timestamp(loop)}}</a></p>
|
<p class="username font-weight-bolder lead d-flex justify-content-between"><a :href="loop.account.url">{{loop.account.acct}}</a> <a :href="loop.url">{{timestamp(loop)}}</a></p>
|
||||||
<p class="small text-muted text-truncate" v-html="loop.content ? loop.content : 'Untitled'"></p>
|
<p class="small text-muted text-truncate" v-html="getTitle(loop)"></p>
|
||||||
<div class="small text-muted d-flex justify-content-between mb-0">
|
<div class="small text-muted d-flex justify-content-between mb-0">
|
||||||
<span>{{loop.favourites_count}} Likes</span>
|
<span>{{loop.favourites_count}} Likes</span>
|
||||||
<span>{{loop.reblogs_count}} Shares</span>
|
<span>{{loop.reblogs_count}} Shares</span>
|
||||||
|
@ -108,6 +108,10 @@ export default {
|
||||||
timestamp(loop) {
|
timestamp(loop) {
|
||||||
let ts = new Date(loop.created_at);
|
let ts = new Date(loop.created_at);
|
||||||
return ts.toLocaleDateString();
|
return ts.toLocaleDateString();
|
||||||
|
},
|
||||||
|
getTitle(loop) {
|
||||||
|
let content = loop.content : 'Untitled';
|
||||||
|
return content.trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue