1332a67b9f4007deab7483a3ba0dc2429e351b5e
[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 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
9
10 export const repositoryActionSet: ContextMenuActionSet = [[{
11     name: "Attributes",
12     icon: AdvancedIcon,
13     execute: (dispatch, resource) => {
14         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
15     }
16 }, {
17     name: "Share",
18     icon: ShareIcon,
19     execute: (dispatch, resource) => {
20         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
21     }
22 }, {
23     name: "Advanced",
24     icon: AdvancedIcon,
25     execute: (dispatch, resource) => {
26         dispatch<any>(openAdvancedTabDialog(resource.uuid, resource.index));
27     }
28 }, {
29     name: "Remove",
30     icon: RemoveIcon,
31     execute: (dispatch, resource) => {
32         dispatch<any>(openFileRemoveDialog(resource.uuid));
33     }
34 }]];