diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2019-07-07 09:23:59 -0400 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-07-07 15:33:01 -0400 |
commit | 5c71a0f73717bffefb5e23a9e100adb62fc54a61 (patch) | |
tree | a841ca27065db2c68e07570780549624bbb70f40 /diplomacy/communication/responses.py | |
parent | d67963031211b32df6dd39d610a6424717729094 (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/communication/responses.py')
-rw-r--r-- | diplomacy/communication/responses.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/diplomacy/communication/responses.py b/diplomacy/communication/responses.py index 58edd6f..f9f9fce 100644 --- a/diplomacy/communication/responses.py +++ b/diplomacy/communication/responses.py @@ -70,11 +70,13 @@ class DataGameSchedule(_AbstractResponse): class DataGameInfo(_AbstractResponse): """ Response containing information about a game, to be used when no entire game object is required. """ __slots__ = ['game_id', 'phase', 'timestamp', 'map_name', 'rules', 'status', 'n_players', 'n_controls', - 'deadline', 'registration_password', 'observer_level', 'controlled_powers'] + 'deadline', 'registration_password', 'observer_level', 'controlled_powers', + 'timestamp_created'] params = { strings.GAME_ID: str, strings.PHASE: str, strings.TIMESTAMP: int, + strings.TIMESTAMP_CREATED: int, strings.MAP_NAME: parsing.OptionalValueType(str), strings.OBSERVER_LEVEL: parsing.OptionalValueType( parsing.EnumerationType((strings.MASTER_TYPE, strings.OMNISCIENT_TYPE, strings.OBSERVER_TYPE))), @@ -91,6 +93,7 @@ class DataGameInfo(_AbstractResponse): self.game_id = None # type: str self.phase = None # type: str self.timestamp = None # type: int + self.timestamp_created = None # type: int self.map_name = None # type: str self.observer_level = None # type: str self.controlled_powers = None # type: list |