mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-09 20:05:20 -05:00
fix recipe static routes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<RecipeCardSection
|
||||
v-if="recentRecipes"
|
||||
:icon="$globals.icons.primary"
|
||||
:title="$t('general.recent')"
|
||||
:recipes="recentRecipes"
|
||||
@@ -13,12 +12,15 @@
|
||||
import { defineComponent } from "@nuxtjs/composition-api";
|
||||
import RecipeCardSection from "~/components/Domain/Recipe/RecipeCardSection.vue";
|
||||
import { useRecipes, recentRecipes } from "~/composables/use-recipes";
|
||||
import { useStaticRoutes } from "~/composables/api";
|
||||
|
||||
export default defineComponent({
|
||||
components: { RecipeCardSection },
|
||||
setup() {
|
||||
const { assignSorted } = useRecipes(false);
|
||||
|
||||
useStaticRoutes();
|
||||
|
||||
return { recentRecipes, assignSorted };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
:key="imageKey"
|
||||
:max-width="recipe.settings.landscapeView ? null : '50%'"
|
||||
:height="hideImage ? '50' : imageHeight"
|
||||
:src="api.recipes.recipeImage(recipe.slug, imageKey)"
|
||||
:src="recipeImage(recipe.slug, imageKey)"
|
||||
class="d-print-none"
|
||||
@error="hideImage = true"
|
||||
>
|
||||
@@ -183,6 +183,7 @@ import RecipeNotes from "~/components/Domain/Recipe/RecipeNotes.vue";
|
||||
import RecipeImageUploadBtn from "~/components/Domain/Recipe/RecipeImageUploadBtn.vue";
|
||||
import RecipeSettingsMenu from "~/components/Domain/Recipe/RecipeSettingsMenu.vue";
|
||||
import { Recipe } from "~/types/api-types/admin";
|
||||
import { useStaticRoutes } from "~/composables/api";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -208,6 +209,8 @@ export default defineComponent({
|
||||
|
||||
const { getBySlug, loading } = useRecipeContext();
|
||||
|
||||
const { recipeImage } = useStaticRoutes();
|
||||
|
||||
const recipe = getBySlug(slug);
|
||||
|
||||
const form = ref<boolean>(false);
|
||||
@@ -250,6 +253,7 @@ export default defineComponent({
|
||||
updateRecipe,
|
||||
uploadImage,
|
||||
validators,
|
||||
recipeImage,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<RecipeCardSection
|
||||
v-if="allRecipes"
|
||||
:icon="$globals.icons.primary"
|
||||
:title="$t('page.all-recipes')"
|
||||
:recipes="allRecipes"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<RecipeCardSection
|
||||
v-if="category"
|
||||
:icon="$globals.icons.tags"
|
||||
:title="category.name"
|
||||
:recipes="category.recipes"
|
||||
|
||||
Reference in New Issue
Block a user