mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-21 22:13:31 -07:00
feat(ui): allow adding a new category in cookbook management dropdown
This commit is contained in:
parent
117c6b9948
commit
d330c0b425
2 changed files with 9 additions and 3 deletions
|
@ -186,7 +186,7 @@
|
||||||
v-else-if="field.type === Organizer.Category"
|
v-else-if="field.type === Organizer.Category"
|
||||||
v-model="field.organizers"
|
v-model="field.organizers"
|
||||||
:selector-type="Organizer.Category"
|
:selector-type="Organizer.Category"
|
||||||
:show-add="false"
|
:show-add="true"
|
||||||
:show-label="false"
|
:show-label="false"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
variant="underlined"
|
variant="underlined"
|
||||||
|
|
|
@ -11,12 +11,10 @@
|
||||||
multiple
|
multiple
|
||||||
:variant="variant"
|
:variant="variant"
|
||||||
:prepend-inner-icon="icon"
|
:prepend-inner-icon="icon"
|
||||||
:append-icon="showAdd ? $globals.icons.create : undefined"
|
|
||||||
return-object
|
return-object
|
||||||
auto-select-first
|
auto-select-first
|
||||||
class="pa-0"
|
class="pa-0"
|
||||||
@update:model-value="resetSearchInput"
|
@update:model-value="resetSearchInput"
|
||||||
@click:append="dialog = true"
|
|
||||||
>
|
>
|
||||||
<template #chip="{ item, index }">
|
<template #chip="{ item, index }">
|
||||||
<v-chip
|
<v-chip
|
||||||
|
@ -32,6 +30,14 @@
|
||||||
{{ item.value }}
|
{{ item.value }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="showAdd" #append-item>
|
||||||
|
<v-divider class="my-2" />
|
||||||
|
<v-list-item
|
||||||
|
:title="`+ ${$t('general.add')}`"
|
||||||
|
class="text-primary"
|
||||||
|
@click="dialog = true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
v-if="showAdd"
|
v-if="showAdd"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue