X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8e770bee7ad8ce5af04bdb6103eff530c52dd5c8..25216cc7acedc987c26a159f0b640210c0ef101e:/src/views-components/context-menu/action-sets/project-action-set.ts diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index 57ba0ea3f1..c847113845 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -3,21 +3,21 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link, FolderSharedIcon } from '~/components/icon/icon'; +import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link, FolderSharedIcon } from 'components/icon/icon'; import { ToggleFavoriteAction } from "../actions/favorite-action"; -import { toggleFavorite } from "~/store/favorites/favorites-actions"; -import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action"; -import { openMoveProjectDialog } from '~/store/projects/project-move-actions'; -import { openProjectCreateDialog } from '~/store/projects/project-create-actions'; -import { openProjectUpdateDialog } from '~/store/projects/project-update-actions'; -import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action"; -import { toggleProjectTrashed } from "~/store/trash/trash-actions"; -import { ShareIcon } from '~/components/icon/icon'; -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'; -import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions"; -import { openWebDavS3InfoDialog } from "~/store/collections/collection-info-actions"; +import { toggleFavorite } from "store/favorites/favorites-actions"; +import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action"; +import { openMoveProjectDialog } from 'store/projects/project-move-actions'; +import { openProjectCreateDialog } from 'store/projects/project-create-actions'; +import { openProjectUpdateDialog } from 'store/projects/project-update-actions'; +import { ToggleTrashAction } from "views-components/context-menu/actions/trash-action"; +import { toggleProjectTrashed } from "store/trash/trash-actions"; +import { ShareIcon } from 'components/icon/icon'; +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'; +import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions"; +import { openWebDavS3InfoDialog } from "store/collections/collection-info-actions"; export const readOnlyProjectActionSet: ContextMenuActionSet = [[ { @@ -66,16 +66,9 @@ export const readOnlyProjectActionSet: ContextMenuActionSet = [[ }, ]]; -export const projectActionSet: ContextMenuActionSet = [ +export const filterGroupActionSet: ContextMenuActionSet = [ [ ...readOnlyProjectActionSet.reduce((prev, next) => prev.concat(next), []), - { - icon: NewProjectIcon, - name: "New project", - execute: (dispatch, resource) => { - dispatch(openProjectCreateDialog(resource.uuid)); - } - }, { icon: RenameIcon, name: "Edit project", @@ -106,3 +99,16 @@ export const projectActionSet: ContextMenuActionSet = [ }, ] ]; + +export const projectActionSet: ContextMenuActionSet = [ + [ + ...filterGroupActionSet.reduce((prev, next) => prev.concat(next), []), + { + icon: NewProjectIcon, + name: "New project", + execute: (dispatch, resource) => { + dispatch(openProjectCreateDialog(resource.uuid)); + } + }, + ] +];