Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,11 @@

// eslint-disable-next-line import/no-unresolved, n/no-missing-import
import 'vite/modulepreload-polyfill'
import Vue from 'vue'
import DirectEditing from './views/DirectEditing.vue'

Check warning on line 9 in src/main.js

View check run for this annotation

Codecov / codecov/patch

src/main.js#L8-L9

Added lines #L8 - L9 were not covered by tests

if (document.getElementById('app-content')) {
Promise.all([
import(/* webpackChunkName: "editor" */'vue'),
import(/* webpackChunkName: "editor" */'./views/DirectEditing.vue'),
]).then((imports) => {
const Vue = imports[0].default
Vue.prototype.t = window.t
Vue.prototype.OCA = window.OCA
const DirectEditing = imports[1].default
const vm = new Vue({
render: h => h(DirectEditing),
})
vm.$mount(document.getElementById('app-content'))
})
}
Vue.prototype.t = window.t
Vue.prototype.OCA = window.OCA

Check warning on line 12 in src/main.js

View check run for this annotation

Codecov / codecov/patch

src/main.js#L11-L12

Added lines #L11 - L12 were not covered by tests

const DirectView = Vue.extend(DirectEditing)
new DirectView().$mount('#app-content')

Check warning on line 15 in src/main.js

View check run for this annotation

Codecov / codecov/patch

src/main.js#L14-L15

Added lines #L14 - L15 were not covered by tests
4 changes: 2 additions & 2 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
// eslint-disable-next-line import/no-unresolved, n/no-missing-import
import 'vite/modulepreload-polyfill'

Check warning on line 6 in src/viewer.js

View check run for this annotation

Codecov / codecov/patch

src/viewer.js#L5-L6

Added lines #L5 - L6 were not covered by tests

import { logger } from './helpers/logger.js'
import { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'
// eslint-disable-next-line import/no-unresolved, n/no-missing-import
import 'vite/modulepreload-polyfill'

/**
* Wrapper for async registration of ViewerComponent.
Expand Down
Loading