Fixed automatic battleToggles

This commit is contained in:
WBHarry 2025-11-29 15:25:47 +01:00
parent e32454b7c7
commit d7bbc9e650
10 changed files with 201 additions and 21 deletions

View file

@ -7,7 +7,7 @@
{{#if grouping.nr}}
<label>{{key}} BP: {{concat (localize grouping.description) ' ' '('grouping.nr 'x)'}}</label>
{{else}}
<label class="unselected-grouping">{{key}}BP - {{localize grouping.description}}</label>
<label class="unselected-grouping">{{key}} BP - {{localize grouping.description}}</label>
{{/if}}
</div>
{{/each}}
@ -16,8 +16,12 @@
<div class="battlepoint-toggles-container">
<h3>{{localize "Modifiers"}}</h3>
{{#each toggles as |toggle|}}
<div class="battlepoint-toggle-container">
<input type="checkbox" data-combat-id="{{@root.combatId}}" data-category="{{toggle.categoryKey}}" data-grouping="{{toggle.toggleKey}}" {{checked toggle.checked}} />
<div class="battlepoint-toggle-container {{#if (and toggle.disabled (not toggle.checked))}}inactive{{/if}}">
{{#if toggle.disabled}}
<i class="grouping-lock fa-solid {{#if toggle.checked}}fa-lock{{else}}fa-unlock{{/if}}"></i>
{{else}}
<input type="checkbox" data-combat-id="{{@root.combatId}}" data-category="{{toggle.categoryKey}}" data-grouping="{{toggle.toggleKey}}" {{checked toggle.checked}} />
{{/if}}
<label class="unselected-grouping">{{toggle.categoryKey}} BP: {{localize toggle.description}}</label>
</div>
{{/each}}