mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 08:23:38 +02:00
Merge branch 'development' into feature/1383-Companion-Bonus-Levelups
This commit is contained in:
commit
2fcad0ff25
66 changed files with 1389 additions and 151 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<aside class="character-sidebar-sheet">
|
||||
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
{{#if document.system.class.subclass.system.spellcastingTrait}}
|
||||
{{#if document.system.spellcastModifierTrait.key}}
|
||||
<div class="icons-list">
|
||||
<span class="spellcast-icon {{#if isDeath}}no-label{{/if}}">
|
||||
<span class="spellcast-label">
|
||||
{{localize "DAGGERHEART.ITEMS.Subclass.spellcastingTrait"}}:
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.class.subclass.system.spellcastingTrait '.short')}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.spellcastModifierTrait.key '.short')}}
|
||||
</span>
|
||||
<i class="fa-solid fa-wand-sparkles"></i>
|
||||
</span>
|
||||
|
|
|
|||
20
templates/sheets/rollTable/header.hbs
Normal file
20
templates/sheets/rollTable/header.hbs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<header class="sheet-header img-name">
|
||||
<img src="{{source.img}}" data-action="editImage" data-edit="img" alt="{{localize "DOCUMENT.FIELDS.img.label"}}">
|
||||
|
||||
<input type="text" name="name" value="{{source.name}}" placeholder="{{localize "DOCUMENT.FIELDS.name.label"}}" aria-label="{{localize "DOCUMENT.FIELDS.name.label"}}">
|
||||
{{#if usesAltFormula}}
|
||||
<div class="form-group">
|
||||
<label>{{localize "Formula"}}</label>
|
||||
<div class="form-fields">
|
||||
<select class="system-update-field" data-path="activeAltFormula">
|
||||
{{selectOptions this.altFormulaOptions selected=this.activeAltFormula labelAttr="name"}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<button data-action="changeMode">
|
||||
<i class="fa-solid fa-eye" inert></i>
|
||||
<span>{{localize "TABLE.ACTIONS.ChangeMode.View"}}</span>
|
||||
</button>
|
||||
</header>
|
||||
55
templates/sheets/rollTable/results.hbs
Normal file
55
templates/sheets/rollTable/results.hbs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<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>
|
||||
49
templates/sheets/rollTable/sheet.hbs
Normal file
49
templates/sheets/rollTable/sheet.hbs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<header class="sheet-header flexrow">
|
||||
<img src="{{document.img}}" alt="{{localize "DOCUMENT.FIELDS.img.label"}}">
|
||||
<h1>{{document.name}}</h1>
|
||||
<div class="roll-table-view-formula-container">
|
||||
{{#if usesAltFormula}}
|
||||
<select class="system-update-field" data-path="activeAltFormula">
|
||||
{{selectOptions this.altFormulaOptions selected=this.activeAltFormula labelAttr="name"}}
|
||||
</select>
|
||||
{{/if}}
|
||||
<h4>{{selectedFormula}}</h4>
|
||||
</div>
|
||||
<button data-action="changeMode">
|
||||
<i class="fa-solid fa-pen" inert></i>
|
||||
<span>{{localize "TABLE.ACTIONS.ChangeMode.Edit"}}</span>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
{{{descriptionHTML}}}
|
||||
|
||||
<table class="flexcol" data-results>
|
||||
<thead>
|
||||
<tr class="flexrow">
|
||||
<th class="image flexrow"></th>
|
||||
<th class="range flexrow">{{localize "TABLE_RESULT.FIELDS.range.label"}}</th>
|
||||
<th class="details flexrow">{{localize "TABLE_RESULT.Details"}}</th>
|
||||
<th class="controls flexrow"></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">
|
||||
<img src="{{result.displayImg}}" alt="{{localize "TABLE_RESULT.FIELDS.img.label"}}" loading="lazy">
|
||||
</td>
|
||||
<td class="range">{{result.range}}</td>
|
||||
<td class="details">
|
||||
{{> "templates/sheets/roll-table/result-details.hbs" result=result}}
|
||||
</td>
|
||||
<td class="controls flexrow">
|
||||
<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-up-from-bracket" data-action="drawSpecificResult"
|
||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.DrawSpecificResult"}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
22
templates/sheets/rollTable/summary.hbs
Normal file
22
templates/sheets/rollTable/summary.hbs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
{{formGroup fields.description value=source.description rootId=rootId}}
|
||||
<fieldset class="formulas-section">
|
||||
<legend>{{localize "DAGGERHEART.ROLLTABLES.formula"}}</legend>
|
||||
|
||||
<div class="formulas-container">
|
||||
<span>{{localize "DAGGERHEART.ROLLTABLES.FIELDS.formulaName.label"}}</span>
|
||||
<span>{{localize "Formula Roll"}}</span>
|
||||
<span></span>
|
||||
<input type="text" value="{{@root.formulaName}}" class="system-update-field" data-path="formulaName" />
|
||||
{{formInput fields.formula value=source.formula placeholder=formulaPlaceholder rootId=rootId}}
|
||||
<button class="formula-button" data-action="addFormula"><i class="fa-solid fa-plus"></i></button>
|
||||
{{#each @root.altFormula as | formula key |}}
|
||||
<input type="text" value="{{formula.name}}" class="system-update-field" data-path="{{concat "altFormula." key ".name"}}" />
|
||||
<input type="text" value="{{formula.formula}}" class="system-update-field" data-path="{{concat "altFormula." key ".formula"}}" />
|
||||
<a class="formula-button" data-action="removeFormula" data-key="{{key}}"><i class="fa-solid fa-trash"></i></a>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{formGroup fields.replacement value=source.replacement rootId=rootId}}
|
||||
{{formGroup fields.displayRoll value=source.displayRoll rootId=rootId}}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue