mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 23:59:45 +02:00
feat: Add Alerts for Ingredient Parsing Errors (#3795)
This commit is contained in:
parent
477899fce3
commit
5e0f8a4bf7
2 changed files with 8 additions and 0 deletions
|
@ -101,6 +101,7 @@ import { computed, defineComponent, ref, useContext, useRoute, useRouter, watch
|
|||
import { invoke, until } from "@vueuse/core";
|
||||
import draggable from "vuedraggable";
|
||||
import RecipeIngredientEditor from "~/components/Domain/Recipe/RecipeIngredientEditor.vue";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
import { useAppInfo, useUserApi } from "~/composables/api";
|
||||
import { useRecipe } from "~/composables/recipes";
|
||||
import { useFoodData, useFoodStore, useUnitData, useUnitStore } from "~/composables/store";
|
||||
|
@ -239,6 +240,9 @@ export default defineComponent({
|
|||
errors.value = data.map((ing, index: number) => {
|
||||
return processIngredientError(ing, index);
|
||||
});
|
||||
} else {
|
||||
alert.error(i18n.t("events.something-went-wrong") as string);
|
||||
parsedIng.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue