Merge branch '13893-collection-creation'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-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 { ToggleFavoriteAction } from "../actions/favorite-action";
7 import { toggleFavorite } from "../../../store/favorites/favorites-actions";
8 import { dataExplorerActions } from "../../../store/data-explorer/data-explorer-action";
9 import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel";
10 import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "../../../components/icon/icon";
11
12 export const collectionActionSet: ContextMenuActionSet = [[
13     {
14         icon: RenameIcon,
15         name: "Edit collection",
16         execute: (dispatch, resource) => {
17             // add code
18         }
19     },
20     {
21         icon: ShareIcon,
22         name: "Share",
23         execute: (dispatch, resource) => {
24             // add code
25         }
26     },
27     {
28         icon: MoveToIcon,
29         name: "Move to",
30         execute: (dispatch, resource) => {
31             // add code
32         }
33     },
34     {
35         component: ToggleFavoriteAction,
36         execute: (dispatch, resource) => {
37             dispatch<any>(toggleFavorite(resource)).then(() => {
38                 dispatch<any>(dataExplorerActions.REQUEST_ITEMS({ id: FAVORITE_PANEL_ID }));
39             });
40         }
41     },
42     {
43         icon: CopyIcon,
44         name: "Copy to project",
45         execute: (dispatch, resource) => {
46             // add code
47         }
48     },
49     {
50         icon: DetailsIcon,
51         name: "View details",
52         execute: (dispatch, resource) => {
53             // add code
54         }
55     },
56     {
57         icon: ProvenanceGraphIcon,
58         name: "Provenance graph",
59         execute: (dispatch, resource) => {
60             // add code
61         }
62     },
63     {
64         icon: AdvancedIcon,
65         name: "Advanced",
66         execute: (dispatch, resource) => {
67             // add code
68         }
69     },
70     {
71         icon: RemoveIcon,
72         name: "Remove",
73         execute: (dispatch, resource) => {
74             // add code
75         }
76     }
77 ]];