feat: adapt recipe surfaces for batch-cook sessions
- Recipes page action buttons reordered/restyled to push AI generation and batch cooking ahead of manual recipe creation. - Recipe detail page hides meal/drink pairing (doesn't make sense for a multi-dish batch session). - Print pages force light mode regardless of app theme (dark bg + hardcoded dark text was unreadable) and render sectioned steps + dishes/storage for batch-cook recipes. - Markdown export mirrors the same sectioned structure. - Cooking mode tags each step with which dish(es) it belongs to. - Meal planner: mealPlanEntries.batchDishId lets a slot point at one specific dish within a batch session; picking a batch-cook recipe now prompts for which dish, and the grid shows the dish name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import { useLocale } from "@/lib/i18n/provider";
|
||||
import { formatIngredientQuantity, type UnitPref } from "@/lib/unit-conversion";
|
||||
import { useWakeLock } from "@/lib/hooks/use-wake-lock";
|
||||
|
||||
type Step = { id: string; instruction: string; timerSeconds: number | null };
|
||||
type Step = { id: string; instruction: string; timerSeconds: number | null; appliesTo?: string[] };
|
||||
type Ingredient = { rawName: string; quantity: string | null; unit: string | null };
|
||||
|
||||
type TimerState = {
|
||||
@@ -287,6 +287,13 @@ export function CookingMode({
|
||||
{t("stepOf", { current: current + 1, total: steps.length })}
|
||||
</div>
|
||||
|
||||
{/* Batch-cook dish tag */}
|
||||
{step.appliesTo !== undefined && (
|
||||
<span className="text-xs font-semibold uppercase tracking-wide rounded-full bg-muted px-3 py-1">
|
||||
{step.appliesTo.length === 0 ? t("batchPrepLabel") : step.appliesTo.join(" + ")}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* Instruction */}
|
||||
<p className="text-2xl sm:text-3xl leading-relaxed text-center font-medium max-w-2xl">
|
||||
{step.instruction}
|
||||
|
||||
Reference in New Issue
Block a user