mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 07:38:26 -05:00
improved sub recipe rendering
This commit is contained in:
@@ -35,11 +35,11 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
<template v-if="step.stepRecipe">
|
<template v-if="step.stepRecipe">
|
||||||
<v-card-text>
|
<v-card class="ma-2 border-md" prepend-icon="$recipes" :title="step.stepRecipeData.name">
|
||||||
<v-card class="mt-1" v-for="(subRecipeStep, subRecipeStepIndex) in step.stepRecipeData.steps" :key="subRecipeStep.id">
|
<v-card-text class="mt-1" v-for="(subRecipeStep, subRecipeStepIndex) in step.stepRecipeData.steps" :key="subRecipeStep.id">
|
||||||
<step-view v-model="step.stepRecipeData.steps[subRecipeStepIndex]" :step-number="subRecipeStepIndex+1" :ingredientFactor="ingredientFactor"></step-view>
|
<step-view v-model="step.stepRecipeData.steps[subRecipeStepIndex]" :step-number="subRecipeStepIndex+1" :ingredientFactor="ingredientFactor"></step-view>
|
||||||
</v-card>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="step.file">
|
<template v-if="step.file">
|
||||||
<v-img :src="step.file.preview" v-if="step.file.preview"></v-img>
|
<v-img :src="step.file.preview" v-if="step.file.preview"></v-img>
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
<v-col class="pa-1" cols="12" md="6">
|
<v-col class="pa-1" cols="12" md="6">
|
||||||
<b v-if="s.showAsHeader">{{ i + 1 }}. {{ s.name }} </b>
|
<b v-if="s.showAsHeader">{{ i + 1 }}. {{ s.name }} </b>
|
||||||
<ingredients-table v-model="s.ingredients" :ingredient-factor="props.ingredientFactor"></ingredients-table>
|
<ingredients-table v-model="s.ingredients" :ingredient-factor="props.ingredientFactor"></ingredients-table>
|
||||||
|
|
||||||
|
<template v-if="s.stepRecipe">
|
||||||
|
<v-card class="ma-2 border-md" prepend-icon="$recipes" :title="s.stepRecipeData.name"
|
||||||
|
:to="{name: 'RecipeViewPage', params: {id: s.stepRecipeData.id}}" target="_blank">
|
||||||
|
<v-row v-for="subRecipeStep in s.stepRecipeData.steps">
|
||||||
|
<v-col>
|
||||||
|
<ingredients-table v-model="subRecipeStep.ingredients" :ingredient-factor="props.ingredientFactor"></ingredients-table>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
@@ -22,6 +33,7 @@
|
|||||||
import {PropType} from 'vue'
|
import {PropType} from 'vue'
|
||||||
import {Step} from "@/openapi";
|
import {Step} from "@/openapi";
|
||||||
import IngredientsTable from "@/components/display/IngredientsTable.vue";
|
import IngredientsTable from "@/components/display/IngredientsTable.vue";
|
||||||
|
import StepView from "@/components/display/StepView.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
steps: {
|
steps: {
|
||||||
|
|||||||
Reference in New Issue
Block a user