fix: NCWF-4 Token Issues (#8)

Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de>
Co-authored-by: shahdlala66 <shahd.lala66@gmail.com>
Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
2026-06-02 21:55:55 +02:00
parent 873bfe3bae
commit 95eff42dfe
37 changed files with 2522 additions and 573 deletions
+7 -7
View File
@@ -4,7 +4,7 @@ import { ActivatedRoute, RouterLink } from '@angular/router';
import { BoardActionsBarComponent } from '../../components/board-actions-bar/board-actions-bar.component';
import { ChessBoardComponent } from '../../components/chess-board/chess-board.component';
import { ExportPanelComponent } from '../../components/export-panel/export-panel.component';
import { MoveHistoryComponent, MoveNavDirection } from '../../components/move-history/move-history.component';
import { MoveHistoryComponent } from '../../components/move-history/move-history.component';
import { PlayerCardComponent } from '../../components/player-card/player-card.component';
import { PromotionDialogComponent } from '../../components/promotion-dialog/promotion-dialog.component';
import { GameFacade } from './game.facade';
@@ -158,12 +158,7 @@ export class GameComponent implements OnInit, OnDestroy {
}
onResign(): void {
this.showToast('Resigned');
}
// ── Move history navigation ───────────────────────────────────
onMoveNavigate(_direction: MoveNavDirection): void {
// Visual-only for now; board always reflects live position.
this.facade.requestResign();
}
// ── Timer helpers ─────────────────────────────────────────────
@@ -199,6 +194,11 @@ export class GameComponent implements OnInit, OnDestroy {
this.blackTimerMs = clock.blackRemainingMs < 0
? -1
: Math.max(0, clock.blackRemainingMs - (!activeIsWhite ? elapsed : 0));
if ((this.whiteTimerMs !== null && this.whiteTimerMs <= 0 && clock.whiteRemainingMs > 0) ||
(this.blackTimerMs !== null && this.blackTimerMs <= 0 && clock.blackRemainingMs > 0)) {
this.facade.errorMessage = '';
}
}
private showToast(msg: string): void {