ui: better user last active at field

This commit is contained in:
undefined committed 2024-10-06 23:17:26 +08:00
1 parent 6ae902d3ca
commit 7a95780405
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -497,6 +497,7 @@ judge_playground: 评测游乐场
Judged At: 评测时间
Judged By: 评测机
Judging Queue: 评测队列
just now: 刚刚
Keep current expiration: 保持当前过期设置
Langs Config: 语言设置
langs: 语言
@@ -26,8 +26,8 @@
{{ _('UID') }}: {{ udoc['_id'] }},
{{ _('Registered at') }} {{ datetimeSpan(udoc['regat'])|safe }},
{{ _('last login at') }} {{ datetimeSpan(udoc['loginat'])|safe }},
{% if sdoc %}
{{ _('last active at') }} {{ datetimeSpan(sdoc['updateAt'])|safe }}.
{% if sdoc and sdoc.updateAt %}
{{ _('last active at') }} {{ datetimeSpan(sdoc['updateAt'])|safe if Date.now() - sdoc.updateAt.getTime() > 300000 else _('just now') }}.
{% else %}
{{ _('currently offline') }}.
{% endif %}