diff --git a/src/lib/components/party/Party.svelte b/src/lib/components/party/Party.svelte index 8c8a4ca1..58851e11 100644 --- a/src/lib/components/party/Party.svelte +++ b/src/lib/components/party/Party.svelte @@ -316,6 +316,14 @@ // Check if syncing is in progress const isSyncingAll = $derived(syncAllItems.isPending) + // Check if any items in the party are orphaned (linked collection item was deleted) + const hasOrphanedItems = $derived.by(() => { + const hasOrphanedWeapons = (party?.weapons ?? []).some((w) => w?.orphaned) + const hasOrphanedCharacters = (party?.characters ?? []).some((c) => c?.orphaned) + const hasOrphanedSummons = (party?.summons ?? []).some((s) => s?.orphaned) + return hasOrphanedWeapons || hasOrphanedCharacters || hasOrphanedSummons + }) + function handleTabChange(tab: GridType) { activeTab = tab // Instant UI update @@ -941,6 +949,13 @@ {/snippet} + {#if hasOrphanedItems} + + {/if} + diff --git a/src/lib/components/units/CharacterUnit.svelte b/src/lib/components/units/CharacterUnit.svelte index 3f8b0f6c..c74b48fc 100644 --- a/src/lib/components/units/CharacterUnit.svelte +++ b/src/lib/components/units/CharacterUnit.svelte @@ -176,7 +176,7 @@ } -
+
{#if item} {#snippet trigger()} @@ -218,6 +218,11 @@ title="Perpetuity Ring" /> {/if} + {#if item?.orphaned} +
+ +
+ {/if} {#if imageUrl} diff --git a/src/lib/components/units/SummonUnit.svelte b/src/lib/components/units/SummonUnit.svelte index 037034b6..377019a8 100644 --- a/src/lib/components/units/SummonUnit.svelte +++ b/src/lib/components/units/SummonUnit.svelte @@ -114,7 +114,7 @@ -
+
{#if item} {#snippet trigger()} @@ -129,6 +129,11 @@ class:is-active={isActive} onclick={() => viewDetails()} > + {#if item?.orphaned} +
+ +
+ {/if} = 9} class:is-active={isActive} + class:orphaned={item?.orphaned} > {#if item} @@ -173,6 +174,11 @@ onclick={() => viewDetails()} >
+ {#if item?.orphaned} +
+ +
+ {/if} {#if awakeningImage}