Bug/103 enrich htmlfield content before its used in applications (#369)

* FIX: Add enritch to HTMLField
FIX: Remove no-HTMLField from Manifest
FIX: Convert Scar's HTMLField to StringField
FIX: Remove unused HTMLField

* REMOVE unused hanldebars helpers

* FEAT: add inventory-fieldset-items-V2 and inventory-item-V2  partials for Actors

* FIX showLabels to hideTags

* FEAT: add template to items sheet

* FEAT: add effects tabs on ItemSheet

* FEAT: add context menus for all inventory-items

* FEAT: add resources to inventory-item template

* FEAT: add enritch on inventory-item description
FEAT: add extensible behavior on inventory-item-content
FEAT: add fade effect on item-img to roll-itmg

* FEAT: add eritch to NPC description
FIX: missing htmlFieldss on manfiest
FIX: add misisng localizations

* FIX_ minor fixes

* Little resource fix. Noone will notice ._.

* 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

---------

Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
joaquinpereyra98 2025-07-19 17:21:46 -03:00 committed by GitHub
parent 615df65415
commit b8930b18a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 1768 additions and 1434 deletions

View file

@ -6,11 +6,7 @@ export default class SubclassSheet extends DHBaseItemSheet {
classes: ['subclass'],
position: { width: 600 },
window: { resizable: false },
actions: {
addFeature: this.addFeature,
editFeature: this.editFeature,
deleteFeature: this.deleteFeature
}
actions: {}
};
/**@override */
@ -25,64 +21,22 @@ export default class SubclassSheet extends DHBaseItemSheet {
settings: {
template: 'systems/daggerheart/templates/sheets/items/subclass/settings.hbs',
scrollable: ['.settings']
},
effects: {
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-effects.hbs',
scrollable: ['.effects']
}
};
/** @inheritdoc */
static TABS = {
primary: {
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'settings' }],
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'settings' }, { id: 'effects' }],
initial: 'description',
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
}
};
static async addFeature(_, target) {
const feature = await game.items.documentClass.create({
type: 'feature',
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
system: {
subType:
target.dataset.type === 'foundation'
? CONFIG.DH.ITEM.featureSubTypes.foundation
: target.dataset.type === 'specialization'
? CONFIG.DH.ITEM.featureSubTypes.specialization
: CONFIG.DH.ITEM.featureSubTypes.mastery
}
});
await this.document.update({
[`system.features`]: [...this.document.system.features.map(x => x.uuid), feature.uuid]
});
}
static async editFeature(_, button) {
const feature = this.document.system.features.find(x => x.id === button.dataset.feature);
if (!feature) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.featureIsMissing'));
return;
}
if (feature) {
await feature.update({ 'system.subType': null });
}
feature.sheet.render(true);
}
static async deleteFeature(event, target) {
event.stopPropagation();
const feature = this.document.system.features.find(feature => feature.id === target.dataset.feature);
if (feature) {
await feature.update({ 'system.subType': null });
}
await this.document.update({
[`system.features`]: this.document.system.features
.filter(feature => feature && feature.id !== target.dataset.feature)
.map(x => x.uuid)
});
}
async _onDragStart(event) {
const featureItem = event.currentTarget.closest('.drop-section');