X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a06392b6e6c0ad1aa9e674b82a068c71ef2fb3a3..6faff5910b3e7bdaf47ab5ede7cf8094a1b4adb9:/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts diff --git a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts index 19c9f7cd..94f702e8 100644 --- a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts @@ -3,27 +3,28 @@ // 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 { FileViewerActions } from '~/views-components/context-menu/actions/file-viewer-actions'; export const collectionFilesItemActionSet: ContextMenuActionSet = [[{ name: "Rename", icon: RenameIcon, execute: (dispatch, resource) => { - dispatch(openRenameFileDialog(resource.name)); + dispatch(openRenameFileDialog({ name: resource.name, id: resource.uuid })); } }, { - name: "Download", - icon: DownloadIcon, - execute: (dispatch, resource) => { - return; - } + component: DownloadCollectionFileAction, + execute: () => { return; } }, { name: "Remove", icon: RemoveIcon, execute: (dispatch, resource) => { - dispatch(openFileRemoveDialog(resource.uuid)); + dispatch(openFileRemoveDialog(resource.uuid)); } +}], [{ + component: FileViewerActions, + execute: () => { return; }, }]];