fix: timer now in sync with backend

This commit is contained in:
Lala, Shahd
2026-05-14 19:13:03 +00:00
parent 1e6cd34f61
commit 3fa687c450
4 changed files with 47 additions and 133 deletions
+5 -11
View File
@@ -20,30 +20,24 @@
</p>
</div>
}
@if (facade.isGameFinished && facade.gameCompletionMessage) {
<div class="game-completion-alert alert alert-success mb-3">
<h2 class="completion-title">{{ facade.gameCompletionMessage }}</h2>
<p class="completion-subtitle mb-0">
<a routerLink="/" class="completion-link">Start a new game</a>
</p>
</div>
}
<div class="container-fluid">
<div class="row g-3">
<!-- Left Sidebar - Dummy Timers -->
<!-- Left Sidebar - Timers -->
@if (hasTimer) {
<div class="col-lg-3 col-md-6 col-12 order-lg-1 order-2">
<section class="timer-card">
<h2>Timers</h2>
<div class="player-timer" [class.active-timer]="facade.state.turn === 'white'">
<p class="timer-label">White</p>
<p class="timer-value">{{ formatTimer(whiteTimerSeconds) }}</p>
<p class="timer-value">{{ formatTimer(whiteTimerMs) }}</p>
</div>
<div class="player-timer" [class.active-timer]="facade.state.turn === 'black'">
<p class="timer-label">Black</p>
<p class="timer-value">{{ formatTimer(blackTimerSeconds) }}</p>
<p class="timer-value">{{ formatTimer(blackTimerMs) }}</p>
</div>
</section>
</div>
}
<!-- Center - Chess Board -->
<div class="col-lg-6 col-md-12 col-12 order-lg-2 order-1">