X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2f83fcd45b4b23db2bb5bb4afbe1e863ebd77ec6..96f0b43ee4bb07e87dbeef8514a51857db069351:/services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts diff --git a/services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts b/services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts index 12fec7c402..cbdcd00428 100644 --- a/services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts +++ b/services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts @@ -2,34 +2,41 @@ // // SPDX-License-Identifier: AGPL-3.0 -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"; +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: AttributesIcon, - execute: (dispatch, { uuid }) => { - dispatch(openRepositoryAttributes(uuid)); - } -}, { - name: "Share", - icon: ShareIcon, - execute: (dispatch, { uuid }) => { - dispatch(openSharingDialog(uuid)); - } -}, { - name: "API Details", - icon: AdvancedIcon, - execute: (dispatch, resource) => { - dispatch(openAdvancedTabDialog(resource.uuid)); - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openRemoveRepositoryDialog(uuid)); - } -}]]; +export const repositoryActionSet: ContextMenuActionSet = [ + [ + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + dispatch(openRepositoryAttributes(resources[0].uuid)); + }, + }, + { + name: 'Share', + icon: ShareIcon, + execute: (dispatch, resources) => { + dispatch(openSharingDialog(resources[0].uuid)); + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + dispatch(openAdvancedTabDialog(resources[0].uuid)); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + dispatch(openRemoveRepositoryDialog(resources[0].uuid)); + }, + }, + ], +];