From 3172f8d413c594053a1dfa35e81911cc61dc38ea Mon Sep 17 00:00:00 2001 From: CrypterEmerald Date: Mon, 15 Nov 2021 12:59:16 +0100 Subject: [PATCH] Replaced timeago with moment.fromNow --- public/js/grocy.js | 3 +-- views/layout/default.blade.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/public/js/grocy.js b/public/js/grocy.js index e44fe019..8b3123af 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -316,7 +316,6 @@ if (window.localStorage.getItem("sidebar_state") === "collapsed") $("#sidenavToggler").click(); } -$.timeago.settings.allowFuture = true; RefreshContextualTimeago = function(rootSelector = "#page-content") { $(rootSelector + " time.timeago").each(function() @@ -352,7 +351,7 @@ RefreshContextualTimeago = function(rootSelector = "#page-content") } else { - element.timeago("update", timestamp); + element.text(moment(timestamp).fromNow()); } if (isDateWithoutTime) diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index 68738939..4eb3fb8d 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -697,8 +697,6 @@ - -