X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6661ea52b2e50ae43b421548007389fe3fa64fe6..9d465addb74ffb1209dab4b86e45f933bb21c840:/src/views-components/context-menu/action-sets/collection-action-set.ts?ds=sidebyside 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 5fb4f2d11d..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 @@ -6,18 +6,20 @@ import { ContextMenuActionSet } from "../context-menu-action-set"; import { ToggleFavoriteAction } from "../actions/favorite-action"; import { toggleFavorite } from "~/store/favorites/favorites-actions"; import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "~/components/icon/icon"; -import { openUpdater } from "~/store/collections/updater/collection-updater-action"; +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 "~/views-components/project-copy-dialog/project-copy-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(openUpdater(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,