1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet } from "../context-menu-action-set";
6 import { ToggleFavoriteAction } from "../actions/favorite-action";
7 import { toggleFavorite } from "~/store/favorites/favorites-actions";
8 import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon";
9 import { openUpdater } from "~/store/collections/updater/collection-updater-action";
10 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
11 import { openMoveToDialog } from "../../move-to-dialog/move-to-dialog";
12 import { ResourceKind } from '~/models/resource';
14 export const collectionResourceActionSet: ContextMenuActionSet = [[
17 name: "Edit collection",
18 execute: (dispatch, resource) => {
19 dispatch<any>(openUpdater(resource));
25 execute: (dispatch, resource) => {
32 execute: (dispatch, resource) => dispatch<any>(openMoveToDialog({
35 kind: ResourceKind.COLLECTION
39 component: ToggleFavoriteAction,
40 execute: (dispatch, resource) => {
41 dispatch<any>(toggleFavorite(resource)).then(() => {
42 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
48 name: "Copy to project",
49 execute: (dispatch, resource) => {
56 execute: (dispatch, resource) => {
63 execute: (dispatch, resource) => {