feat(editor): Make PDF and Audio binary-data viewable in the UI (#7367)

fixes #7361
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-09 17:43:57 +02:00
committed by GitHub
parent 732b15a1fa
commit 8187be1b7d
8 changed files with 150 additions and 58 deletions

View File

@@ -7,6 +7,10 @@
<source :src="embedSource" :type="binaryData.mimeType" />
{{ $locale.baseText('binaryDataDisplay.yourBrowserDoesNotSupport') }}
</video>
<audio v-if="binaryData.fileType === 'audio'" controls autoplay>
<source :src="embedSource" :type="binaryData.mimeType" />
{{ $locale.baseText('binaryDataDisplay.yourBrowserDoesNotSupport') }}
</audio>
<vue-json-pretty
v-else-if="binaryData.fileType === 'json'"
:data="jsonData"
@@ -92,7 +96,8 @@ export default defineComponent({
max-width: calc(100% - 1em);
}
&.other {
&.other,
&.pdf {
height: calc(100% - 1em);
width: calc(100% - 1em);
}