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. --- web/play/src/main.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'web/play/src/main.ts') diff --git a/web/play/src/main.ts b/web/play/src/main.ts index f051429..2dd3ce9 100644 --- a/web/play/src/main.ts +++ b/web/play/src/main.ts @@ -68,6 +68,7 @@ const gateway = new Gateway(wsUrl, { onHello(hello) { serverOffset = hello.time - Date.now(); currentUser = hello.user ?? null; + if (typeof hello.balance === "number") lastBalance = hello.balance; gameBadge.textContent = `v${hello.version}`; }, onView(next) { -- cgit v1.2.3