From c089214a2a4bc178d0c6da63ed7d579b92523448 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 26 Jan 2024 14:44:51 +0100 Subject: [PATCH] chore: Update `@nextcloud/dialogs` to 5.1.1 Signed-off-by: Ferdinand Thiessen --- apps/files/src/actions/moveOrCopyAction.ts | 8 ++++++-- package-lock.json | 10 +++++----- package.json | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index a4e70caf37d..7fa899dc7da 100644 --- a/apps/files/src/actions/moveOrCopyAction.ts +++ b/apps/files/src/actions/moveOrCopyAction.ts @@ -29,7 +29,7 @@ import type { MoveCopyResult } from './moveOrCopyActionUtils' import { AxiosError } from 'axios' import { basename, join } from 'path' import { emit } from '@nextcloud/event-bus' -import { getFilePickerBuilder, showError } from '@nextcloud/dialogs' +import { FilePickerClosed, getFilePickerBuilder, showError } from '@nextcloud/dialogs' import { Permission, FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import Vue from 'vue' @@ -232,7 +232,11 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes: const picker = filePicker.build() picker.pick().catch((error) => { logger.debug(error as Error) - reject(new Error(t('files', 'Cancelled move or copy operation'))) + if (error instanceof FilePickerClosed) { + reject(new Error(t('files', 'Cancelled move or copy operation'))) + } else { + reject(new Error(t('files', 'Move or copy operation failed'))) + } }) }) } diff --git a/package-lock.json b/package-lock.json index 22561e93ced..6be1515e377 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@nextcloud/browserslist-config": "^3.0.0", "@nextcloud/calendar-availability-vue": "^2.0.1", "@nextcloud/capabilities": "^1.0.4", - "@nextcloud/dialogs": "^5.1.0", + "@nextcloud/dialogs": "^5.1.1", "@nextcloud/event-bus": "^3.1.0", "@nextcloud/files": "^3.1.0", "@nextcloud/initial-state": "^2.0.0", @@ -3816,9 +3816,9 @@ } }, "node_modules/@nextcloud/dialogs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.1.0.tgz", - "integrity": "sha512-SHoM9vasgzq4imnJjOROFVqJkr663ncsO8bRzgKdOpC6rC96wCEOID2+DXJmhq6tVpdHwsXjYNvBogWBwDaMJA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.1.1.tgz", + "integrity": "sha512-3jQdoI1Rw8eTt9bgIZYIkGGguwHYWhOMTMu+5QfX3FlvhI7Z086PKN1YSlLmudV9ZyXFuC5zp2o2FYjTvLcwQw==", "dependencies": { "@nextcloud/axios": "^2.4.0", "@nextcloud/event-bus": "^3.1.0", @@ -3828,7 +3828,7 @@ "@nextcloud/router": "^2.2.0", "@nextcloud/typings": "^1.7.0", "@types/toastify-js": "^1.12.3", - "@vueuse/core": "^10.7.1", + "@vueuse/core": "^10.7.2", "toastify-js": "^1.12.0", "vue-frag": "^1.4.3", "webdav": "^5.3.1" diff --git a/package.json b/package.json index baa3398324f..24b72ce751d 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@nextcloud/browserslist-config": "^3.0.0", "@nextcloud/calendar-availability-vue": "^2.0.1", "@nextcloud/capabilities": "^1.0.4", - "@nextcloud/dialogs": "^5.1.0", + "@nextcloud/dialogs": "^5.1.1", "@nextcloud/event-bus": "^3.1.0", "@nextcloud/files": "^3.1.0", "@nextcloud/initial-state": "^2.0.0", -- 2.39.5