1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Datefns on userprofilespage.js and complete removal of humanedate

This commit is contained in:
ferferga 2020-04-02 20:02:52 +02:00
parent af9d2d0bf8
commit b0a6c4dabc
3 changed files with 2 additions and 77 deletions

View file

@ -1,4 +1,4 @@
define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light", "cardStyle", "emby-button", "indicators", "flexStyles"], function (loading, dom, globalize) {
define(["loading", "dom", "globalize", "date-fns", "dfnshelper", "paper-icon-button-light", "cardStyle", "emby-button", "indicators", "flexStyles"], function (loading, dom, globalize, datefns, dfnshelper) {
"use strict";
function deleteUser(page, id) {
@ -128,7 +128,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
function getLastSeenText(lastActivityDate) {
if (lastActivityDate) {
return "Last seen " + humaneDate(lastActivityDate);
return globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(session.LastActivityDate), { addSuffix: true, locale: dfnshelper.getLocale() }));
}
return "";