mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-11 17:16:59 -05:00
property editor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- TODO label is not showing for some reason, for now in placeholder -->
|
||||
<v-input :hint="props.hint" persistent-hint :label="props.label">
|
||||
<v-input :hint="props.hint" persistent-hint :label="props.label" :hide-details="props.hideDetails">
|
||||
<template #prepend v-if="$slots.prepend">
|
||||
<slot name="prepend"></slot>
|
||||
</template>
|
||||
@@ -73,13 +73,14 @@ const props = defineProps({
|
||||
object: {type: Boolean, default: true},
|
||||
|
||||
allowCreate: {type: Boolean, default: false},
|
||||
|
||||
placeholder: {type: String, default: undefined},
|
||||
|
||||
noOptionsText: {type: String, default: undefined},
|
||||
noResultsText: {type: String, default: undefined},
|
||||
|
||||
label: {type: String, default: ''},
|
||||
|
||||
hint: {type: String, default: ''},
|
||||
hideDetails: {type: Boolean, default: false},
|
||||
density: {type: String as PropType<'' | 'compact' | 'comfortable'>, default: ''},
|
||||
|
||||
searchOnLoad: {type: Boolean, default: false},
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
<template>
|
||||
<v-btn v-bind="props" icon="fa-solid fa-ellipsis-v" variant="plain" :size="props.size">
|
||||
<v-icon icon="fa-solid fa-ellipsis-v"></v-icon>
|
||||
<v-menu activator="parent" close-on-content-click>
|
||||
<v-list density="compact" class="pt-1 pb-1">
|
||||
<v-list-item :to="{ name: 'ModelEditPage', params: {model: 'recipe', id: recipe.id} }" prepend-icon="$edit">
|
||||
{{ $t('Edit') }}
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$mealplan" link>
|
||||
{{ $t('Add_to_Plan') }}
|
||||
<model-edit-dialog model="MealPlan" :itemDefaults="{recipe: recipe}"></model-edit-dialog>
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$shopping" link>
|
||||
{{ $t('Add_to_Shopping') }}
|
||||
<add-to-shopping-dialog :recipe="props.recipe"></add-to-shopping-dialog>
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="fa-solid fa-share-nodes" link>
|
||||
{{ $t('Share') }}
|
||||
<recipe-share-dialog :recipe="props.recipe"></recipe-share-dialog>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-menu activator="parent" close-on-content-click>
|
||||
<v-list density="compact" class="pt-1 pb-1">
|
||||
<v-list-item :to="{ name: 'ModelEditPage', params: {model: 'recipe', id: recipe.id} }" prepend-icon="$edit">
|
||||
{{ $t('Edit') }}
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$mealplan" link>
|
||||
{{ $t('Add_to_Plan') }}
|
||||
<model-edit-dialog model="MealPlan" :itemDefaults="{recipe: recipe}"></model-edit-dialog>
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$shopping" link>
|
||||
{{ $t('Add_to_Shopping') }}
|
||||
<add-to-shopping-dialog :recipe="props.recipe"></add-to-shopping-dialog>
|
||||
</v-list-item>
|
||||
<v-list-item :to="{ name: 'PropertyEditorPage', query: {recipe: recipe.id} }" prepend-icon="fa-solid fa-table" link>
|
||||
{{ $t('Property_Editor') }}
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="fa-solid fa-share-nodes" link>
|
||||
{{ $t('Share') }}
|
||||
<recipe-share-dialog :recipe="props.recipe"></recipe-share-dialog>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-btn>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user