X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e6039bec0497aa7e1391958e5c4f84bbaeef653e..1c6bd6afe7d0faf19f24a37a283e1d0e39de6b79:/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 9a1b1d5b..e0284e85 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,17 +3,21 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import actions from "../../../store/project/project-action"; -import { IconTypes } from "../../../components/icon/icon"; +import { projectActions } from "../../../store/project/project-action"; +import { ShareIcon, NewProjectIcon } from "../../../components/icon/icon"; +import { FavoriteActionText, FavoriteActionIcon } from "./favorite-action"; +import { favoritesActions, toggleFavorite } from "../../../store/favorites/favorites-actions"; export const projectActionSet: ContextMenuActionSet = [[{ - icon: IconTypes.FOLDER, + icon: NewProjectIcon, name: "New project", execute: (dispatch, resource) => { - dispatch(actions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid })); + dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid })); } }, { - icon: IconTypes.ANNOUNCEMENT, - name: "Share", - execute: () => { return; } -}]]; \ No newline at end of file + name: FavoriteActionText, + icon: FavoriteActionIcon, + execute: (dispatch, resource) => { + dispatch(toggleFavorite(resource.uuid)); + } +}]];