From 9cb636e6381ce847601bf2921a790eca36a9bddb Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 17 Oct 2023 14:03:19 +0200 Subject: [PATCH] UI - Adding mouseover/title to show absolute date/time of a last-change or last-checked date #1860 --- changedetectionio/static/js/watch-overview.js | 8 ++++++++ changedetectionio/templates/watch-overview.html | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/changedetectionio/static/js/watch-overview.js b/changedetectionio/static/js/watch-overview.js index a8b2b4fd..57541dfe 100644 --- a/changedetectionio/static/js/watch-overview.js +++ b/changedetectionio/static/js/watch-overview.js @@ -4,6 +4,14 @@ $(function () { $(this).closest('.unviewed').removeClass('unviewed'); }); + $('td[data-timestamp]').each(function () { + $(this).prop('title', new Intl.DateTimeFormat(undefined, + { + dateStyle: 'full', + timeStyle: 'long' + }).format($(this).data('timestamp') * 1000)); + }) + $("#checkbox-assign-tag").click(function (e) { $('#op_extradata').val(prompt("Enter a tag name")); }); diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 687012c7..40b88e2c 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -154,8 +154,8 @@ {% endfor %} - {{watch|format_last_checked_time|safe}} - {% if watch.history_n >=2 and watch.last_changed >0 %} + {{watch|format_last_checked_time|safe}} + {% if watch.history_n >=2 and watch.last_changed >0 %} {{watch.last_changed|format_timestamp_timeago}} {% else %} Not yet