From b884441ba0d10bdd3559748507a0991888f66194 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 19 Nov 2026 08:53:51 +0100 Subject: Phase 6: settings, saves, localization parity (M6) --- web/src/lib/ui/decks/DeckArea.svelte | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'web/src/lib/ui/decks/DeckArea.svelte') 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);
- {#if $gameState} + {#if showLoot && $gameState} {/if}
@@ -165,7 +180,7 @@ {/if} {/if} - {#if $gameState && shouldShowAlliesDeck($gameState)} + {#if showSharedDecks && $gameState && shouldShowAlliesDeck($gameState)} {/if} - {#if $gameState} + {#if showSharedDecks && $gameState}