diff --git a/deno.json b/deno.json index 6b32982..46b3db0 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@moonlight-protocol/provider-console", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "tasks": { "dev": "deno run --allow-all --allow-env --watch src/server.ts", diff --git a/src/views/provider.ts b/src/views/provider.ts index 28a63f4..6b4c310 100644 --- a/src/views/provider.ts +++ b/src/views/provider.ts @@ -66,6 +66,18 @@ function fmtRelativeTime(epochMs: number, now: number): string { return `${hr}h ago`; } +/** Absolute, human-readable date with hour:minute (24h), e.g. "Jun 12, 2026, 18:16". */ +function fmtDateTime(epochMs: number): string { + return new Date(epochMs).toLocaleString(undefined, { + year: "numeric", + month: "short", + day: "numeric", + hour: "2-digit", + minute: "2-digit", + hour12: false, + }); +} + function withBriefCopyFeedback(btn: HTMLElement): void { const orig = btn.innerHTML; btn.innerHTML = @@ -221,7 +233,7 @@ function renderTemplate(