Skip to content

Commit

Permalink
Merge pull request #833 from kgar/quick-fix-inline-activities-favorit…
Browse files Browse the repository at this point in the history
…e-features

Added inline activities to favorite features.
  • Loading branch information
kgar authored Nov 13, 2024
2 parents 94e600e + 0244ae1 commit 2b066e5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/sheets/character/parts/FavoriteFeaturesList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import type { Readable } from 'svelte/store';
import RechargeControl from 'src/components/item-list/controls/RechargeControl.svelte';
import { ItemUtils } from 'src/utils/ItemUtils';
import InlineActivitiesList from 'src/components/item-list/InlineActivitiesList.svelte';
import type { InlineToggleService } from 'src/features/expand-collapse/InlineToggleService';
import InlineToggleControl from 'src/sheets/shared/InlineToggleControl.svelte';
let context = getContext<Readable<CharacterSheetContext>>(
CONSTANTS.SVELTE_CONTEXT.CONTEXT,
Expand All @@ -30,6 +33,10 @@
CONSTANTS.SVELTE_CONTEXT.ITEM_IDS_TO_SHOW,
);
let inlineToggleService = getContext<InlineToggleService>(
CONSTANTS.SVELTE_CONTEXT.INLINE_TOGGLE_SERVICE,
);
const localize = FoundryAdapter.localize;
</script>

Expand Down Expand Up @@ -64,6 +71,9 @@
>
<ItemTableCell primary={true}>
<ItemUseButton disabled={!$context.editable} {item} />
{#if item?.system.activities?.contents.length > 1}
<InlineToggleControl entityId={item.id} {inlineToggleService} />
{/if}
<ItemName
on:toggle={() => toggleSummary($context.actor)}
hasChildren={false}
Expand Down Expand Up @@ -93,6 +103,9 @@
{/if}
</ItemTableCell>
</ItemTableRow>
{#if item?.system.activities?.contents.length > 1}
<InlineActivitiesList {item} {inlineToggleService} />
{/if}
{/each}
</svelte:fragment>
</ItemTable>

0 comments on commit 2b066e5

Please sign in to comment.