Fine tuning date formatting.

This commit is contained in:
2026-08-22 00:09:57 +00:00
parent 29f8fac013
commit c77598adc7
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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;
+3 -1
View File
@@ -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) {