Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 131bbb3c06 | |||
| c0a98a90dd |
@@ -123,3 +123,8 @@
|
|||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* show finished games on watch page instead of hanging spinner ([#16](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/issues/16)) ([828c2a0](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/commit/828c2a03c18c74d191d7181cfa70c824c2beca67))
|
* show finished games on watch page instead of hanging spinner ([#16](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/issues/16)) ([828c2a0](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/commit/828c2a03c18c74d191d7181cfa70c824c2beca67))
|
||||||
|
## [0.0.0](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/compare/0.6.5...0.0.0) (2026-06-30)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **tournaments:** make finished games in previous rounds clickable ([#17](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/issues/17)) ([c0a98a9](https://git.janis-eccarius.de/NowChess/NowChess-Frontend/commit/c0a98a90dd53e675b5f6655d71bab681a1dcf361))
|
||||||
|
|||||||
@@ -340,6 +340,13 @@
|
|||||||
}
|
}
|
||||||
.pairing-ongoing svg { animation: pulse 1.4s ease-in-out infinite; }
|
.pairing-ongoing svg { animation: pulse 1.4s ease-in-out infinite; }
|
||||||
|
|
||||||
|
.pairing-review {
|
||||||
|
font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
|
||||||
|
text-transform: uppercase; color: var(--nc-neon);
|
||||||
|
opacity: 0; transition: opacity 0.15s;
|
||||||
|
}
|
||||||
|
.pairing-row.is-watchable:hover .pairing-review { opacity: 1; }
|
||||||
|
|
||||||
/* Official bot join section */
|
/* Official bot join section */
|
||||||
.join-divider {
|
.join-divider {
|
||||||
display: flex; align-items: center; gap: 10px;
|
display: flex; align-items: center; gap: 10px;
|
||||||
|
|||||||
@@ -186,6 +186,35 @@
|
|||||||
</section>
|
</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>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ export class TournamentsComponent implements OnInit {
|
|||||||
selectedTournament: Tournament | null = null;
|
selectedTournament: Tournament | null = null;
|
||||||
pairings: RoundPairings | null = null;
|
pairings: RoundPairings | null = null;
|
||||||
pairingsLoading = false;
|
pairingsLoading = false;
|
||||||
|
previousRoundPairings: RoundPairings[] = [];
|
||||||
|
previousRoundsLoading = false;
|
||||||
|
|
||||||
showCreateDialog = false;
|
showCreateDialog = false;
|
||||||
createForm: FormGroup = this.fb.group({
|
createForm: FormGroup = this.fb.group({
|
||||||
@@ -116,19 +118,35 @@ export class TournamentsComponent implements OnInit {
|
|||||||
this.tab = tab;
|
this.tab = tab;
|
||||||
this.selectedTournament = null;
|
this.selectedTournament = null;
|
||||||
this.pairings = null;
|
this.pairings = null;
|
||||||
|
this.previousRoundPairings = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
selectTournament(t: Tournament): void {
|
selectTournament(t: Tournament): void {
|
||||||
if (this.selectedTournament?.id === t.id) {
|
if (this.selectedTournament?.id === t.id) {
|
||||||
this.selectedTournament = null;
|
this.selectedTournament = null;
|
||||||
this.pairings = null;
|
this.pairings = null;
|
||||||
|
this.previousRoundPairings = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.selectedTournament = t;
|
this.selectedTournament = t;
|
||||||
this.pairings = null;
|
this.pairings = null;
|
||||||
|
this.previousRoundPairings = [];
|
||||||
if (t.round > 0) {
|
if (t.round > 0) {
|
||||||
this.loadPairings(t.id, t.round);
|
this.loadPairings(t.id, t.round);
|
||||||
}
|
}
|
||||||
|
if (t.round > 1) {
|
||||||
|
this.previousRoundsLoading = true;
|
||||||
|
const rounds = Array.from({ length: t.round - 1 }, (_, i) => i + 1);
|
||||||
|
forkJoin(rounds.map(r => this.tournamentService.roundPairings(t.id, r)))
|
||||||
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||||
|
.subscribe({
|
||||||
|
next: results => {
|
||||||
|
this.previousRoundPairings = [...results].reverse();
|
||||||
|
this.previousRoundsLoading = false;
|
||||||
|
},
|
||||||
|
error: () => { this.previousRoundsLoading = false; }
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get activeList(): Tournament[] {
|
get activeList(): Tournament[] {
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
MAJOR=0
|
MAJOR=0
|
||||||
MINOR=6
|
MINOR=7
|
||||||
PATCH=5
|
PATCH=0
|
||||||
|
|||||||
Reference in New Issue
Block a user