Merge branch '21128-toolbar-context-menu'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / root-project-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 { openCollectionCreateDialog } from 'store/collections/collection-create-actions';
7 import { NewProjectIcon, CollectionIcon } from 'components/icon/icon';
8 import { openProjectCreateDialog } from 'store/projects/project-create-actions';
9
10 export const rootProjectActionSet: ContextMenuActionSet = [
11     [
12         {
13             icon: NewProjectIcon,
14             name: 'New project',
15             execute: (dispatch, resources) => {
16                  dispatch<any>(openProjectCreateDialog(resources[0].uuid));
17             },
18         },
19         {
20             icon: CollectionIcon,
21             name: 'New Collection',
22             execute: (dispatch, resources) => {
23                  dispatch<any>(openCollectionCreateDialog(resources[0].uuid));
24             },
25         },
26     ],
27 ];