X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/80fdf9603c057f1e41915e7c8890c942d240b36e..ebaede5aff01400db400a3e69bb3bec2b636db3a:/src/views-components/context-menu/action-sets/project-admin-action-set.ts diff --git a/src/views-components/context-menu/action-sets/project-admin-action-set.ts b/src/views-components/context-menu/action-sets/project-admin-action-set.ts index 1076696a..398864dc 100644 --- a/src/views-components/context-menu/action-sets/project-admin-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-admin-action-set.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon } from '~/components/icon/icon'; +import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link } 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"; @@ -17,6 +17,9 @@ 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 { TogglePublicFavoriteAction } from "~/views-components/context-menu/actions/public-favorite-action"; +import { togglePublicFavorite } from "~/store/public-favorites/public-favorites-actions"; +import { publicFavoritePanelActions } from "~/store/public-favorites-panel/public-favorites-action"; +import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions"; export const projectAdminActionSet: ContextMenuActionSet = [[ { @@ -26,6 +29,20 @@ export const projectAdminActionSet: ContextMenuActionSet = [[ dispatch(openProjectCreateDialog(resource.uuid)); } }, + { + icon: OpenIcon, + name: "Open in new tab", + execute: (dispatch, resource) => { + dispatch(openInNewTabAction(resource)); + } + }, + { + icon: Link, + name: "Copy to clipboard", + execute: (dispatch, resource) => { + dispatch(copyToClipboardAction(resource)); + } + }, { icon: RenameIcon, name: "Edit project", @@ -42,6 +59,7 @@ export const projectAdminActionSet: ContextMenuActionSet = [[ }, { component: ToggleFavoriteAction, + name: 'ToggleFavoriteAction', execute: (dispatch, resource) => { dispatch(toggleFavorite(resource)).then(() => { dispatch(favoritePanelActions.REQUEST_ITEMS()); @@ -50,9 +68,10 @@ export const projectAdminActionSet: ContextMenuActionSet = [[ }, { component: TogglePublicFavoriteAction, + name: 'TogglePublicFavoriteAction', execute: (dispatch, resource) => { - dispatch(toggleFavorite(resource)).then(() => { - dispatch(favoritePanelActions.REQUEST_ITEMS()); + dispatch(togglePublicFavorite(resource)).then(() => { + dispatch(publicFavoritePanelActions.REQUEST_ITEMS()); }); } }, @@ -86,6 +105,7 @@ export const projectAdminActionSet: ContextMenuActionSet = [[ }, { component: ToggleTrashAction, + name: 'ToggleTrashAction', execute: (dispatch, resource) => { dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); }