mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-07 19:05:35 -05:00
feat: Add Alerts for Ingredient Parsing Errors (#3795)
This commit is contained in:
@@ -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 = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user