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

@@ -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 %}