daggerheart/templates/sheets/feature.hbs
2025-05-22 16:53:39 +02:00

80 lines
No EOL
5 KiB
Handlebars

<div>
<header class="flexcol">
<div class="title-container">
<img class="flex0" src="{{document.img}}" data-edit="img" data-action="onEditImage" title="{{document.name}}" height="64" width="64"/>
<div class="title-name">
{{formInput fields.name value=source.name rootId=partId}}
</div>
</div>
<nav class="sheet-tabs tabs">
{{#each tabs as |tab|}}
<a class="{{tab.cssClass}}" data-action="tab" data-group="{{tab.group}}" data-tab="{{tab.id}}">
<i class="{{tab.icon}}"></i>
<label>{{localize tab.label}}</label>
</a>
{{/each}}
</nav>
</header>
<section class="sheet-body">
<div class="tab {{this.tabs.features.cssClass}}" data-group="primary" data-tab="features">
<div class="feature-description">
{{formField systemFields.type value=source.system.type rootId=partId label="DAGGERHEART.Sheets.Feature.FeatureType" localize=true }}
{{formField systemFields.actionType value=source.system.actionType label="DAGGERHEART.Sheets.Feature.ActionType" rootId=partId localize=true }}
<div class="form-group">
<label>{{localize "DAGGERHEART.Sheets.Feature.RefreshType"}}</label>
<div class="form-fields">
{{formField systemFields.refreshData.fields.type value=source.system.refreshData.type rootId=partId label="Type" localize=true }}
{{#if document.system.refreshData.type}}
<label>Uses</label>
<input type="text" name="system.refreshData.uses" value="{{document.system.refreshData.uses}}" data-dtype="Number" />
{{/if}}
</div>
</div>
<div class="form-group">
<label>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Title"}}</label>
<div class="flexcol">
<div class="form-fields">
{{#if (eq document.system.featureType.type "dice")}}
<label>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Type"}}</label>
{{/if}}
<select name="system.featureType.type">
{{selectOptions this.itemConfig.valueTypes selected=document.system.featureType.type labelAttr="name" localize=true}}
</select>
{{#if (eq document.system.featureType.type "dice")}}
<label>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Dice"}}</label>
<select name="system.featureType.data.value">
{{selectOptions this.dice selected=document.system.featureType.data.value }}
</select>
<label>{{localize "DAGGERHEART.Sheets.Feature.Max"}}</label>
<input type="text" name="system.featureType.data.max" value="{{document.system.featureType.data.max}}" />
<label>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Property"}}</label>
<select name="system.featureType.data.property">
{{selectOptions this.properties selected=document.system.featureType.data.property labelAttr="name" localize=true}}
</select>
{{/if}}
</div>
</div>
</div>
<h2>{{localize "DAGGERHEART.Sheets.Feature.Description"}}</h2>
{{!-- {{editor document.system.description target="system.description" button=true}} --}}
{{formInput systemFields.description value=source.system.description enriched=source.system.description localize=true toggled=true}}
</div>
</div>
<div class="tab {{this.tabs.effects.cssClass}}" data-group="primary" data-tab="effects">
{{> "systems/daggerheart/templates/sheets/parts/effects.hbs" config=this.effectConfig selectedEffectType=this.selectedEffectType effects=document.system.effects}}
</div>
<div class="tab {{this.tabs.actions.cssClass}}" data-group="primary" data-tab="actions">
<h2>{{localize "Actions"}} <i class="fa-solid fa-plus icon-button" data-action="addAction"></i></h2>
<div class="flexrow">
{{#each document.system.actions as |action index|}}
<div data-action="editAction" data-index="{{index}}" class="ability-chip">
<img src="{{action.img}}" />
<div>{{action.name}}</div>
<button data-action="removeAction" data-index="{{index}}"><i class="fa-solid fa-x"></i></button>
</div>
{{/each}}
</div>
</div>
</section>
</div>