adding/removing-from-public-favorites
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-action-set.ts
index 07e150245486d85442034849250a2a41acdb4d0d..fe77b749226b4c44de2af1a32e2dad0f9650deb0 100644 (file)
@@ -12,9 +12,9 @@ import { openMoveCollectionDialog } from '~/store/collections/collection-move-ac
 import { openCollectionCopyDialog } from "~/store/collections/collection-copy-actions";
 import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
 import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
-import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
 import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions';
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
+import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
 
 export const collectionActionSet: ContextMenuActionSet = [[
     {
@@ -31,11 +31,6 @@ export const collectionActionSet: ContextMenuActionSet = [[
             dispatch<any>(openSharingDialog(uuid));
         }
     },
-    {
-        icon: MoveToIcon,
-        name: "Move to",
-        execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
-    },
     {
         component: ToggleFavoriteAction,
         execute: (dispatch, resource) => {
@@ -45,10 +40,9 @@ export const collectionActionSet: ContextMenuActionSet = [[
         }
     },
     {
-        component: ToggleTrashAction,
-        execute: (dispatch, resource) => {
-            dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
-        }
+        icon: MoveToIcon,
+        name: "Move to",
+        execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
     },
     {
         icon: CopyIcon,
@@ -62,16 +56,16 @@ export const collectionActionSet: ContextMenuActionSet = [[
         icon: DetailsIcon,
         name: "View details",
         execute: dispatch => {
-            dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
-        }
-    },
-    {
-        icon: ProvenanceGraphIcon,
-        name: "Provenance graph",
-        execute: (dispatch, resource) => {
-            // add code
+            dispatch<any>(toggleDetailsPanel());
         }
     },
+    // {
+    //     icon: ProvenanceGraphIcon,
+    //     name: "Provenance graph",
+    //     execute: (dispatch, resource) => {
+    //         // add code
+    //     }
+    // },
     {
         icon: AdvancedIcon,
         name: "Advanced",
@@ -80,10 +74,16 @@ export const collectionActionSet: ContextMenuActionSet = [[
         }
     },
     {
-        icon: RemoveIcon,
-        name: "Remove",
+        component: ToggleTrashAction,
         execute: (dispatch, resource) => {
-            // add code
+            dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
         }
-    }
+    },
+    // {
+    //     icon: RemoveIcon,
+    //     name: "Remove",
+    //     execute: (dispatch, resource) => {
+    //         // add code
+    //     }
+    // }
 ]];