fix: freeze PP clock on any stoppage, not just intermission
CI / Lint (push) Successful in 10s
CI / Test (push) Successful in 10s
CI / Build & Push (push) Successful in 31s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 21:17:12 -04:00
parent dd1d9fe42d
commit c7ba334bb9
+3 -3
View File
@@ -245,7 +245,7 @@ function teamRow(game, side, state) {
const sogHtml = (state === 'live' || state === 'final') && sog !== undefined const sogHtml = (state === 'live' || state === 'final') && sog !== undefined
? `<span class="team-sog">${sog} SOG</span>` : ''; ? `<span class="team-sog">${sog} SOG</span>` : '';
const ppHtml = state === 'live' && pp const ppHtml = state === 'live' && pp
? teamPpIndicator(pp, game['Intermission']) ? teamPpIndicator(pp, game['Time Running'])
: ''; : '';
const subParts = [sogHtml, ppHtml].filter(Boolean).join(''); const subParts = [sogHtml, ppHtml].filter(Boolean).join('');
@@ -266,9 +266,9 @@ function teamRow(game, side, state) {
</div>`; </div>`;
} }
function teamPpIndicator(pp, intermission) { function teamPpIndicator(pp, running) {
const timeStr = pp.replace('PP ', ''); const timeStr = pp.replace('PP ', '');
if (intermission) { if (!running) {
return `<span class="team-pp">PP ${timeStr}</span>`; return `<span class="team-pp">PP ${timeStr}</span>`;
} }
const seconds = timeToSeconds(timeStr); const seconds = timeToSeconds(timeStr);