mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
feat: Parser Workflow Improvements (#2249)
* ensure recipe settings are set after parsing * added insert and delete functionality * added errors recalculation to use the new index
This commit is contained in:
parent
8a0ee351c5
commit
73476c10f8
3 changed files with 85 additions and 29 deletions
|
@ -104,6 +104,7 @@
|
|||
:buttons="btns"
|
||||
@toggle-section="toggleTitle"
|
||||
@toggle-original="toggleOriginalText"
|
||||
@insert-ingredient="$emit('insert-ingredient')"
|
||||
@delete="$emit('delete')"
|
||||
/>
|
||||
</div>
|
||||
|
@ -133,6 +134,10 @@ export default defineComponent({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
allowInsertIngredient: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
setup(props, { listeners }) {
|
||||
const { i18n, $globals } = useContext();
|
||||
|
@ -145,6 +150,13 @@ export default defineComponent({
|
|||
},
|
||||
];
|
||||
|
||||
if (props.allowInsertIngredient) {
|
||||
options.push({
|
||||
text: i18n.tc("recipe.insert-ingredient") ,
|
||||
event: "insert-ingredient",
|
||||
})
|
||||
}
|
||||
|
||||
// FUTURE: add option to parse a single ingredient
|
||||
// if (!value.food && !value.unit && value.note) {
|
||||
// options.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue