Merge branch 'master' into 14078-obtain-configuration-data-from-discovery-endpoint
[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) => {
15         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
16     }
17 }, {
18     component: DownloadCollectionFileAction,
19     execute: () => { return; }
20 }, {
21     name: "Remove",
22     icon: RemoveIcon,
23     execute: (dispatch, resource) => {
24         dispatch<any>(openFileRemoveDialog(resource.uuid));
25     }
26 }]];