renamed components to match recommended naming
This commit is contained in:
parent
355f2d30a6
commit
0e55fe162c
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<keywords :recipe="recipe"></keywords>
|
<keywords-component :recipe="recipe"></keywords-component>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
@ -97,8 +97,8 @@
|
|||||||
<b v-bind:key="s.id">{{s.name}}</b>
|
<b v-bind:key="s.id">{{s.name}}</b>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="i in s.ingredients">
|
<template v-for="i in s.ingredients">
|
||||||
<Ingredient :ingredient="i" :ingredient_factor="ingredient_factor" :key="i.id"
|
<ingredient-component :ingredient="i" :ingredient_factor="ingredient_factor" :key="i.id"
|
||||||
@checked-state-changed="updateIngredientCheckedState"></Ingredient>
|
@checked-state-changed="updateIngredientCheckedState"></ingredient-component>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- eslint-enable vue/no-v-for-template-key-on-child -->
|
<!-- eslint-enable vue/no-v-for-template-key-on-child -->
|
||||||
@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<div class="row" style="margin-top: 2vh; margin-bottom: 2vh">
|
<div class="row" style="margin-top: 2vh; margin-bottom: 2vh">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<Nutrition :recipe="recipe" :ingredient_factor="ingredient_factor"></Nutrition>
|
<Nutrition-component :recipe="recipe" :ingredient_factor="ingredient_factor"></Nutrition-component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -140,8 +140,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<div v-for="(s, index) in recipe.steps" v-bind:key="s.id" style="margin-top: 1vh">
|
<div v-for="(s, index) in recipe.steps" v-bind:key="s.id" style="margin-top: 1vh">
|
||||||
<Step :recipe="recipe" :step="s" :ingredient_factor="ingredient_factor" :index="index" :start_time="start_time"
|
<step-component :recipe="recipe" :step="s" :ingredient_factor="ingredient_factor" :index="index" :start_time="start_time"
|
||||||
@update-start-time="updateStartTime" @checked-state-changed="updateIngredientCheckedState"></Step>
|
@update-start-time="updateStartTime" @checked-state-changed="updateIngredientCheckedState"></step-component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -164,21 +164,25 @@ import 'bootstrap-vue/dist/bootstrap-vue.css'
|
|||||||
|
|
||||||
import {apiLoadRecipe} from "@/utils/api";
|
import {apiLoadRecipe} from "@/utils/api";
|
||||||
|
|
||||||
import Step from "@/components/Step";
|
import Step from "@/components/StepComponent";
|
||||||
import RecipeContextMenu from "@/components/RecipeContextMenu";
|
import RecipeContextMenu from "@/components/RecipeContextMenu";
|
||||||
import {ResolveUrlMixin, ToastMixin} from "@/utils/utils";
|
import {ResolveUrlMixin, ToastMixin} from "@/utils/utils";
|
||||||
import Ingredient from "@/components/Ingredient";
|
import Ingredient from "@/components/IngredientComponent";
|
||||||
|
|
||||||
import PdfViewer from "@/components/PdfViewer";
|
import PdfViewer from "@/components/PdfViewer";
|
||||||
import ImageViewer from "@/components/ImageViewer";
|
import ImageViewer from "@/components/ImageViewer";
|
||||||
import Nutrition from "@/components/Nutrition";
|
import Nutrition from "@/components/NutritionComponent";
|
||||||
|
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import Keywords from "@/components/Keywords";
|
import Keywords from "@/components/KeywordsComponent";
|
||||||
import LoadingSpinner from "@/components/LoadingSpinner";
|
import LoadingSpinner from "@/components/LoadingSpinner";
|
||||||
import AddRecipeToBook from "@/components/AddRecipeToBook";
|
import AddRecipeToBook from "@/components/AddRecipeToBook";
|
||||||
import RecipeRating from "@/components/RecipeRating";
|
import RecipeRating from "@/components/RecipeRating";
|
||||||
import LastCooked from "@/components/LastCooked";
|
import LastCooked from "@/components/LastCooked";
|
||||||
|
import IngredientComponent from "@/components/IngredientComponent";
|
||||||
|
import StepComponent from "@/components/StepComponent";
|
||||||
|
import KeywordsComponent from "@/components/KeywordsComponent";
|
||||||
|
import NutritionComponent from "@/components/NutritionComponent";
|
||||||
|
|
||||||
Vue.prototype.moment = moment
|
Vue.prototype.moment = moment
|
||||||
|
|
||||||
@ -195,11 +199,11 @@ export default {
|
|||||||
RecipeRating,
|
RecipeRating,
|
||||||
PdfViewer,
|
PdfViewer,
|
||||||
ImageViewer,
|
ImageViewer,
|
||||||
Ingredient,
|
IngredientComponent,
|
||||||
Step,
|
StepComponent,
|
||||||
RecipeContextMenu,
|
RecipeContextMenu,
|
||||||
Nutrition,
|
NutritionComponent,
|
||||||
Keywords,
|
KeywordsComponent,
|
||||||
LoadingSpinner,
|
LoadingSpinner,
|
||||||
AddRecipeToBook,
|
AddRecipeToBook,
|
||||||
},
|
},
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
import {calculateAmount, ResolveUrlMixin} from "@/utils/utils";
|
import {calculateAmount, ResolveUrlMixin} from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Ingredient',
|
name: 'IngredientComponent',
|
||||||
props: {
|
props: {
|
||||||
ingredient: Object,
|
ingredient: Object,
|
||||||
ingredient_factor: {
|
ingredient_factor: {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Keywords',
|
name: 'KeywordsComponent',
|
||||||
props: {
|
props: {
|
||||||
recipe: Object,
|
recipe: Object,
|
||||||
},
|
},
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
import {calculateAmount, calculateEnergy, energyHeading} from "@/utils/utils";
|
import {calculateAmount, calculateEnergy, energyHeading} from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Nutrition',
|
name: 'NutritionComponent',
|
||||||
props: {
|
props: {
|
||||||
recipe: Object,
|
recipe: Object,
|
||||||
ingredient_factor: Number,
|
ingredient_factor: Number,
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<p class="mt-1">
|
<p class="mt-1">
|
||||||
<last-cooked :recipe="recipe"></last-cooked>
|
<last-cooked :recipe="recipe"></last-cooked>
|
||||||
<keywords :recipe="recipe" style="margin-top: 4px"></keywords>
|
<keywords-component :recipe="recipe" style="margin-top: 4px"></keywords-component>
|
||||||
</p>
|
</p>
|
||||||
<transition name="fade" mode="in-out">
|
<transition name="fade" mode="in-out">
|
||||||
<div class="row mt-3" v-if="detailed">
|
<div class="row mt-3" v-if="detailed">
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<!-- eslint-disable vue/no-v-for-template-key-on-child -->
|
<!-- eslint-disable vue/no-v-for-template-key-on-child -->
|
||||||
<template v-for="s in recipe.steps">
|
<template v-for="s in recipe.steps">
|
||||||
<template v-for="i in s.ingredients">
|
<template v-for="i in s.ingredients">
|
||||||
<Ingredient :detailed="false" :ingredient="i" :ingredient_factor="1" :key="i.id"></Ingredient>
|
<Ingredient-component :detailed="false" :ingredient="i" :ingredient_factor="1" :key="i.id"></Ingredient-component>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- eslint-enable vue/no-v-for-template-key-on-child -->
|
<!-- eslint-enable vue/no-v-for-template-key-on-child -->
|
||||||
@ -82,13 +82,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import RecipeContextMenu from "@/components/RecipeContextMenu";
|
import RecipeContextMenu from "@/components/RecipeContextMenu";
|
||||||
import Keywords from "@/components/Keywords";
|
|
||||||
import {resolveDjangoUrl, ResolveUrlMixin} from "@/utils/utils";
|
import {resolveDjangoUrl, ResolveUrlMixin} from "@/utils/utils";
|
||||||
import RecipeRating from "@/components/RecipeRating";
|
import RecipeRating from "@/components/RecipeRating";
|
||||||
import moment from "moment/moment";
|
import moment from "moment/moment";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import LastCooked from "@/components/LastCooked";
|
import LastCooked from "@/components/LastCooked";
|
||||||
import Ingredient from "./Ingredient";
|
import KeywordsComponent from "@/components/KeywordsComponent";
|
||||||
|
import IngredientComponent from "@/components/IngredientComponent";
|
||||||
|
|
||||||
Vue.prototype.moment = moment
|
Vue.prototype.moment = moment
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ export default {
|
|||||||
mixins: [
|
mixins: [
|
||||||
ResolveUrlMixin,
|
ResolveUrlMixin,
|
||||||
],
|
],
|
||||||
components: {LastCooked, RecipeRating, Keywords, RecipeContextMenu, Ingredient},
|
components: {LastCooked, RecipeRating, KeywordsComponent, RecipeContextMenu, IngredientComponent},
|
||||||
props: {
|
props: {
|
||||||
recipe: Object,
|
recipe: Object,
|
||||||
meal_plan: Object,
|
meal_plan: Object,
|
||||||
|
@ -169,7 +169,7 @@ import IngredientComponent from "@/components/IngredientComponent";
|
|||||||
Vue.prototype.moment = moment
|
Vue.prototype.moment = moment
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Step',
|
name: 'StepComponent',
|
||||||
mixins: [
|
mixins: [
|
||||||
GettextMixin,
|
GettextMixin,
|
||||||
ResolveUrlMixin,
|
ResolveUrlMixin,
|
||||||
|
Loading…
Reference in New Issue
Block a user