simplify per-game table: tracked player only, no rating diff column
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 31s
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 31s
Reworked the per-game row layout to be relative to the tracked player instead of white/black: the tracked player's name+accuracy+rating are always shown first, the opponent's rating+accuracy (no name) always second, regardless of which color each side played in a given game - this keeps columns aligned across rows even as the tracked player switches sides. Dropped the rating-change-per-game column added earlier; it pushed the line past mobile width limits.
This commit is contained in:
parent
d479e14bf9
commit
26cb066515
3 changed files with 29 additions and 39 deletions
|
|
@ -583,13 +583,6 @@ class StatsService:
|
|||
else:
|
||||
tracked_is_white = None
|
||||
|
||||
if tracked_is_white is True:
|
||||
tracked_rating_diff = white.get('ratingDiff')
|
||||
elif tracked_is_white is False:
|
||||
tracked_rating_diff = black.get('ratingDiff')
|
||||
else:
|
||||
tracked_rating_diff = None
|
||||
|
||||
return GameRow(
|
||||
white_name=white_name,
|
||||
black_name=black_name,
|
||||
|
|
@ -599,8 +592,7 @@ class StatsService:
|
|||
black_accuracy=(black.get('analysis') or {}).get('accuracy'),
|
||||
result=result,
|
||||
created_at=game.get('createdAt', 0),
|
||||
tracked_is_white=tracked_is_white,
|
||||
tracked_rating_diff=tracked_rating_diff
|
||||
tracked_is_white=tracked_is_white
|
||||
)
|
||||
|
||||
def _process_games_of_period(self, games: List[Dict[str, Any]], username: str, include_games: bool = False) -> GamesOfPeriodStats:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue