- },
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch<any>(toggleDetailsPanel());
- }
- },
- {
- icon: AdvancedIcon,
- name: "API Details",
- execute: (dispatch, resource) => {
- dispatch<any>(openAdvancedTabDialog(resource.uuid));
- }
- },
-]];
+const commonActionSet: ContextMenuActionSet = [
+ [
+ {
+ icon: OpenIcon,
+ name: "Open in new tab",
+ execute: (dispatch, resources) => {
+ dispatch<any>(openInNewTabAction(resources[0]));
+ },
+ },
+ {
+ icon: Link,
+ name: "Copy to clipboard",
+ execute: (dispatch, resources) => {
+ dispatch<any>(copyToClipboardAction(resources));
+ },
+ },
+ {
+ icon: CopyIcon,
+ name: "Make a copy",
+ execute: (dispatch, resources) => {
+ resources.forEach(resource => dispatch<any>(openCollectionCopyDialog(resource))); //here
+ },
+ },
+ {
+ icon: DetailsIcon,
+ name: "View details",
+ execute: dispatch => {
+ dispatch<any>(toggleDetailsPanel());
+ },
+ },
+ {
+ icon: AdvancedIcon,
+ name: "API Details",
+ execute: (dispatch, resources) => {
+ resources.forEach(resource => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
+ },
+ },
+ ],
+];