diff --git a/package-lock.json b/package-lock.json index 79f88599cf2..1f74e14bfbd 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", @@ -3630,35 +3630,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" } }, @@ -27230,27 +27230,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 fb2389384ee..aa014e78568 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,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 83c9e14e642..e4aff014061 100644 --- a/src/components/Menu/ActionInsertLink.vue +++ b/src/components/Menu/ActionInsertLink.vue @@ -149,9 +149,9 @@ export default { .build() 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}/` : '') @@ -160,9 +160,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 @@ -184,6 +185,7 @@ export default { } this.isInputMode = true }, + /** * Save user entered URL as a link markup * Triggered when the user submits the ActionInput @@ -228,6 +230,7 @@ export default { } chain.focus().run() }, + /** * Remove link markup at current position * Triggered by the "remove link" button @@ -236,6 +239,7 @@ export default { this.$editor.chain().unsetLink().focus().run() this.menuOpen = false }, + linkPicker() { getLinkWithPicker(null, true) .then(link => {