From 8405c8e896a6da1534f1974a5ed972845421c9fe Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 10 Jul 2026 15:14:26 -0700 Subject: [PATCH] feat(store): show plutonium and caps balances in store header (#4570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Show the player's plutonium (hard) and caps (soft) balances on the right side of the store modal's title bar, next to the existing not-logged-in warning - Reuses the existing `currency-display` component from the account modal - Renders only when the user is logged in and has currency data (`player.currency` is optional in the API schema); balances stay current via the `userMeResponse` document event the store already listens to ## Test plan - [ ] Open the store while logged in with currency balances — plutonium and caps appear to the right of the title - [ ] Open the store while logged out — only the not-logged-in warning shows, no currency display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 --- src/client/Store.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/Store.ts b/src/client/Store.ts index f1d1a3c42..712041d0b 100644 --- a/src/client/Store.ts +++ b/src/client/Store.ts @@ -6,6 +6,7 @@ import { Cosmetics } from "../core/CosmeticSchemas"; import { UserSettings } from "../core/game/UserSettings"; import { BaseModal } from "./components/BaseModal"; import "./components/CosmeticButton"; +import "./components/CurrencyDisplay"; import "./components/CustomCurrencyCard"; import "./components/EffectsGrid"; import "./components/NotLoggedInWarning"; @@ -60,11 +61,23 @@ export class StoreModal extends BaseModal { } private renderHeader(): TemplateResult { + const currency = + this.userMeResponse === false + ? undefined + : this.userMeResponse.player.currency; return modalHeader({ title: translateText("store.title"), onBack: () => this.close(), ariaLabel: translateText("common.back"), - rightContent: html``, + rightContent: html`
+ ${currency + ? html`` + : ""} + +
`, }); }