diff --git a/products/ASC.Files/Client/src/components/dialogs/DeleteDialog/index.js b/products/ASC.Files/Client/src/components/dialogs/DeleteDialog/index.js index f92d393677..d0496ac810 100644 --- a/products/ASC.Files/Client/src/components/dialogs/DeleteDialog/index.js +++ b/products/ASC.Files/Client/src/components/dialogs/DeleteDialog/index.js @@ -61,6 +61,8 @@ class DeleteDialogComponent extends React.Component { deleteOperation: t("Translations:DeleteOperation"), deleteFromTrash: t("Translations:DeleteFromTrash"), deleteSelectedElem: t("Translations:DeleteSelectedElem"), + FileRemoved: t("Home:FileRemoved"), + FolderRemoved: t("Home:FolderRemoved"), }; const selection = this.state.selection.filter((f) => f.checked); diff --git a/products/ASC.Files/Client/src/store/FilesActionsStore.js b/products/ASC.Files/Client/src/store/FilesActionsStore.js index c1989f2cdc..dc3bad6c86 100644 --- a/products/ASC.Files/Client/src/store/FilesActionsStore.js +++ b/products/ASC.Files/Client/src/store/FilesActionsStore.js @@ -129,6 +129,17 @@ class FilesActionStore { }; await this.uploadDataStore.loopFilesOperations(data, pbData); this.updateCurrentFolder(selection.length); + if (isRecycleBinFolder) { + return toastr.success(translations.deleteFromTrash); + } + + if (selection.length > 1) { + return toastr.success(translations.deleteSelectedElem); + } + if (selection[0].fileExst) { + return toastr.success(translations.FileRemoved); + } + return toastr.success(translations.FolderRemoved); } ); } catch (err) { @@ -737,6 +748,8 @@ class FilesActionStore { deleteOperation: t("Translations:DeleteOperation"), deleteFromTrash: t("Translations:DeleteFromTrash"), deleteSelectedElem: t("Translations:DeleteSelectedElem"), + FileRemoved: t("Home:FileRemoved"), + FolderRemoved: t("Home:FolderRemoved"), }; this.deleteAction(translations).catch((err) =>