diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2026-11-19 08:53:51 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2026-11-19 08:53:51 +0100 |
| commit | b884441ba0d10bdd3559748507a0991888f66194 (patch) | |
| tree | 074321d353c1153e8d95191eecf5a61b2eec1096 /web/src/lib/ui/StatusMenu.svelte | |
| parent | d64cf3514e5ff1ddb1c7f3ddac9a769db3e7dde0 (diff) | |
Phase 6: settings, saves, localization parity (M6)
Diffstat (limited to 'web/src/lib/ui/StatusMenu.svelte')
| -rw-r--r-- | web/src/lib/ui/StatusMenu.svelte | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/web/src/lib/ui/StatusMenu.svelte b/web/src/lib/ui/StatusMenu.svelte index e968883..eb1090a 100644 --- a/web/src/lib/ui/StatusMenu.svelte +++ b/web/src/lib/ui/StatusMenu.svelte @@ -21,10 +21,18 @@ import { isObjectiveOrEscort } from '$lib/data/classInfo'; import { CONDITIONS } from '$lib/game/conditions'; import { t } from '$lib/i18n'; + import { clientSettings } from '$lib/settings'; import type { CampaignData } from '$lib/data/gameData'; import Menu from './Menu.svelte'; import FigureNoteMenu from './menus/FigureNoteMenu.svelte'; + /** + * The "custom content" conditions, hidden when the `showCustomContent` + * client setting is off (the reference `showCustomContent` gate in the + * status-menu condition panels: dodge / infect / rupture / poison x2). + */ + const CUSTOM_CONDITIONS = new Set(['dodge', 'infect', 'rupture', 'poison2']); + export interface FigureRef { title: string; /** Wire `figureId`: the character id, or `name+gfx+standeeNr`. */ @@ -249,15 +257,19 @@ </div> {/if} + <!-- The custom-content conditions (the reference `showCustomContent` + gate) are hidden when "show custom content" is off. --> <div class="condgrid"> {#each CONDITIONS as c, i} - <button - class:condgrid--on={conditions.includes(i)} - disabled={!canAct} - onclick={() => toggleCondition(i, c.name)} - > - {c.label} - </button> + {#if $clientSettings.showCustomContent || !CUSTOM_CONDITIONS.has(c.name)} + <button + class:condgrid--on={conditions.includes(i)} + disabled={!canAct} + onclick={() => toggleCondition(i, c.name)} + > + {c.label} + </button> + {/if} {/each} </div> |
