minor ui improvement

feature/modern-browsers
Inga 🏳‍🌈 1 month ago
parent c5eac547fb
commit 4ba2c894ca
  1. 2
      src/backend/components/boardgame.tsx
  2. 1
      src/frontend/static/style.css
  3. 1
      src/shared/display.ts

@ -54,7 +54,7 @@ export const getBoardgameHtml = (key: string, gameState: BoardgameStateType, gam
return (
<board-game track={key} className={gameActiveClassNames.join(" ")} game-variant={gameVariant}>
<form method="post" is="progressive-form">
<p>
<p class="when-outcome-undecided">
Current player: <span class="current-player-name">{gameState.currentPlayerName}</span>
</p>

@ -33,6 +33,7 @@ li form {
board-game:not(.outcome-winx) .when-outcome-winx,
board-game:not(.outcome-wino) .when-outcome-wino,
board-game:not(.outcome-draw) .when-outcome-draw,
board-game:not(.outcome-undecided) .when-outcome-undecided,
board-game:not(.autoplayer-x-enabled) .when-autoplayer-x-enabled,
board-game:not(.autoplayer-x-disabled) .when-autoplayer-x-disabled,
board-game:not(.autoplayer-o-enabled) .when-autoplayer-o-enabled,

@ -4,6 +4,7 @@ export const getDisplayStates = (gameState: BoardgameStateType, currentOutcome:
"outcome-winx": currentOutcome === CurrentOutcome.WinX,
"outcome-wino": currentOutcome === CurrentOutcome.WinO,
"outcome-draw": currentOutcome === CurrentOutcome.Draw,
"outcome-undecided": currentOutcome === CurrentOutcome.Undecided,
"autoplayer-x-enabled": gameState.autoPlayers.has(Player.X),
"autoplayer-x-disabled": !gameState.autoPlayers.has(Player.X),
"autoplayer-o-enabled": gameState.autoPlayers.has(Player.O),

Loading…
Cancel
Save