diff --git a/package-lock.json b/package-lock.json index b5cf87c1f79..08e5cd66446 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@nextcloud/auth": "^2.5.1", "@nextcloud/axios": "^2.5.1", "@nextcloud/browser-storage": "^0.4.0", - "@nextcloud/dialogs": "^6.2.0", + "@nextcloud/dialogs": "^6.3.1", "@nextcloud/event-bus": "^3.3.2", "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", @@ -3618,22 +3618,23 @@ } }, "node_modules/@nextcloud/dialogs": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.2.0.tgz", - "integrity": "sha512-gV9cf0aLABNEVPoqvBblc0uzKc5hS0xq7dljmLeS52CkW/39nboTCYAyT2FLLth6HiJ7RJ+uUFfNxAWb9Ze74Q==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.3.1.tgz", + "integrity": "sha512-lklTssGdphRZKoR07pYU88btqguEKcQjEpKYom342i1eiMPiejgmoPZEignWJvJhpaN9CT5FoGndCrqqS3BswA==", "license": "AGPL-3.0-or-later", "dependencies": { "@mdi/js": "^7.4.47", - "@nextcloud/auth": "^2.4.0", + "@nextcloud/auth": "^2.5.1", "@nextcloud/axios": "^2.5.1", + "@nextcloud/browser-storage": "^0.4.0", "@nextcloud/event-bus": "^3.3.2", "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", - "@nextcloud/l10n": "^3.2.0", + "@nextcloud/l10n": "^3.3.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.4", "@nextcloud/typings": "^1.9.1", - "@types/toastify-js": "^1.12.3", + "@types/toastify-js": "^1.12.4", "@vueuse/core": "^11.3.0", "cancelable-promise": "^4.3.1", "p-queue": "^8.1.0", @@ -5825,9 +5826,10 @@ "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==" }, "node_modules/@types/toastify-js": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@types/toastify-js/-/toastify-js-1.12.3.tgz", - "integrity": "sha512-9RjLlbAHMSaae/KZNHGv19VG4gcLIm3YjvacCXBtfMfYn26h76YP5oxXI8k26q4iKXCB9LNfv18lsoS0JnFPTg==" + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/@types/toastify-js/-/toastify-js-1.12.4.tgz", + "integrity": "sha512-zfZHU4tKffPCnZRe7pjv/eFKzTVHozKewFCKaCjZ4gFinKgJRz/t0bkZiMCXJxPhv/ZoeDGNOeRD09R0kQZ/nw==", + "license": "MIT" }, "node_modules/@types/trusted-types": { "version": "2.0.7", @@ -22224,21 +22226,22 @@ } }, "@nextcloud/dialogs": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.2.0.tgz", - "integrity": "sha512-gV9cf0aLABNEVPoqvBblc0uzKc5hS0xq7dljmLeS52CkW/39nboTCYAyT2FLLth6HiJ7RJ+uUFfNxAWb9Ze74Q==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.3.1.tgz", + "integrity": "sha512-lklTssGdphRZKoR07pYU88btqguEKcQjEpKYom342i1eiMPiejgmoPZEignWJvJhpaN9CT5FoGndCrqqS3BswA==", "requires": { "@mdi/js": "^7.4.47", - "@nextcloud/auth": "^2.4.0", + "@nextcloud/auth": "^2.5.1", "@nextcloud/axios": "^2.5.1", + "@nextcloud/browser-storage": "^0.4.0", "@nextcloud/event-bus": "^3.3.2", "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", - "@nextcloud/l10n": "^3.2.0", + "@nextcloud/l10n": "^3.3.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.4", "@nextcloud/typings": "^1.9.1", - "@types/toastify-js": "^1.12.3", + "@types/toastify-js": "^1.12.4", "@vueuse/core": "^11.3.0", "cancelable-promise": "^4.3.1", "p-queue": "^8.1.0", @@ -23664,9 +23667,9 @@ "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==" }, "@types/toastify-js": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@types/toastify-js/-/toastify-js-1.12.3.tgz", - "integrity": "sha512-9RjLlbAHMSaae/KZNHGv19VG4gcLIm3YjvacCXBtfMfYn26h76YP5oxXI8k26q4iKXCB9LNfv18lsoS0JnFPTg==" + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/@types/toastify-js/-/toastify-js-1.12.4.tgz", + "integrity": "sha512-zfZHU4tKffPCnZRe7pjv/eFKzTVHozKewFCKaCjZ4gFinKgJRz/t0bkZiMCXJxPhv/ZoeDGNOeRD09R0kQZ/nw==" }, "@types/trusted-types": { "version": "2.0.7", diff --git a/package.json b/package.json index 0c933cac4f9..f10cf83b102 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@nextcloud/auth": "^2.5.1", "@nextcloud/axios": "^2.5.1", "@nextcloud/browser-storage": "^0.4.0", - "@nextcloud/dialogs": "^6.2.0", + "@nextcloud/dialogs": "^6.3.1", "@nextcloud/event-bus": "^3.3.2", "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", diff --git a/src/components/Menu/ActionInsertLink.vue b/src/components/Menu/ActionInsertLink.vue index 949e156c8e2..3f733506d0a 100644 --- a/src/components/Menu/ActionInsertLink.vue +++ b/src/components/Menu/ActionInsertLink.vue @@ -127,9 +127,9 @@ export default { const filePicker = buildFilePicker(this.startPath) filePicker.pick() - .then((files) => { + .then((file) => { const client = OC.Files.getClient() - client.getFileInfo(files[0]).then((_status, fileInfo) => { + client.getFileInfo(file).then((_status, fileInfo) => { const url = new URL(generateUrl(`/f/${fileInfo.id}`), window.origin) this.setLink(url.href, fileInfo.name) this.startPath = fileInfo.path + (fileInfo.type === 'dir' ? `/${fileInfo.name}/` : '') @@ -141,7 +141,6 @@ export default { this.$refs.buttonFile?.$el.focus() }) }, - /** * Allow user to enter an URL manually * Triggered when by the "link url" button @@ -163,7 +162,6 @@ export default { } this.isInputMode = true }, - /** * Save user entered URL as a link markup * Triggered when the user submits the ActionInput @@ -191,7 +189,6 @@ export default { chain.insertOrSetLink(text, { href }) chain.focus().run() }, - /** * Remove link markup at current position * Triggered by the "remove link" button @@ -200,7 +197,6 @@ export default { this.$editor.chain().unsetLink().focus().run() this.menuOpen = false }, - linkPicker() { getLinkWithPicker(null, true) .then(link => {