mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(editor): Render image binary-data using img tags (#10829)
Co-authored-by: Milorad Filipovic <milorad@n8n.io>
This commit is contained in:
parent
25c8a328a8
commit
7c23101ab8
|
@ -63,6 +63,7 @@ onMounted(async () => {
|
|||
<source :src="embedSource" :type="binaryData.mimeType" />
|
||||
{{ $locale.baseText('binaryDataDisplay.yourBrowserDoesNotSupport') }}
|
||||
</audio>
|
||||
<img v-else-if="binaryData.fileType === 'image'" :src="embedSource" />
|
||||
<VueJsonPretty
|
||||
v-else-if="binaryData.fileType === 'json'"
|
||||
:data="data"
|
||||
|
@ -76,18 +77,16 @@ onMounted(async () => {
|
|||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.binary-data {
|
||||
background-color: var(--color-foreground-xlight);
|
||||
|
||||
&.image {
|
||||
max-height: calc(100% - 1em);
|
||||
max-width: calc(100% - 1em);
|
||||
img,
|
||||
video {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.binary-data {
|
||||
&.other,
|
||||
&.pdf {
|
||||
height: calc(100% - 1em);
|
||||
width: calc(100% - 1em);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue