X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=163b977cbb8c474560a4dfa9cf24c1a03926e56b;hp=044d4e07ad5e3e62885648410f0d6977d5b62525;hb=f9c9dec19b3ee6e272683301d49c3add6fb176f8;hpb=5e235932d1940d4849d2f3adbee33f6ecef4ed6b diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 044d4e0..163b977 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -569,19 +569,18 @@ class Ambiguities extends React.PureComponent { ); } - if (this.props.players_judged.has(this.props.player.name)) { - return ( -
-

Submission received

-

- The following players have completed judging: - {[...this.props.players_judged].join(', ')} -

+ let still_waiting = null; + const judging_players = Object.keys(this.props.players_judging); + if (judging_players.length) { + still_waiting = ( +

- Still waiting for the following players: + Still waiting for the following player + {judging_players.length > 1 ? 's' : '' } + :

+ ); + } + + if (this.props.players_judged.has(this.props.player.name)) { + return ( +
+

Submission received

+

+ The following players have completed judging:{' '} + {[...this.props.players_judged].join(', ')} +

+ {still_waiting} {move_on_button}
@@ -611,6 +623,7 @@ class Ambiguities extends React.PureComponent { what goes around comes around, so it's best to be generous when judging.

+

{this.props.prompt.prompt}

{this.state.word_sets.map(set => { return (
-

Submission received

+ let still_waiting = null; + const answering_players = Object.keys(this.props.players_answering);; + if (answering_players.length) { + still_waiting = ( +

- The following players have submitted their answers: - {[...this.props.players_answered].join(', ')} -

-

- Still waiting for the following players: + Still waiting for the following player + {answering_players.length > 1 ? 's' : ''} + :

    - {Object.keys(this.props.players_answering).map(player => { + {answering_players.map(player => { return (
  • +
+ ); + } + + if (this.props.players_answered.has(this.props.player.name)) { + return ( +
+

Submission received

+

+ The following players have submitted their answers:{' '} + {[...this.props.players_answered].join(', ')} +

+ {still_waiting} {move_on_button}
@@ -767,7 +792,8 @@ class ActivePrompt extends React.PureComponent {

Remember, you're trying to match your answers with what the other players submit. - Give {this.props.prompt.items} answers for the following prompt: + Give {this.props.prompt.items} answer + {this.props.prompt.items > 1 ? 's' : ''} for the following prompt:

{this.props.prompt.prompt}

@@ -1062,6 +1088,7 @@ class Game extends React.PureComponent { if (state.scores) { return (
+

{state.active_prompt.prompt}

Scores

    {state.scores.scores.map(score => { @@ -1077,7 +1104,7 @@ class Game extends React.PureComponent { {state.scores.words.map(word => { return (
  • - {word.word}: {word.players.join(', ')} + {word.word} ({word.players.length}): {word.players.join(', ')}
  • ); })}