Merge branch '16719-collection-version-basic-ui'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-action-set.ts
index ea97a9b17ebfb4937d4b22d5b58fbc4ea4276c11..7fa6f2241f5144f6c21eeefef5eb2375d737fd09 100644 (file)
@@ -27,7 +27,7 @@ export const readOnlyCollectionActionSet: ContextMenuActionSet = [[
     },
     {
         icon: CopyIcon,
-        name: "Copy to project",
+        name: "Make a copy",
         execute: (dispatch, resource) => {
             dispatch<any>(openCollectionCopyDialog(resource));
         }
@@ -49,30 +49,33 @@ export const readOnlyCollectionActionSet: ContextMenuActionSet = [[
     },
 ]];
 
-export const collectionActionSet: ContextMenuActionSet = readOnlyCollectionActionSet.concat([[
-    {
-        icon: RenameIcon,
-        name: "Edit collection",
-        execute: (dispatch, resource) => {
-            dispatch<any>(openCollectionUpdateDialog(resource));
-        }
-    },
-    {
-        icon: ShareIcon,
-        name: "Share",
-        execute: (dispatch, { uuid }) => {
-            dispatch<any>(openSharingDialog(uuid));
-        }
-    },
-    {
-        icon: MoveToIcon,
-        name: "Move to",
-        execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
-    },
-    {
-        component: ToggleTrashAction,
-        execute: (dispatch, resource) => {
-            dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
-        }
-    },
-]]);
+export const collectionActionSet: ContextMenuActionSet = [
+    [
+        ...readOnlyCollectionActionSet.reduce((prev, next) => prev.concat(next), []),
+        {
+            icon: RenameIcon,
+            name: "Edit collection",
+            execute: (dispatch, resource) => {
+                dispatch<any>(openCollectionUpdateDialog(resource));
+            }
+        },
+        {
+            icon: ShareIcon,
+            name: "Share",
+            execute: (dispatch, { uuid }) => {
+                dispatch<any>(openSharingDialog(uuid));
+            }
+        },
+        {
+            icon: MoveToIcon,
+            name: "Move to",
+            execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
+        },
+        {
+            component: ToggleTrashAction,
+            execute: (dispatch, resource) => {
+                dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
+            }
+        },
+    ]
+];