opencs2-dataset-viewer / src /lib /components /match-table /cells /start-time-cell.svelte
blanchon's picture
Home: POV tab + DuckDB advanced filter
5a67aa1
<script lang="ts">
interface Props {
seconds?: number;
}
let { seconds }: Props = $props();
function fmt(s: number): string {
const m = Math.floor(s / 60);
const r = s - m * 60;
return `${m}:${r.toFixed(1).padStart(4, '0')}`;
}
</script>
{#if seconds === undefined || !Number.isFinite(seconds)}
<span class="font-mono text-xs text-muted-foreground/40">—</span>
{:else}
<span class="font-mono text-xs text-foreground tabular-nums">{fmt(seconds)}</span>
{/if}