aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/web/src/gui/utils/inline_game_view.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'diplomacy/web/src/gui/utils/inline_game_view.jsx')
-rw-r--r--diplomacy/web/src/gui/utils/inline_game_view.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/diplomacy/web/src/gui/utils/inline_game_view.jsx b/diplomacy/web/src/gui/utils/inline_game_view.jsx
index ec2ca46..e3b55b0 100644
--- a/diplomacy/web/src/gui/utils/inline_game_view.jsx
+++ b/diplomacy/web/src/gui/utils/inline_game_view.jsx
@@ -22,9 +22,10 @@ import {Button} from "../components/button";
import {DeleteButton} from "../components/delete_button";
export class InlineGameView {
- constructor(page, gameData) {
+ constructor(page, gameData, maps) {
this.page = page;
this.game = gameData;
+ this.maps = maps;
this.get = this.get.bind(this);
this.joinGame = this.joinGame.bind(this);
this.showGame = this.showGame.bind(this);
@@ -75,7 +76,10 @@ export class InlineGameView {
);
} else {
// Game not yet joined.
- return <JoinForm key={this.game.game_id} game_id={this.game.game_id} powers={this.game.controlled_powers}
+ return <JoinForm key={this.game.game_id}
+ game_id={this.game.game_id}
+ powers={this.game.controlled_powers}
+ availablePowers={this.maps[this.game.map_name].powers}
password_required={this.game.registration_password}
onSubmit={this.joinGame}/>;
}
@@ -151,6 +155,7 @@ export class InlineGameView {
return <div>
<div><strong>{this.game.game_id}</strong></div>
<div>({dateString})</div>
+ <div><em>{this.game.map_name}</em></div>
</div>;
}
return this.game[name];