Skip to content

Commit

Permalink
https://github.com/cschleiden/imperaplus-client/issues/30
Browse files Browse the repository at this point in the history
  • Loading branch information
renebaudisch committed Jan 19, 2020
1 parent 2ebd171 commit f62bf82
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
1 change: 1 addition & 0 deletions loc/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Close": "Schließen",
"Enter your message...": "Nachricht eingeben...",
"Send": "Senden",
"max. turns": "max. Züge",
"You have to be 13 years or older to play Impera.": "Du must 13 Jahre oder älter sein um Impera zu spielen.",
"Password changed.": "Passwort geändert.",
"Your session expired. Please login again.": "Deine Session ist abgelaufen. Bitte erneut einloggen.",
Expand Down
33 changes: 25 additions & 8 deletions src/pages/play/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ class Header extends React.Component<IHeaderProps & IHeaderDispatchProps> {
</div>

{/* Actions */}
{inputActive && <div className="play-header-block">
{
game.playState === PlayState.PlaceUnits &&
<div className="play-header-block">
{inputActive && game.playState === PlayState.PlaceUnits &&
<Button
title={__("Place")}
className={css(
Expand All @@ -119,8 +118,7 @@ class Header extends React.Component<IHeaderProps & IHeaderDispatchProps> {
</Button>
}

{
game.playState === PlayState.Attack &&
{inputActive && game.playState === PlayState.Attack &&
<ButtonGroup className="action-attack">
<Button
key="attack"
Expand All @@ -144,8 +142,7 @@ class Header extends React.Component<IHeaderProps & IHeaderDispatchProps> {
</ButtonGroup>
}

{
(game.playState === PlayState.Attack || game.playState === PlayState.Move) &&
{inputActive && (game.playState === PlayState.Attack || game.playState === PlayState.Move) &&
<Button
title={__("Move")}
className={css(
Expand All @@ -165,7 +162,27 @@ class Header extends React.Component<IHeaderProps & IHeaderDispatchProps> {
</span>
</Button>
}
</div>}

{!inputActive &&
<Button
title={__("Wait")}
className={css(
"btn-u",
"action-none",
{
"current": game.playState === PlayState.Move,
"enabled": false,
"hidden-xs": game.playState !== PlayState.Move
})
}
disabled={!canMoveOrAttack}
>
<span className="fa fa-mail-forward" />&nbsp;<span>
{game.movesInCurrentTurn}/{game.options.movesPerTurn}
</span>
</Button>
}
</div>

{/* End Turn */}
{inputActive && game.playState !== PlayState.PlaceUnits && <div className="play-header-block">
Expand Down

0 comments on commit f62bf82

Please sign in to comment.