X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6a6fea74799f8fc473578978499f66171f5b6ab3..f1db282d059c1d0a6e264943344e09bda5d40282:/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 7171c0af..660d7ea0 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 @@ -12,8 +12,10 @@ 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"; +import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action'; export const projectActionSet: ContextMenuActionSet = [[ { @@ -30,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) => { @@ -38,12 +47,6 @@ export const projectActionSet: ContextMenuActionSet = [[ }); } }, - { - component: ToggleTrashAction, - execute: (dispatch, resource) => { - dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); - } - }, { icon: MoveToIcon, name: "Move to", @@ -51,18 +54,18 @@ export const projectActionSet: ContextMenuActionSet = [[ dispatch(openMoveProjectDialog(resource)); } }, - { - icon: CopyIcon, - name: "Copy to project", - execute: (dispatch, resource) => { - // add code - } - }, + // { + // icon: CopyIcon, + // name: "Copy to project", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { icon: DetailsIcon, name: "View details", execute: dispatch => { - dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); + dispatch(toggleDetailsPanel()); } }, { @@ -72,4 +75,10 @@ export const projectActionSet: ContextMenuActionSet = [[ dispatch(openAdvancedTabDialog(resource.uuid)); } }, + { + component: ToggleTrashAction, + execute: (dispatch, resource) => { + dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); + } + }, ]];