aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/web/src
diff options
context:
space:
mode:
Diffstat (limited to 'diplomacy/web/src')
-rw-r--r--diplomacy/web/src/diplomacy/engine/game.js1
-rw-r--r--diplomacy/web/src/gui/components/power_orders_actions_bar.js2
-rw-r--r--diplomacy/web/src/gui/pages/content_game.jsx15
3 files changed, 16 insertions, 2 deletions
diff --git a/diplomacy/web/src/diplomacy/engine/game.js b/diplomacy/web/src/diplomacy/engine/game.js
index e44fdf6..e86ae85 100644
--- a/diplomacy/web/src/diplomacy/engine/game.js
+++ b/diplomacy/web/src/diplomacy/engine/game.js
@@ -100,6 +100,7 @@ export class Game {
this.registration_password = gameData.registration_password;
this.observer_level = gameData.observer_level;
this.controlled_powers = gameData.controlled_powers;
+ this.daide_port = gameData.daide_port;
this.result = gameData.result || null;
this.phase = gameData.phase_abbr || null; // phase abbreviation
diff --git a/diplomacy/web/src/gui/components/power_orders_actions_bar.js b/diplomacy/web/src/gui/components/power_orders_actions_bar.js
index 2e33a6e..3ffef63 100644
--- a/diplomacy/web/src/gui/components/power_orders_actions_bar.js
+++ b/diplomacy/web/src/gui/components/power_orders_actions_bar.js
@@ -11,7 +11,7 @@ export class PowerOrdersActionBar extends React.Component {
<Button title={'reset'} onClick={this.props.onReset}/>
<Button title={'delete all'} onClick={this.props.onDeleteAll}/>
<Button color={'primary'} title={'update'} onClick={this.props.onUpdate}/>
- {(!this.props.onProcess &&
+ {(this.props.onProcess &&
<Button color={'danger'} title={'process game'} onClick={this.props.onProcess}/>) || ''}
</Bar>
);
diff --git a/diplomacy/web/src/gui/pages/content_game.jsx b/diplomacy/web/src/gui/pages/content_game.jsx
index f1bc76c..7e7c7e9 100644
--- a/diplomacy/web/src/gui/pages/content_game.jsx
+++ b/diplomacy/web/src/gui/pages/content_game.jsx
@@ -71,6 +71,11 @@ const TABLE_POWER_VIEW = {
wait: ['Waiting', 3]
};
+const PRETTY_ROLES = {
+ [STRINGS.OMNISCIENT_TYPE]: 'Omnicient',
+ [STRINGS.OBSERVER_TYPE]: 'Observer'
+};
+
export class ContentGame extends React.Component {
constructor(props) {
@@ -157,8 +162,16 @@ export class ContentGame extends React.Component {
this.vote = this.vote.bind(this);
}
+ static prettyRole(role) {
+ if (PRETTY_ROLES.hasOwnProperty(role))
+ return PRETTY_ROLES[role];
+ return role;
+ }
+
static gameTitle(game) {
- let title = `${game.game_id} | ${game.phase} | ${game.status} | ${game.role} | ${game.map_name}`;
+ let title = `${game.game_id} | ${game.phase} | ${game.status} | ${ContentGame.prettyRole(game.role)} | ${game.map_name}`;
+ if (game.daide_port)
+ title += ` | DAIDE ${game.daide_port}`;
const remainingTime = game.deadline_timer;
if (remainingTime === undefined)
title += ` (deadline: ${game.deadline} sec)`;