minor errata
This commit is contained in:
parent
f5425829dd
commit
9b8393c779
4 changed files with 66 additions and 57 deletions
|
@ -205,6 +205,7 @@ export default class {
|
|||
count: elements[element]
|
||||
})
|
||||
|
||||
retval = retval.filter(element => element.count > 0)
|
||||
retval.sort((element_l, element_r) => element_r.count - element_l.count)
|
||||
|
||||
return retval
|
||||
|
|
|
@ -15,66 +15,71 @@
|
|||
</v-layout>
|
||||
</template>
|
||||
|
||||
<v-alert v-if="!editing" :value="deck.note" type="info">
|
||||
{{ deck.note }}
|
||||
</v-alert>
|
||||
<template v-if="!editing">
|
||||
<v-alert :value="deck.note" type="info">
|
||||
{{ deck.note }}
|
||||
</v-alert>
|
||||
|
||||
<v-container v-if="!editing" style="position: relative" grid-list-md fluid>
|
||||
<v-layout row wrap>
|
||||
<v-flex v-for="part in deck.parts()" :key="part.heading" xs12 sm6 md4>
|
||||
<v-card>
|
||||
<v-card-title>{{ part.count }} {{ part.heading }}</v-card-title>
|
||||
<v-list dense subheader>
|
||||
<Card
|
||||
v-for="card in part.cards"
|
||||
:key="card.serial"
|
||||
:count="card.count"
|
||||
:serial="card.serial"
|
||||
:dbentry="card.dbentry"
|
||||
></Card>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-container style="position: relative" grid-list-md fluid>
|
||||
<v-layout row wrap>
|
||||
<v-flex v-for="part in deck.parts()" :key="part.heading" xs12 sm6 md4>
|
||||
<v-card>
|
||||
<v-card-title>{{ part.count }} {{ part.heading }}</v-card-title>
|
||||
<v-list dense subheader>
|
||||
<Card
|
||||
v-for="card in part.cards"
|
||||
:key="card.serial"
|
||||
:count="card.count"
|
||||
:serial="card.serial"
|
||||
:dbentry="card.dbentry"
|
||||
></Card>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
<v-btn fab absolute bottom right @click.native="editing = true">
|
||||
<v-icon>edit</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-dialog v-model="deleting" persistent>
|
||||
<v-btn fab absolute bottom left slot="activator">
|
||||
<v-icon>delete</v-icon>
|
||||
<v-btn fab absolute bottom right @click.native="editing = true">
|
||||
<v-icon>edit</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
Really delete this deck?
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Are you sure you want to delete this deck? This cannot be undone.
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn color="error" @click.native="deleting = false">
|
||||
Cancel
|
||||
<v-dialog v-model="deleting" persistent>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn fab absolute bottom left v-on="on">
|
||||
<v-icon>delete</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-btn
|
||||
color="success"
|
||||
@click.native="
|
||||
deleting = false
|
||||
delete_deck()
|
||||
"
|
||||
>
|
||||
Confirm
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
Really delete this deck?
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Are you sure you want to delete this deck? This cannot be
|
||||
undone.
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn color="error" @click.native="deleting = false">
|
||||
Cancel
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="success"
|
||||
@click.native="
|
||||
deleting = false
|
||||
delete_deck()
|
||||
"
|
||||
>
|
||||
Confirm
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<DeckEditor v-if="editing" :deck="deck" @save="save_deck">
|
||||
<v-btn color="error" @click.native="editing = false">
|
||||
|
|
|
@ -67,6 +67,7 @@ export default {
|
|||
result.push(deck)
|
||||
}
|
||||
|
||||
result.sort((deck_l, deck_r) => deck_l.name.localeCompare(deck_r.name))
|
||||
return result
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<template>
|
||||
<v-dialog v-model="dialog">
|
||||
<v-btn flat slot="activator">
|
||||
{{ buttonText }}
|
||||
</v-btn>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn flat v-on="on">
|
||||
{{ buttonText }}
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-card>
|
||||
<v-snackbar
|
||||
|
|
Reference in a new issue