-
{{ componentProps.recipe.name }}
+
+
+
+
+
+
+
+ {{ componentProps.recipe.name }}
+
+
+
+
+ {{ badge }}
+
+
+
+ {{ keyword.label }}
+
+
+ {{ (componentProps.recipe.keywords?.length || 0) - 2 }} more
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ componentProps.recipe.description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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 @@
+
+
+
+
+
+
+ {{ props.recipe.createdBy }}
+
+ {{ props.recipe.name }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- by {{ props.recipe.createdBy }}
-
-
-
-
-
-
-
- {{ props.recipe.name }}
-
-
-
+
+
-
-
-
-
- {{ props.recipe.workingTime }} min
- Working Time
-
-
- {{ props.recipe.waitingTime }} min
- Waiting Time
-
-
-
-
-
-
{{ servings }}
-
{{ props.recipe.servingsText }}Servings
-
-
-
-
-
-
+
+
+
+
+
+
\ 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 @@
-
-
-
- {{ props.step.name }}Step {{ props.stepNumber }}
-
-
- {{ props.step.time }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ {{ props.step.name }}Step {{ props.stepNumber }}
+
+
+
+ {{ props.step.time }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
-
-
- Steps Overview
+
+
+
+ Ingredients Overview
-
- {{ i + 1 }}. {{ s.name }}
+
+ Step {{ i + 1 }} {{ s.name }}