From e804e182cf8c83d5725e64f71c0c73f37ddf7e37 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 28 Nov 2024 17:57:45 +0100 Subject: [PATCH] fix: Apply viewer wrapper as we do it in text Signed-off-by: Julius Knorr --- src/view/Office.vue | 2 +- src/view/Viewer.vue | 64 +++++++++++++++++++++++++++++++++++++++++++++ src/viewer.js | 5 ++-- 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 src/view/Viewer.vue diff --git a/src/view/Office.vue b/src/view/Office.vue index 449463ac1e..68f4a1b364 100644 --- a/src/view/Office.vue +++ b/src/view/Office.vue @@ -364,7 +364,7 @@ export default { FilesAppIntegration.updateFileInfo(undefined, Date.now()) } disableScrollLock() - this.$parent.close() + this.$emit('close') }, reload() { this.loading = LOADING_STATE.LOADING diff --git a/src/view/Viewer.vue b/src/view/Viewer.vue new file mode 100644 index 0000000000..2bb2a6b3a6 --- /dev/null +++ b/src/view/Viewer.vue @@ -0,0 +1,64 @@ + + + + diff --git a/src/viewer.js b/src/viewer.js index 9f04ca17ea..5976cb5568 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -6,10 +6,9 @@ import './init-shared.js' import '../css/filetypes.scss' -import Vue from 'vue' -import Office from './view/Office.vue' import { getCapabilities } from './services/capabilities.ts' import { autoSetupBuiltInCodeServerIfNeeded } from './services/builtInCode.ts' +import Viewer from './view/Viewer.vue' const supportedMimes = getCapabilities().mimetypes @@ -18,7 +17,7 @@ if (OCA.Viewer) { id: 'richdocuments', group: null, mimes: supportedMimes, - component: Vue.extend(Office), + component: Viewer, theme: 'default', canCompare: true, })