Fade adversary notes tab when notes are empty (#2015)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
Carlos Fernandez 2026-06-18 19:05:26 -04:00 committed by GitHub
parent 9e25b7eff0
commit 961e124ef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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);