feat: Ingredient Parser Enhancements (#6228)

This commit is contained in:
Michael Genson
2025-09-23 17:03:35 -05:00
committed by GitHub
parent 4dfc32a314
commit 679a42a7cc
5 changed files with 178 additions and 130 deletions

View File

@@ -31,7 +31,7 @@
:placeholder="$t('recipe.quantity')"
@keypress="quantityFilter"
>
<template #prepend>
<template v-if="enableDragHandle" #prepend>
<v-icon
class="mr-n1 handle"
>
@@ -178,6 +178,7 @@
</div>
</v-col>
</v-row>
<slot name="before-divider" />
<v-divider
v-if="!mdAndUp"
class="my-4"
@@ -196,7 +197,7 @@ import type { RecipeIngredient } from "~/lib/api/types/recipe";
// defineModel replaces modelValue prop
const model = defineModel<RecipeIngredient>({ required: true });
defineProps({
const props = defineProps({
unitError: {
type: Boolean,
default: false,
@@ -217,6 +218,14 @@ defineProps({
type: Boolean,
default: false,
},
enableDragHandle: {
type: Boolean,
default: false,
},
deleteDisabled: {
type: Boolean,
default: false,
},
});
defineEmits([
@@ -270,8 +279,8 @@ const btns = computed(() => {
text: i18n.t("general.delete"),
event: "delete",
children: undefined,
disabled: props.deleteDisabled,
});
return out;
});