Merge pull request #1342 from pixelfed/frontend-ui-refactor

Frontend ui refactor
This commit is contained in:
daniel 2019-06-03 20:12:41 -06:00 committed by GitHub
commit bc2b5ec641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

2
public/js/loops.js vendored

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
"/js/compose.js": "/js/compose.js?id=f69f248dc1cfcb8ae092",
"/js/developers.js": "/js/developers.js?id=1359f11c7349301903f8",
"/js/discover.js": "/js/discover.js?id=0625385218493e556ccc",
"/js/loops.js": "/js/loops.js?id=04604e13614f26617f27",
"/js/loops.js": "/js/loops.js?id=0677173fdad43d0687ba",
"/js/profile.js": "/js/profile.js?id=257d02b221142438d173",
"/js/search.js": "/js/search.js?id=27e8be8bfef6be586d25",
"/js/status.js": "/js/status.js?id=fb2f77026b548814adc3",

View File

@ -16,7 +16,7 @@
</div>
<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="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">
<span>{{loop.favourites_count}} Likes</span>
<span>{{loop.reblogs_count}} Shares</span>
@ -108,6 +108,10 @@ export default {
timestamp(loop) {
let ts = new Date(loop.created_at);
return ts.toLocaleDateString();
},
getTitle(loop) {
let content = loop.content ? loop.content : 'Untitled';
return content.trim();
}
}
}