various fixes and improvements

This commit is contained in:
vabene1111
2025-04-04 22:00:10 +02:00
parent 934d78c50e
commit 7314572fc0
616 changed files with 78158 additions and 99608 deletions

View File

@@ -1,6 +1,6 @@
<template>
<v-card class="mt-1 h-100">
<iframe width="100%" height="700px" :src="`${getDjangoUrl('/api/get_recipe_file/')}${props.recipe.id}/`" v-if="isPdf"></iframe>
<iframe width="100%" height="700px" :src="`${getDjangoUrl('/static/pdfjs/web/viewer.html', false)}?file=${getDjangoUrl('/api/get_recipe_file/')}${props.recipe.id}/`" v-if="isPdf"></iframe>
<v-img :src="`${getDjangoUrl('/api/get_recipe_file/')}${props.recipe.id}/`" v-if="isImage"></v-img>
</v-card>
@@ -11,6 +11,7 @@ import {computed, PropType} from "vue";
import {Recipe} from "@/openapi";
import {useDjangoUrls} from "@/composables/useDjangoUrls";
const props = defineProps({
recipe: {type: {} as PropType<Recipe>, required: true}
})

View File

@@ -1,5 +1,5 @@
<template>
<v-img :cover="cover" :style="{'height': height, 'width': width,}" style="background-color: #ffffff" :src="image" :alt="$t('Recipe_Image')" :rounded="props.rounded">
<v-img :cover="cover" :style="{'height': height, 'width': width,}" color="recipeImagePlaceholderBg" :src="image" :alt="$t('Recipe_Image')" :rounded="props.rounded">
<slot name="overlay">
</slot>

View File

@@ -72,7 +72,7 @@
</v-card>
</template>
<property-view v-model="recipe" :servings="servings"></property-view>
<property-view v-model="recipe" :servings="servings" v-if="recipe.internal"></property-view>
<v-expansion-panels class="mt-2">