Skip to content

Commit

Permalink
feat: Show recipe tags on mobile view and meal plan (#3864)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
  • Loading branch information
AverageMarcus authored Jul 10, 2024
1 parent 1fd2eb3 commit 6e680c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/components/Domain/Recipe/RecipeCardMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<v-list-item-subtitle>
<SafeMarkdown :source="description" />
</v-list-item-subtitle>
<div class="d-flex flex-wrap justify-start">
<RecipeChips :truncate="true" :items="tags" :title="false" :limit="2" :small="true" url-prefix="tags" />
</div>
<div class="d-flex flex-wrap justify-end align-center">
<slot name="actions">
<RecipeFavoriteBadge v-if="isOwnGroup && showRecipeContent" :recipe-id="recipeId" show-always />
Expand Down Expand Up @@ -83,6 +86,7 @@ import RecipeFavoriteBadge from "./RecipeFavoriteBadge.vue";
import RecipeContextMenu from "./RecipeContextMenu.vue";
import RecipeCardImage from "./RecipeCardImage.vue";
import RecipeRating from "./RecipeRating.vue";
import RecipeChips from "./RecipeChips.vue";
import { useLoggedInState } from "~/composables/use-logged-in-state";
export default defineComponent({
Expand All @@ -91,6 +95,7 @@ export default defineComponent({
RecipeContextMenu,
RecipeRating,
RecipeCardImage,
RecipeChips,
},
props: {
name: {
Expand All @@ -114,6 +119,10 @@ export default defineComponent({
required: false,
default: "abc123",
},
tags: {
type: Array,
default: () => [],
},
recipeId: {
type: String,
required: true,
Expand Down
1 change: 1 addition & 0 deletions frontend/pages/group/mealplan/planner/view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:slug="mealplan.recipe ? mealplan.recipe.slug : mealplan.title"
:description="mealplan.recipe ? mealplan.recipe.description : mealplan.text"
:name="mealplan.recipe ? mealplan.recipe.name : mealplan.title"
:tags="mealplan.recipe ? mealplan.recipe.tags : []"
/>
</div>
</v-col>
Expand Down

0 comments on commit 6e680c9

Please sign in to comment.