Fix copy-paste typo and add comments
This commit is contained in:
parent
9d6255dfa1
commit
f6340eb0b3
1 changed files with 3 additions and 2 deletions
|
@ -125,10 +125,11 @@ define(["loading", "dom", "globalize", "date-fns", "dfnshelper", "paper-icon-but
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
return html + "</div>";
|
return html + "</div>";
|
||||||
}
|
}
|
||||||
|
// FIXME: It seems that, sometimes, server sends date in the future, so date-fns displays messages like 'in less than a minute'. We should fix
|
||||||
|
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
|
||||||
function getLastSeenText(lastActivityDate) {
|
function getLastSeenText(lastActivityDate) {
|
||||||
if (lastActivityDate) {
|
if (lastActivityDate) {
|
||||||
return globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(session.LastActivityDate), { addSuffix: true, locale: dfnshelper.getLocale() }));
|
return globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(lastActivityDate), { addSuffix: true, locale: dfnshelper.getLocale() }));
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue