diff --git a/src/components/GameList/GameList.styl b/src/components/GameList/GameList.styl index 1063b29854..8f67967091 100644 --- a/src/components/GameList/GameList.styl +++ b/src/components/GameList/GameList.styl @@ -52,8 +52,8 @@ themed background-color miniboard-to-move } - .opponents-move { - themed background-color miniboard-opponent-to-move + .viewed-users-move { + themed background-color miniboard-viewed-to-move } .goban-with-names { diff --git a/src/components/GobanLineSummary/GobanLineSummary.styl b/src/components/GobanLineSummary/GobanLineSummary.styl index 80f18ca770..b15393884f 100644 --- a/src/components/GobanLineSummary/GobanLineSummary.styl +++ b/src/components/GobanLineSummary/GobanLineSummary.styl @@ -59,8 +59,8 @@ themed background-color miniboard-to-move; } - .opponents-move { - themed background-color miniboard-opponent-to-move; + .viewed-users-move { + themed background-color miniboard-viewed-to-move; } .game-name, .player { diff --git a/src/components/GobanLineSummary/GobanLineSummary.tsx b/src/components/GobanLineSummary/GobanLineSummary.tsx index 6b535376b0..833bd5ae1d 100644 --- a/src/components/GobanLineSummary/GobanLineSummary.tsx +++ b/src/components/GobanLineSummary/GobanLineSummary.tsx @@ -156,8 +156,8 @@ export class GobanLineSummary extends React.Component< // If this is a different player's page, also mark other games // where it's not that player's move. - opponents_move: - !!player && !is_current_user && user !== player && player_to_move !== player, + viewed_users_move: + !!player && !is_current_user && user !== player && player_to_move === player, black_to_move_cls: this.goban && black.id === player_to_move ? "to-move" : "", white_to_move_cls: this.goban && white.id === player_to_move ? "to-move" : "", @@ -192,7 +192,7 @@ export class GobanLineSummary extends React.Component< to={`/game/${this.props.id}`} className={ `GobanLineSummary ` + - (this.state.opponents_move ? " opponents-move" : "") + + (this.state.viewed_users_move ? " viewed-users-move" : "") + (this.state.current_users_move ? " current-users-move" : "") + (this.state.in_stone_removal_phase ? " in-stone-removal-phase" : "") } diff --git a/src/components/MiniGoban/MiniGoban.styl b/src/components/MiniGoban/MiniGoban.styl index 6783c0215c..ef97acf1a9 100644 --- a/src/components/MiniGoban/MiniGoban.styl +++ b/src/components/MiniGoban/MiniGoban.styl @@ -133,12 +133,12 @@ themed border-color miniboard-to-move-border } - .board.opponents-move { + .board.viewed-users-move { border: 1px solid transparent; border-radius: 4px; //padding: 1.2em; - themed background-color miniboard-opponent-to-move; - themed border-color miniboard-opponent-to-move-border + themed background-color miniboard-viewed-to-move; + themed border-color miniboard-viewed-to-move-border } .board.in-stone-removal-phase { diff --git a/src/components/MiniGoban/MiniGoban.tsx b/src/components/MiniGoban/MiniGoban.tsx index 3024b14b54..f4de4f01dd 100644 --- a/src/components/MiniGoban/MiniGoban.tsx +++ b/src/components/MiniGoban/MiniGoban.tsx @@ -72,7 +72,7 @@ export function MiniGoban(props: MiniGobanProps): JSX.Element { const [black_name, setBlackName] = React.useState(""); const [white_name, setWhiteName] = React.useState(""); const [current_users_move, setCurrentUsersMove] = React.useState(false); - const [opponents_move, setOpponentsMove] = React.useState(false); + const [viewed_users_move, setViewedUsersMove] = React.useState(false); const [black_to_move_cls, setBlackToMoveCls] = React.useState(""); const [white_to_move_cls, setWhiteToMoveCls] = React.useState(""); const [in_stone_removal_phase, setInStoneRemovalPhase] = React.useState(false); @@ -229,8 +229,8 @@ export function MiniGoban(props: MiniGobanProps): JSX.Element { // If this is a different player's page, also mark other games // where it's not that player's move. const player = props?.player?.id; - setOpponentsMove( - !!player && !is_current_user && user !== player && player_to_move !== player, + setViewedUsersMove( + !!player && !is_current_user && user !== player && player_to_move === player, ); setBlackToMoveCls( @@ -280,7 +280,7 @@ export function MiniGoban(props: MiniGobanProps): JSX.Element { className={ "small board" + (current_users_move ? " current-users-move" : "") + - (opponents_move ? " opponents-move" : "") + + (viewed_users_move ? " viewed-users-move" : "") + (in_stone_removal_phase ? " in-stone-removal-phase" : "") + (finished ? " finished" : "") } diff --git a/src/lib/types.ts b/src/lib/types.ts index cf55e0b5c1..f653d986af 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -145,7 +145,7 @@ export interface GobanInfoStateBase { white_name?: string; current_users_move?: boolean; - opponents_move?: boolean; + viewed_users_move?: boolean; black_to_move_cls?: string; white_to_move_cls?: string; in_stone_removal_phase?: boolean; diff --git a/src/ogs.styl b/src/ogs.styl index 6faecbc546..8c69552df2 100644 --- a/src/ogs.styl +++ b/src/ogs.styl @@ -256,8 +256,8 @@ light.goban-shadow = 0 4px 8px rgba(128,128,128,.71) light.goban-shadow-borderless = 0 0px 0px rgba(128,128,128,.71) light.miniboard-to-move = #E6FFD8 light.miniboard-to-move-border = darken(light.miniboard-to-move, 60%) -light.miniboard-opponent-to-move = #F8F8F8 -light.miniboard-opponent-to-move-border = darken(light.miniboard-opponent-to-move, 10%) +light.miniboard-viewed-to-move = #F3F3F3 +light.miniboard-viewed-to-move-border = darken(light.miniboard-viewed-to-move, 10%) light.miniboard-hover = #C7E7E9 light.miniboard-hover-border = darken(light.miniboard-hover, 30%) light.miniboard-stone-removal = #FBfbD8 @@ -394,8 +394,8 @@ dark.goban-shadow = none dark.goban-shadow-borderless = none dark.miniboard-to-move = #2B4029 dark.miniboard-to-move-border = darken(dark.miniboard-to-move, 60%) -dark.miniboard-opponent-to-move = #282828 -dark.miniboard-opponent-to-move-border = lighten(dark.miniboard-opponent-to-move, 10%) +dark.miniboard-viewed-to-move = #282828 +dark.miniboard-viewed-to-move-border = lighten(dark.miniboard-viewed-to-move, 10%) dark.miniboard-hover = #578588 dark.miniboard-hover-border = darken(dark.miniboard-hover, 30%) dark.miniboard-stone-removal = #5B4810