fix: pdf preview header (#3274)

This commit is contained in:
Andrés Bono 2024-06-08 21:55:46 +02:00 committed by GitHub
parent 2a90cdfdaf
commit a8388689f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -269,7 +269,7 @@ main .spinner .bounce2 {
#previewer .pdf {
width: 100%;
height: 100%;
margin-top: 4em;
padding-top: 4em;
}
#previewer h2.message {

View File

@ -6,7 +6,7 @@
@mousemove="toggleNavigation"
@touchstart="toggleNavigation"
>
<header-bar v-if="showNav">
<header-bar v-if="isPdf || showNav">
<action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ name }}</title>
<action
@ -74,11 +74,7 @@
:options="videoOptions"
>
</VideoPlayer>
<object
v-else-if="fileStore.req?.extension.toLowerCase() == '.pdf'"
class="pdf"
:data="raw"
></object>
<object v-else-if="isPdf" class="pdf" :data="raw"></object>
<div v-else-if="fileStore.req?.type == 'blob'" class="info">
<div class="title">
<i class="material-icons">feedback</i>
@ -189,6 +185,8 @@ const raw = computed(() => {
return downloadUrl.value;
});
const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf");
const isResizeEnabled = computed(() => resizePreview);
const subtitles = computed(() => {