summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/components/FileEntry.vue11
-rw-r--r--apps/files/src/components/FilesListHeaderActions.vue4
2 files changed, 10 insertions, 5 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index 260294e1a36..130cd12367e 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -103,7 +103,7 @@ import { debounce } from 'debounce'
import { formatFileSize } from '@nextcloud/files'
import { Fragment } from 'vue-fragment'
import { join } from 'path'
-import { showError } from '@nextcloud/dialogs'
+import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
import CancelablePromise from 'cancelable-promise'
import FileIcon from 'vue-material-design-icons/File.vue'
@@ -434,10 +434,15 @@ export default Vue.extend({
const displayName = action.displayName([this.source], this.currentView)
try {
this.loading = action.id
- await action.exec(this.source, this.currentView)
+ const success = await action.exec(this.source, this.currentView)
+ if (success) {
+ showSuccess(this.t('files', '"{displayName}" action executed successfully', { displayName }))
+ return
+ }
+ showError(this.t('files', '"{displayName}" action failed', { displayName }))
} catch (e) {
logger.error('Error while executing action', { action, e })
- showError(this.t('files', 'Error while executing action "{displayName}"', { displayName }))
+ showError(this.t('files', '"{displayName}" action failed', { displayName }))
} finally {
this.loading = ''
}
diff --git a/apps/files/src/components/FilesListHeaderActions.vue b/apps/files/src/components/FilesListHeaderActions.vue
index 5cf0fdbe373..b7d48f1de25 100644
--- a/apps/files/src/components/FilesListHeaderActions.vue
+++ b/apps/files/src/components/FilesListHeaderActions.vue
@@ -136,11 +136,11 @@ export default Vue.extend({
}
// Show success message and clear selection
- showSuccess(this.t('files', '"{displayName}" batch action successfully executed', { displayName }))
+ showSuccess(this.t('files', '"{displayName}" batch action executed successfully', { displayName }))
this.selectionStore.reset()
} catch (e) {
logger.error('Error while executing action', { action, e })
- showError(this.t('files', 'Error while executing action "{displayName}"', { displayName }))
+ showError(this.t('files', '"{displayName}" action failed', { displayName }))
} finally {
this.loading = null
}