daggerheart/templates/sheets/rollTable/results.hbs
WBHarry a78ef1f70c
[Feature] RollTable Improvements (#1552)
* Initial - Branch Test

* reorganized path for better usage

* something to mess with

* registration things

* .

* root-template error

* pushing in for the day

* hook?

* help?

* .

* implementation initial

* updated comment

* overcomplicated it

* .

* Added Formula select to view mode

* .

* Prettied up roll-results template

* Removed SRD table descriptions

* Improved draw result description css

* Fallback for default dark dice

* .

---------

Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com>
2026-01-24 20:26:37 +01:00

55 lines
3 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
<table class="flexcol" data-results>
<thead>
<tr class="flexrow">
<th class="image flexrow">
<button class="inline-control icon fa-solid fa-plus" data-action="createResult"
data-tooltip aria-label="{{localize "TABLE.ACTIONS.CreateResult"}}"></button>
</th>
<th class="details flexrow">{{localize "TABLE_RESULT.Details"}}</th>
<th class="weight flexrow">{{localize "TABLE_RESULT.FIELDS.weight.label"}}</th>
<th class="range flexrow">{{localize "TABLE_RESULT.FIELDS.range.label"}}</th>
<th class="controls flexrow">
<button class="inline-control icon fa-solid fa-scale-balanced" data-action="normalizeResults"
data-tooltip aria-label="{{localize "TABLE.ACTIONS.NormalizeResults"}}"></button>
</th>
</tr>
</thead>
<tbody class="scrollable">
{{#each results as |result i|}}
<tr class="flexrow{{#if result.drawn}} drawn{{/if}}" data-result-id="{{result.id}}">
<td class="image flexrow">
<img src="{{result.displayImg}}" data-action="editImage" data-edit="results.{{i}}.img"
alt="{{localize "TABLE_RESULT.FIELDS.img.label"}}" loading="lazy">
</td>
<td class="details">
{{> "templates/sheets/roll-table/result-details.hbs" result=result}}
</td>
<td class="weight flexrow">
<input type="number" name="results.{{i}}.weight" value="{{result.weight}}" placeholder="1">
</td>
<td class="range flexrow">
<input type="number" name="results.{{i}}.range.0" value="{{result.range.[0]}}" placeholder="L">
<span class="dash"></span>
<input type="number" name="results.{{i}}.range.1" value="{{result.range.[1]}}" placeholder="H">
</td>
<td class="controls flexrow">
<button class="inline-control icon fa-solid fa-file-pen" data-action="openResultSheet"
data-tooltip aria-label="{{localize "TABLE.ACTIONS.OpenResultConfig"}}"></button>
<button class="inline-control icon fa-solid fa-lock{{#unless result.drawn}}-open{{/unless}}"
data-action="lockResult"
data-tooltip aria-label="{{localize "TABLE.ACTIONS.ToggleDrawn"}}"></button>
<button class="inline-control icon fa-solid fa-trash" data-action="deleteResult"
data-tooltip aria-label="{{localize "TABLE.ACTIONS.DeleteResult"}}"></button>
</td>
<input type="hidden" name="results.{{i}}._id" value="{{result.id}}">
</tr>
{{/each}}
</tbody>
</table>
</section>