Merge branch 'master' into 14452-my-account
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / repository-action-set.ts
index b2bcb5cf6bba34fd41521dca215863f07f616bc9..82c2f2b8e04909b861d561ff59557c89ae973a1c 100644 (file)
@@ -4,32 +4,32 @@
 
 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
 import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from "~/components/icon/icon";
-import { openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
 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, { uuid }) => {
+        dispatch<any>(openRepositoryAttributes(uuid));
     }
 }, {
     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",
     icon: AdvancedIcon,
     execute: (dispatch, resource) => {
-        dispatch<any>(openAdvancedTabDialog(resource.uuid, resource.index));
+        dispatch<any>(openAdvancedTabDialog(resource.uuid));
     }
 }, {
     name: "Remove",
     icon: RemoveIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRemoveRepositoryDialog(resource.uuid));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openRemoveRepositoryDialog(uuid));
     }
 }]];