X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e99aebfc86f72db64d3bd04edeaabd5c31b9b3e6..50510c9d0d5f7ffcc46ec2bb1b14200de7569e24:/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 f7dbf3a7..fe77b749 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 @@ -12,8 +12,9 @@ import { openMoveCollectionDialog } from '~/store/collections/collection-move-ac import { openCollectionCopyDialog } from "~/store/collections/collection-copy-actions"; 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 = [[ { @@ -26,15 +27,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) => { @@ -44,10 +40,9 @@ export const collectionActionSet: ContextMenuActionSet = [[ } }, { - component: ToggleTrashAction, - execute: (dispatch, resource) => { - dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); - } + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) }, { icon: CopyIcon, @@ -61,16 +56,16 @@ export const collectionActionSet: ContextMenuActionSet = [[ icon: DetailsIcon, name: "View details", execute: dispatch => { - dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); - } - }, - { - icon: ProvenanceGraphIcon, - name: "Provenance graph", - execute: (dispatch, resource) => { - // add code + dispatch(toggleDetailsPanel()); } }, + // { + // icon: ProvenanceGraphIcon, + // name: "Provenance graph", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { icon: AdvancedIcon, name: "Advanced", @@ -79,10 +74,16 @@ export const collectionActionSet: ContextMenuActionSet = [[ } }, { - icon: RemoveIcon, - name: "Remove", + component: ToggleTrashAction, execute: (dispatch, resource) => { - // add code + dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); } - } + }, + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]];