1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 17:16:59 -05:00

recipe editor

This commit is contained in:
vabene1111
2024-12-05 18:00:13 +01:00
parent 35461ba926
commit 01d52143e8
5 changed files with 49 additions and 12 deletions

View File

@@ -1,13 +1,13 @@
<template>
<v-menu open-on-hover open-delay="0" :open-on-click="true" location="start">
<v-menu location="start">
<template v-slot:activator="{ props }">
<v-btn v-bind="props" icon="fas fa-ellipsis-v" variant="plain"></v-btn>
</template>
<v-list>
<v-list-item>
<v-list-item-title @click="openRecipe()"><i class="fas fa-edit fa-fw mr-2"></i> Edit</v-list-item-title>
<v-list-item :to="{ name: 'ModelEditPage', params: {model: 'recipe', id: recipe.id} }" prepend-icon="fas fa-edit">
{{$t('Edit')}}
</v-list-item>
</v-list>
</v-menu>
@@ -24,9 +24,6 @@ const props = defineProps({
recipe: {type: Object as PropType<Recipe | RecipeFlat | RecipeOverview>, required: true}
})
function openRecipe() {
router.push({name: 'edit_recipe', params: {recipe_id: props.recipe.id}})
}
</script>

View File

@@ -74,8 +74,10 @@
</v-col>
</v-row>
</vue-draggable>
<v-btn color="primary" @click="insertAndFocusIngredient()">{{ $t('Add') }}</v-btn>
<v-btn color="secondary" @click="dialogIngredientParser = true">{{ $t('AddMany') }}</v-btn>
<v-btn-group density="compact">
<v-btn color="success" @click="insertAndFocusIngredient()" prepend-icon="$add">{{ $t('Add') }}</v-btn>
<v-btn color="warning" @click="dialogIngredientParser = true"><v-icon icon="$add"></v-icon> <v-icon icon="$add"></v-icon></v-btn>
</v-btn-group>
</v-col>
<v-col cols="12">
<v-label>{{ $t('Instructions') }}</v-label>
@@ -94,7 +96,7 @@
:max-width="(mobile) ? '100vw': '75vw'"
:fullscreen="mobile">
<v-card>
<v-closable-card-title :title="$t('Instructions')"></v-closable-card-title>
<v-closable-card-title :title="$t('Instructions')" v-model="dialogMarkdownEdit"></v-closable-card-title>
<step-markdown-editor class="h-100" v-model="step"></step-markdown-editor>
</v-card>
</v-dialog>
@@ -104,7 +106,7 @@
:max-width="(mobile) ? '100vw': '75vw'"
:fullscreen="mobile">
<v-card>
<v-closable-card-title :title="$t('Ingredients')"></v-closable-card-title>
<v-closable-card-title :title="$t('Ingredients')" v-model="dialogIngredientParser"></v-closable-card-title>
<v-card-text>
<v-textarea v-model="ingredientTextInput"></v-textarea>
</v-card-text>