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: CopyIcon,
name: "Make a copy",
execute: (dispatch, resources) => {
- dispatch<any>(openCollectionCopyDialog(resources[0]));
+ console.log(resources[0]);
+ //here fix single vs one
+ if (resources[0].isSingle) dispatch<any>(openCollectionCopyDialog(resources[0]));
+ else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
},
},
{
component: ToggleTrashAction,
name: "ToggleTrashAction",
execute: (dispatch, resources: ContextMenuResource[]) => {
+ //here fix multi?
resources.forEach(resource => dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)));
},
},