From 082a656210a8d37b9ce091fd68ff1d4f6f26e322 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 13 Jan 2021 19:40:39 +0100 Subject: [PATCH] Revert "refactored ingredient components" This reverts commit 9f51b9fd16df35396f729db97728fed45afb69ed. --- vue/src/apps/RecipeView/RecipeView.vue | 10 ++++-- .../{IngredientRow.vue => Ingredient.vue} | 4 +-- vue/src/components/Ingredients.vue | 31 ------------------- vue/src/components/Step.vue | 12 +++++-- vue/webpack-stats.json | 2 +- 5 files changed, 19 insertions(+), 40 deletions(-) rename vue/src/components/{IngredientRow.vue => Ingredient.vue} (94%) delete mode 100644 vue/src/components/Ingredients.vue diff --git a/vue/src/apps/RecipeView/RecipeView.vue b/vue/src/apps/RecipeView/RecipeView.vue index 381a624e8..e72b3005a 100644 --- a/vue/src/apps/RecipeView/RecipeView.vue +++ b/vue/src/apps/RecipeView/RecipeView.vue @@ -81,11 +81,15 @@
+ +
@@ -139,7 +143,7 @@ import {apiLoadRecipe} from "@/utils/api"; import Step from "@/components/Step"; import RecipeContextMenu from "@/components/RecipeContextMenu"; import {GettextMixin, ToastMixin} from "@/utils/utils"; -import Ingredients from "@/components/Ingredients"; +import Ingredient from "@/components/Ingredient"; import PdfViewer from "@/components/PdfViewer"; import ImageViewer from "@/components/ImageViewer"; @@ -160,7 +164,7 @@ export default { components: { PdfViewer, ImageViewer, - Ingredients, + Ingredient, Step, RecipeContextMenu, Nutrition, diff --git a/vue/src/components/IngredientRow.vue b/vue/src/components/Ingredient.vue similarity index 94% rename from vue/src/components/IngredientRow.vue rename to vue/src/components/Ingredient.vue index a7b2239ad..cdafcbf5f 100644 --- a/vue/src/components/IngredientRow.vue +++ b/vue/src/components/Ingredient.vue @@ -3,7 +3,7 @@ - + {{ calculateAmount(ingredient.amount) }} @@ -31,7 +31,7 @@ import {calculateAmount} from "@/utils/utils"; export default { - name: 'IngredientRow', + name: 'Ingredient', props: { ingredient: Object, servings: { diff --git a/vue/src/components/Ingredients.vue b/vue/src/components/Ingredients.vue deleted file mode 100644 index d9bfe1e9d..000000000 --- a/vue/src/components/Ingredients.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/vue/src/components/Step.vue b/vue/src/components/Step.vue index 23382edc5..66b5bc7b2 100644 --- a/vue/src/components/Step.vue +++ b/vue/src/components/Step.vue @@ -31,7 +31,13 @@
- + + + + +
@@ -108,12 +114,12 @@ import {calculateAmount} from "@/utils/utils"; +import Ingredient from "@/components/Ingredient"; import {GettextMixin} from "@/utils/utils"; import CompileComponent from "@/components/CompileComponent"; import Vue from "vue"; import moment from "moment"; -import Ingredients from "@/components/Ingredients"; Vue.prototype.moment = moment @@ -123,7 +129,7 @@ export default { GettextMixin, ], components: { - Ingredients, + Ingredient, CompileComponent, }, props: { diff --git a/vue/webpack-stats.json b/vue/webpack-stats.json index 1df9b2067..40ac4d359 100644 --- a/vue/webpack-stats.json +++ b/vue/webpack-stats.json @@ -1 +1 @@ -{"status":"done","publicPath":"http://localhost:8080/","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","publicPath":"http://localhost:8080/js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"recipe_view":[{"name":"js/recipe_view.js","publicPath":"http://localhost:8080/js/recipe_view.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\recipe_view.js"},{"name":"recipe_view.e0742691919ff3fcce04.hot-update.js","publicPath":"http://localhost:8080/recipe_view.e0742691919ff3fcce04.hot-update.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\recipe_view.e0742691919ff3fcce04.hot-update.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):\n(Emitted value instead of an instance of Error) \n\n Errors compiling template:\n\n text \"Test\" outside root element will be ignored.\n\n 7 | \n 8 | \n 9 | \n | \n 10 | Test\n | ^^^^\n 11 | \n | \n"} \ No newline at end of file +{"status":"done","publicPath":"http://localhost:8080/","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","publicPath":"http://localhost:8080/js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"recipe_view":[{"name":"js/recipe_view.js","publicPath":"http://localhost:8080/js/recipe_view.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\recipe_view.js"},{"name":"recipe_view.fab07d3cd83db7e32016.hot-update.js","publicPath":"http://localhost:8080/recipe_view.fab07d3cd83db7e32016.hot-update.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\recipe_view.fab07d3cd83db7e32016.hot-update.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/eslint-loader/index.js):\n\nF:\\Developement\\Django\\recipes\\vue\\src\\components\\Step.vue\n 79:9 error '.sync' modifier on 'v-bind' directive is deprecated. Use 'v-model:propName' instead vue/no-deprecated-v-bind-sync\n\n✖ 1 problem (1 error, 0 warnings)\n 1 error and 0 warnings potentially fixable with the `--fix` option.\n"} \ No newline at end of file