Fade adversary notes tab when notes are empty

This commit is contained in:
Carlos Fernandez 2026-06-18 18:43:16 -04:00
parent 9e25b7eff0
commit df7a1380c7

View file

@ -131,6 +131,15 @@ export default class AdversarySheet extends DHBaseActorSheet {
return context;
}
/** @inheritdoc */
_prepareTabs(group) {
const result = super._prepareTabs(group);
if (group === 'primary') {
result.notes.empty = !this.document.system.notes?.trim();
}
return result;
}
/**@inheritdoc */
_attachPartListeners(partId, htmlElement, options) {
super._attachPartListeners(partId, htmlElement, options);