feat(tournaments): make finished games in previous rounds clickable

Load all completed rounds in parallel when a tournament is expanded
and display them below the current round. Each finished game row is
clickable and navigates to the existing game review view. A 'Review'
label fades in on hover to signal interactivity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
LQ63
2026-06-30 20:03:41 +02:00
parent efb129c323
commit ed27699ac5
3 changed files with 54 additions and 0 deletions
@@ -186,6 +186,35 @@
</section>
}
<!-- Previous rounds -->
@if (previousRoundsLoading) {
<div class="state-msg small"><span class="pulse"></span>Loading previous rounds…</div>
}
@for (rp of previousRoundPairings; track rp.round) {
<section class="detail-section">
<h3 class="detail-heading">Round {{ rp.round }} pairings</h3>
<div class="pairings-list">
@for (p of rp.pairings; track pairingKey(p)) {
@let gid = firstGameId(p);
<div class="pairing-row" [class.is-watchable]="!!gid"
(click)="gid && watchGame(gid)">
<span class="pairing-white">{{ p.white?.name ?? 'Bye' }}</span>
<span class="pairing-vs">vs</span>
<span class="pairing-black">{{ p.black.name }}</span>
@if (p.winner) {
<span class="pairing-result" [class]="'result-' + p.winner">
{{ p.winner === 'draw' ? '½–½' : p.winner === 'white' ? '1–0' : '0–1' }}
</span>
}
@if (gid) {
<span class="pairing-review">Review</span>
}
</div>
}
</div>
</section>
}
</div>
}
</div>