Hide the "% used" indicator when there is no maximum capacity, and add a placeholder to be more explicit for the input
This commit is contained in:
parent
e4e1f30fcb
commit
f05311d7c8
4 changed files with 15 additions and 6 deletions
|
|
@ -87,6 +87,7 @@
|
||||||
"max-value": "Maximum value",
|
"max-value": "Maximum value",
|
||||||
"carry-capacity-used": "({percent}% Used)",
|
"carry-capacity-used": "({percent}% Used)",
|
||||||
"carrying-capacity": {
|
"carrying-capacity": {
|
||||||
|
"placeholder": "Unlimited",
|
||||||
"title": "Carrying Capacity:",
|
"title": "Carrying Capacity:",
|
||||||
"label": "Maximum carrying weight"
|
"label": "Maximum carrying weight"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,7 @@ export class PlayerSheet extends
|
||||||
};
|
};
|
||||||
|
|
||||||
ctx.totalWeight = config.weightFormatter(totalWeight);
|
ctx.totalWeight = config.weightFormatter(totalWeight);
|
||||||
|
ctx.hasCarryingCapacity = this.actor.system.carryCapacity != null;
|
||||||
ctx.carryCapacityPercent = Math.round(totalWeight / this.actor.system.carryCapacity * 100);
|
ctx.carryCapacityPercent = Math.round(totalWeight / this.actor.system.carryCapacity * 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
.taf > .window-content input {
|
.taf > .window-content input {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
|
&::placeholder {
|
||||||
|
color: color-mix(in srgb, currentColor 40%, transparent 60%);
|
||||||
|
}
|
||||||
|
|
||||||
&.large {
|
&.large {
|
||||||
--input-height: 2.5rem;
|
--input-height: 2.5rem;
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,14 @@
|
||||||
<h3 class="grow">
|
<h3 class="grow">
|
||||||
{{localize "taf.Apps.PlayerSheet.carrying-capacity.title"}}
|
{{localize "taf.Apps.PlayerSheet.carrying-capacity.title"}}
|
||||||
</h3>
|
</h3>
|
||||||
|
{{#if hasCarryCapacity}}
|
||||||
<div>
|
<div>
|
||||||
{{localize
|
{{localize
|
||||||
"taf.Apps.PlayerSheet.carry-capacity-used"
|
"taf.Apps.PlayerSheet.carry-capacity-used"
|
||||||
percent=carryCapacityPercent
|
percent=carryCapacityPercent
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="{{totalWeight}}"
|
value="{{totalWeight}}"
|
||||||
|
|
@ -28,6 +30,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
name="system.carryCapacity"
|
name="system.carryCapacity"
|
||||||
value="{{system.carryCapacity}}"
|
value="{{system.carryCapacity}}"
|
||||||
|
placeholder="{{localize "taf.Apps.PlayerSheet.carrying-capacity.placeholder"}}"
|
||||||
aria-label="{{localize "taf.Apps.PlayerSheet.carrying-capacity.label"}}"
|
aria-label="{{localize "taf.Apps.PlayerSheet.carrying-capacity.label"}}"
|
||||||
data-tooltip
|
data-tooltip
|
||||||
data-tooltip-direction="UP"
|
data-tooltip-direction="UP"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue