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