mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-11 04:45:22 -05:00
feat(frontend): ✨ Fix scheduler, forgot password flow, and minor bug fixes (#725)
* feat(frontend): 💄 add recipe title * fix(frontend): 🐛 fixes #722 side-bar issue * feat(frontend): ✨ Add page titles to all pages * minor cleanup * refactor(backend): ♻️ rewrite scheduler to be more modulare and work * feat(frontend): ✨ start password reset functionality * refactor(backend): ♻️ refactor application settings to facilitate dependency injection * refactor(backend): 🔥 remove RECIPE_SETTINGS env variables in favor of group settings * formatting * refactor(backend): ♻️ align naming convention * feat(backend): ✨ password reset * test(backend): ✅ password reset * feat(frontend): ✨ self-service password reset * purge password schedule * update user creation for tests Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
@@ -7,7 +7,7 @@ from pydantic import BaseModel, Field, validator
|
||||
from pydantic.utils import GetterDict
|
||||
from slugify import slugify
|
||||
|
||||
from mealie.core.config import app_dirs
|
||||
from mealie.core.config import get_app_dirs
|
||||
from mealie.db.models.recipe.recipe import RecipeModel
|
||||
|
||||
from .recipe_asset import RecipeAsset
|
||||
@@ -18,6 +18,8 @@ from .recipe_nutrition import Nutrition
|
||||
from .recipe_settings import RecipeSettings
|
||||
from .recipe_step import RecipeStep
|
||||
|
||||
app_dirs = get_app_dirs()
|
||||
|
||||
|
||||
class CreateRecipeByURL(BaseModel):
|
||||
url: str
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
from fastapi_camelcase import CamelModel
|
||||
|
||||
from mealie.core.config import settings
|
||||
from mealie.core.config import get_app_settings
|
||||
|
||||
settings = get_app_settings()
|
||||
|
||||
|
||||
class RecipeSettings(CamelModel):
|
||||
public: bool = settings.RECIPE_PUBLIC
|
||||
show_nutrition: bool = settings.RECIPE_SHOW_NUTRITION
|
||||
show_assets: bool = settings.RECIPE_SHOW_ASSETS
|
||||
landscape_view: bool = settings.RECIPE_LANDSCAPE_VIEW
|
||||
disable_comments: bool = settings.RECIPE_DISABLE_COMMENTS
|
||||
disable_amount: bool = settings.RECIPE_DISABLE_AMOUNT
|
||||
public: bool = False
|
||||
show_nutrition: bool = False
|
||||
show_assets: bool = False
|
||||
landscape_view: bool = False
|
||||
disable_comments: bool = True
|
||||
disable_amount: bool = True
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
@@ -5,7 +5,7 @@ from fastapi_camelcase import CamelModel
|
||||
from pydantic.types import constr
|
||||
from pydantic.utils import GetterDict
|
||||
|
||||
from mealie.core.config import settings
|
||||
from mealie.core.config import get_app_settings
|
||||
from mealie.db.models.users import User
|
||||
from mealie.schema.group.group_preferences import ReadGroupPreferences
|
||||
from mealie.schema.recipe import RecipeSummary
|
||||
@@ -13,6 +13,8 @@ from mealie.schema.recipe import RecipeSummary
|
||||
from ..meal_plan import ShoppingListOut
|
||||
from ..recipe import CategoryBase
|
||||
|
||||
settings = get_app_settings()
|
||||
|
||||
|
||||
class LoingLiveTokenIn(CamelModel):
|
||||
name: str
|
||||
|
||||
29
mealie/schema/user/user_passwords.py
Normal file
29
mealie/schema/user/user_passwords.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from fastapi_camelcase import CamelModel
|
||||
|
||||
from .user import PrivateUser
|
||||
|
||||
|
||||
class ForgotPassword(CamelModel):
|
||||
email: str
|
||||
|
||||
|
||||
class ValidateResetToken(CamelModel):
|
||||
token: str
|
||||
|
||||
|
||||
class ResetPassword(ValidateResetToken):
|
||||
email: str
|
||||
password: str
|
||||
passwordConfirm: str
|
||||
|
||||
|
||||
class SavePasswordResetToken(CamelModel):
|
||||
user_id: int
|
||||
token: str
|
||||
|
||||
|
||||
class PrivatePasswordResetToken(SavePasswordResetToken):
|
||||
user: PrivateUser
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
Reference in New Issue
Block a user