From 408fac5c545c4294c81df5fff36b2fed19d7fe55 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 8 Nov 2026 03:34:38 +0100 Subject: web: restore the balance on a refresh into history The gateway hello now carries the core's last known balance alongside the user, so a refresh on a non-game view does not blank the header before the next INFO reply. --- webd/src/session.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webd/src') diff --git a/webd/src/session.rs b/webd/src/session.rs index 3b34f47..7389028 100644 --- a/webd/src/session.rs +++ b/webd/src/session.rs @@ -187,6 +187,8 @@ enum ServerMessage<'a> { grace_seconds: u64, /// Signed-in user, so a refresh during a game can skip the login card. user: Option<&'a str>, + /// Last known balance, for views that do not carry one. + balance: Option, /// Estimated game-server Unix time, milliseconds. time: u64, }, @@ -258,6 +260,7 @@ impl Session { version: VERSION, grace_seconds: self.config.grace.as_secs(), user: self.core.user(), + balance: self.core.balance(), time: self.core.server_now_ms(), }, ); -- cgit v1.2.3