mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Removed the disabled default ownership select in the ownership view. Added a fallback text incase there are no players added yet
This commit is contained in:
parent
51eadc499f
commit
9cb014888b
5 changed files with 21 additions and 21 deletions
|
|
@ -586,6 +586,7 @@
|
|||
},
|
||||
"OwnershipSelection": {
|
||||
"title": "Ownership Selection - {name}",
|
||||
"noPlayers": "No players to assign ownership to",
|
||||
"default": "Default Ownership"
|
||||
},
|
||||
"ReactionRoll": {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 10px;
|
||||
button {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -1,23 +1,19 @@
|
|||
<div class="ownership-outer-container">
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label>{{localize "DAGGERHEART.APPLICATIONS.OwnershipSelection.default"}}</label>
|
||||
<select name="default" data-dtype="Number" disabled>
|
||||
{{selectOptions ownershipDefaultOptions selected=defaultOwnership labelAttr="label" valueAttr="value" localize=true }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="ownership-list">
|
||||
{{#each ownership as |player id|}}
|
||||
<li class="ownership-container">
|
||||
<img src="{{player.img}}" />
|
||||
<span>{{player.name}}</span>
|
||||
<select name="{{concat "ownership." id}}" data-dtype="Number">
|
||||
{{selectOptions @root.ownershipOptions selected=player.ownership labelAttr="label" valueAttr="value" localize=true }}
|
||||
</select>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{#if ownership.length}}
|
||||
<ul class="ownership-list">
|
||||
{{#each ownership as |player id|}}
|
||||
<li class="ownership-container">
|
||||
<img src="{{player.img}}" />
|
||||
<span>{{player.name}}</span>
|
||||
<select name="{{concat "ownership." id}}" data-dtype="Number">
|
||||
{{selectOptions @root.ownershipOptions selected=player.ownership labelAttr="label" valueAttr="value" localize=true }}
|
||||
</select>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.OwnershipSelection.noPlayers"}}</span>
|
||||
{{/if}}
|
||||
<footer class="flexrow">
|
||||
<button type="submit">{{localize "Save"}}</button>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue