diff --git a/vue3/src/components/display/IngredientsInline.vue b/vue3/src/components/display/IngredientsInline.vue new file mode 100644 index 0000000000..30318d82ac --- /dev/null +++ b/vue3/src/components/display/IngredientsInline.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/vue3/src/components/display/RecipeCard.vue b/vue3/src/components/display/RecipeCard.vue index 30939e366b..7fc6f7abba 100644 --- a/vue3/src/components/display/RecipeCard.vue +++ b/vue3/src/components/display/RecipeCard.vue @@ -1,62 +1,71 @@ @@ -69,32 +78,47 @@ import RecipeContextMenu from "@/components/inputs/RecipeContextMenu.vue"; import RecipeImage from "@/components/display/RecipeImage.vue"; const componentProps = defineProps({ - recipe: {type: {} as PropType, required: true,}, - loading: {type: Boolean, required: false}, - show_keywords: {type: Boolean, required: false}, - show_description: {type: Boolean, required: false}, - height: {type: String, required: false, default: '25vh'}, + recipe: {type: {} as PropType, required: true,}, + loading: {type: Boolean, required: false}, + show_keywords: {type: Boolean, required: false}, + show_description: {type: Boolean, required: false}, + height: {type: String, required: false, default: '25vh'}, + info_badges: {type: Array as PropType, required: false, default: () => ['serves', 'time']} }) +// Can add more.. +type infoBadgeProperties = 'serves' | 'time' + +const generateInfoBadges = (recipe: Recipe | RecipeOverview, properties: infoBadgeProperties[]) => { + const badges = { + 'serves': `Serves ${recipe.servings}`, + 'time': `Ready in ${(recipe.waitingTime || 0) + (recipe.workingTime || 0)} min`, + } + + return properties.map((property) => { + return badges[property] + }) +} + \ No newline at end of file diff --git a/vue3/src/components/display/RecipeView.vue b/vue3/src/components/display/RecipeView.vue index 61450fcbce..9d95a5b0c6 100644 --- a/vue3/src/components/display/RecipeView.vue +++ b/vue3/src/components/display/RecipeView.vue @@ -1,100 +1,218 @@ \ No newline at end of file diff --git a/vue3/src/components/display/Step.vue b/vue3/src/components/display/Step.vue index 206d05472d..402ead7654 100644 --- a/vue3/src/components/display/Step.vue +++ b/vue3/src/components/display/Step.vue @@ -1,27 +1,33 @@ diff --git a/vue3/src/components/display/StepsOverview.vue b/vue3/src/components/display/StepsOverview.vue index 8565fdec68..48a142b4ef 100644 --- a/vue3/src/components/display/StepsOverview.vue +++ b/vue3/src/components/display/StepsOverview.vue @@ -1,12 +1,13 @@