2baa52440162f48d68d3dcad64ad0f82a894f522
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-item-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from "../context-menu-action-set";
6 import { RenameIcon, RemoveIcon } from "~/components/icon/icon";
7 import { DownloadCollectionFileAction } from "../actions/download-collection-file-action";
8 import { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
9
10
11 export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
12     name: "Rename",
13     icon: RenameIcon,
14     execute: (dispatch, resource) => dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }))
15 }, {
16     component: DownloadCollectionFileAction,
17     execute: () => { return; }
18 }, {
19     name: "Remove",
20     icon: RemoveIcon,
21     execute: (dispatch, resource) => dispatch<any>(openFileRemoveDialog(resource.uuid))
22 }]];