bold winner text

This commit is contained in:
ntr
2019-10-23 13:09:56 +11:00
parent 0aed7cfe73
commit 9b1cb34e7b
4 changed files with 17 additions and 13 deletions
+4 -2
View File
@@ -58,7 +58,8 @@ function Faceoff(props) {
const constructs = team.constructs.map((c, i) =>
<FaceoffConstruct key={c.id} construct={c}/>);
const classes = `team player ${team.ready ? 'ready' : ''}`
const winner = instance.winner === team.id;
const classes = `team player ${winner ? 'winner' : team.ready ? 'ready' : ''}`
return (
<div class={classes}>
{constructs}
@@ -71,7 +72,8 @@ function Faceoff(props) {
const constructs = team.constructs.map((c, i) =>
<FaceoffConstruct key={c.id} construct={c}/>);
const classes = `team opponent ${team.ready ? 'ready' : ''}`
const winner = instance.winner === team.id;
const classes = `team opponent ${winner ? 'winner' : team.ready ? 'ready' : ''}`
return (
<div class={classes}>
+4 -2
View File
@@ -67,9 +67,11 @@ function Scoreboard(args) {
return '';
};
const winner = player.score === 'Win';
if (!isPlayer) {
return (
<div class={`player-box top ${player.ready ? 'ready' : ''}`}>
<div class={`player-box top ${winner ? 'winner' : player.ready ? 'ready' : ''}`}>
<div></div>
<div class="score">{scoreText()}</div>
<div class="name">{player.name}</div>
@@ -80,7 +82,7 @@ function Scoreboard(args) {
}
return (
<div class={`player-box bottom ${player.ready ? 'ready' : ''}`}>
<div class={`player-box bottom ${winner ? 'winner': player.ready ? 'ready' : ''}`}>
<div class="msg">{chat || '\u00A0'}</div>
<div class="score">{scoreText()}</div>
<div class="name">{player.name}</div>