From c6403a79982c92d5e8359b5cd47e87e71b5cab37 Mon Sep 17 00:00:00 2001 From: Hayden Date: Sun, 17 Jan 2021 12:10:13 -0900 Subject: [PATCH 1/5] db init hotfix --- mealie/app.py | 2 -- mealie/services/settings_services.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mealie/app.py b/mealie/app.py index 9188e01aa..2d65933c7 100644 --- a/mealie/app.py +++ b/mealie/app.py @@ -15,7 +15,6 @@ from routes import ( ) from utils.api_docs import generate_api_docs from utils.logger import logger -from utils.startup import post_start app = FastAPI( title="Mealie", @@ -53,7 +52,6 @@ def invalid_api(): app.include_router(static_routes.router) -# post_start() # Generate API Documentation if not PRODUCTION: diff --git a/mealie/services/settings_services.py b/mealie/services/settings_services.py index ae6cdaa36..25b5911d9 100644 --- a/mealie/services/settings_services.py +++ b/mealie/services/settings_services.py @@ -140,4 +140,4 @@ def default_settings_init(): if not sql_exists: default_settings_init() - default_theme_init + default_theme_init() From b00b0c8af4afb010521ef96315299594aefc623b Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sun, 17 Jan 2021 13:52:43 -0900 Subject: [PATCH 2/5] bug: fix crash in mongo --- mealie/app_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mealie/app_config.py b/mealie/app_config.py index 7e14198db..ef65b5250 100644 --- a/mealie/app_config.py +++ b/mealie/app_config.py @@ -50,7 +50,7 @@ else: docs_url = None redoc_url = None - +SQLITE_FILE = None # DATABASE ENV DATABASE_TYPE = os.getenv("db_type", "sqlite") # mongo, sqlite if DATABASE_TYPE == "sqlite": From d1fe1f44b8b231549827d28e0768306b1eb445cd Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sun, 17 Jan 2021 15:06:43 -0900 Subject: [PATCH 3/5] fix mongo bug --- mealie/db/db_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mealie/db/db_setup.py b/mealie/db/db_setup.py index b41197948..3f816564b 100644 --- a/mealie/db/db_setup.py +++ b/mealie/db/db_setup.py @@ -2,9 +2,10 @@ from app_config import SQLITE_FILE, USE_MONGO, USE_SQL from db.sql.db_session import globa_init as sql_global_init -sql_exists = SQLITE_FILE.is_file() +sql_exists = True if USE_SQL: + sql_exists = SQLITE_FILE.is_file() sql_global_init(SQLITE_FILE) pass From d0f9917c6fc98e49d1863068fa50c0c8d8a94977 Mon Sep 17 00:00:00 2001 From: Hayden Date: Sun, 17 Jan 2021 21:22:39 -0900 Subject: [PATCH 4/5] fixed version notifier --- frontend/src/locales/da.json | 5 +++-- frontend/src/locales/en.json | 5 +++-- frontend/src/pages/SettingsPage.vue | 28 +++++++++++++++++++++------- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/frontend/src/locales/da.json b/frontend/src/locales/da.json index b8342d838..73be28648 100644 --- a/frontend/src/locales/da.json +++ b/frontend/src/locales/da.json @@ -95,7 +95,8 @@ "new-version-available": "En ny version af Mealie er tilgængelig. Besøg repoen ", "set-new-time": "Indstil ny tid", "swatches": "Prøver", - "version-latest": "Version: {current} | Seneste: {latest}", + "current": "Version:", + "latest": "Seneste:", "theme": { "accent": "Accent", "dark-mode": "Mørk tilstand", @@ -130,4 +131,4 @@ "import-themes": "Importer temaer" } } -} +} \ No newline at end of file diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index d594c0a6c..35a65e033 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -73,7 +73,8 @@ "swatches": "Swatches", "add-a-new-theme": "Add a New Theme", "set-new-time": "Set New Time", - "version-latest": "Version: { current } | Latest: { latest }", + "current": "Version:", + "latest": "Latest", "explore-the-docs": "Explore the Docs", "contribute": "Contribute", "backup-and-exports": "Backup and Exports", @@ -130,4 +131,4 @@ "failed-imports": "Failed Imports", "upload-an-archive": "Upload an Archive" } -} +} \ No newline at end of file diff --git a/frontend/src/pages/SettingsPage.vue b/frontend/src/pages/SettingsPage.vue index 4f926404a..441029ef3 100644 --- a/frontend/src/pages/SettingsPage.vue +++ b/frontend/src/pages/SettingsPage.vue @@ -1,23 +1,37 @@