mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
food layout complete, edit food working
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
@dragleave="handleDragLeave($event)"
|
||||
@drop="handleDragDrop($event)">
|
||||
<b-row no-gutters style="height:inherit;">
|
||||
<b-col no-gutters md="3" style="justify-content: center; height:inherit;">
|
||||
<b-col no-gutters md="3" style="height:inherit;">
|
||||
<b-card-img-lazy style="object-fit: cover; height: 10vh;" :src="food_image" v-bind:alt="$t('Recipe_Image')"></b-card-img-lazy>
|
||||
</b-col>
|
||||
<b-col no-gutters md="9" style="height:inherit;">
|
||||
@@ -34,9 +34,10 @@
|
||||
</b-card-text>
|
||||
</b-card-body>
|
||||
</b-col>
|
||||
<div class="card-img-overlay h-100 d-flex flex-column justify-content-right"
|
||||
style="float:right; text-align: right; padding-top: 10px; padding-right: 5px">
|
||||
<generic-context-menu style="float:right"
|
||||
<div class="card-img-overlay justify-content-right h-25 m-0 p-0 text-right">
|
||||
<b-button v-if="food.recipe" v-b-tooltip.hover :title="food.recipe.name"
|
||||
class=" btn fas fa-book-open p-0 border-0" variant="link" :href="food.recipe.url"/>
|
||||
<generic-context-menu class="p-0"
|
||||
:show_merge="true"
|
||||
:show_move="true"
|
||||
@item-action="$emit('item-action', {'action': $event, 'source': food})">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-dropdown variant="link" toggle-class="text-decoration-none" no-caret>
|
||||
<template #button-content>
|
||||
<i class="fas fa-ellipsis-v" ></i>
|
||||
@@ -21,7 +20,6 @@
|
||||
</b-dropdown-item>
|
||||
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -44,11 +44,20 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
initial_selection: function (newVal, oldVal) { // watch it
|
||||
this.selected_objects = newVal
|
||||
if (this.multiple) {
|
||||
this.selected_objects = newVal
|
||||
} else if (this.selected_objects != newVal?.[0]) {
|
||||
// when not using multiple selections need to convert array to value
|
||||
this.selected_objects = newVal?.[0] ?? null
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.search('')
|
||||
// when not using multiple selections need to convert array to value
|
||||
if (!this.multiple & this.selected_objects != this.initial_selection?.[0]) {
|
||||
this.selected_objects = this.initial_selection?.[0] ?? null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search: function (query) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@dragleave="handleDragLeave($event)"
|
||||
@drop="handleDragDrop($event)">
|
||||
<b-row no-gutters style="height:inherit;">
|
||||
<b-col no-gutters md="3" style="justify-content: center; height:inherit;">
|
||||
<b-col no-gutters md="3" style="height:inherit;">
|
||||
<b-card-img-lazy style="object-fit: cover; height: 10vh;" :src="keyword_image" v-bind:alt="$t('Recipe_Image')"></b-card-img-lazy>
|
||||
</b-col>
|
||||
<b-col no-gutters md="9" style="height:inherit;">
|
||||
@@ -34,9 +34,8 @@
|
||||
</b-card-text>
|
||||
</b-card-body>
|
||||
</b-col>
|
||||
<div class="card-img-overlay h-100 d-flex flex-column justify-content-right"
|
||||
style="float:right; text-align: right; padding-top: 10px; padding-right: 5px">
|
||||
<generic-context-menu style="float:right"
|
||||
<div class="card-img-overlay justify-content-right h-25 m-0 p-0 text-right">
|
||||
<generic-context-menu class="p-0"
|
||||
:show_merge="true"
|
||||
:show_move="true"
|
||||
@item-action="$emit('item-action', {'action': $event, 'source': keyword})">
|
||||
|
||||
Reference in New Issue
Block a user