Implement a button to create items of a specific subtype in the player inventory (closes #120)

This commit is contained in:
Oliver-Akins 2024-03-22 23:35:04 -06:00
parent b3e699bc32
commit 96f5b17785
9 changed files with 73 additions and 21 deletions

View file

@ -7,9 +7,24 @@
{{#each computed.itemFilters as | filter |}}
{{#if filter.active}}
<section class="item-list__group">
<h2>{{filter.label}}</h2>
<div class="item-group__header">
<h2>{{filter.label}}</h2>
<button
type="button"
class="item-group__create-item reduced-padding equal-padding"
data-embedded-create="{{@key}}"
aria-label="{{filter.createLabel}}"
data-tooltip="{{filter.createLabel}}"
data-tooltip-direction="LEFT"
>
<div aria-hidden="true" class="icon icon--16">
{{{ @root.icons.create }}}
</div>
</button>
</div>
<hr>
<div class="{{@key}}-list">
<div class="item-group__list--{{@key}}">
{{#each (lookup @root.items @key) as | item |}}
{{> (concat "dotdungeon.pc.v2." @../key) @root item=item}}
{{else}}