X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e952a4d2fac7c75375a9307f7f6676bd950bd0ed..4ab30205d4a2ea82d6fd4a71798ec2e1eba4ac0a:/src/views-components/context-menu/action-sets/collection-resource-action-set.ts diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts index c54d40e4..7730b145 100644 --- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts @@ -6,32 +6,32 @@ import { ContextMenuActionSet } from "../context-menu-action-set"; import { ToggleFavoriteAction } from "../actions/favorite-action"; import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action"; import { toggleFavorite } from "~/store/favorites/favorites-actions"; -import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon"; +import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon, AdvancedIcon } from '~/components/icon/icon'; import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions"; import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action"; import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions'; import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions'; 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 collectionResourceActionSet: 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,23 +42,43 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[ }, { component: ToggleTrashAction, - execute: (dispatch, resource) => dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)) + 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()) + execute: dispatch => { + dispatch(toggleDetailsPanel()); + } }, { - icon: RemoveIcon, - name: "Remove", + icon: AdvancedIcon, + name: "Advanced", execute: (dispatch, resource) => { - // add code + dispatch(openAdvancedTabDialog(resource.uuid)); } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]];