X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d842372e4f45ee06315e511529e65ae1d3f319a0..9d465addb74ffb1209dab4b86e45f933bb21c840:/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 fab4a8055a..121fe17ab5 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 @@ -8,16 +8,18 @@ import { toggleFavorite } from "~/store/favorites/favorites-actions"; import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } 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/move-collection-dialog/move-collection-dialog'; -import { openProjectCopyDialog } from "~/store/project-copy-project-dialog/project-copy-project-dialog"; +import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions'; +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 { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab"; export const collectionActionSet: ContextMenuActionSet = [[ { icon: RenameIcon, name: "Edit collection", - execute: (dispatch, resource) => { - dispatch(openCollectionUpdateDialog(resource)); - } + execute: (dispatch, resource) => dispatch(openCollectionUpdateDialog(resource)) }, { icon: ShareIcon, @@ -39,19 +41,20 @@ export const collectionActionSet: ContextMenuActionSet = [[ }); } }, + { + component: ToggleTrashAction, + execute: (dispatch, resource) => dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)) + }, { icon: CopyIcon, name: "Copy to project", - execute: (dispatch, resource) => { - dispatch(openProjectCopyDialog({name: resource.name, projectUuid: resource.uuid})); - } + execute: (dispatch, resource) => dispatch(openCollectionCopyDialog(resource)) + }, { icon: DetailsIcon, name: "View details", - execute: (dispatch, resource) => { - // add code - } + execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()) }, { icon: ProvenanceGraphIcon, @@ -63,9 +66,7 @@ export const collectionActionSet: ContextMenuActionSet = [[ { icon: AdvancedIcon, name: "Advanced", - execute: (dispatch, resource) => { - // add code - } + execute: (dispatch, resource) => dispatch(openAdvancedTabDialog(resource.uuid)) }, { icon: RemoveIcon,