aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/server/request_managers.py
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-07-07 09:23:59 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-07-07 15:33:01 -0400
commit5c71a0f73717bffefb5e23a9e100adb62fc54a61 (patch)
treea841ca27065db2c68e07570780549624bbb70f40 /diplomacy/server/request_managers.py
parentd67963031211b32df6dd39d610a6424717729094 (diff)
Updated the web interface to have 3 tabs - Results / Messages / Current
- Updated dependencies in package-lock.json - Set default homepage to "." so that built pages are relative to "index.html". - Add module "helmet" to handle page title. - Simplified page loading (replace static function builder with direct call to a method with component as argument). - Move function loadGameFromDisk in a separate file. - Use React context to access page object. - Add a new React component "Navigation" and simplify page rendering. - Add ability to choose power for any kind of loaded game. In phase history: - Show messages from all past and currently displayed phase. - Display messages from past phase with gray background. - Show messages per protagonist in tabs. - Show message phase in message header - Display message wide (header left, body right). - Display short names for powers in message tabs header. - Add warn function to page component. - Messages from previous phase are displayed with gray color text. - Game registration password input is displayed only if required - On games page: - sorted by descending timestamp created. - In table, game ID is displayed with human readable created date. - Prevent messages from displaying twice. - Re-add checkbox "show orders" to display arrow orders on past maps. - Handle HTML break-lines <br/> and remove all other HTML tags when displaying messages. - Use latest phase as current game phase when loading a game from disk.
Diffstat (limited to 'diplomacy/server/request_managers.py')
-rw-r--r--diplomacy/server/request_managers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/diplomacy/server/request_managers.py b/diplomacy/server/request_managers.py
index 6819421..fdc4564 100644
--- a/diplomacy/server/request_managers.py
+++ b/diplomacy/server/request_managers.py
@@ -626,6 +626,7 @@ def on_list_games(server, request, connection_handler):
game_id=server_game.game_id,
phase=server_game.current_short_phase,
timestamp=server_game.get_latest_timestamp(),
+ timestamp_created=server_game.timestamp_created,
map_name=server_game.map_name,
observer_level=server_game.get_observer_level(username),
controlled_powers=server_game.get_controlled_power_names(username),
@@ -657,6 +658,7 @@ def on_get_games_info(server, request, connection_handler):
game_id=server_game.game_id,
phase=server_game.current_short_phase,
timestamp=server_game.get_latest_timestamp(),
+ timestamp_created=server_game.timestamp_created,
map_name=server_game.map_name,
observer_level=server_game.get_observer_level(username),
controlled_powers=server_game.get_controlled_power_names(username),
@@ -1110,6 +1112,7 @@ def on_synchronize(server, request, connection_handler):
return responses.DataGameInfo(game_id=level.game.game_id,
phase=level.game.current_short_phase,
timestamp=level.game.get_latest_timestamp(),
+ timestamp_created=level.game.timestamp_created,
request_id=request.request_id)
def on_vote(server, request, connection_handler):