Stopped spell list cards animating on prepare

This commit is contained in:
Stefan Zermatten
2022-12-03 12:17:20 +02:00
parent 0a2d4cf97b
commit c058f3eab4

View File

@@ -5,11 +5,21 @@
@toolbarclick="clickSpellList(model._id)" @toolbarclick="clickSpellList(model._id)"
> >
<template slot="toolbar"> <template slot="toolbar">
<v-toolbar-title> <v-toolbar-title
v-if="!preparingSpells"
>
{{ model.name }} {{ model.name }}
</v-toolbar-title> </v-toolbar-title>
<v-spacer v-if="!preparingSpells && preparedError" />
<v-toolbar-title
v-if="preparingSpells || preparedError"
:class="{'error--text' : preparedError}"
>
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared
</v-toolbar-title>
<v-spacer /> <v-spacer />
<v-menu <v-menu
v-if="!preparingSpells"
bottom bottom
left left
transition="slide-y-transition" transition="slide-y-transition"
@@ -33,22 +43,29 @@
/> />
</v-list> </v-list>
</v-menu> </v-menu>
</template> <v-btn
<v-expand-transition> v-else
<v-card-text icon
v-if="preparedError || preparingSpells" @click.stop="preparingSpells = false"
:class="{'error--text' : preparedError}"
class="pb-0"
> >
<div v-if="model.maxPrepared && model.maxPrepared.value"> <v-icon>mdi-check</v-icon>
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared </v-btn>
</div> </template>
<v-switch <!-- Disabled because it changes the height of the card
v-model="preparingSpells" <v-card-text
label="Change prepared spells" v-if="preparedError || preparingSpells"
/> :class="{'error--text' : preparedError}"
</v-card-text> class="pb-0"
</v-expand-transition> >
<div v-if="model.maxPrepared && model.maxPrepared.value">
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared
</div>
<v-switch
v-model="preparingSpells"
label="Change prepared spells"
/>
</v-card-text>
-->
<spell-list <spell-list
:spells="spells" :spells="spells"
:parent-ref="{id: model._id, collection: 'creatureProperties'}" :parent-ref="{id: model._id, collection: 'creatureProperties'}"