download-selected
[arvados.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 import { FileViewerActions } from '~/views-components/context-menu/actions/file-viewer-actions';
10
11
12 export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
13     name: "Rename",
14     icon: RenameIcon,
15     execute: (dispatch, resource) => {
16         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
17     }
18 }, {
19     component: DownloadCollectionFileAction,
20     execute: () => { return; }
21 }, {
22     name: "Remove",
23     icon: RemoveIcon,
24     execute: (dispatch, resource) => {
25         dispatch<any>(openFileRemoveDialog(resource.uuid));
26     }
27 }], [{
28     component: FileViewerActions,
29     execute: () => { return; },
30 }]];