kopia lustrzana https://github.com/pixelfed/pixelfed
Update ProfileDirectory
rodzic
cfaa248c72
commit
87668d809a
|
|
@ -73,7 +73,7 @@ window.App.util = {
|
||||||
timeAgo: (function(ts) {
|
timeAgo: (function(ts) {
|
||||||
let date = Date.parse(ts);
|
let date = Date.parse(ts);
|
||||||
let seconds = Math.floor((new Date() - date) / 1000);
|
let seconds = Math.floor((new Date() - date) / 1000);
|
||||||
let interval = Math.floor(seconds / 31536000);
|
let interval = Math.floor(seconds / 63072000);
|
||||||
if (interval >= 1) {
|
if (interval >= 1) {
|
||||||
return interval + "y";
|
return interval + "y";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,6 @@
|
||||||
<span>
|
<span>
|
||||||
<span>{{prettyCount(profile.statuses_count)}}</span> POSTS
|
<span>{{prettyCount(profile.statuses_count)}}</span> POSTS
|
||||||
</span>
|
</span>
|
||||||
<span>
|
|
||||||
<span>{{postsPerDay(profile)}}</span> POSTS/DAY
|
|
||||||
</span>
|
|
||||||
<span>
|
<span>
|
||||||
<span>{{prettyCount(profile.followers_count)}}</span> FOLLOWERS
|
<span>{{prettyCount(profile.followers_count)}}</span> FOLLOWERS
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -105,19 +102,6 @@
|
||||||
|
|
||||||
thumbUrl(p) {
|
thumbUrl(p) {
|
||||||
return p.media_attachments[0].url;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue