recipe loaders screen

This commit is contained in:
hay-kot 2021-03-30 17:51:24 -08:00
commit f90415d159

View file

@ -1,6 +1,17 @@
<template> <template>
<v-container> <v-container>
<v-card id="myRecipe"> <v-card
v-if="skeleton"
:color="`white ${theme.isDark ? 'darken-2' : 'lighten-4'}`"
class="pa-3"
>
<v-skeleton-loader
class="mx-auto"
height="700px"
type="card"
></v-skeleton-loader>
</v-card>
<v-card v-else id="myRecipe">
<v-img <v-img
height="400" height="400"
:src="getImage(recipeDetails.image)" :src="getImage(recipeDetails.image)"
@ -77,8 +88,14 @@ export default {
RecipeTimeCard, RecipeTimeCard,
}, },
mixins: [user], mixins: [user],
inject: {
theme: {
default: { isDark: false },
},
},
data() { data() {
return { return {
skeleton: true,
// currentRecipe: this.$route.params.recipe, // currentRecipe: this.$route.params.recipe,
form: false, form: false,
jsonEditor: false, jsonEditor: false,
@ -138,6 +155,7 @@ export default {
}, },
async getRecipeDetails() { async getRecipeDetails() {
this.recipeDetails = await api.recipes.requestDetails(this.currentRecipe); this.recipeDetails = await api.recipes.requestDetails(this.currentRecipe);
this.skeleton = false;
this.form = false; this.form = false;
}, },
getImage(image) { getImage(image) {