Update to allow for local storage and signify reserve or cantrip magic
This commit is contained in:
parent
776669c659
commit
b3dbdd3280
@ -62,7 +62,7 @@ export class Place extends LitElement {
|
|||||||
<div @click="${this.addSpell}">
|
<div @click="${this.addSpell}">
|
||||||
<h3>${this.location}</h3>
|
<h3>${this.location}</h3>
|
||||||
<div class="place-spells">
|
<div class="place-spells">
|
||||||
${this.spells.sort(spellSort).map(spell => spell ? html`<dd-spell .spellRemover="${(name: string) => this.removeSpell(name)}" name="${spell.name}" cost=${spell.cost} color="${spell.color}" category="${spell.category}" cantripMagic="${spell.cantripMagic}" reserveMagic="${spell.reserveMagic}" description="${spell.description}"></dd-spell>` : '')}
|
${this.spells.sort(spellSort).map(spell => spell ? html`<dd-spell .spellRemover="${(name: string) => this.removeSpell(name)}" name="${spell.name}" cost=${spell.cost} color="${spell.color}" category="${spell.category}" ?cantripMagic="${spell.cantripMagic ?? false}" ?reserveMagic="${spell.reserveMagic ?? false}" description="${spell.description}"></dd-spell>` : '')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -28,4 +28,4 @@ export const spellSort = (a: Spell, b: Spell) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return compareValue;
|
return compareValue;
|
||||||
}
|
};
|
||||||
|
@ -10,8 +10,8 @@ export class SpellCard extends LitElement {
|
|||||||
color: string = '';
|
color: string = '';
|
||||||
category: string = '';
|
category: string = '';
|
||||||
description: string = '';
|
description: string = '';
|
||||||
cantripMagic: boolean | null = false;
|
cantripMagic: boolean = false;
|
||||||
reserveMagic: boolean | null = false;
|
reserveMagic: boolean = false;
|
||||||
@property() spellRemover: any = null;
|
@property() spellRemover: any = null;
|
||||||
@property() selectSpell: any = null;
|
@property() selectSpell: any = null;
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ export class SpellList extends LitElement {
|
|||||||
<h2 style="text-align: center;">Spells</h2>
|
<h2 style="text-align: center;">Spells</h2>
|
||||||
<input type="text" @keyup="${(event: any) => this.filterText(event)}" />
|
<input type="text" @keyup="${(event: any) => this.filterText(event)}" />
|
||||||
<div class="spells">
|
<div class="spells">
|
||||||
${this.filteredSpells.sort(spellSort).map(spell => html`<dd-spell name="${spell.name}" cost=${spell.cost} color="${spell.color}" category="${spell.category}" cantripMagic="${spell.cantripMagic}" reserveMagic="${spell.reserveMagic}" description="${spell.description}" .selectSpell="${() => this.selectASpell(spell)}"></dd-spell>`)}
|
${this.filteredSpells.sort(spellSort).map(spell => html`<dd-spell name="${spell.name}" cost=${spell.cost} color="${spell.color}" category="${spell.category}" ?cantripMagic="${spell.cantripMagic ?? false}" ?reserveMagic="${spell.reserveMagic ?? false}" description="${spell.description}" .selectSpell="${() => this.selectASpell(spell)}"></dd-spell>`)}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user