Work towards using pop-out item sheets instead of inline-editing because inline-editing is annoying and kinda ugly TBH

This commit is contained in:
Oliver-Akins 2024-01-10 22:18:18 -07:00
parent dcdc1b7764
commit 516f7ac826
13 changed files with 150 additions and 73 deletions

View file

@ -4,71 +4,60 @@
<summary data-collapse-id="{{spell.uuid}}">
<span class="flex-grow" style="flex-grow: 1">
{{spell.name}}
{{localize "dotdungeon.actor.pc.spells.title.cost" cost=spell.system.cost}}
{{#if (defined spell.system.cost)}}
{{localize "dotdungeon.actor.pc.spells.title.cost" cost=spell.system.cost}}
{{/if}}
</span>
</summary>
<div class="spell">
<div class="spell__name">
<label for="{{spell.uuid}}-name">
{{localize "dotdungeon.actor.pc.spells.name.label"}}
</label>
<input
type="text"
id="{{spell.uuid}}-name"
value="{{spell.name}}"
data-embedded-update="name"
data-embedded-id="{{spell.uuid}}"
>
</div>
<div class="spell__cost">
<label for="{{spell.uuid}}-cost">
{{localize "dotdungeon.actor.pc.spells.cost.label"}}
</label>
<input
type="text"
id="{{spell.uuid}}-cost"
value="{{spell.system.cost}}"
placeholder="{{localize "dotdungeon.actor.pc.spells.cost.placeholder"}}"
data-embedded-update="system.cost"
data-embedded-id="{{spell.uuid}}"
>
</div>
<div class="spell__description">
<label for="{{spell.uuid}}-description">
{{localize "dotdungeon.actor.pc.spells.description.label"}}
</label>
<textarea
id="{{spell.uuid}}-description"
placeholder="{{localize "dotdungeon.actor.pc.spells.description.placeholder"}}"
data-embedded-update="system.description"
data-embedded-id="{{spell.uuid}}"
>{{spell.system.description}}</textarea>
{{localize "dotdungeon.actor.pc.spells.description.label"}}
<p class="{{ifThen spell.system.description '' 'placeholder'}}">
{{#if spell.system.description}}
{{spell.system.description}}
{{else}}
{{localize "dotdungeon.actor.pc.spells.description.placeholder"}}
{{/if}}
</p>
</div>
{{#if spell.system.skill}}
<div class="spell__skill">
{{localize
"dotdungeon.actor.pc.spells.skill.label"
skill=(localize (concat "dotdungeon.keyword.skill." spell.system.skill))
}}
</div>
{{/if}}
<div class="spell__actions">
<button
class="neutral reduced-padding equal-padding"
class="confirm"
>
<div class="icon icon--20">
Edit
</button>
<button
class="neutral equal-padding"
aria-label="{{localize "dotdungeon.actor.pc.spells.aria.chat"}}"
data-embedded-chat
data-embedded-id="{{spell.uuid}}"
>
<div aria-hidden="true" class="icon icon--20">
{{{ ../icons.chat-bubble }}}
</div>
</button>
<button
class="danger reduced-padding equal-padding"
class="danger equal-padding"
aria-label="{{localize "dotdungeon.actor.pc.spells.aria.delete"}}"
data-embedded-delete
data-embedded-id="{{spell.uuid}}"
>
<div class="icon icon--20">
<div aria-hidden="true" class="icon icon--20">
{{{ ../icons.garbage-bin }}}
</div>
</button>
</div>
</div>
<div class="debug-data">
{{spell.uuid}}
{{dd-stringify spell}}
</div>
</details>
{{else}}
<p>