diff --git a/lang/en.json b/lang/en.json index a70698ca..828b2303 100755 --- a/lang/en.json +++ b/lang/en.json @@ -586,6 +586,7 @@ }, "OwnershipSelection": { "title": "Ownership Selection - {name}", + "noPlayers": "No players to assign ownership to", "default": "Default Ownership" }, "ReactionRoll": { diff --git a/module/applications/dialogs/ownershipSelection.mjs b/module/applications/dialogs/ownershipSelection.mjs index 049f4d99..64173221 100644 --- a/module/applications/dialogs/ownershipSelection.mjs +++ b/module/applications/dialogs/ownershipSelection.mjs @@ -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; } diff --git a/styles/less/ui/ownership-selection/ownership-selection.less b/styles/less/ui/ownership-selection/ownership-selection.less index 76ae0930..ae7b5e2d 100644 --- a/styles/less/ui/ownership-selection/ownership-selection.less +++ b/styles/less/ui/ownership-selection/ownership-selection.less @@ -36,6 +36,10 @@ } } + .hint { + text-align: center; + } + footer { margin-top: 10px; button { diff --git a/system.json b/system.json index a58f23db..c58be61d 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.3.2", + "version": "1.4.0", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/dialogs/ownershipSelection.hbs b/templates/dialogs/ownershipSelection.hbs index b16e5d75..ccd90cdf 100644 --- a/templates/dialogs/ownershipSelection.hbs +++ b/templates/dialogs/ownershipSelection.hbs @@ -1,23 +1,19 @@
-
-
- - -
-
- + {{#if showOwnership}} + + {{else}} + {{localize "DAGGERHEART.APPLICATIONS.OwnershipSelection.noPlayers"}} + {{/if}}