77 lines
2.5 KiB
HTML
77 lines
2.5 KiB
HTML
<template name="featureDialog">
|
|
{{#with feature}}
|
|
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
|
{{> featureDetails}}
|
|
{{else}}
|
|
{{> featureEdit}}
|
|
{{/baseDialog}}
|
|
{{/with}}
|
|
</template>
|
|
|
|
<template name="featureDetails">
|
|
{{#if or canEnable hasUses}}
|
|
<div class="layout horizontal center justified wrap">
|
|
{{#if canEnable}}
|
|
<paper-checkbox class="sideMargin" checked={{enabled}}>enabled</paper-checkbox>
|
|
{{/if}}
|
|
{{#if hasUses}}
|
|
<div class="subhead" style="margin-right: 16px">
|
|
Uses: {{usesLeft}}/{{usesValue}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if hasUses}}
|
|
<div class="layout horizontal">
|
|
<paper-button class="useFeature" disabled={{noUsesLeft}}>Use</paper-button>
|
|
<paper-button class="resetFeature" disabled={{usesFull}}>Reset</paper-button>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<hr class="vertMargin">
|
|
{{/if}}
|
|
|
|
{{#if description}}
|
|
<div>{{#markdown}}{{evaluateString charId description}}{{/markdown}}</div>
|
|
{{/if}}
|
|
|
|
{{> effectsViewList charId=charId parentId=_id}}
|
|
{{> proficiencyViewList charId=charId parentId=_id}}
|
|
</template>
|
|
|
|
<template name="featureEdit">
|
|
<!--name-->
|
|
<paper-input id="featureNameInput" class="fullwidth" label="Name" value={{name}}></paper-input>
|
|
|
|
<div class="layout horizontal center wrap justified">
|
|
<paper-dropdown-menu class=flex label="Enable Feature" style="flex-basis: 150px; max-width: 200px;">
|
|
<dicecloud-selector selected={{enabledSelection}} class="dropdown-content enabled-dropdown">
|
|
<paper-item name="alwaysEnabled" style="width: 150px;">
|
|
Always Enabled
|
|
</paper-item>
|
|
<paper-item name="enabled">
|
|
Enabled
|
|
</paper-item>
|
|
<paper-item name="disabled">
|
|
Disabled
|
|
</paper-item>
|
|
</dicecloud-selector>
|
|
</paper-dropdown-menu>
|
|
<paper-toggle-button id="limitUseCheck" checked={{usesSet}} style="margin: 0 16px; height: 62px;">
|
|
Limit uses
|
|
</paper-toggle-button>
|
|
{{#if usesSet}}
|
|
<paper-input id="usesInput" class="flex" label="Uses" value={{uses}} style="flex-basis: 100px; max-width: 200px">
|
|
{{> formulaSuffix}}
|
|
</paper-input>
|
|
{{else}}
|
|
<div class="flex" style="flex-basis: 100px; max-width: 200px"></div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<!--description-->
|
|
<paper-textarea label="Description" id="featureDescriptionInput" value={{description}}></paper-textarea>
|
|
|
|
{{> effectsEditList parentId=_id parentCollection="Features" charId=charId name=name enabled=enabled}}
|
|
{{> proficiencyEditList parentId=_id parentCollection="Features" charId=charId enabled=enabled}}
|
|
</template>
|