feat: show each account's last sign-in in Users

A right-aligned column at the end of every Users & roles row says how long ago the
account signed in, with the exact moment as the hint and as a line in the account
panel; a dash where nothing is recorded, and the demo account says it is not recorded.
formatDateTime formats that moment in the UI language rather than the browser's.
This commit is contained in:
2026-09-16 00:45:03 +02:00
parent 11aef4ab7a
commit e299c66121
6 changed files with 74 additions and 1 deletions
+6
View File
@@ -148,6 +148,12 @@ export function formatCountOrDash(n: number | null | undefined): string {
return n != null ? formatViews(n) : "—";
}
// Absolute date AND time in the UI language (e.g. "16 Sept 2026, 08:30:14"). A bare `toLocaleString()`
// formats in the browser's locale instead, so an English UI showed a Hungarian-shaped date. Empty for null.
export function formatDateTime(iso: string | null | undefined): string {
return iso ? new Date(iso).toLocaleString(i18n.language) : "";
}
// Absolute day-precision date (e.g. "12 Jan 2017"), shown alongside a relative time. Empty for null.
export function formatDate(iso: string | null | undefined, lang: string): string {
return iso