|
|
|
@ -1232,6 +1232,7 @@ class Action extends React.Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div ref={x => this.props.forwardRef(x)}>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col width={'12'}>
|
|
|
|
|
<div className={'action'}>
|
|
|
|
@ -1243,6 +1244,7 @@ class Action extends React.Component {
|
|
|
|
|
</div>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1447,6 +1449,13 @@ class BoardApp extends React.Component {
|
|
|
|
|
card: props.ui.card
|
|
|
|
|
};
|
|
|
|
|
this.myRef = React.createRef();
|
|
|
|
|
this.actionRef = React.createRef();
|
|
|
|
|
this.actionRefExtra = React.createRef();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
actionShowing = () => {
|
|
|
|
|
return (this.actionRef && this.actionRef.offsetParent) ||
|
|
|
|
|
(this.actionRefExtra && this.actionRefExtra.offsetParent)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showScreen = screen => {
|
|
|
|
@ -1475,7 +1484,7 @@ class BoardApp extends React.Component {
|
|
|
|
|
// it as handled.
|
|
|
|
|
if (this.props.ui.unhandledAlert &&
|
|
|
|
|
this.props.ui.unhandledAlert.type === ALERTS.beginTurn &&
|
|
|
|
|
this.state.screen === SCREENS.action) {
|
|
|
|
|
this.actionShowing()) {
|
|
|
|
|
this.props.alertHandled(this.props.ui.unhandledAlert.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1567,7 +1576,7 @@ class BoardApp extends React.Component {
|
|
|
|
|
</Fragment>
|
|
|
|
|
</AlertOverlay>
|
|
|
|
|
);
|
|
|
|
|
} else if (alert && this.state.screen !== SCREENS.action) {
|
|
|
|
|
} else if (alert && !this.actionShowing()) {
|
|
|
|
|
switch (alert.type) {
|
|
|
|
|
case ALERTS.beginTurn:
|
|
|
|
|
alertOverlay = (
|
|
|
|
@ -1651,6 +1660,7 @@ class BoardApp extends React.Component {
|
|
|
|
|
</div>
|
|
|
|
|
<div className={this.tabClass(SCREENS.action)}>
|
|
|
|
|
<Action
|
|
|
|
|
forwardRef={x => this.actionRef = x}
|
|
|
|
|
spaces={this.props.spaces}
|
|
|
|
|
player={this.props.player}
|
|
|
|
|
game={this.props.game}
|
|
|
|
@ -1699,6 +1709,7 @@ class BoardApp extends React.Component {
|
|
|
|
|
<div className='static-tab-container show-for-large'>
|
|
|
|
|
<div className='tab show'>
|
|
|
|
|
<Action
|
|
|
|
|
forwardRef={x => this.actionRefExtra = x}
|
|
|
|
|
spaces={this.props.spaces}
|
|
|
|
|
player={this.props.player}
|
|
|
|
|
game={this.props.game}
|
|
|
|
|