1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-08 06:55:24 +02:00

feat: Move create-item button in shopping list to the top (#5687)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Patrick Lehner (he/him) 2025-08-08 00:47:21 +09:00 committed by GitHub
parent c4fdcec85f
commit 50c8e9be79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,6 +136,30 @@
v-if="!edit"
class="py-2"
>
<!-- Create Item -->
<div v-if="createEditorOpen">
<ShoppingListItemEditor
v-model="createListItemData"
class="my-4"
:labels="allLabels || []"
:units="allUnits || []"
:foods="allFoods || []"
:allow-delete="false"
@delete="createEditorOpen = false"
@cancel="createEditorOpen = false"
@save="createListItem"
/>
</div>
<div v-else class="d-flex justify-end">
<BaseButton
create
@click="createEditorOpen = true"
>
{{ $t('general.add') }}
</BaseButton>
</div>
<!-- View without Label grouping -->
<div v-if="!preferences.viewByLabel">
<VueDraggable
v-model="listItems.unchecked"
@ -222,29 +246,6 @@
</div>
</div>
<!-- Create Item -->
<div v-if="createEditorOpen">
<ShoppingListItemEditor
v-model="createListItemData"
class="my-4"
:labels="allLabels || []"
:units="allUnits || []"
:foods="allFoods || []"
:allow-delete="false"
@delete="createEditorOpen = false"
@cancel="createEditorOpen = false"
@save="createListItem"
/>
</div>
<div v-else class="d-flex justify-end">
<BaseButton
create
@click="createEditorOpen = true"
>
{{ $t('general.add') }}
</BaseButton>
</div>
<!-- Reorder Labels -->
<BaseDialog
v-model="reorderLabelsDialog"