From 221117463654b37c4d4443bb1a0a9bfc915f9a0a Mon Sep 17 00:00:00 2001
From: Hayden <64056131+hay-kot@users.noreply.github.com>
Date: Tue, 22 Feb 2022 15:32:13 -0900
Subject: [PATCH] Feature/UI updates (#990)
* titleCase utility
* update rules ui
* order by date_added
* fix error on page refresh
* fix health checks
* fix cookbook return values
---
Dockerfile | 2 +-
frontend/composables/use-utils.ts | 7 +++++++
frontend/pages/group/mealplan/settings.vue | 22 ++++++++++++++------
frontend/pages/recipe/create.vue | 11 ++++------
mealie/repos/repository_recipes.py | 1 +
mealie/routes/groups/controller_cookbooks.py | 20 ++++++++++++------
6 files changed, 43 insertions(+), 20 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 5aac61cd..8019c89d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -131,7 +131,7 @@ ENV APP_PORT=9000
EXPOSE ${APP_PORT}
-HEALTHCHECK CMD curl -f http://localhost:${APP_PORT} || exit 1
+HEALTHCHECK CMD curl -f http://localhost:${APP_PORT}/docs || exit 1
RUN chmod +x $MEALIE_HOME/mealie/run.sh
ENTRYPOINT $MEALIE_HOME/mealie/run.sh
diff --git a/frontend/composables/use-utils.ts b/frontend/composables/use-utils.ts
index f45e1874..014024a8 100644
--- a/frontend/composables/use-utils.ts
+++ b/frontend/composables/use-utils.ts
@@ -4,6 +4,13 @@ export const useAsyncKey = function () {
return String(Date.now());
};
+export const titleCase = function (str: string) {
+ return str
+ .split(" ")
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
+ .join(" ");
+};
+
export function detectServerBaseUrl(req?: IncomingMessage | null) {
if (!req || req === undefined) {
return "";
diff --git a/frontend/pages/group/mealplan/settings.vue b/frontend/pages/group/mealplan/settings.vue
index 1e7c8260..9b6a3268 100644
--- a/frontend/pages/group/mealplan/settings.vue
+++ b/frontend/pages/group/mealplan/settings.vue
@@ -5,7 +5,7 @@