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:
parent
c4fdcec85f
commit
50c8e9be79
1 changed files with 24 additions and 23 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue