diff --git a/package-lock.json b/package-lock.json index a08536e4375..0b1c1cb292f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.1", "@nextcloud/browser-storage": "^0.4.0", - "@nextcloud/dialogs": "^6.1.1", + "@nextcloud/dialogs": "^6.2.0", "@nextcloud/event-bus": "^3.3.2", "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", @@ -3618,35 +3618,35 @@ } }, "node_modules/@nextcloud/dialogs": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.1.1.tgz", - "integrity": "sha512-RrvFPt8SgCkg8rC0PtMC0fvyEu77kKbY2cJ/j+6RLse3rFWcNGwgNZNuRkA/Nn4GgzQ7QNhKTqWknsy0ld6rNQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.2.0.tgz", + "integrity": "sha512-gV9cf0aLABNEVPoqvBblc0uzKc5hS0xq7dljmLeS52CkW/39nboTCYAyT2FLLth6HiJ7RJ+uUFfNxAWb9Ze74Q==", "license": "AGPL-3.0-or-later", "dependencies": { "@mdi/js": "^7.4.47", "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.1", - "@nextcloud/event-bus": "^3.3.1", - "@nextcloud/files": "^3.9.0", + "@nextcloud/event-bus": "^3.3.2", + "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", - "@nextcloud/l10n": "^3.1.0", + "@nextcloud/l10n": "^3.2.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.4", "@nextcloud/typings": "^1.9.1", "@types/toastify-js": "^1.12.3", - "@vueuse/core": "^11.2.0", + "@vueuse/core": "^11.3.0", "cancelable-promise": "^4.3.1", "p-queue": "^8.1.0", "toastify-js": "^1.12.0", "vue-frag": "^1.4.3", - "webdav": "^5.7.1" + "webdav": "^5.8.0" }, "engines": { "node": "^20.0.0", "npm": "^10.0.0" }, "peerDependencies": { - "@nextcloud/vue": "^8.16.0", + "@nextcloud/vue": "^8.23.1", "vue": "^2.7.16" } }, @@ -22490,27 +22490,27 @@ } }, "@nextcloud/dialogs": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.1.1.tgz", - "integrity": "sha512-RrvFPt8SgCkg8rC0PtMC0fvyEu77kKbY2cJ/j+6RLse3rFWcNGwgNZNuRkA/Nn4GgzQ7QNhKTqWknsy0ld6rNQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.2.0.tgz", + "integrity": "sha512-gV9cf0aLABNEVPoqvBblc0uzKc5hS0xq7dljmLeS52CkW/39nboTCYAyT2FLLth6HiJ7RJ+uUFfNxAWb9Ze74Q==", "requires": { "@mdi/js": "^7.4.47", "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.1", - "@nextcloud/event-bus": "^3.3.1", - "@nextcloud/files": "^3.9.0", + "@nextcloud/event-bus": "^3.3.2", + "@nextcloud/files": "^3.10.2", "@nextcloud/initial-state": "^2.2.0", - "@nextcloud/l10n": "^3.1.0", + "@nextcloud/l10n": "^3.2.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.4", "@nextcloud/typings": "^1.9.1", "@types/toastify-js": "^1.12.3", - "@vueuse/core": "^11.2.0", + "@vueuse/core": "^11.3.0", "cancelable-promise": "^4.3.1", "p-queue": "^8.1.0", "toastify-js": "^1.12.0", "vue-frag": "^1.4.3", - "webdav": "^5.7.1" + "webdav": "^5.8.0" } }, "@nextcloud/e2e-test-server": { diff --git a/package.json b/package.json index 1c5ae368bea..f263374b7ae 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.1", "@nextcloud/browser-storage": "^0.4.0", - "@nextcloud/dialogs": "^6.1.1", + "@nextcloud/dialogs": "^6.2.0", "@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 ae6452eac4c..06abc1d1532 100644 --- a/src/components/Menu/ActionInsertLink.vue +++ b/src/components/Menu/ActionInsertLink.vue @@ -125,9 +125,9 @@ export default { const filePicker = buildFilePicker(this.startPath) filePicker.pick() - .then((file) => { + .then((files) => { const client = OC.Files.getClient() - client.getFileInfo(file).then((_status, fileInfo) => { + client.getFileInfo(files[0]).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}/` : '') @@ -136,9 +136,10 @@ export default { }) .catch(() => { // do not close menu but keep focus - this.$refs.buttonFile.$el.focus() + this.$refs.buttonFile?.$el.focus() }) }, + /** * Allow user to enter an URL manually * Triggered when by the "link url" button @@ -160,6 +161,7 @@ export default { } this.isInputMode = true }, + /** * Save user entered URL as a link markup * Triggered when the user submits the ActionInput @@ -187,6 +189,7 @@ export default { chain.insertOrSetLink(text, { href }) chain.focus().run() }, + /** * Remove link markup at current position * Triggered by the "remove link" button @@ -195,6 +198,7 @@ export default { this.$editor.chain().unsetLink().focus().run() this.menuOpen = false }, + linkPicker() { getLinkWithPicker(null, true) .then(link => {