Merge branch '14503_keep_services_panel'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / repository-action-set.ts
index 2341f9aceba0384f2b41c62d0393e3f9013700f5..22f6bee135c71f6b11fb6faf21b4af1fe27ed4f6 100644 (file)
@@ -4,21 +4,21 @@
 
 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
 import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from "~/components/icon/icon";
-import { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
-import { openRepositoryAttributes } from "~/store/repositories/repositories-actions";
+import { openRepositoryAttributes, openRemoveRepositoryDialog } from "~/store/repositories/repositories-actions";
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 
 export const repositoryActionSet: ContextMenuActionSet = [[{
     name: "Attributes",
     icon: AttributesIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRepositoryAttributes(resource.index!));
+    execute: (dispatch, { index }) => {
+        dispatch<any>(openRepositoryAttributes(index!));
     }
 }, {
     name: "Share",
     icon: ShareIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openSharingDialog(uuid));
     }
 }, {
     name: "Advanced",
@@ -29,7 +29,7 @@ export const repositoryActionSet: ContextMenuActionSet = [[{
 }, {
     name: "Remove",
     icon: RemoveIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openFileRemoveDialog(resource.uuid));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openRemoveRepositoryDialog(uuid));
     }
 }]];