mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat: Add Ingredient Sections To Copied Ingredients (#3032)
Some checks are pending
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend and End-to-End Tests (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Some checks are pending
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend and End-to-End Tests (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
* 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:
parent
16d3dbef5d
commit
61289416a5
1 changed files with 14 additions and 5 deletions
|
@ -52,11 +52,20 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
|
|
||||||
const ingredientCopyText = computed(() => {
|
const ingredientCopyText = computed(() => {
|
||||||
return props.value
|
const components: string[] = [];
|
||||||
.map((ingredient) => {
|
props.value.forEach((ingredient) => {
|
||||||
return `${parseIngredientText(ingredient, props.disableAmount, props.scale, false)}`;
|
if (ingredient.title) {
|
||||||
})
|
if (components.length) {
|
||||||
.join("\n");
|
components.push("");
|
||||||
|
}
|
||||||
|
|
||||||
|
components.push(`[${ingredient.title}]`);
|
||||||
|
}
|
||||||
|
|
||||||
|
components.push(parseIngredientText(ingredient, props.disableAmount, props.scale, false));
|
||||||
|
});
|
||||||
|
|
||||||
|
return components.join("\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
function toggleChecked(index: number) {
|
function toggleChecked(index: number) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue