X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/aed4e6256e6d5ecb5edc60a04a5aab6f04d9fb99..31e84a9315728c2f58a26bf0e9e1d2b38326fb86:/src/views-components/context-menu/action-sets/process-resource-action-set.ts diff --git a/src/views-components/context-menu/action-sets/process-resource-action-set.ts b/src/views-components/context-menu/action-sets/process-resource-action-set.ts index 8cab9bfd51..73a65a2d41 100644 --- a/src/views-components/context-menu/action-sets/process-resource-action-set.ts +++ b/src/views-components/context-menu/action-sets/process-resource-action-set.ts @@ -14,21 +14,7 @@ import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions import { openRemoveProcessDialog } from "~/store/processes/processes-actions"; import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action'; -export const processResourceActionSet: ContextMenuActionSet = [[ - { - icon: RenameIcon, - name: "Edit process", - execute: (dispatch, resource) => { - dispatch(openProcessUpdateDialog(resource)); - } - }, - { - icon: ShareIcon, - name: "Share", - execute: (dispatch, { uuid }) => { - dispatch(openSharingDialog(uuid)); - } - }, +export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [[ { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -37,13 +23,6 @@ export const processResourceActionSet: ContextMenuActionSet = [[ }); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => { - dispatch(openMoveProcessDialog(resource)); - } - }, { icon: CopyIcon, name: "Copy to project", @@ -58,6 +37,31 @@ export const processResourceActionSet: ContextMenuActionSet = [[ dispatch(toggleDetailsPanel()); } }, +]]; + +export const processResourceActionSet: ContextMenuActionSet = [[ + ...readOnlyProcessResourceActionSet.reduce((prev, next) => prev.concat(next), []), + { + icon: RenameIcon, + name: "Edit process", + execute: (dispatch, resource) => { + dispatch(openProcessUpdateDialog(resource)); + } + }, + { + icon: ShareIcon, + name: "Share", + execute: (dispatch, { uuid }) => { + dispatch(openSharingDialog(uuid)); + } + }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => { + dispatch(openMoveProcessDialog(resource)); + } + }, { name: "Remove", icon: RemoveIcon,