Show provisioning timestamps and step offsets (Refs #89)

This commit is contained in:
2026-10-09 10:05:12 -04:00
parent 6128a137cc
commit dbbe3749e2
6 changed files with 73 additions and 23 deletions
@@ -0,0 +1,16 @@
<script lang="ts">
import { timestampISO, type Timestamp } from '$lib/time-zone.js';
import { formatTimeOffset } from '$ui/duration.js';
import { timeFormat } from '$ui/stores/time-zone.js';
let { value, start, missing = 'Not recorded' }: { value: Timestamp; start: Timestamp; missing?: string } = $props();
const iso = $derived(timestampISO(value));
const offset = $derived(formatTimeOffset(start, value));
const absolute = $derived($timeFormat.dateTime(value));
</script>
{#if iso}<time datetime={iso} title={absolute} aria-label={offset ? `${offset} from operation start · ${absolute}` : undefined}>{offset ?? absolute}</time>{:else}<span>{missing}</span>{/if}
<style>
time { font-variant-numeric: tabular-nums; }
</style>