diff --git a/src/view/Office.vue b/src/view/Office.vue
index 27b7079786..f63a9db1f6 100644
--- a/src/view/Office.vue
+++ b/src/view/Office.vue
@@ -379,7 +379,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 5b141c67e7..befe6803f9 100644
--- a/src/viewer.js
+++ b/src/viewer.js
@@ -24,9 +24,8 @@
import './init-shared.js'
import '../css/filetypes.scss'
-import Vue from 'vue'
-import Office from './view/Office.vue'
import { getCapabilities } from '@nextcloud/capabilities'
+import Viewer from './view/Viewer.vue'
const supportedMimes = getCapabilities().richdocuments.mimetypes
@@ -35,7 +34,7 @@ if (OCA.Viewer) {
id: 'richdocuments',
group: null,
mimes: supportedMimes,
- component: Vue.extend(Office),
+ component: Viewer,
theme: 'default',
canCompare: true,
})