1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 23:59:45 +02:00

feat(frontend): Add Meal Tags + UI Improvements (#807)

* feat: 

* fix colors

* add additional support for settings meal tag

* add defaults to recipe

* use group reciep settings

* fix login infinite loading

* disable owner on initial load

* add skeleton loader

* add v-model support

* formatting

* fix overwriting existing values

* feat(frontend):  add markdown preview for steps

* update black plus formatting

* update help text

* fix overwrite error

* remove print

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-11-20 14:30:38 -09:00 committed by GitHub
parent d4bf81dee6
commit 912cc6d956
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 456 additions and 246 deletions

View file

@ -4,6 +4,15 @@ import { useAsyncKey } from "./use-utils";
import { useUserApi } from "~/composables/api";
import { CreateMealPlan, UpdateMealPlan } from "~/api/class-interfaces/group-mealplan";
export type MealType = "breakfast" | "lunch" | "dinner" | "snack";
export const planTypeOptions = [
{ text: "Breakfast", value: "breakfast" },
{ text: "Lunch", value: "lunch" },
{ text: "Dinner", value: "dinner" },
{ text: "Snack", value: "snack" },
];
export const useMealplans = function () {
const api = useUserApi();
const loading = ref(false);
@ -72,9 +81,14 @@ export const useMealplans = function () {
this.refreshAll();
}
},
async setType(payload: UpdateMealPlan, typ: MealType) {
payload.entryType = typ;
await this.updateOne(payload);
},
};
const mealplans = actions.getAll();
return { mealplans, actions, validForm };
return { mealplans, actions, validForm, loading };
};