summaryrefslogtreecommitdiff
path: root/web/src/lib/ui/StatusMenu.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/lib/ui/StatusMenu.svelte')
-rw-r--r--web/src/lib/ui/StatusMenu.svelte26
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>