X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/d8a3b5fdd6f606800e9b321acb3fca10c5183cb9..26ec4bc0f0d5ecaaedb468993400632e2d5a58c0:/src/views-components/context-menu/action-sets/collection-action-set.ts?ds=sidebyside diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts index ea97a9b1..fba2a53a 100644 --- a/src/views-components/context-menu/action-sets/collection-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-action-set.ts @@ -49,30 +49,33 @@ export const readOnlyCollectionActionSet: ContextMenuActionSet = [[ }, ]]; -export const collectionActionSet: ContextMenuActionSet = readOnlyCollectionActionSet.concat([[ - { - icon: RenameIcon, - name: "Edit collection", - execute: (dispatch, resource) => { - dispatch(openCollectionUpdateDialog(resource)); - } - }, - { - icon: ShareIcon, - name: "Share", - execute: (dispatch, { uuid }) => { - dispatch(openSharingDialog(uuid)); - } - }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) - }, - { - component: ToggleTrashAction, - execute: (dispatch, resource) => { - dispatch(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(openCollectionUpdateDialog(resource)); + } + }, + { + icon: ShareIcon, + name: "Share", + execute: (dispatch, { uuid }) => { + dispatch(openSharingDialog(uuid)); + } + }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) + }, + { + component: ToggleTrashAction, + execute: (dispatch, resource) => { + dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); + } + }, + ] +];