mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-10 12:25:14 -05:00
Feature/recipe instructions improvements (#785)
* feat(frontend): ✨ split paragraph by 1. 1) or 1: regex matches * feat(frontend): ✨ Update frontend to support ingredient To step refs * feat(backend): ✨ Update backend to support ingredient to step refs * fix title editor * move about info to site-settings * update change-log Co-authored-by: Hayden K <hay-kot@pm.me>
This commit is contained in:
@@ -43,7 +43,7 @@ class RecipeIngredient(CamelModel):
|
||||
# Ref is used as a way to distinguish between an individual ingredient on the frontend
|
||||
# It is required for the reorder and section titles to function properly because of how
|
||||
# Vue handles reactivity. ref may serve another purpose in the future.
|
||||
ref: UUID = Field(default_factory=uuid4)
|
||||
reference_id: UUID = Field(default_factory=uuid4)
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
from typing import Optional
|
||||
from uuid import UUID
|
||||
|
||||
from fastapi_camelcase import CamelModel
|
||||
|
||||
|
||||
class IngredientReferences(CamelModel):
|
||||
"""
|
||||
A list of ingredient references.
|
||||
"""
|
||||
|
||||
reference_id: UUID = None
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class RecipeStep(CamelModel):
|
||||
title: Optional[str] = ""
|
||||
text: str
|
||||
ingredient_references: list[IngredientReferences] = []
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
Reference in New Issue
Block a user