1
0
Fork 0
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:
Michael Genson 2023-04-01 20:43:59 -05:00 committed by GitHub
parent 8a0ee351c5
commit 73476c10f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 85 additions and 29 deletions

View file

@ -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({