1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-27 17:19:40 +02:00

TheButton global component (#425)

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-05-24 10:12:46 -08:00 committed by GitHub
parent fd1b54ae70
commit 034a21e203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 283 additions and 175 deletions

View file

@ -5,7 +5,13 @@
</v-card>
<NoRecipe v-else-if="loadFailed" />
<v-card v-else-if="!loadFailed" id="myRecipe" class="d-print-none">
<v-img height="400" :src="getImage(recipeDetails.slug)" class="d-print-none" :key="imageKey">
<v-img
:height="hideImage ? '40' : imageHeight"
@error="hideImage = true"
:src="getImage(recipeDetails.slug)"
class="d-print-none"
:key="imageKey"
>
<RecipeTimeCard
:class="isMobile ? undefined : 'force-bottom'"
:prepTime="recipeDetails.prepTime"
@ -71,6 +77,7 @@ export default {
},
data() {
return {
hideImage: false,
loadFailed: false,
skeleton: true,
form: false,
@ -123,6 +130,9 @@ export default {
isMobile() {
return this.$vuetify.breakpoint.name === "xs";
},
imageHeight() {
return this.isMobile ? "200" : "400";
},
currentRecipe() {
return this.$route.params.recipe;
},