1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 07:09:41 +02:00

feature/favorite-recipes (#443)

* add favorites options

* bump dependencies

* add badges to all cards

* typo

* remove console.log

* fix site-loader viewport

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-05-29 15:54:18 -08:00 committed by GitHub
parent 57f7ea3750
commit 6f38fcf81b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 365 additions and 82 deletions

View file

@ -23,6 +23,7 @@
</v-card-title>
<v-card-actions>
<FavoriteBadge v-if="loggedIn" :slug="slug" show-always />
<Rating :value="rating" :name="name" :slug="slug" :small="true" />
<v-spacer></v-spacer>
<RecipeChips :truncate="true" :items="tags" :title="false" :limit="2" :small="true" :isCategory="false" />
@ -33,18 +34,14 @@
</template>
<script>
import FavoriteBadge from "@/components/Recipe/FavoriteBadge";
import RecipeChips from "@/components/Recipe/RecipeViewer/RecipeChips";
import ContextMenu from "@/components/Recipe/ContextMenu";
import CardImage from "@/components/Recipe/CardImage";
import Rating from "@/components/Recipe/Parts/Rating";
import { api } from "@/api";
export default {
components: {
RecipeChips,
ContextMenu,
Rating,
CardImage,
},
components: { FavoriteBadge, RecipeChips, ContextMenu, Rating, CardImage },
props: {
name: String,
slug: String,
@ -64,6 +61,11 @@ export default {
fallBackImage: false,
};
},
computed: {
loggedIn() {
return this.$store.getters.getIsLoggedIn;
},
},
methods: {
getImage(slug) {
return api.recipes.recipeSmallImage(slug, this.image);