1
0
Fork 0
forked from mirror/pixelfed

Update ProfileDirectory

This commit is contained in:
Daniel Supernault 2020-05-17 19:33:43 -06:00
parent cfaa248c72
commit 87668d809a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 1 additions and 17 deletions

View file

@ -73,7 +73,7 @@ window.App.util = {
timeAgo: (function(ts) {
let date = Date.parse(ts);
let seconds = Math.floor((new Date() - date) / 1000);
let interval = Math.floor(seconds / 31536000);
let interval = Math.floor(seconds / 63072000);
if (interval >= 1) {
return interval + "y";
}

View file

@ -16,9 +16,6 @@
<span>
<span>{{prettyCount(profile.statuses_count)}}</span> POSTS
</span>
<span>
<span>{{postsPerDay(profile)}}</span> POSTS/DAY
</span>
<span>
<span>{{prettyCount(profile.followers_count)}}</span> FOLLOWERS
</span>
@ -105,19 +102,6 @@
thumbUrl(p) {
return p.media_attachments[0].url;
},
postsPerDay(profile) {
let created = profile.created_at;
let now = Date.now();
let diff = Math.abs(created, now)
let day = 1000 * 60 * 60 * 24;
let days = Math.round(diff / day);
let statuses = profile.statuses_count;
let perDay = this.prettyCount(Math.floor(statuses / days));
return perDay;
}
}
}