From c77598adc7b4d234a65cf1e0db3b57ff13c64f02 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Sat, 22 Aug 2026 00:09:57 +0000 Subject: [PATCH] Fine tuning date formatting. --- frontend/src/AnalyticsView.vue | 2 +- frontend/src/analytics/format.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/AnalyticsView.vue b/frontend/src/AnalyticsView.vue index ff52657..51ca33c 100644 --- a/frontend/src/AnalyticsView.vue +++ b/frontend/src/AnalyticsView.vue @@ -356,7 +356,7 @@ const abuseRows = computed(() => formatAbuseRows(data.value?.abuse || [], client } .visit-table .last-seen { - width: 5rem; + width: 6rem; text-align: right; white-space: nowrap; cursor: pointer; diff --git a/frontend/src/analytics/format.js b/frontend/src/analytics/format.js index cab9eb7..d66fc9d 100644 --- a/frontend/src/analytics/format.js +++ b/frontend/src/analytics/format.js @@ -92,7 +92,7 @@ export function calcReadStats(visits) { totalVisitSeconds += secs.reduce((a, b) => a + b, 0) for (const [path, s] of Object.entries(v.read || {})) { if (s >= MIN_READ_SECONDS) { - ;(perArticle[path] || (perArticle[path] = [])).push(s) + ; (perArticle[path] || (perArticle[path] = [])).push(s) } } } @@ -185,6 +185,8 @@ export function formatWhen(ts, now = Date.now()) { if (adiff <= 86400000) { return formatter .format(Math.round(diff / 3600000), 'hour') + .replace('hours', 'h') + .replace('hour', 'h') .replaceAll(' ', '\u202F') } if (adiff <= 604800000) {