X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e952a4d2fac7c75375a9307f7f6676bd950bd0ed..340b992768b4460ef27b1102f7065381be96f2ea:/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 121fe17a..d6095d10 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,26 +13,25 @@ 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 = [[ { icon: RenameIcon, name: "Edit collection", - execute: (dispatch, resource) => dispatch(openCollectionUpdateDialog(resource)) + execute: (dispatch, resource) => { + dispatch(openCollectionUpdateDialog(resource)); + } }, { 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) => { @@ -42,37 +41,50 @@ 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, name: "Copy to project", - execute: (dispatch, resource) => dispatch(openCollectionCopyDialog(resource)) + 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) => dispatch(openAdvancedTabDialog(resource.uuid)) + execute: (dispatch, resource) => { + dispatch(openAdvancedTabDialog(resource.uuid)); + } }, { - 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 + // } + // } ]];