add pdf and html framing in creations

This commit is contained in:
axolotle
2021-10-22 18:32:12 +02:00
parent f53e6c442b
commit eaa6b6ff8a
4 changed files with 25 additions and 4 deletions
+13
View File
@@ -40,6 +40,19 @@ export default {
if (node.type === 'Creation') {
node.variant = [{ id: 0 }]
if (node.files && node.files.length) {
const mime = node.files[0].filemime
if (mime === 'application/pdf') {
node.iframeUrl = node.files[0].url + '#toolbar=0&navpanes=0&statusbar=0'
} else if (mime === 'text/html') {
node.iframeUrl = node.files[0].url
} else if (node.piece && node.piece.url) {
node.iframeUrl = node.piece.url
}
}
} else if (node.piece && node.piece.url) {
node.iframeUrl = node.piece.url
}
}
if (node.date) {