1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet } from "../context-menu-action-set";
6 import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/icon/icon";
7 import { ToggleFavoriteAction } from "../actions/favorite-action";
8 import { toggleFavorite } from "~/store/favorites/favorites-actions";
9 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
10 import { openMoveProjectDialog } from '~/store/projects/project-move-actions';
11 import { openProjectCreateDialog } from '~/store/projects/project-create-actions';
12 import { openProjectUpdateDialog } from '~/store/projects/project-update-actions';
14 export const projectActionSet: ContextMenuActionSet = [[
18 execute: (dispatch, resource) => {
19 dispatch<any>(openProjectCreateDialog(resource.uuid));
25 execute: (dispatch, resource) => {
26 dispatch<any>(openProjectUpdateDialog(resource));
30 component: ToggleFavoriteAction,
31 execute: (dispatch, resource) => {
32 dispatch<any>(toggleFavorite(resource)).then(() => {
33 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
40 execute: (dispatch, resource) => dispatch<any>(openMoveProjectDialog(resource))
44 name: "Copy to project",
45 execute: (dispatch, resource) => {