Skip to content

Commit

Permalink
Fix: Item avatar rendering fix (#287)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Potts <[email protected]>
  • Loading branch information
misterpotts authored Feb 20, 2024
1 parent 0ce19cc commit 2e01046
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Fabricate 0.10.21
title: Fabricate 0.10.22
email: [email protected]
description: >-
End user documentation for the Foundry Virtual Tabletop (VTT) Module, "Fabricate".
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fabricate",
"version": "0.10.21",
"version": "0.10.22",
"description": "A system-agnostic, flexible crafting module for FoundryVT",
"main": "index.js",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
<ItemCard quantity={productUnit.quantity}
name={loadedComponent.name}
imageUrl={loadedComponent.imageUrl}
imageWidth="w-[104px]"
essences={dereferenceEssences(loadedComponent)}/>
{/await}
{/each}
Expand All @@ -192,7 +193,8 @@
<ItemCard quantity={catalystUnit.actual.quantity}
requiredQuantity={catalystUnit.target.quantity}
name={loadedComponent.name}
imageUrl={loadedComponent.imageUrl}/>
imageUrl={loadedComponent.imageUrl}
imageWidth="w-[104px]" />
{/await}
{/each}
</div>
Expand All @@ -212,6 +214,7 @@
<ItemCard quantity={productUnit.quantity}
name={loadedComponent.name}
imageUrl={loadedComponent.imageUrl}
imageWidth="w-[104px]"
essences={dereferenceEssences(loadedComponent)}/>
{/await}
{/each}
Expand Down
4 changes: 2 additions & 2 deletions src/applications/actorCraftingApp/ItemCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
rounded={imageRounding}/>
{#if typeof requiredQuantity !== "undefined"}
{#if quantity >= requiredQuantity}
<span class="absolute bottom-0 left-0 rounded-bl-lg w-24 bg-success-500 text-center text-black font-bold h-5 leading-5">
<span class="absolute bottom-0 left-0 rounded-bl-lg {imageWidth} bg-success-500 text-center text-black font-bold h-5 leading-5">
{quantity} / {requiredQuantity}
</span>
{:else}
<span class="absolute bottom-0 left-0 rounded-bl-lg w-24 bg-error-500 text-center text-black font-bold h-5 leading-5">
<span class="absolute bottom-0 left-0 rounded-bl-lg {imageWidth} bg-error-500 text-center text-black font-bold h-5 leading-5">
{quantity} / {requiredQuantity}
</span>
{/if}
Expand Down
12 changes: 12 additions & 0 deletions test/stubs/api/StubRecipeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ class StubRecipeAPI implements RecipeAPI {
return recipe;
}

createMany(_options: {
itemUuids: string[];
craftingSystemId: string;
recipeOptionsByItemUuid?: Map<string, RecipeOptions>
}): Promise<Recipe[]> {
throw new Error(StubRecipeAPI._USE_REAL_INSTEAD_MESSAGE);
}

importCompendium(_options: { craftingSystemId: string; compendiumId: string }): Promise<Recipe[]> {
throw new Error(StubRecipeAPI._USE_REAL_INSTEAD_MESSAGE);
}

}

export { StubRecipeAPI };

0 comments on commit 2e01046

Please sign in to comment.