Hiding item card for other players.

logins
Thomas Hintz 5 years ago
parent 2d8aee8c65
commit a22cf21662

@ -1026,14 +1026,22 @@ class Action extends React.Component {
.find(p => p.player.name === this.props.game.currentPlayer).player; .find(p => p.player.name === this.props.game.currentPlayer).player;
switch (this.props.ui.action) { switch (this.props.ui.action) {
case 'otb': case 'otb':
view = ( if (this.props.player.name === this.props.game.currentPlayer) {
<div className='game-card'> view = (
<GroupBox title={itemCard}> <div className='game-card'>
<div className='card' <GroupBox title={itemCard}>
dangerouslySetInnerHTML={{__html: this.props.ui.actionValue}} /> <div className='card'
</GroupBox> dangerouslySetInnerHTML={{__html: this.props.ui.actionValue}} />
</div> </GroupBox>
); </div>
);
} else {
view = (
<div>
<p>{currentPlayer.name} drew an {itemCard}</p>
</div>
);
}
buttons = (<Button onClick={() => this.props.showNextAction()}>Continue</Button>); buttons = (<Button onClick={() => this.props.showNextAction()}>Continue</Button>);
break; break;
case 'farmers-fate': case 'farmers-fate':
@ -1262,7 +1270,7 @@ class AlertOverlay extends React.Component {
{this.props.children} {this.props.children}
<br /> <br />
<Button onClick={this.buttonClick}>{this.props.buttonText}</Button> <Button onClick={this.buttonClick}>{this.props.buttonText}</Button>
<label><input type='checkbox' /> {`Don't show again`}</label> <label><input type='checkbox' onClick={this.hidePermanent} /> {`Don't show again`}</label>
<a href='#' onClick={this.hide}>close</a> <a href='#' onClick={this.hide}>close</a>
</div> </div>
</div> </div>

Loading…
Cancel
Save