From 9cb014888b84267546b3c3e22445be9946255918 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 22 Dec 2025 21:34:01 +0100 Subject: [PATCH] Removed the disabled default ownership select in the ownership view. Added a fallback text incase there are no players added yet --- lang/en.json | 1 + .../dialogs/ownershipSelection.mjs | 1 - .../ownership-selection.less | 4 +++ system.json | 2 +- templates/dialogs/ownershipSelection.hbs | 34 ++++++++----------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lang/en.json b/lang/en.json index 6e9a2489..e82d4629 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..3cba1b9a 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) => { 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..f098c9f5 100644 --- a/templates/dialogs/ownershipSelection.hbs +++ b/templates/dialogs/ownershipSelection.hbs @@ -1,23 +1,19 @@
-
-
- - -
-
- + {{#if ownership.length}} + + {{else}} + {{localize "DAGGERHEART.APPLICATIONS.OwnershipSelection.noPlayers"}} + {{/if}}