aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/web/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'diplomacy/web/src/gui')
-rw-r--r--diplomacy/web/src/gui/components/power_orders_actions_bar.js2
-rw-r--r--diplomacy/web/src/gui/pages/content_game.jsx15
2 files changed, 15 insertions, 2 deletions
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)`;