Merge pull request #1797 from nextcloud/fix/noid/prototype

Fix undefined Tasks version then creating task from Dashboard or Talk
This commit is contained in:
Raimund Schlüßler 2021-09-27 13:47:27 +02:00 committed by GitHub
commit 1baf38ec1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import './css/dashboard.scss'
import { generateFilePath } from '@nextcloud/router'
import { getRequestToken } from '@nextcloud/auth'
import { translate, translatePlural } from '@nextcloud/l10n'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
import Vue from 'vue'
import Vuex from 'vuex'
@ -42,10 +42,11 @@ __webpack_nonce__ = btoa(getRequestToken())
// eslint-disable-next-line
__webpack_public_path__ = generateFilePath('tasks', '', 'js/')
Vue.prototype.t = translate
Vue.prototype.n = translatePlural
Vue.prototype.t = t
Vue.prototype.n = n
Vue.prototype.$OC = OC
Vue.prototype.$OCA = OCA
Vue.prototype.$appVersion = appVersion
document.addEventListener('DOMContentLoaded', () => {
OCA.Dashboard.register('tasks', (el) => {

View File

@ -45,7 +45,9 @@ __webpack_public_path__ = generateFilePath('tasks', '', 'js/')
Vue.prototype.t = t
Vue.prototype.n = n
Vue.prototype.OC = OC
Vue.prototype.$OC = OC
Vue.prototype.$OCA = OCA
Vue.prototype.$appVersion = appVersion
window.addEventListener('DOMContentLoaded', () => {
if (!window.OCA?.Talk?.registerMessageAction) {