From c929a03b574fbd81b148c22c22926a020e061fa4 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sat, 20 Sep 2025 23:37:14 -0500 Subject: [PATCH] feat: Upgraded Ingredient Parsing Workflow (#6151) --- .../import-recipe-bookmarklet.md | 4 +- .../Domain/Recipe/RecipeIngredientEditor.vue | 27 +- .../Domain/Recipe/RecipePage/RecipePage.vue | 41 +- .../RecipePageIngredientEditor.vue | 9 +- .../RecipePageParts/RecipePageParseDialog.vue | 490 ++++++++++++++++++ frontend/components/global/AppLogo.vue | 2 +- .../composables/recipe-page/shared-state.ts | 20 +- .../composables/use-new-recipe-options.ts | 85 +++ frontend/composables/use-users/preferences.ts | 22 + frontend/lang/messages/en-US.json | 9 +- frontend/lib/icons/icons.ts | 2 + .../r/[slug]/ingredient-parser.vue | 445 ---------------- .../pages/g/[groupSlug]/r/create/html.vue | 44 +- .../pages/g/[groupSlug]/r/create/image.vue | 33 +- frontend/pages/g/[groupSlug]/r/create/url.vue | 72 +-- 15 files changed, 758 insertions(+), 547 deletions(-) create mode 100644 frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue create mode 100644 frontend/composables/use-new-recipe-options.ts delete mode 100644 frontend/pages/g/[groupSlug]/r/[slug]/ingredient-parser.vue diff --git a/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md b/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md index 2ef49d037..ed8401b62 100644 --- a/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md +++ b/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md @@ -12,12 +12,10 @@ var url = document.URL.endsWith('/') ? document.URL; var mealie = "http://localhost:8080"; var group_slug = "home" // Change this to your group slug. You can obtain this from your URL after logging-in to Mealie -var use_keywords= "&use_keywords=1" // Optional - use keywords from recipe - update to "" if you don't want that -var edity = "&edit=1" // Optional - keep in edit mode - update to "" if you don't want that if (mealie.slice(-1) === "/") { mealie = mealie.slice(0, -1) } -var dest = mealie + "/g/" + group_slug + "/r/create/url?recipe_import_url=" + url + use_keywords + edity; +var dest = mealie + "/g/" + group_slug + "/r/create/url?recipe_import_url=" + url; window.open(dest, "_blank"); ``` diff --git a/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue b/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue index 920641f95..a8ad58b95 100644 --- a/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue +++ b/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue @@ -165,12 +165,12 @@ @click="$emit('clickIngredientField', 'note')" /> -

- {{ $t("recipe.original-text-with-value", { originalText: model.originalText }) }} -

- { @@ -254,13 +250,6 @@ const contextMenuOptions = computed(() => { }, ]; - if (model.value.originalText) { - options.push({ - text: i18n.t("recipe.see-original-text"), - event: "toggle-original", - }); - } - return options; }); @@ -319,10 +308,6 @@ function toggleTitle() { state.showTitle = !state.showTitle; } -function toggleOriginalText() { - state.showOriginalText = !state.showOriginalText; -} - function handleUnitEnter() { if ( model.value.unit === undefined @@ -349,7 +334,7 @@ function quantityFilter(e: KeyboardEvent) { } } -const { showTitle, showOriginalText } = toRefs(state); +const { showTitle } = toRefs(state); const foods = foodStore.store; const units = unitStore.store; diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue index ad6e08a5a..297552743 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue @@ -1,5 +1,12 @@