diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 9990b400..62f4c760 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -419,14 +419,9 @@ margin-top: 1em; } - .opponent-name { - margin-bottom: 1em; - grid-area: oppname; - } - - .player-name { - margin-top: 1em; - grid-area: playername; + .winner { + color: @yellow; + font-weight: bold; } .team { @@ -441,12 +436,12 @@ font-size: 200%; text-transform: uppercase; letter-spacing: 1em; + font-weight: bold; color: @black; animation: faceoff 4s linear 0s 2 alternate; &.winner { - color: @yellow; animation: win 2s linear 0s 1; } } diff --git a/client/assets/styles/player.less b/client/assets/styles/player.less index 6bcf804b..616ba46f 100644 --- a/client/assets/styles/player.less +++ b/client/assets/styles/player.less @@ -46,6 +46,11 @@ grid-area: msg; color: @white; } + + &.winner { + color: @yellow; + font-weight: bold; + } } .chat { diff --git a/client/src/components/faceoff.jsx b/client/src/components/faceoff.jsx index d6a068fd..723c985b 100644 --- a/client/src/components/faceoff.jsx +++ b/client/src/components/faceoff.jsx @@ -58,7 +58,8 @@ function Faceoff(props) { const constructs = team.constructs.map((c, i) => ); - const classes = `team player ${team.ready ? 'ready' : ''}` + const winner = instance.winner === team.id; + const classes = `team player ${winner ? 'winner' : team.ready ? 'ready' : ''}` return (
{constructs} @@ -71,7 +72,8 @@ function Faceoff(props) { const constructs = team.constructs.map((c, i) => ); - const classes = `team opponent ${team.ready ? 'ready' : ''}` + const winner = instance.winner === team.id; + const classes = `team opponent ${winner ? 'winner' : team.ready ? 'ready' : ''}` return (
diff --git a/client/src/components/player.box.jsx b/client/src/components/player.box.jsx index ec0527e5..29ee6532 100644 --- a/client/src/components/player.box.jsx +++ b/client/src/components/player.box.jsx @@ -67,9 +67,11 @@ function Scoreboard(args) { return ''; }; + const winner = player.score === 'Win'; + if (!isPlayer) { return ( -
+
{scoreText()}
{player.name}
@@ -80,7 +82,7 @@ function Scoreboard(args) { } return ( -
+
{chat || '\u00A0'}
{scoreText()}
{player.name}