X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/4ae10b1717541336c32778bc69bd1d4ea8fc78ab..fca732a280e0e078a026ef8326eb5ad65f9864c6:/src/views-components/context-menu/action-sets/collection-action-set.ts diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts index cff30fb1..9d26fad2 100644 --- a/src/views-components/context-menu/action-sets/collection-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-action-set.ts @@ -13,6 +13,9 @@ import { openCollectionCopyDialog } from "~/store/collections/collection-copy-ac import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action"; import { toggleCollectionTrashed } from "~/store/trash/trash-actions"; import { detailsPanelActions } from '~/store/details-panel/details-panel-action'; +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 collectionActionSet: ContextMenuActionSet = [[ { @@ -25,15 +28,10 @@ export const collectionActionSet: ContextMenuActionSet = [[ { icon: ShareIcon, name: "Share", - execute: (dispatch, resource) => { - // add code + execute: (dispatch, { uuid }) => { + dispatch(openSharingDialog(uuid)); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) - }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -48,37 +46,45 @@ export const collectionActionSet: ContextMenuActionSet = [[ dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); } }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) + }, { icon: CopyIcon, name: "Copy to project", execute: (dispatch, resource) => { dispatch(openCollectionCopyDialog(resource)); } + }, { icon: DetailsIcon, name: "View details", - execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()) - }, - { - icon: ProvenanceGraphIcon, - name: "Provenance graph", - execute: (dispatch, resource) => { - // add code + execute: dispatch => { + dispatch(toggleDetailsPanel()); } }, + // { + // icon: ProvenanceGraphIcon, + // name: "Provenance graph", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { icon: AdvancedIcon, name: "Advanced", execute: (dispatch, resource) => { - // add code - } - }, - { - icon: RemoveIcon, - name: "Remove", - execute: (dispatch, resource) => { - // add code + dispatch(openAdvancedTabDialog(resource.uuid)); } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]];