From 149249199843ccada03ec7857894230f1c97e202 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:14:40 +0200 Subject: [PATCH 01/11] [Fix] Reroll Countdown Automation (#2031) * Fixed so that automated countdowns reverse progress from Fear when rerolling dice if the duality result changes * . * Removed overprep * Apply suggestion from @CarlosFdez --------- Co-authored-by: Carlos Fernandez --- module/applications/ui/countdowns.mjs | 14 +++++++------ module/dice/helpers.mjs | 29 ++++++++++++++++++--------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/module/applications/ui/countdowns.mjs b/module/applications/ui/countdowns.mjs index d559582f..5cf79100 100644 --- a/module/applications/ui/countdowns.mjs +++ b/module/applications/ui/countdowns.mjs @@ -342,29 +342,31 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application * Sends updates of the countdowns to the GM player. Since this is asynchronous, be sure to * update all the countdowns at the same time. * - * @param {...any} progressTypes Countdowns to be updated + * @param {...(string | { type: string; undo?: boolean })} progressTypes Countdowns to be updated */ static async updateCountdowns(...progressTypes) { + progressTypes = progressTypes.map(p => typeof p === 'string' ? { type: p } : p); const { countdownAutomation } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); if (!countdownAutomation) return; const countdownSetting = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns); const updatedCountdowns = Object.keys(countdownSetting.countdowns).reduce((acc, key) => { const countdown = countdownSetting.countdowns[key]; - if (progressTypes.indexOf(countdown.progress.type) !== -1 && countdown.progress.current > 0) { - acc.push(key); + const progressData = progressTypes.find(x => x.type === countdown.progress.type); + if (progressData && countdown.progress.current > 0) { + acc[key] = { value: progressData.undo ? 1 : -1 }; } return acc; - }, []); + }, {}); const countdownData = countdownSetting.toObject(); const settings = { ...countdownData, countdowns: Object.keys(countdownData.countdowns).reduce((acc, key) => { const countdown = foundry.utils.deepClone(countdownData.countdowns[key]); - if (updatedCountdowns.includes(key)) { - countdown.progress.current -= 1; + if (updatedCountdowns[key]) { + countdown.progress.current += updatedCountdowns[key].value; } acc[key] = countdown; diff --git a/module/dice/helpers.mjs b/module/dice/helpers.mjs index 5f8a7bbb..d03970d0 100644 --- a/module/dice/helpers.mjs +++ b/module/dice/helpers.mjs @@ -1,19 +1,28 @@ import { ResourceUpdateMap } from '../data/action/baseAction.mjs'; export function updateResourcesForDualityReroll(oldDuality, newDuality, actor) { - const { hopeFear } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); - if (game.user.isGM ? !hopeFear.gm : !hopeFear.players) return; - - const updates = []; const hope = (newDuality >= 0 ? 1 : 0) - (oldDuality >= 0 ? 1 : 0); const stress = (newDuality === 0 ? 1 : 0) - (oldDuality === 0 ? 1 : 0); const fear = (newDuality === -1 ? 1 : 0) - (oldDuality === -1 ? 1 : 0); - if (hope !== 0) updates.push({ key: 'hope', value: hope, enabled: true }); - if (stress !== 0) updates.push({ key: 'stress', value: -1 * stress, enabled: true }); - if (fear !== 0) updates.push({ key: 'fear', value: fear, enabled: true }); + const { hopeFear, countdownAutomation } = + game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation); - const resourceUpdates = new ResourceUpdateMap(actor); - resourceUpdates.addResources(updates); - resourceUpdates.updateResources(); + if (game.user.isGM ? hopeFear.gm : hopeFear.players) { + const updates = []; + if (hope !== 0) updates.push({ key: 'hope', value: hope, enabled: true }); + if (stress !== 0) updates.push({ key: 'stress', value: -1 * stress, enabled: true }); + if (fear !== 0) updates.push({ key: 'fear', value: fear, enabled: true }) + + const resourceUpdates = new ResourceUpdateMap(actor); + resourceUpdates.addResources(updates); + resourceUpdates.updateResources(); + } + + if (countdownAutomation && fear !== 0) { + game.system.api.applications.ui.DhCountdowns.updateCountdowns({ + type: CONFIG.DH.GENERAL.countdownProgressionTypes.fear.id, + undo: fear === 1 ? false : true + }); + } } From 8e930259474f631d4923b37d45dade63070e6adb Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:24:33 +0200 Subject: [PATCH 02/11] [Fix] Weapon Spellcasting Active Effects (#2032) * . * . * Apply suggestion from @CarlosFdez --------- Co-authored-by: Carlos Fernandez --- .../sheets/api/application-mixin.mjs | 2 +- module/applications/sheets/api/base-actor.mjs | 2 +- module/data/action/baseAction.mjs | 39 +++++++++++++------ module/documents/actor.mjs | 2 +- module/documents/chatMessage.mjs | 2 +- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index d89237df..98f38f03 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -518,7 +518,7 @@ export default function DHApplicationMixin(Base) { const doc = await getDocFromElement(target), action = doc?.system?.attack ?? doc; const config = action.prepareConfig(event); - config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects( + config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects( this.document, doc ); diff --git a/module/applications/sheets/api/base-actor.mjs b/module/applications/sheets/api/base-actor.mjs index e65745c0..007b641b 100644 --- a/module/applications/sheets/api/base-actor.mjs +++ b/module/applications/sheets/api/base-actor.mjs @@ -212,7 +212,7 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { const doc = await getDocFromElement(target), action = doc?.system?.attack ?? doc; const config = action.prepareConfig(event); - config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects( + config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects( this.document, doc ); diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index ea4361b9..f568436e 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -228,7 +228,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel let config = this.prepareConfig(event, configOptions); if (!config) return; - config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(this.actor, this.item); + config.effects = + await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(this.actor, this.item); if (Hooks.call(`${CONFIG.DH.id}.preUseAction`, this, config) === false) return; @@ -333,27 +334,43 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel } /** - * Get the all potentially applicable effects on the actor + * Get the all potentially applicable effects on the actor for the action's RollDialog * @param {DHActor} actor The actor performing the action * @param {DHItem|DhActor} effectParent The parent of the effect * @returns {DhActiveEffect[]} */ - static async getEffects(actor, effectParent) { + static async getActionRelevantEffects(actor, effectParent) { if (!actor) return []; - return Array.from(await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true })).filter( - effect => { - /* Effects on weapons only ever apply for the weapon itself */ + // Changes on weapon effects are not typically only applicable to show in the roll dialog for the weapon itself + // The exemptions to this rule are listed below + const weaponTransferredEffectKeys = [ + 'system.bonuses.roll.spellcast.bonus' + ]; + + return Array.from(await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true })).reduce( + (acc, effect) => { + const effectData = effect.toObject(); + /* Effects on weapons only ever apply for the weapon itself, with a few defined exceptions */ if (effect.parent.type === 'weapon') { /* Unless they're secondary - then they apply only to other primary weapons */ if (effect.parent.system.secondary) { - if (effectParent?.type !== 'weapon' || effectParent?.system.secondary) return false; - } else if (effectParent?.id !== effect.parent.id) return false; + if (effectParent?.type !== 'weapon' || effectParent?.system.secondary) { + effectData.system.changes = + effectData.system.changes.filter(x => weaponTransferredEffectKeys.includes(x.key)); + } + } else if (effectParent?.id !== effect.parent.id) { + effectData.system.changes = + effectData.system.changes.filter(x => weaponTransferredEffectKeys.includes(x.key)); + } } - return !effect.isSuppressed; - } - ); + if (!effect.isSuppressed) { + acc.push(effectData); + } + + return acc; + }, []); } /** diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 1642ed30..8ef64f65 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -549,7 +549,7 @@ export default class DhpActor extends Actor { headerTitle: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', { ability: abilityLabel }), - effects: await game.system.api.data.actions.actionsTypes.base.getEffects(this), + effects: await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(this), roll: { trait: trait, type: 'trait' diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index 480f8c69..b555dfca 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -167,7 +167,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { if (this.system.action) { const actor = await foundry.utils.fromUuid(config.source.actor); const item = actor?.items.get(config.source.item) ?? null; - config.effects = await game.system.api.data.actions.actionsTypes.base.getEffects(actor, item); + config.effects = await game.system.api.data.actions.actionsTypes.base.getActionRelevantEffects(actor, item); await this.system.action.workflow.get('damage')?.execute(config, this._id, true); } } From 329d820aab0ce538ab4c1696afa27b1e4c827ad4 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 22 Jun 2026 00:26:24 +0200 Subject: [PATCH 03/11] Raised version --- system.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system.json b/system.json index f5e13a62..08693074 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.3.4", + "version": "2.4.0", "compatibility": { "minimum": "14.364", "verified": "14.364", @@ -10,7 +10,7 @@ }, "url": "https://github.com/Foundryborne/daggerheart", "manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json", - "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.3.4/system.zip", + "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.4.0/system.zip", "authors": [ { "name": "WBHarry" From 9f29229c9455efefbe331abf2c9d6bb55ca99d11 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Tue, 23 Jun 2026 02:57:22 -0400 Subject: [PATCH 04/11] Fix resolving formulas in weapon change effects (#2035) --- module/data/action/baseAction.mjs | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index f568436e..27383b7a 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -348,29 +348,31 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel 'system.bonuses.roll.spellcast.bonus' ]; - return Array.from(await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true })).reduce( - (acc, effect) => { - const effectData = effect.toObject(); - /* Effects on weapons only ever apply for the weapon itself, with a few defined exceptions */ - if (effect.parent.type === 'weapon') { - /* Unless they're secondary - then they apply only to other primary weapons */ - if (effect.parent.system.secondary) { - if (effectParent?.type !== 'weapon' || effectParent?.system.secondary) { - effectData.system.changes = - effectData.system.changes.filter(x => weaponTransferredEffectKeys.includes(x.key)); - } - } else if (effectParent?.id !== effect.parent.id) { - effectData.system.changes = - effectData.system.changes.filter(x => weaponTransferredEffectKeys.includes(x.key)); + const results = []; + const applicableEffects = await actor.allApplicableEffects({ noTransferArmor: true, noSelfArmor: true }); + for (const effect of [...applicableEffects].filter(e => !e.isSuppressed)) { + if (effect.parent.type === 'weapon') { + // Effects on weapons only ever apply for the weapon itself (with a few exceptions) + const restricted = + effect.parent.system.secondary + // Secondary applies only to other primary weapons + ? effectParent?.type !== 'weapon' || effectParent?.system.secondary + // Primary only applies to itself + : effectParent?.id !== effect.parent.id; + if (restricted) { + const sourceChanges = effect._source.system.changes; + const changes = sourceChanges.filter(x => weaponTransferredEffectKeys.includes(x.key)); + if (changes.length) { + results.push(effect.clone({ 'system.changes': changes })); } + continue; } + } + + results.push(effect); + } - if (!effect.isSuppressed) { - acc.push(effectData); - } - - return acc; - }, []); + return results; } /** From f5fa59b3bd6d6dcdd8e3b1f3fda68168cf2c3bec Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Tue, 23 Jun 2026 03:40:12 -0400 Subject: [PATCH 05/11] Make prosemirror editor look a bit nicer (#2034) --- styles/less/global/prose-mirror.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/styles/less/global/prose-mirror.less b/styles/less/global/prose-mirror.less index e4b1249f..fc8e49f9 100644 --- a/styles/less/global/prose-mirror.less +++ b/styles/less/global/prose-mirror.less @@ -3,6 +3,8 @@ .application.daggerheart { prose-mirror { + --menu-padding: 4px 0px; + --menu-height: calc(var(--menu-button-height) + 8px); height: 100% !important; width: 100%; From 958eaa310c2b33414527b68afbe6b4ecc64f02c3 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Tue, 23 Jun 2026 06:22:03 -0400 Subject: [PATCH 06/11] Simplify ActiveEffect sheet tags (#2037) * Simplify ActiveEffect sheet tags * Show origin actor and exclude tag if it is a top level actor tag without origin --- lang/en.json | 3 ++- module/documents/activeEffect.mjs | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lang/en.json b/lang/en.json index a4a5edf0..3f21f5eb 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2010,7 +2010,8 @@ "Attachments": { "attachHint": "Drop items here to attach them", "transferHint": "If checked, this effect will be applied to any actor that owns this Effect's parent Item. The effect is always applied if this Item is attached to another one." - } + }, + "OriginTag": "Origin: {name}" }, "GENERAL": { "Ability": { diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 0e7f5d1e..083b3950 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -224,12 +224,13 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { * @returns {string[]} An array of localized tag strings. */ _getTags() { - const tags = [ - `${game.i18n.localize(this.parent.system.metadata.label)}: ${this.parent.name}`, - game.i18n.localize( - this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive' - ) - ]; + const tags = []; + const originActor = DhActiveEffect.#resolveParentDocument(fromUuidSync(this.origin), Actor); + if (originActor && originActor !== this.actor) { + tags.push(_loc('DAGGERHEART.EFFECTS.OriginTag', { name: originActor.name })); + } else if (!(this.parent instanceof Actor)) { + tags.push(`${_loc(this.parent.system.metadata.label)}: ${this.parent.name}`); + } for (const statusId of this.statuses) { const status = CONFIG.statusEffects.find(s => s.id === statusId); From 07b7c8209440dfc350c1b668ab95487d7cfcf799 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Tue, 23 Jun 2026 17:26:53 -0400 Subject: [PATCH 07/11] Fetch origin fetch when in compendium (#2042) --- module/documents/activeEffect.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 083b3950..cdfc9a52 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -225,7 +225,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { */ _getTags() { const tags = []; - const originActor = DhActiveEffect.#resolveParentDocument(fromUuidSync(this.origin), Actor); + const originActor = DhActiveEffect.#resolveParentDocument(fromUuidSync(this.origin, { strict: false }), Actor); if (originActor && originActor !== this.actor) { tags.push(_loc('DAGGERHEART.EFFECTS.OriginTag', { name: originActor.name })); } else if (!(this.parent instanceof Actor)) { From ca82cbcf669240ba6034d0200f84781df5e185de Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Tue, 23 Jun 2026 23:28:04 +0200 Subject: [PATCH 08/11] . (#2041) --- module/documents/combat.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/documents/combat.mjs b/module/documents/combat.mjs index 20996b77..e74127e9 100644 --- a/module/documents/combat.mjs +++ b/module/documents/combat.mjs @@ -46,7 +46,9 @@ export default class DhpCombat extends Combat { for (let actor of actors) { await actor.createEmbeddedDocuments( 'ActiveEffect', - effects.filter(x => x.effectTargetTypes.includes(actor.type)) + effects + .filter(x => x.effectTargetTypes.includes(actor.type)) + .map(x => foundry.utils.deepClone(x)) ); } } else { From 2c1f52413d60004c8d4933caf586258ff4baf1cd Mon Sep 17 00:00:00 2001 From: WBHarry Date: Tue, 23 Jun 2026 23:33:29 +0200 Subject: [PATCH 09/11] Raised verison --- system.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system.json b/system.json index 08693074..4660a196 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.4.0", + "version": "2.4.1", "compatibility": { "minimum": "14.364", "verified": "14.364", @@ -10,7 +10,7 @@ }, "url": "https://github.com/Foundryborne/daggerheart", "manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json", - "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.4.0/system.zip", + "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.4.1/system.zip", "authors": [ { "name": "WBHarry" From 1ebbad47973b631bb6779340e5cab85dd4532a7a Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Wed, 24 Jun 2026 17:37:00 -0400 Subject: [PATCH 10/11] [Fix] quirks involving expanding items and hovering over them (#2033) --- .../sheets/api/application-mixin.mjs | 2 +- module/data/action/baseAction.mjs | 4 + module/data/item/armor.mjs | 8 +- module/data/item/weapon.mjs | 8 +- module/documents/activeEffect.mjs | 4 + module/documents/item.mjs | 4 + styles/less/global/inventory-item.less | 28 +- .../global/partials/inventory-item-V2.hbs | 266 +++++++++--------- 8 files changed, 163 insertions(+), 161 deletions(-) diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index 98f38f03..0168f46d 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -603,7 +603,7 @@ export default function DHApplicationMixin(Base) { const doc = await fromUuid(itemUuid); //get inventory-item description element - const descriptionElement = el.querySelector('.invetory-description'); + const descriptionElement = el.querySelector('.inventory-description'); if (!doc || !descriptionElement) continue; // localize the description (idk if it's still necessary) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 27383b7a..f3008704 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -54,6 +54,10 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel return {}; } + get hasDescription() { + return Boolean(this.description); + } + /** * Create a Map containing each Action step based on fields define in schema. Ordered by Fields order property. * diff --git a/module/data/item/armor.mjs b/module/data/item/armor.mjs index 21c56f9a..15bb620d 100644 --- a/module/data/item/armor.mjs +++ b/module/data/item/armor.mjs @@ -52,6 +52,10 @@ export default class DHArmor extends AttachableItem { ); } + get itemFeatures() { + return this.armorFeatures; + } + /**@inheritdoc */ async getDescriptionData() { const baseDescription = this.description; @@ -169,8 +173,4 @@ export default class DHArmor extends AttachableItem { const labels = [`${game.i18n.localize('DAGGERHEART.ITEMS.Armor.baseScore')}: ${this.armor.max}`]; return labels; } - - get itemFeatures() { - return this.armorFeatures; - } } diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index 84e4de7f..39c0fc8e 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -113,6 +113,10 @@ export default class DHWeapon extends AttachableItem { ); } + get itemFeatures() { + return this.weaponFeatures; + } + /**@inheritdoc */ async getDescriptionData() { const baseDescription = this.description; @@ -269,8 +273,4 @@ export default class DHWeapon extends AttachableItem { return labels; } - - get itemFeatures() { - return this.weaponFeatures; - } } diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index cdfc9a52..4a9f3cc4 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -65,6 +65,10 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { ); } + get hasDescription() { + return Boolean(this.description); + } + /* -------------------------------------------- */ /* Event Handlers */ /* -------------------------------------------- */ diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 32543ebd..14717538 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -89,6 +89,10 @@ export default class DHItem extends foundry.documents.Item { return !pack?.locked && this.isOwner && isValidType && hasActions; } + get hasDescription() { + return Boolean(this.system.description) || Boolean(this.system.itemFeatures?.length); + } + /** @inheritdoc */ static async createDialog(data = {}, createOptions = {}, options = {}) { const { folders, types, template, context = {}, ...dialogOptions } = options; diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index 3a5a9321..fc73ba95 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -43,16 +43,19 @@ } } + .item-main { + border-radius: 5px; + padding: 2px; + margin: -2px; + } + &:hover { .inventory-item-header .item-label .item-name .expanded-icon { margin-left: 10px; display: inline-block; } - &:has(.inventory-item-content.extensible) { - .inventory-item-header, - .inventory-item-content { - background: light-dark(@dark-blue-40, @golden-40); - } + .item-main { + background: light-dark(@dark-blue-40, @golden-40); } &:has(.inventory-item-content.extended) { .inventory-item-header .item-label .item-name .expanded-icon { @@ -60,19 +63,6 @@ } } } - - &:has(.inventory-item-content.extensible) { - .inventory-item-header { - border-radius: 5px 5px 0 0; - } - .inventory-item-content { - border-radius: 0 0 5px 5px; - } - } - - &:not(:has(.inventory-item-content.extensible)) .inventory-item-header { - border-radius: 5px; - } } .inventory-item-header, @@ -171,7 +161,7 @@ grid-template-rows: 1fr; padding-top: 4px; } - .invetory-description { + .inventory-description { overflow: hidden; h1 { diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index f7d22a30..775690d4 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -25,146 +25,146 @@ Parameters: data-type="{{type}}" data-item-type="{{item.type}}" data-item-uuid="{{item.uuid}}" data-no-compendium-edit="{{noCompendiumEdit}}" > -
- {{!-- Image --}} -
- - {{#if (and item.usable (ne showActions false))}} - {{#if @root.isNPC}} - d20 - {{else}} - 2d12 - {{/if}} - {{/if}} -
- - {{!-- Name & Tags --}} -
- {{!-- Item Name --}} - {{localize item.name}} {{#unless (or noExtensible (not item.system.description))}}{{/unless}} - - {{!-- Tags Start --}} - {{#if (not hideTags)}} - {{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item}} - {{#if (eq ../type 'feature')}} - {{#if (and system.featureForm (ne @root.document.type "character"))}} -
- {{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}} -
+
+
+ {{!-- Image --}} +
+ + {{#if (and item.usable (ne showActions false))}} + {{#if @root.isNPC}} + d20 + {{else}} + 2d12 {{/if}} {{/if}} - {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} - {{/if}} +
- {{!--Tags End --}} -
+ {{!-- Name & Tags --}} +
+ {{!-- Item Name --}} + {{localize item.name}} {{#unless (or noExtensible (not item.hasDescription))}}{{/unless}} - {{!-- Simple Resource --}} - {{#if (and (not hideResources) (not (eq item.system.resource.type 'diceValue')))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{#if (or isQuantifiable (or (eq item.system.quantity 0) (gt item.system.quantity 1)))}} -
- + {{!-- Tags Start --}} + {{#if (not hideTags)}} + {{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item}} + {{#if (and (eq ../type 'feature') system.featureForm (ne @root.document.type "character"))}} +
+ {{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}} +
+ {{/if}} + {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} + {{/if}} + + {{!--Tags End --}} +
+ + {{!-- Simple Resource --}} + {{#if (and (not hideResources) (not (eq item.system.resource.type 'diceValue')))}} + {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} + {{/if}} + {{#if (or isQuantifiable (or (eq item.system.quantity 0) (gt item.system.quantity 1)))}} +
+ +
+ {{/if}} + + {{!-- Controls --}} + {{#unless hideControls}} +
+ {{!-- Toggle/Equip buttons --}} + {{#if @root.editable}} + {{#if (and (eq actorType 'character') (eq type 'weapon'))}} + + + + {{/if}} + {{#if (and (eq actorType 'character') (eq type 'armor'))}} + + + + {{/if}} + {{#if (and (eq type 'domainCard'))}} + + + + {{/if}} + {{#if (and (and (eq type 'effect') (not (eq item.type 'beastform'))))}} + + + + {{/if}} + {{/if}} + + {{!-- Send to Chat --}} + {{#if (hasProperty item "toChat")}} + + + + {{/if}} + + {{!-- Document management buttons or context menu --}} + {{#if (and (not isActor) (not hideContextMenu))}} + + + + {{else if (and @root.editable (not hideModifyControls))}} + + + + {{#if (not isActor)}} + + + + {{else if (eq type 'adversary')}} + + + + {{/if}} + {{/if}} +
+ {{/unless}}
+ {{#unless hideDescription}} +
+ {{!-- Description --}} +
+
+ {{/unless}} +
+ {{!-- Dice Resource --}} + {{#if (and (not hideResources) (eq item.system.resource.type 'diceValue'))}} + {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} {{/if}} - - {{!-- Controls --}} - {{#unless hideControls}} -
- {{!-- Toggle/Equip buttons --}} - {{#if @root.editable}} - {{#if (and (eq actorType 'character') (eq type 'weapon'))}} - - - - {{/if}} - {{#if (and (eq actorType 'character') (eq type 'armor'))}} - - - - {{/if}} - {{#if (and (eq type 'domainCard'))}} - - - - {{/if}} - {{#if (and (and (eq type 'effect') (not (eq item.type 'beastform'))))}} - - - - {{/if}} + {{!-- Actions Buttons --}} + {{#if (and showActions item.system.actions.size)}} +
+ {{#each item.system.actions as | action |}} +
+ {{#if (and (eq action.type 'beastform') @root.beastformActive)}} + + {{else}} + {{/if}} - - {{!-- Send to Chat --}} - {{#if (hasProperty item "toChat")}} - - - - {{/if}} - - {{!-- Document management buttons or context menu --}} - {{#if (and (not isActor) (not hideContextMenu))}} - - - - {{else if (and @root.editable (not hideModifyControls))}} - - - - {{#if (not isActor)}} - - - - {{else if (eq type 'adversary')}} - - - - {{/if}} + {{#if action.uses.max}} +
+ {{/if}}
- {{/unless}} -
-
- {{!-- Description --}} - {{#unless hideDescription}} -
- {{/unless}} -
- {{!-- Dice Resource --}} - {{#if (and (not hideResources) (eq item.system.resource.type 'diceValue'))}} - {{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}} - {{/if}} - {{!-- Actions Buttons --}} - {{#if (and showActions item.system.actions.size)}} -
- {{#each item.system.actions as | action |}} -
- {{#if (and (eq action.type 'beastform') @root.beastformActive)}} - - {{else}} - - {{/if}} - {{#if action.uses.max}} -
- - {{/if}} + {{/each}}
- {{/each}} -
- {{/if}} - \ No newline at end of file + {{/if}} + From 624e81ae3671407b71e18429b563fd5d40e162cd Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Fri, 29 May 2026 05:41:22 -0400 Subject: [PATCH 11/11] Styling pass for scrollbars, fieldsets, and scroll shadows --- styles/less/global/elements.less | 8 +++- styles/less/global/sheet.less | 2 +- .../sheets/actors/actor-sheet-shared.less | 3 +- .../less/sheets/actors/adversary/effects.less | 13 ++++-- .../sheets/actors/adversary/features.less | 11 +++-- .../less/sheets/actors/adversary/header.less | 3 +- .../less/sheets/actors/adversary/index.less | 5 +-- .../less/sheets/actors/adversary/notes.less | 7 ++- .../less/sheets/actors/adversary/sheet.less | 43 +++++++++++-------- .../sheets/actors/character/biography.less | 3 +- .../sheets/actors/character/features.less | 1 + .../less/sheets/actors/character/index.less | 2 +- .../sheets/actors/character/inventory.less | 7 ++- .../less/sheets/actors/character/loadout.less | 4 +- .../less/sheets/actors/character/sheet.less | 41 ++++++++++-------- .../less/sheets/actors/companion/effects.less | 6 ++- .../sheets/actors/environment/features.less | 4 +- .../less/sheets/actors/environment/index.less | 3 +- .../less/sheets/actors/environment/notes.less | 11 +++++ .../environment/potentialAdversaries.less | 4 +- .../less/sheets/actors/environment/sheet.less | 2 + styles/less/sheets/actors/party/index.less | 3 +- .../less/sheets/actors/party/inventory.less | 6 +++ styles/less/sheets/actors/party/notes.less | 12 ++++++ .../sheets/actors/party/party-members.less | 1 + styles/less/sheets/actors/party/sheet.less | 2 + .../sheets/actors/adversary/features.hbs | 21 ++++----- templates/sheets/actors/adversary/notes.hbs | 5 +-- .../sheets/actors/environment/features.hbs | 19 ++++---- templates/sheets/actors/environment/notes.hbs | 5 +-- templates/sheets/actors/party/notes.hbs | 5 +-- 31 files changed, 168 insertions(+), 94 deletions(-) create mode 100644 styles/less/sheets/actors/environment/notes.less create mode 100644 styles/less/sheets/actors/party/notes.less diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index e57ba50d..6c229dda 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -261,10 +261,14 @@ fieldset { align-items: center; - margin-top: 5px; border-radius: 6px; border-color: @color-fieldset-border; + /* Left and right side spacing is set up so that content starts at 15px left indent */ + margin-top: 5px; + padding-inline: 7px; + margin-inline: 6px; + &.glassy { background-color: light-dark(@dark-blue-10, @golden-10); border-color: transparent; @@ -501,7 +505,7 @@ height: 1px; width: 100%; border-bottom: 1px solid @color-border; - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); + mask-image: linear-gradient(270deg, transparent 0%, black 35%,black 50%, black 65%, transparent 100%); } side-line-div { diff --git a/styles/less/global/sheet.less b/styles/less/global/sheet.less index e3072da1..8381c7c3 100755 --- a/styles/less/global/sheet.less +++ b/styles/less/global/sheet.less @@ -54,7 +54,7 @@ body.game:is(.performance-low, .noblur) { position: relative; min-height: -webkit-fill-available; transition: opacity 0.3s ease; - padding-bottom: 20px; + padding-bottom: 16px; .tab { padding: 0 10px; diff --git a/styles/less/sheets/actors/actor-sheet-shared.less b/styles/less/sheets/actors/actor-sheet-shared.less index 89617103..6015047b 100644 --- a/styles/less/sheets/actors/actor-sheet-shared.less +++ b/styles/less/sheets/actors/actor-sheet-shared.less @@ -39,6 +39,7 @@ .window-header > .attribution-header-label { margin-right: var(--spacer-4); + pointer-events: none; } .tab.inventory { @@ -46,7 +47,7 @@ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; - padding: 10px 10px 0; + padding: 12px 12px 0 10px; .input { color: light-dark(@dark, @beige); diff --git a/styles/less/sheets/actors/adversary/effects.less b/styles/less/sheets/actors/adversary/effects.less index 4aa44e51..c4fa0124 100644 --- a/styles/less/sheets/actors/adversary/effects.less +++ b/styles/less/sheets/actors/adversary/effects.less @@ -3,13 +3,20 @@ .application.sheet.daggerheart.actor.dh-style.adversary { .tab.effects { + margin-top: var(--spacer-12); + overflow-y: auto; + scrollbar-gutter: stable; + .with-scroll-shadows(); .effects-sections { display: flex; flex-direction: column; gap: 10px; - overflow-y: auto; - padding-bottom: 20px; - .with-scroll-shadows(); + } + fieldset { + margin-right: 0; // scroll gutter compensation + &:first-child { + margin-top: 0; + } } } } diff --git a/styles/less/sheets/actors/adversary/features.less b/styles/less/sheets/actors/adversary/features.less index 447d050e..49e64909 100644 --- a/styles/less/sheets/actors/adversary/features.less +++ b/styles/less/sheets/actors/adversary/features.less @@ -3,14 +3,17 @@ @import '../../../utils/mixin.less'; .application.sheet.daggerheart.actor.dh-style.adversary { - .tab.features { + .tab.features.active { + position: relative; + margin-top: var(--spacer-8); + padding: var(--spacer-8) 2px 0 var(--left-indent); + overflow-y: auto; + scrollbar-gutter: stable; + .with-scroll-shadows(); .feature-section { display: flex; flex-direction: column; gap: 10px; - overflow-y: auto; - padding-bottom: 20px; - .with-scroll-shadows(); } } } diff --git a/styles/less/sheets/actors/adversary/header.less b/styles/less/sheets/actors/adversary/header.less index 549a219d..0d50b886 100644 --- a/styles/less/sheets/actors/adversary/header.less +++ b/styles/less/sheets/actors/adversary/header.less @@ -7,7 +7,7 @@ width: 100%; > *:not(line-div, .tab-navigation) { - padding-left: 15px; + padding-left: var(--left-indent); padding-right: 15px; } @@ -75,6 +75,7 @@ .tab-navigation { margin-top: 0; + margin-bottom: 0; button[data-action="openSettings"] { margin-right: 12px; } diff --git a/styles/less/sheets/actors/adversary/index.less b/styles/less/sheets/actors/adversary/index.less index 28ff9d22..a05af854 100644 --- a/styles/less/sheets/actors/adversary/index.less +++ b/styles/less/sheets/actors/adversary/index.less @@ -1,7 +1,6 @@ -@import './features.less'; -@import './header.less'; @import './sheet.less'; +@import './header.less'; +@import './features.less'; @import './sidebar.less'; @import './effects.less'; @import './notes.less'; - diff --git a/styles/less/sheets/actors/adversary/notes.less b/styles/less/sheets/actors/adversary/notes.less index a95d070e..e9dbd271 100644 --- a/styles/less/sheets/actors/adversary/notes.less +++ b/styles/less/sheets/actors/adversary/notes.less @@ -1,3 +1,8 @@ .application.sheet.daggerheart.actor.dh-style.adversary .tab.notes.active { - padding-bottom: 20px; + padding-top: var(--spacer-16); + padding-left: var(--left-indent); + .editor-content { + scrollbar-gutter: stable; + .with-scroll-shadows(); + } } diff --git a/styles/less/sheets/actors/adversary/sheet.less b/styles/less/sheets/actors/adversary/sheet.less index 0bd845fa..9a284a26 100644 --- a/styles/less/sheets/actors/adversary/sheet.less +++ b/styles/less/sheets/actors/adversary/sheet.less @@ -2,6 +2,8 @@ @import '../../../utils/fonts.less'; .application.sheet.daggerheart.actor.dh-style.adversary { + --left-indent: 15px; + .window-content { display: grid; grid-template-columns: 275px 1fr; @@ -9,28 +11,31 @@ height: 100%; width: 100%; padding-bottom: 0; + } - .adversary-sidebar-sheet { - grid-row: 1 / span 2; - grid-column: 1; + .adversary-sidebar-sheet { + grid-row: 1 / span 2; + grid-column: 1; + overflow: hidden; + display: flex; + flex-direction: column; + } + + .adversary-header-sheet { + grid-row: 1; + grid-column: 2; + } + + .tab { + grid-row: 2; + grid-column: 2; + &.active { overflow: hidden; display: flex; flex-direction: column; - } - - .adversary-header-sheet { - grid-row: 1; - grid-column: 2; - } - - .tab { - grid-row: 2; - grid-column: 2; - &.active { - overflow: hidden; - display: flex; - flex-direction: column; - } + padding: 0; + margin-right: 1px; + margin-bottom: 12px; } } -} +} \ No newline at end of file diff --git a/styles/less/sheets/actors/character/biography.less b/styles/less/sheets/actors/character/biography.less index 8548a2fb..ce52c5af 100644 --- a/styles/less/sheets/actors/character/biography.less +++ b/styles/less/sheets/actors/character/biography.less @@ -11,8 +11,9 @@ height: 100%; overflow-y: auto; padding-top: 8px; - padding-bottom: 20px; + padding-bottom: 4px; height: 100%; + scrollbar-gutter: stable; .with-scroll-shadows(); } diff --git a/styles/less/sheets/actors/character/features.less b/styles/less/sheets/actors/character/features.less index 52b41826..f81f0e32 100644 --- a/styles/less/sheets/actors/character/features.less +++ b/styles/less/sheets/actors/character/features.less @@ -10,6 +10,7 @@ gap: 10px; overflow-y: auto; padding-bottom: 20px; + scrollbar-gutter: stable; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/character/index.less b/styles/less/sheets/actors/character/index.less index edefe0a1..f196d5bf 100644 --- a/styles/less/sheets/actors/character/index.less +++ b/styles/less/sheets/actors/character/index.less @@ -1,8 +1,8 @@ +@import './sheet.less'; @import './biography.less'; @import './effects.less'; @import './features.less'; @import './header.less'; @import './inventory.less'; @import './loadout.less'; -@import './sheet.less'; @import './sidebar.less'; diff --git a/styles/less/sheets/actors/character/inventory.less b/styles/less/sheets/actors/character/inventory.less index fcfbbee9..b07bb6fe 100644 --- a/styles/less/sheets/actors/character/inventory.less +++ b/styles/less/sheets/actors/character/inventory.less @@ -4,13 +4,18 @@ .application.sheet.daggerheart.actor.dh-style.character { .tab.inventory { + padding-right: 0; + .search-section { + padding-right: 14px; + } .items-section { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; + scrollbar-gutter: stable; margin-top: 20px; - padding-bottom: 20px; + padding-bottom: 4px; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/character/loadout.less b/styles/less/sheets/actors/character/loadout.less index fa3e0176..67b2914b 100644 --- a/styles/less/sheets/actors/character/loadout.less +++ b/styles/less/sheets/actors/character/loadout.less @@ -5,6 +5,7 @@ .application.sheet.daggerheart.actor.dh-style.character { .tab.loadout { .search-section { + padding-right: 14px; .btn-toggle-view { background: light-dark(@dark-blue-10, @dark-blue); border: 1px solid @color-border; @@ -52,8 +53,9 @@ gap: 10px; height: 100%; overflow-y: auto; + scrollbar-gutter: stable; margin-top: 20px; - padding-bottom: 20px; + padding-bottom: 4px; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/character/sheet.less b/styles/less/sheets/actors/character/sheet.less index 68792c99..aebcb9b9 100644 --- a/styles/less/sheets/actors/character/sheet.less +++ b/styles/less/sheets/actors/character/sheet.less @@ -10,28 +10,31 @@ width: 100%; padding-bottom: 0; overflow-x: auto; + } + + .character-sidebar-sheet { + grid-row: 1 / span 2; + grid-column: 1; + display: flex; + flex-direction: column; + } - .character-sidebar-sheet { - grid-row: 1 / span 2; - grid-column: 1; + .character-header-sheet { + position: relative; + grid-row: 1; + grid-column: 2; + } + + .tab { + grid-row: 2; + grid-column: 2; + padding-right: 0; + margin-right: 2px; + margin-bottom: 12px; + &.active { display: flex; flex-direction: column; - } - - .character-header-sheet { - position: relative; - grid-row: 1; - grid-column: 2; - } - - .tab { - grid-row: 2; - grid-column: 2; - &.active { - display: flex; - flex-direction: column; - overflow: hidden; - } + overflow: hidden; } } } diff --git a/styles/less/sheets/actors/companion/effects.less b/styles/less/sheets/actors/companion/effects.less index c0cac669..40973196 100644 --- a/styles/less/sheets/actors/companion/effects.less +++ b/styles/less/sheets/actors/companion/effects.less @@ -1,13 +1,17 @@ @import '../../../utils/colors.less'; +@import '../../../utils/mixin.less'; .application.sheet.daggerheart.actor.dh-style.companion { .tab.effects { + margin-right: 2px; + padding-right: 0; .effects-sections { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; - padding-bottom: 20px; + padding-bottom: 4px; + scrollbar-gutter: stable; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/environment/features.less b/styles/less/sheets/actors/environment/features.less index 84cf26f8..295636a7 100644 --- a/styles/less/sheets/actors/environment/features.less +++ b/styles/less/sheets/actors/environment/features.less @@ -4,12 +4,14 @@ .application.sheet.daggerheart.actor.dh-style.environment { .tab.features { + position: relative; .feature-section { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; - padding-bottom: 4px; + padding: 4px 8px; + scrollbar-gutter: stable; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/environment/index.less b/styles/less/sheets/actors/environment/index.less index 211c8e60..db35eabc 100644 --- a/styles/less/sheets/actors/environment/index.less +++ b/styles/less/sheets/actors/environment/index.less @@ -1,4 +1,5 @@ +@import './sheet.less'; @import './features.less'; @import './header.less'; @import './potentialAdversaries.less'; -@import './sheet.less'; +@import './notes.less'; diff --git a/styles/less/sheets/actors/environment/notes.less b/styles/less/sheets/actors/environment/notes.less new file mode 100644 index 00000000..58447c88 --- /dev/null +++ b/styles/less/sheets/actors/environment/notes.less @@ -0,0 +1,11 @@ +@import '../../../utils/mixin.less'; + +.application.sheet.daggerheart.actor.dh-style.environment { + .tab.notes { + padding: 6px 0 4px 15px; + .editor-content { + scrollbar-gutter: stable; + .with-scroll-shadows(); + } + } +} \ No newline at end of file diff --git a/styles/less/sheets/actors/environment/potentialAdversaries.less b/styles/less/sheets/actors/environment/potentialAdversaries.less index f112c0d2..e66ff34d 100644 --- a/styles/less/sheets/actors/environment/potentialAdversaries.less +++ b/styles/less/sheets/actors/environment/potentialAdversaries.less @@ -1,4 +1,5 @@ @import '../../../utils/colors.less'; +@import '../../../utils/mixin.less'; .application.sheet.daggerheart.actor.dh-style.environment { .tab.potentialAdversaries { @@ -7,7 +8,8 @@ flex-direction: column; gap: 10px; overflow-y: auto; - padding-bottom: 4px; + padding: 0 4px 4px 4px; + scrollbar-gutter: stable; .with-scroll-shadows(); } } diff --git a/styles/less/sheets/actors/environment/sheet.less b/styles/less/sheets/actors/environment/sheet.less index 2d9cc188..02489cac 100644 --- a/styles/less/sheets/actors/environment/sheet.less +++ b/styles/less/sheets/actors/environment/sheet.less @@ -16,6 +16,8 @@ .tab { flex: 1; overflow-y: auto; + padding-right: 0; + margin-right: 2px; &.active { overflow: hidden; diff --git a/styles/less/sheets/actors/party/index.less b/styles/less/sheets/actors/party/index.less index 56f7a457..279c9db2 100644 --- a/styles/less/sheets/actors/party/index.less +++ b/styles/less/sheets/actors/party/index.less @@ -1,4 +1,5 @@ +@import './sheet.less'; @import './header.less'; @import './party-members.less'; -@import './sheet.less'; @import './inventory.less'; +@import './notes.less'; \ No newline at end of file diff --git a/styles/less/sheets/actors/party/inventory.less b/styles/less/sheets/actors/party/inventory.less index 444c6a57..4b14e112 100644 --- a/styles/less/sheets/actors/party/inventory.less +++ b/styles/less/sheets/actors/party/inventory.less @@ -4,11 +4,17 @@ .application.sheet.daggerheart.actor.dh-style.party { .tab.inventory { + padding-right: 0; + .search-section { + padding-right: 14px; + } + .items-section { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; + scrollbar-gutter: stable; margin-top: 20px; padding-bottom: 4px; .with-scroll-shadows(); diff --git a/styles/less/sheets/actors/party/notes.less b/styles/less/sheets/actors/party/notes.less new file mode 100644 index 00000000..4ef51caa --- /dev/null +++ b/styles/less/sheets/actors/party/notes.less @@ -0,0 +1,12 @@ +@import '../../../utils/mixin.less'; + +.application.sheet.daggerheart.actor.dh-style.party { + .tab.notes { + padding: 16px 0 4px 15px; + .editor-content { + scrollbar-gutter: stable; + padding-left: 8px; + .with-scroll-shadows(); + } + } +} \ No newline at end of file diff --git a/styles/less/sheets/actors/party/party-members.less b/styles/less/sheets/actors/party/party-members.less index dc464291..7b85eb35 100644 --- a/styles/less/sheets/actors/party/party-members.less +++ b/styles/less/sheets/actors/party/party-members.less @@ -4,6 +4,7 @@ .application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers { overflow: auto; + .with-scroll-shadows(); .actors-list { display: flex; diff --git a/styles/less/sheets/actors/party/sheet.less b/styles/less/sheets/actors/party/sheet.less index 852b6cfc..33aa64a3 100644 --- a/styles/less/sheets/actors/party/sheet.less +++ b/styles/less/sheets/actors/party/sheet.less @@ -21,6 +21,8 @@ flex: 1; overflow-y: auto; scrollbar-gutter: stable; + margin-right: 2px; + padding-right: 8px; &.active { overflow: auto; diff --git a/templates/sheets/actors/adversary/features.hbs b/templates/sheets/actors/adversary/features.hbs index 3b495e74..8430d454 100644 --- a/templates/sheets/actors/adversary/features.hbs +++ b/templates/sheets/actors/adversary/features.hbs @@ -1,14 +1,15 @@
- {{> 'daggerheart.inventory-items' - title=tabs.features.label - type='feature' - collection=@root.features - hideContextMenu=true - hideModifyControls=true - canCreate=@root.editable - showActions=@root.editable - }} + {{#each @root.features as |item|}} + {{> 'daggerheart.inventory-item' + item=item + type='feature' + actorType=@root.document.type + hideContextMenu=true + hideModifyControls=true + showActions=@root.editable + }} + {{/each}}
-
\ No newline at end of file + diff --git a/templates/sheets/actors/adversary/notes.hbs b/templates/sheets/actors/adversary/notes.hbs index a5c3f706..28df7f8e 100644 --- a/templates/sheets/actors/adversary/notes.hbs +++ b/templates/sheets/actors/adversary/notes.hbs @@ -3,10 +3,7 @@ data-tab='{{tabs.notes.id}}' data-group='{{tabs.notes.group}}' > -
- {{localize tabs.notes.label}} - {{formInput notes.field value=notes.value enriched=notes.enriched toggled=true}} -
+ {{formInput notes.field value=notes.value enriched=notes.enriched class="aaa" toggled=true}} {{#if (and showAttribution document.system.attribution.artist)}} diff --git a/templates/sheets/actors/environment/features.hbs b/templates/sheets/actors/environment/features.hbs index 35fcb038..264d6bf5 100644 --- a/templates/sheets/actors/environment/features.hbs +++ b/templates/sheets/actors/environment/features.hbs @@ -4,14 +4,15 @@ data-group='{{tabs.features.group}}' >
- {{> 'daggerheart.inventory-items' - title=tabs.features.label - type='feature' - collection=@root.features - hideContextMenu=true - hideModifyControls=true - canCreate=@root.editable - showActions=@root.editable - }} + {{#each @root.features as |item|}} + {{> 'daggerheart.inventory-item' + item=item + type='feature' + actorType=@root.document.type + hideContextMenu=true + hideModifyControls=true + showActions=@root.editable + }} + {{/each}}
\ No newline at end of file diff --git a/templates/sheets/actors/environment/notes.hbs b/templates/sheets/actors/environment/notes.hbs index 4f6b131e..1acf0e93 100644 --- a/templates/sheets/actors/environment/notes.hbs +++ b/templates/sheets/actors/environment/notes.hbs @@ -3,10 +3,7 @@ data-tab='{{tabs.notes.id}}' data-group='{{tabs.notes.group}}' > -
- {{localize tabs.notes.label}} - {{formInput notes.field value=notes.value enriched=notes.value toggled=true}} -
+ {{formInput notes.field value=notes.value enriched=notes.value toggled=true}} {{#if (and showAttribution document.system.attribution.artist)}} diff --git a/templates/sheets/actors/party/notes.hbs b/templates/sheets/actors/party/notes.hbs index 663a484a..0972bee9 100644 --- a/templates/sheets/actors/party/notes.hbs +++ b/templates/sheets/actors/party/notes.hbs @@ -3,8 +3,5 @@ data-tab='{{tabs.notes.id}}' data-group='{{tabs.notes.group}}' > -
- {{localize tabs.notes.label}} - {{formInput notes.field value=notes.value enriched=notes.value toggled=true}} -
+ {{formInput notes.field value=notes.value enriched=notes.value toggled=true}} \ No newline at end of file