feat: add number format config, resource cap, and modal scroll fix

- Add user-configurable number format (suffix/scientific/engineering)
  - Suffix: K/M/B/T through Dc (1e33), then letter-based a/b/c... indefinitely
  - Scientific: 1.23e15 style via toExponential
  - Engineering: exponent always a multiple of 3 (1.23E15)
  - Stored in ProfileSettings, fetched from profile API on load
  - Picker UI in EditProfileModal with live examples
- Cap all resource accumulation at 1e300 (RESOURCE_CAP constant)
  - Per-resource FULL badge with tooltip in ResourceBar
  - Amber notice strip when any resource is at cap
  - handleClick also respects the cap
- Make EditProfileModal scrollable with viewport margin
  - Flex column layout with sticky header, scrollable form body
  - Bio textarea preserved as resizable with min-height
- Fix ReferenceError: formatNumber not defined in BossPanel/AchievementPanel
  - Pass formatNumber as prop to BossCard and AchievementCard
  - Pass formatNumber as parameter to conditionDescription
This commit is contained in:
2026-03-06 18:59:43 -08:00
committed by Naomi Carrigan
parent 24beaf3131
commit 5ad2c44399
15 changed files with 290 additions and 65 deletions
+1 -1
View File
@@ -41,5 +41,5 @@ export type {
UpgradeTarget,
} from "./interfaces/Upgrade.js";
export type { Zone, ZoneStatus } from "./interfaces/Zone.js";
export type { ProfileSettings } from "./interfaces/ProfileSettings.js";
export type { NumberFormat, ProfileSettings } from "./interfaces/ProfileSettings.js";
export { DEFAULT_PROFILE_SETTINGS } from "./interfaces/ProfileSettings.js";
@@ -1,3 +1,5 @@
export type NumberFormat = "suffix" | "scientific" | "engineering";
export interface ProfileSettings {
showTotalGold: boolean;
showTotalClicks: boolean;
@@ -7,6 +9,7 @@ export interface ProfileSettings {
showQuestsCompleted: boolean;
showAdventurersRecruited: boolean;
showAchievementsUnlocked: boolean;
numberFormat: NumberFormat;
}
export const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
@@ -18,4 +21,5 @@ export const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
showQuestsCompleted: true,
showAdventurersRecruited: true,
showAchievementsUnlocked: true,
numberFormat: "suffix",
};