mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-21 22:13:31 -07:00
remove duplicate insert-ingredient and fix above/below in parser
This commit is contained in:
parent
07d5928f18
commit
bf3127ed61
2 changed files with 2 additions and 14 deletions
|
@ -153,7 +153,6 @@
|
|||
@toggle-original="toggleOriginalText"
|
||||
@insert-above="$emit('insert-above')"
|
||||
@insert-below="$emit('insert-below')"
|
||||
@insert-ingredient="$emit('insert-ingredient')"
|
||||
@delete="$emit('delete')"
|
||||
/>
|
||||
</div>
|
||||
|
@ -189,17 +188,12 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
allowInsertIngredient: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
defineEmits([
|
||||
"clickIngredientField",
|
||||
"insert-above",
|
||||
"insert-below",
|
||||
"insert-ingredient",
|
||||
"delete",
|
||||
]);
|
||||
|
||||
|
@ -228,13 +222,6 @@ const contextMenuOptions = computed(() => {
|
|||
},
|
||||
];
|
||||
|
||||
if (props.allowInsertIngredient) {
|
||||
options.push({
|
||||
text: i18n.t("recipe.insert-ingredient"),
|
||||
event: "insert-ingredient",
|
||||
});
|
||||
}
|
||||
|
||||
if (model.value.originalText) {
|
||||
options.push({
|
||||
text: i18n.t("recipe.see-original-text"),
|
||||
|
|
|
@ -103,7 +103,8 @@
|
|||
<RecipeIngredientEditor
|
||||
v-model="parsedIng[index].ingredient"
|
||||
allow-insert-ingredient
|
||||
@insert-ingredient="insertIngredient(index)"
|
||||
@insert-above="insertIngredient(index)"
|
||||
@insert-below="insertIngredient(index + 1)"
|
||||
@delete="deleteIngredient(index)"
|
||||
/>
|
||||
{{ ing.input }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue