File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66// eslint-disable-next-line import/no-unresolved, n/no-missing-import
77import 'vite/modulepreload-polyfill'
8+ import Vue from 'vue'
9+ import DirectEditing from './views/DirectEditing.vue'
810
9- if ( document . getElementById ( 'app-content' ) ) {
10- Promise . all ( [
11- import ( /* webpackChunkName: "editor" */ 'vue' ) ,
12- import ( /* webpackChunkName: "editor" */ './views/DirectEditing.vue' ) ,
13- ] ) . then ( ( imports ) => {
14- const Vue = imports [ 0 ] . default
15- Vue . prototype . t = window . t
16- Vue . prototype . OCA = window . OCA
17- const DirectEditing = imports [ 1 ] . default
18- const vm = new Vue ( {
19- render : h => h ( DirectEditing ) ,
20- } )
21- vm . $mount ( document . getElementById ( 'app-content' ) )
22- } )
23- }
11+ Vue . prototype . t = window . t
12+ Vue . prototype . OCA = window . OCA
13+
14+ const DirectView = Vue . extend ( DirectEditing )
15+ new DirectView ( ) . $mount ( '#app-content' )
Original file line number Diff line number Diff line change 22 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
5+ // eslint-disable-next-line import/no-unresolved, n/no-missing-import
6+ import 'vite/modulepreload-polyfill'
57
68import { logger } from './helpers/logger.js'
79import { openMimetypesMarkdown , openMimetypesPlainText } from './helpers/mime.js'
8- // eslint-disable-next-line import/no-unresolved, n/no-missing-import
9- import 'vite/modulepreload-polyfill'
1010
1111/**
1212 * Wrapper for async registration of ViewerComponent.
You can’t perform that action at this time.
0 commit comments