d80fc9dab45a9617b9bd162c5f127b144b9bbb95
[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         icon: NewProjectIcon,
13         name: "New project",
14         execute: (dispatch, resource) =>  dispatch<any>(openProjectCreateDialog(resource.uuid))
15     },
16     {
17         icon: CollectionIcon,
18         name: "New Collection",
19         execute: (dispatch, resource) => dispatch<any>(openCollectionCreateDialog(resource.uuid))
20     }
21 ]];