X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b4adbf55b9a1950d70e2e44c28efb13eb4d0f077..95563e85e95cae6a4ef6d2c2137fe1a3533ef8db:/src/views-components/context-menu/action-sets/project-action-set.ts diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index bc5d739ab3..aa82c7fa28 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -2,23 +2,26 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { reset, initialize } from "redux-form"; - import { ContextMenuActionSet } from "../context-menu-action-set"; -import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/icon/icon"; +import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon, DetailsIcon, AdvancedIcon } from '~/components/icon/icon'; import { ToggleFavoriteAction } from "../actions/favorite-action"; import { toggleFavorite } from "~/store/favorites/favorites-actions"; import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action"; import { openMoveProjectDialog } from '~/store/projects/project-move-actions'; -import { PROJECT_CREATE_FORM_NAME, openProjectCreateDialog } from '~/store/projects/project-create-actions'; +import { openProjectCreateDialog } from '~/store/projects/project-create-actions'; import { openProjectUpdateDialog } from '~/store/projects/project-update-actions'; +import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action"; +import { toggleProjectTrashed } from "~/store/trash/trash-actions"; +import { detailsPanelActions } from '~/store/details-panel/details-panel-action'; +import { ShareIcon } from '~/components/icon/icon'; +import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions"; +import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab"; export const projectActionSet: ContextMenuActionSet = [[ { icon: NewProjectIcon, name: "New project", execute: (dispatch, resource) => { - dispatch(reset(PROJECT_CREATE_FORM_NAME)); dispatch(openProjectCreateDialog(resource.uuid)); } }, @@ -29,6 +32,13 @@ export const projectActionSet: ContextMenuActionSet = [[ dispatch(openProjectUpdateDialog(resource)); } }, + { + icon: ShareIcon, + name: "Share", + execute: (dispatch, { uuid }) => { + dispatch(openSharingDialog(uuid)); + } + }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -37,10 +47,18 @@ export const projectActionSet: ContextMenuActionSet = [[ }); } }, + { + component: ToggleTrashAction, + execute: (dispatch, resource) => { + dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); + } + }, { icon: MoveToIcon, name: "Move to", - execute: (dispatch, resource) => dispatch(openMoveProjectDialog(resource)) + execute: (dispatch, resource) => { + dispatch(openMoveProjectDialog(resource)); + } }, { icon: CopyIcon, @@ -49,4 +67,18 @@ export const projectActionSet: ContextMenuActionSet = [[ // add code } }, + { + icon: DetailsIcon, + name: "View details", + execute: dispatch => { + dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); + } + }, + { + icon: AdvancedIcon, + name: "Advanced", + execute: (dispatch, resource) => { + dispatch(openAdvancedTabDialog(resource.uuid)); + } + }, ]];