mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Fade environment adversaries and notes tabs when empty (#2028)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
7237a3651d
commit
3840f39c97
1 changed files with 10 additions and 0 deletions
|
|
@ -72,6 +72,16 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
||||||
return applicationOptions;
|
return applicationOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
_prepareTabs(group) {
|
||||||
|
const result = super._prepareTabs(group);
|
||||||
|
if (group === 'primary') {
|
||||||
|
result.potentialAdversaries.empty = foundry.utils.isEmpty(this.document.system.potentialAdversaries);
|
||||||
|
result.notes.empty = !this.document.system.notes?.trim();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**@inheritdoc */
|
/**@inheritdoc */
|
||||||
async _preparePartContext(partId, context, options) {
|
async _preparePartContext(partId, context, options) {
|
||||||
context = await super._preparePartContext(partId, context, options);
|
context = await super._preparePartContext(partId, context, options);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue