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

reorganize all frontend items

This commit is contained in:
hay-kot 2021-08-01 19:24:47 -08:00
parent d67240d449
commit 00a8fdda41
147 changed files with 3845 additions and 743 deletions

View file

@ -1,14 +1,14 @@
<template>
<v-tooltip bottom nudge-right="50" :color="buttonStyle ? 'info' : 'secondary'">
<template v-slot:activator="{ on, attrs }">
<template #activator="{ on, attrs }">
<v-btn
small
@click.prevent="toggleFavorite"
v-if="isFavorite || showAlways"
small
:color="buttonStyle ? 'info' : 'secondary'"
:icon="!buttonStyle"
:fab="buttonStyle"
v-bind="attrs"
@click.prevent="toggleFavorite"
v-on="on"
>
<v-icon :small="!buttonStyle" :color="buttonStyle ? 'white' : 'secondary'">
@ -25,6 +25,7 @@ import { api } from "@/api";
export default {
props: {
slug: {
type: String,
default: "",
},
showAlways: {
@ -41,7 +42,7 @@ export default {
return this.$store.getters.getUserData;
},
isFavorite() {
return this.user.favoriteRecipes.indexOf(this.slug) !== -1;
return this.user.favoriteRecipes.includes(this.slug);
},
},
methods: {