diff --git a/src/components/EditRecipePage.vue b/src/components/EditRecipePage.vue index fc76054..60d2d67 100644 --- a/src/components/EditRecipePage.vue +++ b/src/components/EditRecipePage.vue @@ -36,7 +36,6 @@ input { border: 0; border-bottom: 1px solid #ccc; font-size: large; - margin: 1ex 1em; } input.recipe-link { diff --git a/src/components/IngredientAddBox.vue b/src/components/IngredientAddBox.vue index 8f613c2..6b8e3e6 100644 --- a/src/components/IngredientAddBox.vue +++ b/src/components/IngredientAddBox.vue @@ -20,28 +20,17 @@ export default { components: { IngredientLine }, data() { return { - ingredient: { - name: '', - quantity: '', - unit: '', - link: '' - }, + ingredient: {}, } }, methods: { addIngredient() { this.$emit('add-ingredient', this.ingredient); - this.ingredient = { - name: '', - quantity: '', - unit: '', - link: '' - }; + this.ingredient = {}; }, updateProduct(ingredient, product_link) { data.parseProduct(ingredient, product_link).then(product => { this.ingredient.product = product; - this.ingredient.product_link = product.link; }); }, updateIngredient(ingredient, line) { @@ -58,7 +47,7 @@ export default { .ingredient-add-box { display: flex; - flex-direction: row; + flex-direction: column; } .ingredient-line { diff --git a/src/components/IngredientLine.vue b/src/components/IngredientLine.vue index 4604c36..8f4d53a 100644 --- a/src/components/IngredientLine.vue +++ b/src/components/IngredientLine.vue @@ -1,46 +1,13 @@ - - - - - - - - - - - - - - - - - ▾ - - - - - - - Ingredient: {{ ingredient.name }} - Quantity: {{ ingredient.quantity }} - Unit: {{ ingredient.unit }} - Preparation: {{ ingredient.preparation }} - - - - Product: - {{ ingredient.product.name }} - - - - - - - - - + + + + + + + + @@ -57,7 +24,7 @@ export default { data() { return { ingredientText: this.ingredient.line, - productLink: this.ingredient.product?.link ?? "", + productLink: this.ingredient.product?.product_link ?? "", showDetails: this.showExpanded }; }, @@ -76,63 +43,7 @@ export default {
- - -
Ingredient: {{ ingredient.name }}
Quantity: {{ ingredient.quantity }}
Unit: {{ ingredient.unit }}
Preparation: {{ ingredient.preparation }}
- Product: - {{ ingredient.product.name }} - - -
+ + +