import { openCollectionUpdateDialog } from "store/collections/collection-update-actions";
import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action";
import { openMoveCollectionDialog } from "store/collections/collection-move-actions";
-import { openCollectionCopyDialog } from "store/collections/collection-copy-actions";
+import { openCollectionCopyDialog, openMultiCollectionCopyDialog } from "store/collections/collection-copy-actions";
import { openWebDavS3InfoDialog } from "store/collections/collection-info-actions";
import { ToggleTrashAction } from "views-components/context-menu/actions/trash-action";
import { toggleCollectionTrashed } from "store/trash/trash-actions";
{
icon: OpenIcon,
name: "Open in new tab",
- execute: (dispatch, resource) => {
- dispatch<any>(openInNewTabAction(resource));
+ execute: (dispatch, resources) => {
+ dispatch<any>(openInNewTabAction(resources[0]));
},
},
{
icon: Link,
name: "Copy to clipboard",
- execute: (dispatch, resource) => {
- dispatch<any>(copyToClipboardAction(resource));
+ execute: (dispatch, resources) => {
+ dispatch<any>(copyToClipboardAction(resources));
},
},
{
icon: CopyIcon,
name: "Make a copy",
execute: (dispatch, resources) => {
- resources.forEach(resource => dispatch<any>(openCollectionCopyDialog(resource)));
+ if (resources[0].isSingle) dispatch<any>(openCollectionCopyDialog(resources[0]));
+ else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
},
},
{