Merge branch '19383-advanced-dialog' into main. Closes #19383
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / repository-action-set.ts
index 1332a67b9f4007deab7483a3ba0dc2429e351b5e..12fec7c4024611b82ace644afc27ea7101f44a7a 100644 (file)
@@ -2,33 +2,34 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
-import { AdvancedIcon, RemoveIcon, ShareIcon } 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 { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from "components/icon/icon";
+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: AdvancedIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+    icon: AttributesIcon,
+    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",
+    name: "API Details",
     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>(openFileRemoveDialog(resource.uuid));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openRemoveRepositoryDialog(uuid));
     }
 }]];