mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update ProfileDirectory
This commit is contained in:
parent
cfaa248c72
commit
87668d809a
2 changed files with 1 additions and 17 deletions
2
resources/assets/js/app.js
vendored
2
resources/assets/js/app.js
vendored
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue