diff options
Diffstat (limited to 'web/src/lib/ui/decks')
| -rw-r--r-- | web/src/lib/ui/decks/DeckArea.svelte | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/web/src/lib/ui/decks/DeckArea.svelte b/web/src/lib/ui/decks/DeckArea.svelte index 6e32dea..e06b0e5 100644 --- a/web/src/lib/ui/decks/DeckArea.svelte +++ b/web/src/lib/ui/decks/DeckArea.svelte @@ -15,6 +15,7 @@ import { isCharacter } from '$lib/protocol/types'; import type { CampaignData, ClassData } from '$lib/data/gameData'; import { t } from '$lib/i18n'; + import { clientSettings, serverSettings } from '$lib/settings'; import { currentCharacterId, modifierDeckByName, @@ -125,12 +126,26 @@ onAmdZoom(card, name, char ? perksFor(char) : null); } - const showAmds = $derived(campaignData != null && charsWithPerks.length > 0); + const showAmds = $derived( + // Phase 6 visibility gates: the server-side `showAmdDeck` hides all + // AMD decks; the client-side `showCharacterAMD` hides the characters' + // personal ones (the reference mutual gating). + $serverSettings?.showAmdDeck !== false && + $clientSettings.showCharacterAMD && + campaignData != null && + charsWithPerks.length > 0 + ); + + /** The shared + ally decks are gated by the server `showAmdDeck` alone. */ + const showSharedDecks = $derived($serverSettings?.showAmdDeck !== false); + + /** The loot deck is hidden by the server `hideLootDeck`. */ + const showLoot = $derived($serverSettings?.hideLootDeck !== true); </script> <div class="deckarea"> <div class="deckarea__loot"> - {#if $gameState} + {#if showLoot && $gameState} <LootDeckWidget {session} deck={$gameState.lootDeck} onOpenMenu={onOpenLoot} /> {/if} </div> @@ -165,7 +180,7 @@ {/if} {/if} - {#if $gameState && shouldShowAlliesDeck($gameState)} + {#if showSharedDecks && $gameState && shouldShowAlliesDeck($gameState)} <ModifierDeckWidget {session} deck={$gameState.modifierDeckAllies} @@ -176,7 +191,7 @@ /> {/if} - {#if $gameState} + {#if showSharedDecks && $gameState} <ModifierDeckWidget {session} deck={$gameState.modifierDeck} |
