Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14433_properties_i...
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / project-action-set.ts
index 7171c0af0285e9c201b699e6b3a24f6023e58fa1..9b8ced5663037596646b1d1598ebd8eb6bc74d80 100644 (file)
@@ -13,7 +13,10 @@ import { openProjectUpdateDialog } from '~/store/projects/project-update-actions
 import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
 import { toggleProjectTrashed } from "~/store/trash/trash-actions";
 import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
+import { ShareIcon } from '~/components/icon/icon';
+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 projectActionSet: ContextMenuActionSet = [[
     {
@@ -30,6 +33,13 @@ export const projectActionSet: ContextMenuActionSet = [[
             dispatch<any>(openProjectUpdateDialog(resource));
         }
     },
+    {
+        icon: ShareIcon,
+        name: "Share",
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openSharingDialog(uuid));
+        }
+    },
     {
         component: ToggleFavoriteAction,
         execute: (dispatch, resource) => {
@@ -62,7 +72,7 @@ export const projectActionSet: ContextMenuActionSet = [[
         icon: DetailsIcon,
         name: "View details",
         execute: dispatch => {
-            dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
+            dispatch<any>(toggleDetailsPanel());
         }
     },
     {