refs #14855-downloading-has-different-behaviour-in-a-specific-environment
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-item-action-set.ts
index 7b03c49ade34658700f9268c4bad3fcd3f966173..61603edf485156f17b693331b24da0b6afc42f67 100644 (file)
@@ -3,17 +3,17 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import { RenameIcon, DownloadIcon, RemoveIcon } from "../../../components/icon/icon";
-import { openRenameFileDialog } from "../../rename-file-dialog/rename-file-dialog";
-import { openFileRemoveDialog } from "../../file-remove-dialog/file-remove-dialog";
+import { RenameIcon, RemoveIcon } from "~/components/icon/icon";
 import { DownloadCollectionFileAction } from "../actions/download-collection-file-action";
+import { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
+import { CollectionFileViewerAction } from '~/views-components/context-menu/actions/collection-file-viewer-action';
 
 
 export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
     name: "Rename",
     icon: RenameIcon,
     execute: (dispatch, resource) => {
-        dispatch<any>(openRenameFileDialog(resource.name));
+        dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
     }
 }, {
     component: DownloadCollectionFileAction,
@@ -22,6 +22,9 @@ export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
     name: "Remove",
     icon: RemoveIcon,
     execute: (dispatch, resource) => {
-        dispatch(openFileRemoveDialog(resource.uuid));
+        dispatch<any>(openFileRemoveDialog(resource.uuid));
     }
+}], [{
+    component: CollectionFileViewerAction,
+    execute: () => { return; },
 }]];