diff --git a/module/applications/sheets/items/subclass.mjs b/module/applications/sheets/items/subclass.mjs index 6daf4a89..254ab7cc 100644 --- a/module/applications/sheets/items/subclass.mjs +++ b/module/applications/sheets/items/subclass.mjs @@ -44,9 +44,9 @@ export default class SubclassSheet extends DHBaseItemSheet { async _prepareContext(options) { const context = await super._prepareContext(options); if (this.document.system.linkedClass) { - const classData = await fromUuid(this.document.system.linkedClass); - context.class = classData ?? { + context.class = (await fromUuid(this.document.system.linkedClass)) ?? { name: _loc('DAGGERHEART.GENERAL.missingX', { x: _loc('TYPES.Item.class') }), + img: 'systems/daggerheart/assets/icons/documents/items/laurel-crown.svg', missing: true }; } diff --git a/module/applications/ui/itemBrowser.mjs b/module/applications/ui/itemBrowser.mjs index 99b9a23d..4bdc1b31 100644 --- a/module/applications/ui/itemBrowser.mjs +++ b/module/applications/ui/itemBrowser.mjs @@ -357,7 +357,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) { async _createFieldFilter() { const filters = ItemBrowser.getFolderConfig(this.selectedMenu.data, 'filters'); - for (const f of filters) { + for(const f of filters) { if (typeof f.field === 'string') f.field = foundry.utils.getProperty(game, f.field); else if (typeof f.choices === 'function') { f.choices = await f.choices(this.items); diff --git a/module/config/itemBrowserConfig.mjs b/module/config/itemBrowserConfig.mjs index 3e40c97b..0bb805b6 100644 --- a/module/config/itemBrowserConfig.mjs +++ b/module/config/itemBrowserConfig.mjs @@ -383,8 +383,7 @@ export const typeConfig = { { key: 'system.linkedClass', label: 'TYPES.Item.class', - format: linkedClass => - foundry.utils.fromUuidSync(linkedClass)?.name ?? 'DAGGERHEART.UI.ItemBrowser.missing' + format: linkedClass => linkedClass?.name ?? 'DAGGERHEART.UI.ItemBrowser.missing' }, { key: 'system.spellcastingTrait', @@ -398,7 +397,7 @@ export const typeConfig = { label: 'TYPES.Item.class', choices: async items => { const list = []; - for (const item of items.filter(item => item.system.linkedClass)) { + for(const item of items.filter(item => item.system.linkedClass)) { const linkedClass = await foundry.utils.fromUuid(item.system.linkedClass); list.push({ value: linkedClass.uuid, diff --git a/styles/less/global/feature-section.less b/styles/less/global/feature-section.less index 7d5099e1..937f0cde 100644 --- a/styles/less/global/feature-section.less +++ b/styles/less/global/feature-section.less @@ -35,14 +35,6 @@ border-radius: 6px; border: none; } - .image-icon { - font-size: 26px; - width: 40px; - height: 40px; - display: flex; - justify-content: center; - align-items: center; - } .controls { display: flex; justify-content: center; diff --git a/templates/sheets/items/subclass/description.hbs b/templates/sheets/items/subclass/description.hbs index 0267eb9b..4591bd1a 100644 --- a/templates/sheets/items/subclass/description.hbs +++ b/templates/sheets/items/subclass/description.hbs @@ -1,10 +1,8 @@
- {{#if spellcastTrait}} -
-

{{localize "DAGGERHEART.ITEMS.Subclass.spellcastTrait"}}

- {{spellcastTrait}} -
- {{/if}} +
+

{{localize "DAGGERHEART.ITEMS.Subclass.spellcastTrait"}}

+ {{spellcastTrait}} +

{{localize "DAGGERHEART.ITEMS.Subclass.foundationFeatures"}}

{{#each foundationFeatures as | feature |}} diff --git a/templates/sheets/items/subclass/features.hbs b/templates/sheets/items/subclass/features.hbs index c54e702e..75ff3a8b 100644 --- a/templates/sheets/items/subclass/features.hbs +++ b/templates/sheets/items/subclass/features.hbs @@ -8,12 +8,9 @@ {{#if class}}
  • - {{#if class.missing}} - - {{class.name}} - {{else}} - - {{class.name}} + + {{class.name}} {{#if class.missing}}{{/if}} + {{#unless class.missing}} - {{/if}} + {{/unless}}
  • {{else}}