69 lines
2.0 KiB
HTML
69 lines
2.0 KiB
HTML
<template name="spellLibraryDialog">
|
|
<div class="fit spell-library-dialog layout vertical">
|
|
<app-toolbar class="app-grey white-text">
|
|
<paper-icon-button id="backButton"
|
|
icon="arrow-back">
|
|
</paper-icon-button>
|
|
<div main-title>Spells</div>
|
|
<paper-input label="Search" class="search-input">
|
|
<iron-icon icon="search" prefix></iron-icon>
|
|
</paper-input>
|
|
</app-toolbar>
|
|
<div class="flex scroll-y">
|
|
<div class="spells" style="padding:8px">
|
|
{{#if searchTerm}}
|
|
{{#if searchSpells.count}}
|
|
<table style="width: 100%">
|
|
<tbody>
|
|
{{#each spell in searchSpells}}
|
|
{{>librarySpell spell=spell selected=(isSelected spell)}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}{{#if searchReady}}
|
|
No spells match "{{searchTerm}}"
|
|
{{/if}}{{/if}}
|
|
{{#unless searchReady}}
|
|
<div class="layout vertical center" style="width: 100%; padding: 16px;">
|
|
<paper-spinner active></paper-spinner>
|
|
</div>
|
|
{{/unless}}
|
|
{{else}}
|
|
{{#each categories}}
|
|
<div class="paper-font-body2 category-header clickable">
|
|
<iron-icon icon="chevron-right" class="{{#if isOpen key}}open{{/if}}">
|
|
</iron-icon>
|
|
{{name}}
|
|
</div>
|
|
<iron-collapse opened={{isOpen key}}>
|
|
<table style="width: 100%">
|
|
<tbody>
|
|
{{#each spell in (spellsInCategory key)}}
|
|
{{>librarySpell spell=spell selected=(isSelected spell)}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{#unless ready key}}
|
|
<paper-spinner active></paper-spinner>
|
|
{{/unless}}
|
|
</iron-collapse>
|
|
{{/each}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
<div class="layout horizontal end-justified">
|
|
<paper-button class="cancelButton">Cancel</paper-button>
|
|
<paper-button class="okButton">OK</paper-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<template name="librarySpell">
|
|
<tr class="spell library-spell {{#if selected}}selected{{/if}}">
|
|
<td class="spellName">
|
|
{{spell.name}}
|
|
<paper-ripple></paper-ripple>
|
|
</td>
|
|
</tr>
|
|
</template>
|