diff --git a/frontend/components/Domain/Recipe/RecipeImageUploadBtn.vue b/frontend/components/Domain/Recipe/RecipeImageUploadBtn.vue index ab16c760fc1..83f58fb58d8 100644 --- a/frontend/components/Domain/Recipe/RecipeImageUploadBtn.vue +++ b/frontend/components/Domain/Recipe/RecipeImageUploadBtn.vue @@ -9,7 +9,7 @@ {{ $t("general.image") }} - +
{{ $t("recipe.recipe-image") }} @@ -22,6 +22,10 @@ :post="false" @uploaded="uploadImage" /> + + {{ $globals.icons.delete }} + {{ $t("general.delete") }} +
@@ -45,6 +49,7 @@ import { useUserApi } from "~/composables/api"; const REFRESH_EVENT = "refresh"; const UPLOAD_EVENT = "upload"; +const DELETE_EVENT = "delete"; export default defineComponent({ props: { @@ -65,6 +70,11 @@ export default defineComponent({ state.menu = false; } + function deleteImage() { + context.emit(DELETE_EVENT); + state.menu = false; + } + const api = useUserApi(); async function getImageFromURL() { state.loading = true; @@ -81,6 +91,7 @@ export default defineComponent({ return { ...toRefs(state), uploadImage, + deleteImage, getImageFromURL, messages, }; diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageEditorToolbar.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageEditorToolbar.vue index a3508e434a3..fff16602cb0 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageEditorToolbar.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageEditorToolbar.vue @@ -1,6 +1,6 @@