mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-27 08:14:30 -04:00 
			
		
		
		
	feat: Add Ingredient Sections To Copied Ingredients (#3032)
* add ingredient title to copied text * fix double linebreak * lint --------- Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
		| @@ -52,11 +52,20 @@ export default defineComponent({ | ||||
|     }); | ||||
|  | ||||
|     const ingredientCopyText = computed(() => { | ||||
|       return props.value | ||||
|         .map((ingredient) => { | ||||
|           return `${parseIngredientText(ingredient, props.disableAmount, props.scale, false)}`; | ||||
|         }) | ||||
|         .join("\n"); | ||||
|       const components: string[] = []; | ||||
|       props.value.forEach((ingredient) => { | ||||
|         if (ingredient.title) { | ||||
|           if (components.length) { | ||||
|             components.push(""); | ||||
|           } | ||||
|  | ||||
|           components.push(`[${ingredient.title}]`); | ||||
|         } | ||||
|  | ||||
|         components.push(parseIngredientText(ingredient, props.disableAmount, props.scale, false)); | ||||
|       }); | ||||
|  | ||||
|       return components.join("\n"); | ||||
|     }); | ||||
|  | ||||
|     function toggleChecked(index: number) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user