Merge branch 'master' into 14565-admin-managing-user
[arvados.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         icon: NewProjectIcon,
13         name: "New project",
14         execute: (dispatch, resource) => {
15             dispatch<any>(openProjectCreateDialog(resource.uuid));
16         }
17     },
18     {
19         icon: CollectionIcon,
20         name: "New Collection",
21         execute: (dispatch, resource) => {
22             dispatch<any>(openCollectionCreateDialog(resource.uuid));
23         }
24     }
25 ]];