1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
6 import { TogglePublicFavoriteAction } from "views-components/context-menu/actions/public-favorite-action";
7 import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
8 import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
13 openInNewTabMenuAction,
14 copyToClipboardMenuAction,
17 openWith3rdPartyClientAction,
23 } from "views-components/context-menu/action-sets/project-action-set";
25 export const togglePublicFavoriteAction = {
26 component: TogglePublicFavoriteAction,
27 name: ContextMenuActionNames.ADD_TO_PUBLIC_FAVORITES,
28 execute: (dispatch, resources) => {
29 dispatch(togglePublicFavorite(resources[0])).then(() => {
30 dispatch(publicFavoritePanelActions.REQUEST_ITEMS());
35 export const projectAdminActionSet: ContextMenuActionSet = [
38 openInNewTabMenuAction,
39 copyToClipboardMenuAction,
42 openWith3rdPartyClientAction,
49 togglePublicFavoriteAction,
53 export const filterGroupAdminActionSet: ContextMenuActionSet = [
56 openInNewTabMenuAction,
57 copyToClipboardMenuAction,
60 openWith3rdPartyClientAction,
65 togglePublicFavoriteAction,
69 export const frozenAdminActionSet: ContextMenuActionSet = [
72 togglePublicFavoriteAction,
74 openInNewTabMenuAction,
75 copyToClipboardMenuAction,
78 openWith3rdPartyClientAction,