From 0e8dd59b4b72e43411a635775cf5d4bea08e601b Mon Sep 17 00:00:00 2001 From: Joaquin Pereyra Date: Sat, 19 Jul 2025 17:12:18 -0300 Subject: [PATCH] FIX: remove default list styles FIX: .extended css reduce max-height, shorten animation duration to 0.5s, and set overflow to auto. FIX: set enriched=notes.enriche on notes.hbs FIX: set experience.value on sidebar.hbs FIX: move tooltip from item-img to img-portrait on inventory-item-V2.hbs REMOVE: unused files --- module/systemRegistration/handlebars.mjs | 2 - styles/less/global/inventory-item.less | 10 +- templates/sheets/actors/adversary/notes.hbs | 2 +- templates/sheets/actors/adversary/sidebar.hbs | 2 +- .../partials/inventory-fieldset-items.hbs | 44 ---- .../global/partials/inventory-item-V2.hbs | 8 +- .../sheets/global/partials/inventory-item.hbs | 197 ------------------ 7 files changed, 13 insertions(+), 252 deletions(-) delete mode 100644 templates/sheets/global/partials/inventory-fieldset-items.hbs delete mode 100644 templates/sheets/global/partials/inventory-item.hbs diff --git a/module/systemRegistration/handlebars.mjs b/module/systemRegistration/handlebars.mjs index 15f095da..ec5f2df1 100644 --- a/module/systemRegistration/handlebars.mjs +++ b/module/systemRegistration/handlebars.mjs @@ -5,10 +5,8 @@ export const preloadHandlebarsTemplates = async function () { }) return foundry.applications.handlebars.loadTemplates([ 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs', - 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs', 'systems/daggerheart/templates/sheets/global/partials/action-item.hbs', 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs', - 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs', 'systems/daggerheart/templates/sheets/global/partials/item-resource.hbs', 'systems/daggerheart/templates/sheets/global/partials/resource-section.hbs', 'systems/daggerheart/templates/components/card-preview.hbs', diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index 1775be24..d758085b 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -21,6 +21,7 @@ .application.daggerheart.dh-style { .inventory-item { width: 100%; + list-style-type: none; &:hover { .inventory-item-header .img-portait { @@ -108,13 +109,16 @@ } .inventory-item-content { + > *:not(:last-child) { + margin-bottom: 5px; + } &.extensible { max-height: 0; overflow: hidden; - transition: max-height 2s linear; + transition: max-height 0.5s ease-in-out; &.extended { - max-height: 1000px; // Reasonable large value - //maybe need the redo this.... idk, i'm just a little wittle girl, atte: JP. + max-height: 500px; + overflow: auto; } } .item-resources { diff --git a/templates/sheets/actors/adversary/notes.hbs b/templates/sheets/actors/adversary/notes.hbs index 663a484a..a2378516 100644 --- a/templates/sheets/actors/adversary/notes.hbs +++ b/templates/sheets/actors/adversary/notes.hbs @@ -5,6 +5,6 @@ >
{{localize tabs.notes.label}} - {{formInput notes.field value=notes.value enriched=notes.value toggled=true}} + {{formInput notes.field value=notes.value enriched=notes.enriched toggled=true}}
\ No newline at end of file diff --git a/templates/sheets/actors/adversary/sidebar.hbs b/templates/sheets/actors/adversary/sidebar.hbs index dabbbffe..8eb4dcb0 100644 --- a/templates/sheets/actors/adversary/sidebar.hbs +++ b/templates/sheets/actors/adversary/sidebar.hbs @@ -99,7 +99,7 @@ {{#each source.system.experiences as |experience id|}}
- +{{experience.total}} + +{{experience.value}}
{{experience.name}}
diff --git a/templates/sheets/global/partials/inventory-fieldset-items.hbs b/templates/sheets/global/partials/inventory-fieldset-items.hbs deleted file mode 100644 index 65c52736..00000000 --- a/templates/sheets/global/partials/inventory-fieldset-items.hbs +++ /dev/null @@ -1,44 +0,0 @@ -
- {{title}} -
    - {{#unless (eq cardView 'card') }} - {{#if (or (eq type 'domainCard') (eq type 'armor') (eq type 'consumable') (eq type 'miscellaneous') (eq type 'weapon'))}} - {{#each document.items as |item|}} - {{#if (eq item.type ../type)}} - {{#unless (and (eq ../type 'domainCard') (or (and item.system.inVault (not ../isVault)) (and (not item.system.inVault) ../isVault)))}} - {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=../type}} - {{/unless}} - {{/if}} - {{/each}} - {{else}} - {{#if (eq type 'effect')}} - {{#each document.effects as |effect|}} - {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}} - {{/each}} - {{else}} - {{#each values}} - {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=this type=../type hideControls=../hideControls featureType=true }} - {{/each}} - - {{#each adversaries as |adversary|}} - {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}} - {{/each}} - {{/if}} - {{/if}} - {{/unless}} - -
- {{#if (and (eq cardView 'card') (eq type 'domainCard'))}} -
    - {{#if isVault}} - {{#each document.system.domainCards.vault as |card|}} - {{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs' item=card type=../type}} - {{/each}} - {{else}} - {{#each document.system.domainCards.loadout as |card|}} - {{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs' item=card type=../type}} - {{/each}} - {{/if}} -
- {{/if}} -
\ No newline at end of file diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index ecb017d6..5329e7b5 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -20,10 +20,10 @@ Parameters:
{{!-- Image --}}
- - + data-action='{{ifThen (hasProperty item "use") "useItem" (ifThen (hasProperty item "toChat") "toChat" "editDoc") }}' + {{#unless hideTooltip}}data-tooltip="#item#{{item.uuid}}" {{/unless}}> + + d20
{{!-- Name & Tags --}} diff --git a/templates/sheets/global/partials/inventory-item.hbs b/templates/sheets/global/partials/inventory-item.hbs deleted file mode 100644 index a6373c08..00000000 --- a/templates/sheets/global/partials/inventory-item.hbs +++ /dev/null @@ -1,197 +0,0 @@ -
  • - -
    -
    - {{#if isCompanion}} - {{item.name}} - {{else}} -
    {{item.name}}
    - {{/if}} - {{#if (eq type 'weapon')}} -
    - {{#if isSidebar}} -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}} - {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}} - - - {{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}} - {{#each item.system.attack.damage.parts.0.type as | type | }} - {{#with (lookup @root.config.GENERAL.damageTypes type)}} - - {{/with}} - {{/each}} -
    -
    - {{else}} -
    - {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.name')}} -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}} -
    -
    - {{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}} - ( - {{#each item.system.attack.damage.parts.0.type}} - {{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}} - {{/each}} - ) -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}} -
    - {{/if}} -
    - {{/if}} - {{#if (eq type 'armor')}} - {{#if isSidebar}} -
    -
    - {{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}: - {{item.system.baseScore}} -
    -
    - {{else}} -
    -
    - {{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}: - {{item.system.baseScore}} -
    -
    - {{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}: - {{item.system.baseThresholds.major}} - / - {{item.system.baseThresholds.severe}} -
    -
    - {{/if}} - {{/if}} - {{#if (eq type 'domainCard')}} - {{#if isSidebar}} -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}} - - - {{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}} - - - {{item.system.recallCost}} - -
    -
    - {{else}} -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}} -
    -
    - {{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}} -
    -
    - {{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}: - {{item.system.recallCost}} -
    -
    - {{/if}} - {{/if}} - {{#if (eq type 'effect')}} -
    -
    - {{localize (concat 'TYPES.Item.' item.parent.type)}} - : - {{item.parent.name}} -
    -
    - {{#if item.duration.duration}} - {{localize 'DAGGERHEART.EFFECTS.Duration.temporary'}} - {{else}} - {{localize 'DAGGERHEART.EFFECTS.Duration.passive'}} - {{/if}} -
    - {{#each item.statuses as |status|}} -
    - {{localize (concat 'DAGGERHEART.CONFIG.Condition.' status '.name')}} -
    - {{/each}} -
    - {{/if}} - {{#if (eq type 'action')}} -
    -
    - {{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}} -
    -
    - {{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}} -
    -
    - {{/if}} -
    - {{#if (and (not isSidebar) (eq item.system.resource.type 'simple'))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{#if (and (not isSidebar) item.system.quantity)}} -
    - -
    - {{/if}} -
    - {{#unless hideControls}} - {{#if isActor}} -
    - {{#if (eq type 'actor')}} - - - - {{/if}} - {{#if (eq type 'adversary')}} - - - - - - - {{/if}} -
    - {{else}} -
    - {{#if (eq type 'weapon')}} - - - - {{/if}} - {{#if (eq type 'armor')}} - - - - {{/if}} - {{#if (eq type 'domainCard')}} - {{#unless item.system.inVault}} - - - - {{else}} - - - - {{/unless}} - - {{/if}} - - -
    - {{/if}} - {{else}} - - {{/unless}} -
    {{#unless isSidebar}}{{{item.system.description}}}{{/unless}}
    - {{#if (and (not isSidebar) (eq item.system.resource.type 'diceValue'))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{#if featureType}} -
    - {{#each item.system.actions as | action |}} - - {{/each}} -
    - {{/if}} -
  • \ No newline at end of file