diff --git a/frontend/src/components/Deck.vue b/frontend/src/components/Deck.vue
index bcfe57d..b3ee2de 100644
--- a/frontend/src/components/Deck.vue
+++ b/frontend/src/components/Deck.vue
@@ -30,7 +30,12 @@
-
+
diff --git a/frontend/src/components/forms/DeckEditor.vue b/frontend/src/components/forms/DeckEditor.vue
index 9c52ea6..bbdde6d 100644
--- a/frontend/src/components/forms/DeckEditor.vue
+++ b/frontend/src/components/forms/DeckEditor.vue
@@ -1,5 +1,5 @@
-
+
{{ count }} cards detected! (Decks should have exactly 50 cards)
@@ -12,7 +12,7 @@
({
@@ -62,7 +62,15 @@ export default {
}),
computed: {
- session: () => Cookies.get('session')
+ session: () => Cookies.get('session'),
+
+ new_deck() {
+ try {
+ return this.parse_deck(this.$refs.textarea)
+ } catch (e) {
+ return this.parse_deck(this.value)
+ }
+ }
},
methods: {
@@ -160,8 +168,7 @@ export default {
close() {
this.checked = false
-
- this.$emit('input', false)
+ this.$emit('close')
},
check() {
@@ -191,14 +198,11 @@ export default {
})
.then(response => {
if (response.data.success) {
+ this.$emit('change', new_deck)
this.close()
}
})
}
- },
-
- activated() {
- console.log('Frosch')
}
}