X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/833a5d07f87b31133ade505b82215b9a5d47bdc3..c11055f2d6ce8385088bc221eab1175e31777ec0:/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 da11b476..a3bfa0b9 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,26 +3,25 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { RenameIcon, DownloadIcon, RemoveIcon } from "../../../components/icon/icon"; -import { openRemoveDialog } from "../../remove-dialog/remove-dialog"; +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(openRenameFileDialog(resource.name)); } -},{ - name: "Download", - icon: DownloadIcon, - execute: (dispatch, resource) => { - return; - } -},{ +}, { + component: DownloadCollectionFileAction, + execute: () => { return; } +}, { name: "Remove", icon: RemoveIcon, execute: (dispatch, resource) => { - dispatch(openRemoveDialog('selected file')); + dispatch(openFileRemoveDialog(resource.uuid)); } }]];