Merge branch '17018-readonly-file-actions-fix'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-admin-action-set.ts
index 6ba863814f22bbf7c123ab99efd731a3e04b8d62..10a839d842592dc41a1bf3e0745550c83b105663 100644 (file)
@@ -16,6 +16,8 @@ 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';
 import { TogglePublicFavoriteAction } from "~/views-components/context-menu/actions/public-favorite-action";
+import { publicFavoritePanelActions } from "~/store/public-favorites-panel/public-favorites-action";
+import { togglePublicFavorite } from "~/store/public-favorites/public-favorites-actions";
 
 export const collectionAdminActionSet: ContextMenuActionSet = [[
     {
@@ -43,8 +45,8 @@ export const collectionAdminActionSet: ContextMenuActionSet = [[
     {
         component: TogglePublicFavoriteAction,
         execute: (dispatch, resource) => {
-            dispatch<any>(toggleFavorite(resource)).then(() => {
-                dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
+            dispatch<any>(togglePublicFavorite(resource)).then(() => {
+                dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
             });
         }
     },
@@ -55,7 +57,7 @@ export const collectionAdminActionSet: ContextMenuActionSet = [[
     },
     {
         icon: CopyIcon,
-        name: "Copy to project",
+        name: "Make a copy",
         execute: (dispatch, resource) => {
             dispatch<any>(openCollectionCopyDialog(resource));
         }
@@ -68,13 +70,6 @@ export const collectionAdminActionSet: ContextMenuActionSet = [[
             dispatch<any>(toggleDetailsPanel());
         }
     },
-    // {
-    //     icon: ProvenanceGraphIcon,
-    //     name: "Provenance graph",
-    //     execute: (dispatch, resource) => {
-    //         // add code
-    //     }
-    // },
     {
         icon: AdvancedIcon,
         name: "Advanced",
@@ -88,11 +83,4 @@ export const collectionAdminActionSet: ContextMenuActionSet = [[
             dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
         }
     },
-    // {
-    //     icon: RemoveIcon,
-    //     name: "Remove",
-    //     execute: (dispatch, resource) => {
-    //         // add code
-    //     }
-    // }
 ]];