aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/OCP
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OCP')
-rw-r--r--core/src/OCP/collaboration.js2
-rw-r--r--core/src/OCP/loader.js6
-rw-r--r--core/src/OCP/toast.js2
3 files changed, 7 insertions, 3 deletions
diff --git a/core/src/OCP/collaboration.js b/core/src/OCP/collaboration.js
index a0c36d0762b..82ff34392cf 100644
--- a/core/src/OCP/collaboration.js
+++ b/core/src/OCP/collaboration.js
@@ -7,7 +7,7 @@ import escapeHTML from 'escape-html'
/**
* @typedef TypeDefinition
- * @function {Function} action This action is executed to let the user select a resource
+ * @function action This action is executed to let the user select a resource
* @param {string} icon Contains the icon css class for the type
* @function Object() { [native code] }
*/
diff --git a/core/src/OCP/loader.js b/core/src/OCP/loader.js
index 7b4e87dd9b4..d307eb27996 100644
--- a/core/src/OCP/loader.js
+++ b/core/src/OCP/loader.js
@@ -3,6 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+import { generateFilePath } from '@nextcloud/router'
+
const loadedScripts = {}
const loadedStylesheets = {}
/**
@@ -25,7 +27,7 @@ export default {
}
loadedScripts[key] = true
return new Promise(function(resolve, reject) {
- const scriptPath = OC.filePath(app, 'js', file)
+ const scriptPath = generateFilePath(app, 'js', file)
const script = document.createElement('script')
script.src = scriptPath
script.setAttribute('nonce', btoa(OC.requestToken))
@@ -49,7 +51,7 @@ export default {
}
loadedStylesheets[key] = true
return new Promise(function(resolve, reject) {
- const stylePath = OC.filePath(app, 'css', file)
+ const stylePath = generateFilePath(app, 'css', file)
const link = document.createElement('link')
link.href = stylePath
link.type = 'text/css'
diff --git a/core/src/OCP/toast.js b/core/src/OCP/toast.js
index ae074aabda2..f93344bbc8e 100644
--- a/core/src/OCP/toast.js
+++ b/core/src/OCP/toast.js
@@ -10,6 +10,8 @@ import {
showWarning,
} from '@nextcloud/dialogs'
+/** @typedef {import('toastify-js')} Toast */
+
export default {
/**
* @deprecated 19.0.0 use `showSuccess` from the `@nextcloud/dialogs` package instead