layout fixes DeckList and subcomponents

This commit is contained in:
Jörn-Michael Miehe 2019-05-27 14:23:33 +02:00
parent 9b8393c779
commit 348b4b2702
3 changed files with 31 additions and 16 deletions

View file

@ -2,7 +2,7 @@
<v-expansion-panel-content> <v-expansion-panel-content>
<template v-slot:header> <template v-slot:header>
<v-layout align-center row> <v-layout align-center row>
<v-flex text-xs-center xs2> <v-flex text-xs-center xs4 sm3 md2>
<Crystal <Crystal
v-for="element in deck.elements()" v-for="element in deck.elements()"
:key="element.name" :key="element.name"
@ -10,7 +10,11 @@
/> />
</v-flex> </v-flex>
<v-flex class="subheading"> <v-flex class="subheading">
{{ deck.name }} <v-card flat>
<v-card-text>
{{ deck.name }}
</v-card-text>
</v-card>
</v-flex> </v-flex>
</v-layout> </v-layout>
</template> </template>
@ -54,8 +58,8 @@
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Are you sure you want to delete this deck? This cannot be Are you sure you want to delete your deck "{{ deck.name }}"?
undone. This cannot be undone.
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>

View file

@ -1,17 +1,18 @@
<template> <template>
<v-expansion-panel v-model="open"> <v-expansion-panel v-model="open">
<Deck
v-for="deck in linked"
:deck="deck"
:key="deck.id"
@change="refresh_decks"
/>
<NewDeck <NewDeck
@change=" @change="
open = null open = null
refresh_decks() refresh_decks()
" "
/> />
<Deck
v-for="deck in linked"
:deck="deck"
:key="deck.id"
@change="refresh_decks"
/>
</v-expansion-panel> </v-expansion-panel>
</template> </template>

View file

@ -1,14 +1,24 @@
<template> <template>
<v-expansion-panel-content> <v-expansion-panel-content>
<template v-slot:header> <template v-slot:header>
<span class="subheading">New Deck</span> <v-layout align-center row>
<v-flex text-xs-center xs4 sm3 md2>
<v-icon>view_carousel</v-icon>
<v-icon>add</v-icon>
</v-flex>
<v-flex class="subheading">
<v-card flat>
<v-card-text>
New Deck
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</template> </template>
<v-container> <v-card flat>
<v-card flat> <DeckEditor ref="editor" @save="save_deck" />
<DeckEditor ref="editor" @save="save_deck" /> </v-card>
</v-card>
</v-container>
</v-expansion-panel-content> </v-expansion-panel-content>
</template> </template>