repositories-panel-init
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / repository-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 "~/views-components/context-menu/context-menu-action-set";
6 import { AdvancedIcon, RemoveIcon, ShareIcon } from "~/components/icon/icon";
7 import { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
8
9 export const repositoryActionSet: ContextMenuActionSet = [[{
10     name: "Attributes",
11     icon: AdvancedIcon,
12     execute: (dispatch, resource) => {
13         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
14     }
15 }, {
16     name: "Share",
17     icon: ShareIcon,
18     execute: (dispatch, resource) => {
19         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
20     }
21 }, {
22     name: "Advanced",
23     icon: AdvancedIcon,
24     execute: (dispatch, resource) => {
25         dispatch<any>(openFileRemoveDialog(resource.uuid));
26     }
27 },
28 {
29     name: "Remove",
30     icon: RemoveIcon,
31     execute: (dispatch, resource) => {
32         dispatch<any>(openFileRemoveDialog(resource.uuid));
33     }
34 }]];