FEATURE: show read time on user cards
This commit is contained in:
parent
3940e95227
commit
2aadc42662
|
@ -118,6 +118,7 @@
|
||||||
<h3><span class='desc'>{{i18n 'last_post'}}</span> {{format-date user.last_posted_at leaveAgo="true"}}</h3>
|
<h3><span class='desc'>{{i18n 'last_post'}}</span> {{format-date user.last_posted_at leaveAgo="true"}}</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<h3><span class='desc'>{{i18n 'joined'}}</span> {{format-date user.created_at leaveAgo="true"}}</h3>
|
<h3><span class='desc'>{{i18n 'joined'}}</span> {{format-date user.created_at leaveAgo="true"}}</h3>
|
||||||
|
<h3><span class='desc'>{{i18n 'time_read'}}</span> {{user.time_read}}</h3>
|
||||||
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
|
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -66,6 +66,7 @@ class UserSerializer < BasicUserSerializer
|
||||||
:topic_post_count,
|
:topic_post_count,
|
||||||
:pending_count,
|
:pending_count,
|
||||||
:profile_view_count,
|
:profile_view_count,
|
||||||
|
:time_read,
|
||||||
:primary_group_name,
|
:primary_group_name,
|
||||||
:primary_group_flair_url,
|
:primary_group_flair_url,
|
||||||
:primary_group_flair_bg_color,
|
:primary_group_flair_bg_color,
|
||||||
|
@ -401,4 +402,8 @@ class UserSerializer < BasicUserSerializer
|
||||||
object.user_profile.views
|
object.user_profile.views
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def time_read
|
||||||
|
AgeWords.age_words(object.user_stat&.time_read)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1003,6 +1003,7 @@ en:
|
||||||
mute: Mute
|
mute: Mute
|
||||||
unmute: Unmute
|
unmute: Unmute
|
||||||
last_post: Last post
|
last_post: Last post
|
||||||
|
time_read: Read time
|
||||||
last_reply_lowercase: last reply
|
last_reply_lowercase: last reply
|
||||||
replies_lowercase:
|
replies_lowercase:
|
||||||
one: reply
|
one: reply
|
||||||
|
|
Loading…
Reference in New Issue