[PR][Fix] Cleaned Up Countdown Ownership View (#1459)

* Removed the disabled default ownership select in the ownership view. Added a fallback text incase there are no players added yet

* Corrected noPlayers condition
This commit is contained in:
WBHarry 2025-12-24 01:09:51 +01:00 committed by GitHub
parent f8b003b304
commit 92b31b71a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 21 deletions

View file

@ -38,7 +38,6 @@ export default class OwnershipSelection extends HandlebarsApplicationMixin(Appli
async _prepareContext(_options) {
const context = await super._prepareContext(_options);
context.ownershipDefaultOptions = CONFIG.DH.GENERAL.basicOwnershiplevels;
context.ownershipOptions = CONFIG.DH.GENERAL.simpleOwnershiplevels;
context.defaultOwnership = this.defaultOwnership;
context.ownership = game.users.reduce((acc, user) => {
@ -52,6 +51,7 @@ export default class OwnershipSelection extends HandlebarsApplicationMixin(Appli
return acc;
}, {});
context.showOwnership = Boolean(Object.keys(context.ownership).length);
return context;
}