feat: German translations for TheMealDB recipes + recipe detail view
- Add GermanTranslator service with 200+ ingredient and meal name mappings - Translate titles and ingredients when fetching from TheMealDB - Add click-to-view recipe detail modal on week plan meal cards - Import RecipeDetail component in WeekPlanView Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Image -->
|
||||
<div class="relative w-full h-40 bg-zinc-800 overflow-hidden">
|
||||
<div class="relative w-full h-40 bg-zinc-800 overflow-hidden cursor-pointer" @click="$emit('click')">
|
||||
<img
|
||||
v-if="entry.recipe.imageUrl"
|
||||
:src="entry.recipe.imageUrl"
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div class="flex-1 px-4 py-3">
|
||||
<div class="flex-1 px-4 py-3 cursor-pointer" @click="$emit('click')">
|
||||
<h3 class="text-zinc-100 font-medium text-base leading-snug line-clamp-2">{{ entry.recipe.title }}</h3>
|
||||
<p v-if="entry.recipe.ingredients?.length" class="mt-1 text-zinc-500 text-xs">
|
||||
{{ entry.recipe.ingredients.length }} Zutaten
|
||||
@@ -76,6 +76,7 @@ defineProps<{
|
||||
defineEmits<{
|
||||
swap: [entry: MealPlanEntry]
|
||||
reroll: [entry: MealPlanEntry]
|
||||
click: []
|
||||
}>()
|
||||
|
||||
const imgError = ref(false)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
:day-name="getDayName(entry.date)"
|
||||
@swap="openSwapModal(entry)"
|
||||
@reroll="handleReroll(entry)"
|
||||
@click="selectedRecipe = entry.recipe"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -98,6 +99,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recipe detail modal -->
|
||||
<RecipeDetail
|
||||
v-if="selectedRecipe"
|
||||
:recipe="selectedRecipe"
|
||||
@close="selectedRecipe = null"
|
||||
/>
|
||||
|
||||
<!-- Swap modal -->
|
||||
<SwapModal
|
||||
v-if="swapEntry && recipesStore.recipes.length"
|
||||
@@ -110,14 +118,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import MealCard from '../components/MealCard.vue'
|
||||
import RecipeDetail from '../components/RecipeDetail.vue'
|
||||
import SwapModal from '../components/SwapModal.vue'
|
||||
import { useMealPlanStore, useRecipesStore } from '../stores/mealPlan'
|
||||
import type { MealPlanEntry } from '../stores/mealPlan'
|
||||
import type { MealPlanEntry, Recipe } from '../stores/mealPlan'
|
||||
|
||||
const store = useMealPlanStore()
|
||||
const recipesStore = useRecipesStore()
|
||||
|
||||
const swapEntry = ref<MealPlanEntry | null>(null)
|
||||
const selectedRecipe = ref<Recipe | null>(null)
|
||||
|
||||
const DAY_NAMES = ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user