Files
mealie/mealie/schema/admin/about.py
Michael Genson f42114e966 feat: Redirect Logged Out Users to Default Group, If It's Public (#2772)
* add default group slug to app info if public

* redirect public user to default group

* added tests

---------

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-02-07 07:53:55 -09:00

63 lines
1.5 KiB
Python

from mealie.schema._mealie import MealieModel
class AppStatistics(MealieModel):
total_recipes: int
total_users: int
total_groups: int
uncategorized_recipes: int
untagged_recipes: int
class AppInfo(MealieModel):
production: bool
version: str
demo_status: bool
allow_signup: bool
default_group_slug: str | None = None
class AppTheme(MealieModel):
light_primary: str = "#E58325"
light_accent: str = "#007A99"
light_secondary: str = "#973542"
light_success: str = "#43A047"
light_info: str = "#1976D2"
light_warning: str = "#FF6D00"
light_error: str = "#EF5350"
dark_primary: str = "#E58325"
dark_accent: str = "#007A99"
dark_secondary: str = "#973542"
dark_success: str = "#43A047"
dark_info: str = "#1976D2"
dark_warning: str = "#FF6D00"
dark_error: str = "#EF5350"
class AppStartupInfo(MealieModel):
is_first_login: bool
"""
The applications best guess that a user hasn't logged in. Currently, it really
on indicates that the 'changeme@example.com' user is still in the database. Once
it is removed, this will always return False.
"""
class AdminAboutInfo(AppInfo):
versionLatest: str
api_port: int
api_docs: bool
db_type: str
db_url: str | None
default_group: str
build_id: str
recipe_scraper_version: str
class CheckAppConfig(MealieModel):
email_ready: bool
ldap_ready: bool
base_url_set: bool
is_up_to_date: bool