12 lines
1.0 KiB
Svelte
12 lines
1.0 KiB
Svelte
<script lang="ts">
|
|
import type { RecordEvidence } from '$lib/leaderboard.js';
|
|
import { timeFormat } from '$ui/stores/time-zone.js';
|
|
import { contextHref } from '$lib/navigation-context.js';
|
|
let { evidence, returnTo, metric = 'Record' }: { evidence: RecordEvidence; returnTo?: string; metric?: string; disclosure?: boolean } = $props();
|
|
</script>
|
|
<span class="record-source"><a href={returnTo ? contextHref(`/matches/${evidence.matchId}`, returnTo) : `/matches/${evidence.matchId}`} aria-label={`${metric}: ${evidence.mapName}, Match #${evidence.matchId}`} title={evidence.endedAt ? `Completed ${$timeFormat.dateTime(evidence.endedAt)}` : 'Completed match; end time unknown'}>Match #{evidence.matchId} · {evidence.mapName}</a></span>
|
|
<style>
|
|
.record-source { display: block; margin-top: var(--space-1); white-space: normal; overflow-wrap: anywhere; font-family: var(--font-body); font-size: var(--text-xs); font-weight: normal; line-height: var(--leading-body); }
|
|
a { color: var(--accent-primary-hover); }
|
|
</style>
|