-
Same shape as T28's 传衣服 panel: file input, live price pulled from GET /api/pricing (今 spend_character_per_segment × segmentsPerUnit, not hardcoded), a garment picker (随机搭配 default, or any wardrobe item, 需求文档 3.3 第 4 点), a segments-to-buy input (1-20, matches the server-side clamp), not-logged-in opens the existing login modal instead of failing silently, insufficient balance points at the topup flow. Success message is visually distinct ("boosted", yellow box, 🎉 已插队播放") from mode 1/2's plain "生成中" — T37's explicit acceptance criterion that a paid_boost submission must be recognizable as skipping the vote queue, not just another queue entry. Also fixes a real bug this surfaced via a live smoke test (not just new to T37 — T28's submitGarmentUpload had the identical bug): both upload handlers set the success/status message and *then* called `await refreshAuthState()`, which re-renders the whole panel (creditBalance changed -> renderAuthButton -> renderWardrobe) and wipes whatever was just set. Both now set the message after refreshAuthState() resolves, re-querying the fresh DOM it produced. Seeded the live pricing.json with spend_character_per_segment (it only existed in pricing.js's DEFAULTS, which don't retroactively apply to an already-existing file — the same class of gap as the isDefault character fix two commits ago). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DUiYs6UjxDMkfvnjtsKFo -
T28 replaces the "开发中敬请期待" placeholder on dance.html's 传衣服 tab with a real upload panel: file input, the live spend_garment price pulled from the new public GET /api/pricing (not hardcoded, per dev-plan-4.md's acceptance criterion), and a submit flow that POSTs to T27's /api/dance/upload-garment. Not logged in opens the existing T22 login modal instead of failing silently; not email-verified shows an inline message; a 402 (insufficient balance) points at the new topup flow; success refreshes the balance and immediately polls the queue, same as the free wardrobe pick's own pollState() call. T29 adds a 充值 pill (visible once logged in) opening a tier picker built from GET /api/pricing's topup_tier entries, POSTing to T24's /api/credits/checkout and navigating to whatever URL comes back (the mock completion page today, Stripe's hosted Checkout once a real key lands tomorrow — both redirect back to dance.html?topup=success/ cancelled). A one-shot banner reads that query param on load, then scrubs it via history.replaceState. The account button's own label now also shows creditBalance, riding on the field GET /api/auth/me already started returning in T24. Manually verified end to end against the live server (localhost:8934): register -> verify -> mock checkout -> balance updates in the header -> topup banner -> upload panel shows the live price and opens the login modal when logged out. The upload itself surfaced that production's one seed character had never been marked isDefault (see the preceding commit) — not a bug in this code, but blocked a live walk of the full generate path until fixed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DUiYs6UjxDMkfvnjtsKFo