mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	* feat(lang): localize some views * fix: typo * fix: Localization broke bug report generation * feat(lang): localize recipe page instructions
		
			
				
	
	
		
			40 lines
		
	
	
		
			993 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			993 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <v-container>
 | |
|     <RecipeCardSection v-if="user" :icon="$globals.icons.heart" :title="$tc('user.user-favorites')" :recipes="user.favoriteRecipes">
 | |
|     </RecipeCardSection>
 | |
|   </v-container>
 | |
| </template>
 | |
| 
 | |
| <script lang="ts">
 | |
| import { defineComponent, useAsync, useRoute } from "@nuxtjs/composition-api";
 | |
| import RecipeCardSection from "~/components/Domain/Recipe/RecipeCardSection.vue";
 | |
| import { useUserApi } from "~/composables/api";
 | |
| import { useAsyncKey } from "~/composables/use-utils";
 | |
| 
 | |
| export default defineComponent({
 | |
|   components: { RecipeCardSection },
 | |
|   setup() {
 | |
|     const api = useUserApi();
 | |
|     const route = useRoute();
 | |
| 
 | |
|     const userId = route.value.params.id;
 | |
| 
 | |
|     const user = useAsync(async () => {
 | |
|       const { data } = await api.users.getFavorites(userId);
 | |
|       return data;
 | |
|     }, useAsyncKey());
 | |
| 
 | |
|     return {
 | |
|       user,
 | |
|     };
 | |
|   },
 | |
|   head() {
 | |
|     return {
 | |
|       title: this.$t("general.favorites") as string,
 | |
|     };
 | |
|   },
 | |
| });
 | |
| </script>
 | |
| 
 | |
| <style scoped></style>
 |