Adjust spacing of compendium browser tags (#1720)

This commit is contained in:
Carlos Fernandez 2026-03-09 19:06:31 -04:00 committed by GitHub
parent 3b6809064d
commit 26ac2c5380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 27 additions and 10 deletions

View file

@ -53,14 +53,14 @@ export default class DHArmor extends AttachableItem {
}
/**@inheritdoc */
async getDescriptionData({ inCompendium }) {
async getDescriptionData() {
const baseDescription = this.description;
const allFeatures = CONFIG.DH.ITEM.allArmorFeatures();
const features = this.armorFeatures.map(x => allFeatures[x.value]).filter(x => x);
const prefix = await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/sheets/items/armor/description.hbs',
{ item: this.parent, inCompendium, features }
{ item: this.parent, features }
);
return { prefix, value: baseDescription, suffix: null };

View file

@ -138,10 +138,10 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
* @param {object} [options] - Options that modify the styling of the rendered template. { headerStyle: undefined|'none'|'large' }
* @returns {string}
*/
async getEnrichedDescription(options = { inCompendium: false }) {
async getEnrichedDescription() {
if (!this.metadata.hasDescription) return '';
const { prefix, value, suffix } = await this.getDescriptionData(options);
const { prefix, value, suffix } = await this.getDescriptionData();
const fullDescription = [prefix, value, suffix].filter(p => !!p).join('\n<hr>\n');
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {

View file

@ -109,7 +109,7 @@ export default class DHWeapon extends AttachableItem {
}
/**@inheritdoc */
async getDescriptionData({ inCompendium }) {
async getDescriptionData() {
const baseDescription = this.description;
const allFeatures = CONFIG.DH.ITEM.allWeaponFeatures();
@ -119,7 +119,6 @@ export default class DHWeapon extends AttachableItem {
'systems/daggerheart/templates/sheets/items/weapon/description.hbs',
{
item: this,
inCompendium,
features
}
);