mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
Refactor/275 actor sheets simplification (#291)
* FEAT: create isNPC geeter and add the prop on metada on actors FEAT: create common method for documents sheets FEAT: create BaseActorSheet and implementation * FIX: tabs label * REFACTOR: remove unused methods REFACTOR: simplify CharacterSheet's click actions methods REFACTOR: minor fix on DHActor class * REFACTOR: remove unused methods REFACTOR: create method on BaseActorSheet REFACTOR: make Datamodel metadata getter * REFACTOR: remove unused method on setting sheet FEAT: create BaseActorSetting FIX: add type="button" to button on actor's sheet * FIX jsdoc * PRETTIER --------- Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
7d7fb88035
commit
87b3677956
34 changed files with 723 additions and 1253 deletions
|
|
@ -3,18 +3,20 @@
|
|||
data-tab='{{tabs.adversaries.id}}'
|
||||
data-group='{{tabs.adversaries.group}}'
|
||||
>
|
||||
<button class="add-action-btn" data-action="addCategory">
|
||||
<button type="button" class="add-action-btn" data-action="addCategory">
|
||||
New Category
|
||||
</button>
|
||||
{{#each document.system.potentialAdversaries}}
|
||||
<fieldset class="category-container" data-potential-adversary="{{@key}}">
|
||||
<legend>{{this.label}}</legend>
|
||||
{{#each document.system.potentialAdversaries as |category id|}}
|
||||
<fieldset class="category-container" data-potential-adversary="{{id}}">
|
||||
<legend>{{category.label}}</legend>
|
||||
<div class="category-name">
|
||||
<input type="text" name="{{concat "system.potentialAdversaries." @key ".label" }}" value="{{this.label}}" />
|
||||
<a><i class="fa-solid fa-trash" data-action="deleteProperty" data-path="system.potentialAdversaries" id={{@key}} data-tooltip='{{localize "CONTROLS.CommonDelete"}}'></i></a>
|
||||
<input type="text" name="{{concat "system.potentialAdversaries." @key ".label" }}" value="{{category.label}}" />
|
||||
<a data-action="removeCategory" data-category-id={{id}} data-tooltip='{{localize "CONTROLS.CommonDelete"}}'>
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="adversaries-container">
|
||||
{{#each this.adversaries as |adversary|}}
|
||||
{{#each category.adversaries as |adversary|}}
|
||||
<div class="adversary-container">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' isActor=true categoryAdversary=@../key}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue