Merge branch 'master'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-item-action-set.ts
index 5e8427647cd1fe4b15529d42e26d9c6cca946b96..a3bfa0b95cb30736ae8c995fcfa00e3deb463b0f 100644 (file)
@@ -3,25 +3,25 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import { RenameIcon, DownloadIcon, RemoveIcon } from "../../../components/icon/icon";
+import { RenameIcon, DownloadIcon, RemoveIcon } from "~/components/icon/icon";
+import { openRenameFileDialog } from "../../rename-file-dialog/rename-file-dialog";
+import { DownloadCollectionFileAction } from "../actions/download-collection-file-action";
+import { openFileRemoveDialog } from "../../../store/collection-panel/collection-panel-files/collection-panel-files-actions";
 
 
 export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
     name: "Rename",
     icon: RenameIcon,
     execute: (dispatch, resource) => {
-        return;
+        dispatch<any>(openRenameFileDialog(resource.name));
     }
-},{
-    name: "Download",
-    icon: DownloadIcon,
-    execute: (dispatch, resource) => {
-        return;
-    }
-},{
+}, {
+    component: DownloadCollectionFileAction,
+    execute: () => { return; }
+}, {
     name: "Remove",
     icon: RemoveIcon,
     execute: (dispatch, resource) => {
-        return;
+        dispatch<any>(openFileRemoveDialog(resource.uuid));
     }
 }]];