enhace feature sheet and apply new standard style to applications

fix unexpected missed padding

requested changes
This commit is contained in:
molilo 2025-05-26 10:45:59 -03:00
parent cf51153432
commit 3c948ca1b7
24 changed files with 1074 additions and 128 deletions

View file

@ -0,0 +1,21 @@
<section
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
data-tab='{{tabs.actions.id}}'
data-group='{{tabs.actions.group}}'
>
<fieldset class="one-column">
<legend>{{localize "Actions"}} <a><i class="fa-solid fa-plus icon-button" data-action="addAction"></i></a></legend>
<div class="actions-list">
{{#each document.system.actions as |action index|}}
<div class="action-item">
<img class="image" src="{{action.img}}" />
<span>{{action.name}}</span>
<div class="controls">
<a data-action="editAction" data-index="{{index}}"><i class="fa-solid fa-pen-to-square"></i></a>
<a data-action="removeAction" data-index="{{index}}"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</section>

View file

@ -0,0 +1,67 @@
<section
class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}'
data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'
>
<fieldset class="two-columns">
<legend>{{localize "Effects"}}</legend>
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.addEffect"}}</span>
<div class="nest-inputs">
<select class="effect-select">
{{selectOptions this.effectConfig.effectTypes selected=this.selectedEffectType labelAttr="name" localize=true blank=""}}
</select>
<a>
<i class="fa-solid fa-plus icon-button {{#if (not this.selectedEffectType)}}disabled{{/if}}" data-action="addEffect"></i>
</a>
</div>
</fieldset>
{{#each this.document.system.effects as |effect key|}}
<fieldset class="two-columns">
<legend>
{{localize (concat 'DAGGERHEART.Effects.Types.' effect.type '.Name')}}
<a>
<i class="fa-solid fa-trash icon-button flex0" data-action="removeEffect" data-effect="{{key}}"></i>
</a>
</legend>
{{#if effect.applyLocationChoices}}
<span>
{{localize "DAGGERHEART.Sheets.Feature.effects.applyLocation"}}
</span>
<select name="system.effects.{{key}}.appliesOn">
{{selectOptions effect.applyLocationChoices selected=effect.appliesOn localize=true}}
</select>
{{/if}}
{{#if (eq effect.valueType ../this.effectConfig.valueTypes.numberString.id)}}
{{#if (eq effect.type ../this.effectConfig.effectTypes.damage.id) }}
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.value"}}</span>
<input type="text" name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}" />
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.initiallySelected"}}</span>
<input type="checkbox" name="system.effects.{{key}}.initiallySelected" {{checked effect.initiallySelected}} />
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.hopeIncrease"}}</span>
<input type="text" name="system.effects.{{key}}.valueData.hopeIncrease" value="{{effect.valueData.hopeIncrease}}" />
{{else}}
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.value"}}</span>
<input type="text" name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}" />
{{/if}}
{{/if}}
{{#if (eq effect.valueType ../this.effectConfig.valueTypes.select.id)}}
<span>
{{localize effect.valueData.fromValue}}
</span>
<select name="system.effects.{{key}}.valueData.fromValue" value="{{effect.valueData.fromValue}}">
{{selectOptions effect.options selected=effect.valueData.fromValue labelAttr="name" valueAttr="value" localize=true blank="" }}
</select>
<span>
{{localize effect.valueData.name}}
</span>
<select name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}">
{{selectOptions effect.options selected=effect.valueData.value labelAttr="name" valueAttr="value" localize=true blank="" }}
</select>
{{/if}}
</fieldset>
{{/each}}
</section>

View file

@ -0,0 +1,10 @@
<header class='item-sheet-header'>
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
<div class='item-info'>
<line-div></line-div>
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class='item-description'>
<h3>{{localize (concat 'DAGGERHEART.Feature.Type.' source.system.type)}}</h3>
</div>
</div>
</header>

View file

@ -0,0 +1,43 @@
<section
class='tab {{tabs.settings.cssClass}} {{tabs.settings.id}}'
data-tab='{{tabs.settings.id}}'
data-group='{{tabs.settings.group}}'
>
<fieldset class="two-columns">
<legend>{{localize tabs.settings.label}}</legend>
<span>{{localize "DAGGERHEART.Sheets.Feature.FeatureType"}}</span>
{{formField systemFields.type value=source.system.type rootId=partId localize=true }}
<span>{{localize "DAGGERHEART.Sheets.Feature.ActionType"}}</span>
{{formField systemFields.actionType value=source.system.actionType rootId=partId localize=true }}
<span>{{localize "DAGGERHEART.Sheets.Feature.RefreshType"}}</span>
<div class="nest-inputs">
<span><input type="text" name="system.refreshData.uses" value="{{source.system.refreshData.uses}}" data-dtype="Number" /></span>
{{formField systemFields.refreshData.fields.type value=source.system.refreshData.type rootId=partId localize=true }}
</div>
</fieldset>
<fieldset class="two-columns">
<legend>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Title"}}</legend>
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Title"}}</span>
<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")}}
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Dice"}}</span>
<select name="system.featureType.data.value">
{{selectOptions this.dice selected=document.system.featureType.data.value }}
</select>
<span>{{localize "DAGGERHEART.Feature.Max"}}</span>
<input type="text" name="system.featureType.data.max" value="{{document.system.featureType.data.max}}" />
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Property"}}</span>
<select name="system.featureType.data.property">
{{selectOptions this.properties selected=document.system.featureType.data.property labelAttr="name" localize=true}}
</select>
{{/if}}
</fieldset>
</section>