1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 15:19:41 +02:00

feat: Add Alerts for Ingredient Parsing Errors (#3795)

This commit is contained in:
Michael Genson 2024-06-26 05:33:11 -05:00 committed by GitHub
parent 477899fce3
commit 5e0f8a4bf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -64,6 +64,7 @@
<script lang="ts">
import { defineComponent, reactive, ref, toRefs, useContext } from "@nuxtjs/composition-api";
import { alert } from "~/composables/use-toast";
import { useUserApi } from "~/composables/api";
import { IngredientConfidence } from "~/lib/api/types/recipe";
import { Parser } from "~/lib/api/user/recipes/recipe";
@ -161,6 +162,9 @@ export default defineComponent({
properties[property].confidence = confidence;
}
});
} else {
alert.error(i18n.t("events.something-went-wrong") as string);
state.results = false;
}
state.loading = false;
}