Merge branch 'master'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-action-set.ts
index 9396b9e472f2e287919370f821dbb94235ae6f2f..653da011f7ed03153cfd3a360c192bf0b36d146c 100644 (file)
@@ -3,8 +3,8 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import { collectionPanelFilesAction } from "../../../store/collection-panel/collection-panel-files/collection-panel-files-actions";
-import { openRemoveDialog } from "../../remove-dialog/remove-dialog";
+import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions";
+import { createCollectionWithSelected } from "~/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected";
 
 
 export const collectionFilesActionSet: ContextMenuActionSet = [[{
@@ -12,24 +12,24 @@ export const collectionFilesActionSet: ContextMenuActionSet = [[{
     execute: (dispatch) => {
         dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
     }
-},{
+}, {
     name: "Unselect all",
     execute: (dispatch) => {
         dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
     }
-},{
+}, {
     name: "Remove selected",
-    execute: (dispatch, resource) => {
-        dispatch(openRemoveDialog('selected files'));
+    execute: (dispatch) => {
+        dispatch(openMultipleFilesRemoveDialog());
     }
-},{
+}, {
     name: "Download selected",
     execute: (dispatch, resource) => {
         return;
     }
-},{
+}, {
     name: "Create a new collection with selected",
-    execute: (dispatch, resource) => {
-        return;
+    execute: (dispatch) => {
+        dispatch<any>(createCollectionWithSelected());
     }
 }]];