mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-23 19:09:55 +02:00
Fade environment adversaries and notes tabs when empty
This commit is contained in:
parent
08b95e48d6
commit
fa3a8bb123
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