V10 compatibility with 0.7.0-alpha1 release

This commit is contained in:
Andrew 2022-08-23 21:23:59 -04:00
parent 107aec3244
commit e23893b6ca
12 changed files with 125 additions and 126 deletions

View file

@ -8,14 +8,14 @@
<input name="name" type="text" value="{{data.name}}" placeholder="Name" />
</h1>
<div class="resource">
<input type="number" name="data.health.value" value="{{systemData.health.value}}"/>
<input type="number" name="system.health.value" value="{{systemData.health.value}}"/>
<span> / </span>
<input type="number" name="data.health.max" value="{{systemData.health.max}}"/>
<input type="number" name="system.health.max" value="{{systemData.health.max}}"/>
</div>
<div class="resource">
<input type="number" name="data.power.value" value="{{systemData.power.value}}"/>
<input type="number" name="system.power.value" value="{{systemData.power.value}}"/>
<span> / </span>
<input type="number" name="data.power.max" value="{{systemData.power.max}}"/>
<input type="number" name="system.power.max" value="{{systemData.power.max}}"/>
</div>
</div>
</header>
@ -32,7 +32,7 @@
{{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
{{editor content=systemData.biography target="data.biography" button=true owner=owner editable=editable rollData=rollData}}
{{editor biographyHTML target="system.biography" button=true editable=editable engine="prosemirror"}}
</div>
{{!-- Owned Items Tab --}}
@ -44,7 +44,7 @@
<h4 class="item-name">{{item.name}}</h4>
{{!-- Iterate through all attributes on the item and output buttons for any that are formula. --}}
<div class="item-buttons">
{{#each item.data.attributes as |itemAttr key|}}
{{#each item.system.attributes as |itemAttr key|}}
{{#if itemAttr.dtype}}
{{#if itemAttr.isFormula}}
{{!-- Use the items.name.key format for shorthand. --}}
@ -112,4 +112,4 @@
</div>
</div>
</section>
</form>
</form>

View file

@ -7,11 +7,11 @@
</h1>
<div class="resource">
<label>Quantity</label>
<input type="number" name="data.quantity" value="{{systemData.quantity}}"/>
<input type="number" name="system.quantity" value="{{systemData.quantity}}"/>
</div>
<div class="resource">
<label>Weight</label>
<input type="number" name="data.weight" value="{{systemData.weight}}"/>
<input type="number" name="system.weight" value="{{systemData.weight}}"/>
</div>
</div>
</header>
@ -27,7 +27,7 @@
{{!-- Description Tab --}}
<div class="tab" data-group="primary" data-tab="description">
{{editor content=systemData.description target="data.description" button=true owner=owner editable=editable rollData=rollData}}
{{editor descriptionHTML target="system.description" button=true editable=editable engine="prosemirror"}}
</div>
{{!-- Attributes Tab --}}
@ -53,4 +53,4 @@
</div>
</div>
</section>
</form>
</form>

View file

@ -6,50 +6,50 @@
{{#if attr.isFormula}}
<a class="attribute-roll" data-label="{{attr.label}}" data-roll="{{attr.value}}"><i class="fas fa-dice-d20"></i></a>
{{/if}}
<input class="attribute-key" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.key" value="{{key}}" placeholder="{{localize "SIMPLE.AttributeKey"}}"/>
<input class="attribute-key" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.key" value="{{key}}" placeholder="{{localize "SIMPLE.AttributeKey"}}"/>
</div>
{{!-- Handle booleans. --}}
{{#if attr.isCheckbox}}
<label class="attribute-value checkbox"><input type="checkbox" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value"
<label class="attribute-value checkbox"><input type="checkbox" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value"
{{checked attr.value}} /></label>
{{else}}
{{!-- Handle resources. --}}
{{#if attr.isResource}}
<div class="attribute-group flexrow">
<span class="attribute-col flexcol">
<label for="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.min">{{localize "SIMPLE.ResourceMin"}}</label>
<input class="attribute-value" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.min" value="{{attr.min}}"
<label for="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.min">{{localize "SIMPLE.ResourceMin"}}</label>
<input class="attribute-value" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.min" value="{{attr.min}}"
data-dtype="Number" />
</span>
<span class="attribute-col flexcol">
<label for="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value">{{localize "SIMPLE.ResourceValue"}}</label>
<input class="attribute-value" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value"
<label for="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value">{{localize "SIMPLE.ResourceValue"}}</label>
<input class="attribute-value" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value"
value="{{attr.value}}" data-dtype="Number" />
</span>
<span class="attribute-col flexcol">
<label for="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.max">{{localize "SIMPLE.ResourceMax"}}</label>
<input class="attribute-value" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.max" value="{{attr.max}}"
<label for="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.max">{{localize "SIMPLE.ResourceMax"}}</label>
<input class="attribute-value" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.max" value="{{attr.max}}"
data-dtype="Number" />
</span>
</div>
{{!-- Handle other input types. --}}
{{else}}
<input class="attribute-value" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value" value="{{attr.value}}"
<input class="attribute-value" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.value" value="{{attr.value}}"
data-dtype="{{attr.dtype}}" placeholder="{{localize "SIMPLE.AttributeValue"}}"/>
{{/if}}
{{/if}}
<input class="attribute-label" type="text" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.label" value="{{attr.label}}"
<input class="attribute-label" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.label" value="{{attr.label}}"
placeholder="{{localize "SIMPLE.AttributeLabel"}}"/>
<select class="attribute-dtype" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.dtype">
<select class="attribute-dtype" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.dtype">
{{#select attr.dtype}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select>
<input type="hidden" name="data.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.group" value="{{attr.group}}" />
<input type="hidden" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.group" value="{{attr.group}}" />
<a class="attribute-control" data-action="delete"><i class="fas fa-trash"></i></a>
</li>
{{/each}}
</ol>
</section>
</section>

View file

@ -2,9 +2,9 @@
{{#each groups as |group groupKey|}}
<li class="group" data-group="{{groupKey}}">
<div class="group-header flexrow">
<input class="group-key" type="text" readonly name="data.groups.{{groupKey}}.key" value="{{groupKey}}" />
<input class="group-label" type="text" name="data.groups.{{groupKey}}.label" value="{{group.label}}" placeholder="Group Label" />
<select class="group-dtype" name="data.groups.{{groupKey}}.dtype">
<input class="group-key" type="text" readonly name="system.groups.{{groupKey}}.key" value="{{groupKey}}" />
<input class="group-label" type="text" name="system.groups.{{groupKey}}.label" value="{{group.label}}" placeholder="Group Label" />
<select class="group-dtype" name="system.groups.{{groupKey}}.dtype">
{{#select group.dtype}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
@ -18,4 +18,4 @@
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=group.attributes group=groupKey dtypes=../dtypes}}
</li>
{{/each}}
</ol>
</ol>