crude deck edit form

This commit is contained in:
Jörn-Michael Miehe 2019-05-16 08:10:03 +02:00
parent e028a7c714
commit 296ab79bd6

View file

@ -4,12 +4,12 @@
<span class="subheading">{{ deck.name }}</span> <span class="subheading">{{ deck.name }}</span>
</template> </template>
<v-alert :value="deck.note" type="info"> <v-alert v-if="!editing" :value="deck.note" type="info">
{{ deck.note }} {{ deck.note }}
</v-alert> </v-alert>
<v-container grid-list-md fluid> <v-container style="position: relative" grid-list-md fluid>
<v-layout row wrap> <v-layout v-if="!editing" row wrap>
<v-flex v-for="part in deck_parts" :key="part.heading" xs12 sm6 md4> <v-flex v-for="part in deck_parts" :key="part.heading" xs12 sm6 md4>
<v-card> <v-card>
<v-card-title>{{ part.count }} {{ part.heading }}</v-card-title> <v-card-title>{{ part.count }} {{ part.heading }}</v-card-title>
@ -24,7 +24,18 @@
</v-list> </v-list>
</v-card> </v-card>
</v-flex> </v-flex>
<v-btn fab absolute bottom right @click.native="editing = true">
<v-icon>edit</v-icon>
</v-btn>
</v-layout> </v-layout>
<v-form v-if="editing" lazy-validation>
<v-textarea
label="Edit Deck"
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
hint="Paste a deck list"
></v-textarea>
</v-form>
</v-container> </v-container>
</v-expansion-panel-content> </v-expansion-panel-content>
</template> </template>
@ -43,6 +54,10 @@ export default {
Card Card
}, },
data: () => ({
editing: false
}),
computed: { computed: {
deck_parts() { deck_parts() {
let retval = { let retval = {