From 608920c193a9902eae757618bef240df04b8cbba Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Sat, 5 Jul 2025 22:45:08 +0200 Subject: [PATCH] Design/action settings dialog style (#274) * Action Setting Dialog style * fix small style details in action config application * requested changes --------- Co-authored-by: moliloo --- .../sheets-configs/action-config.mjs | 71 ++++++++++++++---- styles/daggerheart.css | 45 ++++++++++- styles/less/global/elements.less | 58 +++++++++++++-- .../less/global/inventory-fieldset-items.less | 1 + styles/less/global/tab-form-footer.less | 2 - templates/actionTypes/cost.hbs | 32 ++++---- templates/actionTypes/damage.hbs | 74 ++++++++++--------- templates/actionTypes/effect.hbs | 48 +++++------- templates/actionTypes/range-target.hbs | 22 ++---- templates/actionTypes/roll.hbs | 49 ++++++------ templates/actionTypes/save.hbs | 14 ++-- templates/actionTypes/target.hbs | 8 -- templates/actionTypes/uses.hbs | 16 ++-- templates/config/action.hbs | 50 ------------- .../sheets-settings/action-settings/base.hbs | 17 +++++ .../action-settings/configuration.hbs | 9 +++ .../action-settings/effect.hbs | 14 ++++ .../action-settings/header.hbs | 3 + 18 files changed, 308 insertions(+), 225 deletions(-) delete mode 100644 templates/actionTypes/target.hbs delete mode 100644 templates/config/action.hbs create mode 100644 templates/sheets-settings/action-settings/base.hbs create mode 100644 templates/sheets-settings/action-settings/configuration.hbs create mode 100644 templates/sheets-settings/action-settings/effect.hbs create mode 100644 templates/sheets-settings/action-settings/header.hbs diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index 61ce3fd7..a230eadd 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -9,10 +9,17 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { this.openSection = null; } + get title() { + return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}: ${this.action.name}`; + } + static DEFAULT_OPTIONS = { tag: 'form', - id: 'daggerheart-action', - classes: ['daggerheart', 'views', 'action'], + classes: ['daggerheart', 'dh-style', 'dialog'], + window: { + icon: 'fa-solid fa-wrench', + resizable: false + }, position: { width: 600, height: 'auto' }, actions: { toggleSection: this.toggleSection, @@ -32,21 +39,59 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { }; static PARTS = { - form: { + header: { + id: 'header', + template: 'systems/daggerheart/templates/sheets-settings/action-settings/header.hbs' + }, + tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' }, + base: { + id: 'base', + template: 'systems/daggerheart/templates/sheets-settings/action-settings/base.hbs' + }, + configuration: { + id: 'configuration', + template: 'systems/daggerheart/templates/sheets-settings/action-settings/configuration.hbs' + }, + effect: { + id: 'effect', + template: 'systems/daggerheart/templates/sheets-settings/action-settings/effect.hbs' + } + /* form: { id: 'action', template: 'systems/daggerheart/templates/config/action.hbs' + } */ + }; + + static TABS = { + base: { + active: true, + cssClass: '', + group: 'primary', + id: 'base', + icon: null, + label: 'Base' + }, + config: { + active: false, + cssClass: '', + group: 'primary', + id: 'config', + icon: null, + label: 'Configuration' + }, + effect: { + active: false, + cssClass: '', + group: 'primary', + id: 'effect', + icon: null, + label: 'Effect' } }; static CLEAN_ARRAYS = ['damage.parts', 'cost', 'effects']; - _getTabs() { - const tabs = { - base: { active: true, cssClass: '', group: 'primary', id: 'base', icon: null, label: 'Base' }, - config: { active: false, cssClass: '', group: 'primary', id: 'config', icon: null, label: 'Configuration' }, - effect: { active: false, cssClass: '', group: 'primary', id: 'effect', icon: null, label: 'Effect' } - }; - + _getTabs(tabs) { for (const v of Object.values(tabs)) { v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active; v.cssClass = v.active ? 'active' : ''; @@ -59,7 +104,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { const context = await super._prepareContext(_options, 'action'); context.source = this.action.toObject(false); context.openSection = this.openSection; - context.tabs = this._getTabs(); + context.tabs = this._getTabs(this.constructor.TABS); context.config = CONFIG.DH; if (!!this.action.effects) context.effects = this.action.effects.map(e => this.action.item.effects.get(e._id)); if (this.action.damage?.hasOwnProperty('includeBase') && this.action.type === 'attack') @@ -130,7 +175,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { static addElement(event) { const data = this.action.toObject(), - key = event.target.closest('.action-category-data').dataset.key; + key = event.target.closest('[data-key]').dataset.key; if (!this.action[key]) return; data[key].push({}); this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); @@ -139,7 +184,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { static removeElement(event) { event.stopPropagation(); const data = this.action.toObject(), - key = event.target.closest('.action-category-data').dataset.key, + key = event.target.closest('[data-key]').dataset.key, index = event.target.dataset.index; data[key].splice(index, 1); this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); diff --git a/styles/daggerheart.css b/styles/daggerheart.css index fcae3193..116a34d3 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -5718,10 +5718,24 @@ body.theme-light.application.daggerheart.dialog { .application.dh-style fieldset.flex .inline-child { flex: 1; } -.application.dh-style fieldset.flex .checkbox { +.application.dh-style fieldset .list-w-img { + padding: 5px; +} +.application.dh-style fieldset .list-w-img label { + flex: 1; +} +.application.dh-style fieldset .list-w-img img { + width: 2rem; + height: 2rem; +} +.application.dh-style fieldset .checkbox { display: flex; align-items: center; gap: 20px; + align-self: end; +} +.application.dh-style fieldset .fas.fa-trash { + align-self: end; } .application.dh-style fieldset.one-column { display: flex; @@ -5729,6 +5743,14 @@ body.theme-light.application.daggerheart.dialog { align-items: start; gap: 10px; min-height: 64px; + flex: 1; +} +.application.dh-style fieldset.one-column > .one-column { + width: 100%; +} +.application.dh-style fieldset.one-column .nest-inputs fieldset { + flex: 1; + width: 100%; } .application.dh-style fieldset.two-columns { display: grid; @@ -5759,6 +5781,11 @@ body.theme-light.application.daggerheart.dialog { .application.dh-style fieldset input[type='number']:hover { outline: 2px solid light-dark(#222, #efe6d8); } +.application.dh-style fieldset[disabled], +.application.dh-style fieldset select[disabled], +.application.dh-style fieldset input[disabled] { + opacity: 0.5; +} .application.dh-style fieldset .nest-inputs { display: flex; align-items: center; @@ -5773,6 +5800,22 @@ body.theme-light.application.daggerheart.dialog { font-weight: bold; font-size: smaller; } +.application.dh-style fieldset:has(.list-w-img) { + gap: 0; +} +.application.dh-style fieldset:has(+ .fas.fa-trash) { + border-bottom-right-radius: 0; +} +.application.dh-style fieldset .fas.fa-trash { + color: darkred; + border-radius: 0 6px 6px 0; + border-color: light-dark(#18162e, #f3c267); + border-width: 2px; + border-style: groove; + border-left-width: 0; + padding: 5px; + margin-left: -7px; +} .application.dh-style .two-columns { display: grid; grid-template-columns: 1fr 2fr; diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index fcf9d353..bd06441b 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -89,11 +89,18 @@ box-shadow: none; } - & option { + & option, + & optgroup { color: @beige; background-color: @dark-blue; border-radius: 6px; } + + &:disabled { + opacity: 0.6; + outline: 2px solid transparent; + cursor: not-allowed; + } } p { @@ -148,10 +155,16 @@ .inline-child { flex: 1; } - .checkbox { - display: flex; - align-items: center; - gap: 20px; + } + + .list-w-img { + padding: 5px; + label { + flex: 1; + } + img { + width: 2rem; + height: 2rem; } } @@ -161,6 +174,10 @@ align-items: start; gap: 10px; min-height: 64px; + flex: 1; + > .one-column { + width: 100%; + } } &.two-columns { @@ -196,11 +213,29 @@ } } + &[disabled], + select[disabled], + input[disabled] { + opacity: 0.5; + } + .nest-inputs { display: flex; align-items: center; width: 100%; gap: 5px; + + .btn { + padding-top: 15px; + } + + .image { + height: 40px; + width: 40px; + object-fit: cover; + border-radius: 6px; + border: none; + } } .form-group { @@ -210,6 +245,19 @@ font-weight: bold; font-size: smaller; } + + &.checkbox { + width: fit-content; + + .form-fields { + height: 32px; + align-content: center; + } + } + } + + &:has(.list-w-img) { + gap: 0; } } diff --git a/styles/less/global/inventory-fieldset-items.less b/styles/less/global/inventory-fieldset-items.less index 1cbc9353..46343c0a 100644 --- a/styles/less/global/inventory-fieldset-items.less +++ b/styles/less/global/inventory-fieldset-items.less @@ -7,6 +7,7 @@ flex-direction: column; gap: 10px; align-items: center; + width: 100%; } .card-list { display: flex; diff --git a/styles/less/global/tab-form-footer.less b/styles/less/global/tab-form-footer.less index 3607d463..14794204 100644 --- a/styles/less/global/tab-form-footer.less +++ b/styles/less/global/tab-form-footer.less @@ -2,8 +2,6 @@ .tab-form-footer { display: flex; padding: 0 10px; - position: relative; - bottom: -32px; button { flex: 1; diff --git a/templates/actionTypes/cost.hbs b/templates/actionTypes/cost.hbs index 9ff589a3..62ca5644 100644 --- a/templates/actionTypes/cost.hbs +++ b/templates/actionTypes/cost.hbs @@ -1,21 +1,15 @@ -
- -
Cost
+
+ + Cost + -
-
- {{#each source as |cost index|}} -
-
- {{formField ../fields.type choices=(@root.disableOption index ../fields.type.choices ../source) label="Resource" value=cost.type name=(concat "cost." index ".type") localize=true}} - {{formField ../fields.value label="Value" value=cost.value name=(concat "cost." index ".value")}} -
-
- {{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable")}} - {{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step")}} -
-
-
- {{/each}} -
+ {{#each source as |cost index|}} +
+ {{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox"}} + {{formField ../fields.type choices=(@root.disableOption index ../fields.type.choices ../source) label="Resource" value=cost.type name=(concat "cost." index ".type") localize=true}} + {{formField ../fields.value label="Amount" value=cost.value name=(concat "cost." index ".value")}} + {{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable)}} + +
+ {{/each}}
\ No newline at end of file diff --git a/templates/actionTypes/damage.hbs b/templates/actionTypes/damage.hbs index 01dc533a..ad0a70e6 100644 --- a/templates/actionTypes/damage.hbs +++ b/templates/actionTypes/damage.hbs @@ -1,14 +1,12 @@ -
- Damage - {{#unless (eq path 'system.attack.')}} -
- {{/unless}} +
+ + Damage + {{#unless (eq path 'system.attack.')}}{{/unless}} + {{#unless @root.isNPC}} {{#if @root.hasBaseDamage}} -
- {{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }} -
+ {{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" classes="checkbox" }} {{/if}} {{/unless}} {{#each source.parts as |dmg index|}} @@ -18,37 +16,41 @@ {{#if dmg.value.custom.enabled}} {{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}} {{else}} - {{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }} - {{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice") classes="inline-child"}} - {{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}} +
+ {{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }} + {{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice") classes="inline-child"}} + {{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}} +
{{/if}} {{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}} {{else}} {{#with (@root.getRealIndex index) as | realIndex |}} - - {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}} - {{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}} - {{/if}} - {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}} -
- -
With Hope
-
- {{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}} -
-
- -
With Fear
-
- {{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}} -
- {{else}} - {{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}} - {{/if}} - {{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}} - +
+ + {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}} + {{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true classes="checkbox"}} + {{/if}} + {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}} +
+
+ With Hope + {{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}} +
+
+ With Fear + {{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}} +
+
+ {{else}} + + {{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}} +
+ {{/if}} + {{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}} + +
{{#unless dmg.base}}
{{/unless}} -
+ {{/with}} {{/if}} {{/each}} @@ -56,12 +58,12 @@ {{#*inline "formula"}} {{#unless dmg.base}} - {{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "damage.parts." realIndex "." target ".custom.enabled")}} + {{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "damage.parts." realIndex "." target ".custom.enabled") classes="checkbox"}} {{/unless}} {{#if source.custom.enabled}} {{formField fields.custom.fields.formula value=source.custom.formula name=(concat "damage.parts." realIndex "." target ".custom.formula") localize=true}} {{else}} -
+
{{formField fields.multiplier value=source.multiplier name=(concat "damage.parts." realIndex "." target ".multiplier") localize=true}} {{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}} {{formField fields.dice value=source.dice name=(concat "damage.parts." realIndex "." target ".dice")}} diff --git a/templates/actionTypes/effect.hbs b/templates/actionTypes/effect.hbs index 19ef45f3..9214ecce 100644 --- a/templates/actionTypes/effect.hbs +++ b/templates/actionTypes/effect.hbs @@ -1,35 +1,23 @@ -
- -
Effects
+
+ + Effects + -
-
- {{!-- {{#each @root.effects as | effect index | }} -
-
-
- - -
-
- {{formfield }} -
-
- {{/each}} --}} +
    {{#each source as | effect index |}} -
    -
    - {{#with (@root.getEffectDetails effect._id) as | details |}} -
    - - -
    -
    - {{/with}} - - {{formField ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave")}} +
    + {{#with (@root.getEffectDetails effect._id) as | details |}} + +
    + {{name}} +
    + {{/with}} + + {{#if @root.source.save.trait}}{{formInput ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave") dataset=(object tooltip="Applied even if save succeeded" tooltipDirection="UP")}}{{/if}} +
    +
    -
    +
{{/each}} -
+ \ No newline at end of file diff --git a/templates/actionTypes/range-target.hbs b/templates/actionTypes/range-target.hbs index 69bd0ae9..22da2f86 100644 --- a/templates/actionTypes/range-target.hbs +++ b/templates/actionTypes/range-target.hbs @@ -1,18 +1,12 @@ -
- -
Range{{#if fields.target}} & Target{{/if}}
-
-
- {{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}} -
+
+ Range{{#if fields.target}} & Target{{/if}} + {{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}} {{#if fields.target}} -
-
- {{#if (and source.target.type (not (eq source.target.type 'self')))}} - {{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }} - {{/if}} - {{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }} -
+
+ {{#if (and source.target.type (not (eq source.target.type 'self')))}} + {{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }} + {{/if}} + {{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }}
{{/if}}
\ No newline at end of file diff --git a/templates/actionTypes/roll.hbs b/templates/actionTypes/roll.hbs index cfc79670..6d56162a 100644 --- a/templates/actionTypes/roll.hbs +++ b/templates/actionTypes/roll.hbs @@ -1,31 +1,24 @@ -
- -
Roll
-
-
- {{#if @root.isNPC}} - {{formField fields.bonus label="Bonus" name="roll.bonus" value=source.bonus}} +
+ Roll + {{#if @root.isNPC}} + {{formField fields.bonus label="Bonus" name="roll.bonus" value=source.bonus}} + {{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}} + {{else}} + {{formField fields.type label="Type" name="roll.type" value=source.type localize=true}} + {{#if (eq source.type "diceSet")}} +
+ {{formField fields.diceRolling.fields.multiplier name="roll.diceRolling.multiplier" value=source.diceRolling.multiplier localize=true}} + {{#if (eq source.diceRolling.multiplier 'flat')}}{{formField fields.diceRolling.fields.flatMultiplier value=source.diceRolling.flatMultiplier name="roll.diceRolling.flatMultiplier" }}{{/if}} + {{formField fields.diceRolling.fields.dice name="roll.diceRolling.dice" value=source.diceRolling.dice}} + {{formField fields.diceRolling.fields.compare name="roll.diceRolling.compare" value=source.diceRolling.compare localize=true}} + {{formField fields.diceRolling.fields.treshold name="roll.diceRolling.treshold" value=source.diceRolling.treshold localize=true}} +
{{else}} - {{formField fields.type label="Type" name="roll.type" value=source.type localize=true}} - {{#if (eq source.type "diceSet")}} -
- {{formField fields.diceRolling.fields.multiplier name="roll.diceRolling.multiplier" value=source.diceRolling.multiplier localize=true}} - {{#if (eq source.diceRolling.multiplier 'flat')}}{{formField fields.diceRolling.fields.flatMultiplier value=source.diceRolling.flatMultiplier name="roll.diceRolling.flatMultiplier" }}{{/if}} - {{formField fields.diceRolling.fields.dice name="roll.diceRolling.dice" value=source.diceRolling.dice}} -
-
- {{formField fields.diceRolling.fields.compare name="roll.diceRolling.compare" value=source.diceRolling.compare localize=true}} - {{formField fields.diceRolling.fields.treshold name="roll.diceRolling.treshold" value=source.diceRolling.treshold localize=true}} -
- {{else}} -
- {{formField fields.trait label="Trait" name="roll.trait" value=source.trait localize=true disabled=(not source.type)}} - {{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty disabled=(not source.type)}} -
- {{/if}} +
+ {{formField fields.trait label="Trait" name="roll.trait" value=source.trait localize=true disabled=(not source.type)}} + {{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty disabled=(not source.type)}} + {{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}} +
{{/if}} - {{#unless (eq source.type "diceSet")}} - {{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}} - {{/unless}} -
+ {{/if}}
\ No newline at end of file diff --git a/templates/actionTypes/save.hbs b/templates/actionTypes/save.hbs index 2b6e3c03..4f2809ee 100644 --- a/templates/actionTypes/save.hbs +++ b/templates/actionTypes/save.hbs @@ -1,10 +1,6 @@ -
- -
Save
-
-
- {{formField fields.trait label="Trait" name="save.trait" value=source.trait localize=true}} - {{formField fields.difficulty label="Difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait)}} - {{formField fields.damageMod label="Damage on Save" name="save.damageMod" value=source.damageMod localize=true disabled=(not source.trait)}} -
+
+ Save + {{formField fields.trait label="Trait" name="save.trait" value=source.trait localize=true}} + {{formField fields.difficulty label="Difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait)}} + {{formField fields.damageMod label="Damage on Save" name="save.damageMod" value=source.damageMod localize=true disabled=(not source.trait)}}
\ No newline at end of file diff --git a/templates/actionTypes/target.hbs b/templates/actionTypes/target.hbs deleted file mode 100644 index ec7ebfb2..00000000 --- a/templates/actionTypes/target.hbs +++ /dev/null @@ -1,8 +0,0 @@ -
- -
Target
-
-
- {{formField targetField.type label="Target" name="target" rootId=partId localize=true}} -
-
\ No newline at end of file diff --git a/templates/actionTypes/uses.hbs b/templates/actionTypes/uses.hbs index 9015987e..820d67ab 100644 --- a/templates/actionTypes/uses.hbs +++ b/templates/actionTypes/uses.hbs @@ -1,12 +1,8 @@ -
- -
Uses
-
-
-
- {{formField fields.value label="Value" value=source.value name="uses.value" rootId=partId}} - {{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}} -
- {{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}} +
+ Uses +
+ {{formField fields.value label="Spent" value=source.value name="uses.value" rootId=partId}} + {{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}}
+ {{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}}
\ No newline at end of file diff --git a/templates/config/action.hbs b/templates/config/action.hbs deleted file mode 100644 index bc259acd..00000000 --- a/templates/config/action.hbs +++ /dev/null @@ -1,50 +0,0 @@ -
-
- -
-
-
-
- -
Identity
-
-
- {{formField fields.name value=source.name label="Name" name="name"}} - {{formField fields.img value=source.img label="Icon" name="img"}} - {{formField fields.actionType value=source.actionType label="Type" name="actionType" localize=true}} - {{formField fields.chatDisplay value=source.chatDisplay name="chatDisplay"}} -
-
-
- -
Description
-
-
- {{formInput fields.description value=source.description name="description" }} -
-
-
-
- {{> 'systems/daggerheart/templates/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}} - {{> 'systems/daggerheart/templates/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}} - {{#if fields.target}}{{> 'systems/daggerheart/templates/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}{{/if}} -
-
- {{#if fields.roll}}{{> 'systems/daggerheart/templates/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}{{/if}} - {{#if fields.save}}{{> 'systems/daggerheart/templates/actionTypes/save.hbs' fields=fields.save.fields source=source.save}}{{/if}} - {{#if fields.damage}}{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage}}{{/if}} - {{#if fields.healing}}{{> 'systems/daggerheart/templates/actionTypes/healing.hbs' fields=fields.healing.fields source=source.healing}}{{/if}} - {{#if fields.resource}}{{> 'systems/daggerheart/templates/actionTypes/resource.hbs' fields=fields.resource.fields source=source.resource}}{{/if}} - {{#if fields.documentUUID}}{{> 'systems/daggerheart/templates/actionTypes/uuid.hbs' fields=fields.documentUUID source=source.documentUUID}}{{/if}} - {{#if fields.effects}}{{> 'systems/daggerheart/templates/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}} - {{#if fields.beastform}}{{> 'systems/daggerheart/templates/actionTypes/beastform.hbs' fields=fields.effects.element.fields source=source.beastform}}{{/if}} -
-
-
\ No newline at end of file diff --git a/templates/sheets-settings/action-settings/base.hbs b/templates/sheets-settings/action-settings/base.hbs new file mode 100644 index 00000000..eab56de7 --- /dev/null +++ b/templates/sheets-settings/action-settings/base.hbs @@ -0,0 +1,17 @@ +
+
+ Identity + {{formField fields.name value=source.name label="Name" name="name"}} + {{formField fields.img value=source.img label="Icon" name="img"}} + {{formField fields.actionType value=source.actionType label="Type" name="actionType" localize=true}} + {{formField fields.chatDisplay value=source.chatDisplay name="chatDisplay" classes="checkbox"}} +
+
+ Description + {{formInput fields.description value=source.description name="description" }} +
+
\ No newline at end of file diff --git a/templates/sheets-settings/action-settings/configuration.hbs b/templates/sheets-settings/action-settings/configuration.hbs new file mode 100644 index 00000000..74d5fcc1 --- /dev/null +++ b/templates/sheets-settings/action-settings/configuration.hbs @@ -0,0 +1,9 @@ +
+ {{> 'systems/daggerheart/templates/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}} + {{> 'systems/daggerheart/templates/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}} + {{> 'systems/daggerheart/templates/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}} +
\ No newline at end of file diff --git a/templates/sheets-settings/action-settings/effect.hbs b/templates/sheets-settings/action-settings/effect.hbs new file mode 100644 index 00000000..9e798b37 --- /dev/null +++ b/templates/sheets-settings/action-settings/effect.hbs @@ -0,0 +1,14 @@ +
+ {{#if fields.roll}}{{> 'systems/daggerheart/templates/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}{{/if}} + {{#if fields.save}}{{> 'systems/daggerheart/templates/actionTypes/save.hbs' fields=fields.save.fields source=source.save}}{{/if}} + {{#if fields.damage}}{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage}}{{/if}} + {{#if fields.healing}}{{> 'systems/daggerheart/templates/actionTypes/healing.hbs' fields=fields.healing.fields source=source.healing}}{{/if}} + {{#if fields.resource}}{{> 'systems/daggerheart/templates/actionTypes/resource.hbs' fields=fields.resource.fields source=source.resource}}{{/if}} + {{#if fields.documentUUID}}{{> 'systems/daggerheart/templates/actionTypes/uuid.hbs' fields=fields.documentUUID source=source.documentUUID}}{{/if}} + {{#if fields.effects}}{{> 'systems/daggerheart/templates/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}} + {{#if fields.beastform}}{{> 'systems/daggerheart/templates/actionTypes/beastform.hbs' fields=fields.effects.element.fields source=source.beastform}}{{/if}} +
\ No newline at end of file diff --git a/templates/sheets-settings/action-settings/header.hbs b/templates/sheets-settings/action-settings/header.hbs new file mode 100644 index 00000000..a6286cb0 --- /dev/null +++ b/templates/sheets-settings/action-settings/header.hbs @@ -0,0 +1,3 @@ +
+

{{source.name}}

+
\ No newline at end of file