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}
})