diff --git a/src/components/Universe/Graph/UI/NodeControls/index.tsx b/src/components/Universe/Graph/UI/NodeControls/index.tsx index ee53f93da..297e7fbd7 100644 --- a/src/components/Universe/Graph/UI/NodeControls/index.tsx +++ b/src/components/Universe/Graph/UI/NodeControls/index.tsx @@ -7,10 +7,13 @@ import styled from 'styled-components' import { Group, Vector3 } from 'three' import { useGraphData } from '~/components/DataRetriever' import AddCircleIcon from '~/components/Icons/AddCircleIcon' +import ConstructionIcon from '~/components/Icons/ConstructionIcon' +import DocumentIcon from '~/components/Icons/DocumentIcon' import EditIcon from '~/components/Icons/EditIcon' import MergeIcon from '~/components/Icons/MergeIcon' import NodesIcon from '~/components/Icons/NodesIcon' import PlusIcon from '~/components/Icons/PlusIcon' +import RobotIcon from '~/components/Icons/RobotIcon' import { Flex } from '~/components/common/Flex' import { fetchNodeEdges } from '~/network/fetchGraphData' import { useAppStore } from '~/stores/useAppStore' @@ -164,6 +167,8 @@ export const NodeControls = memo(() => { const id = open ? 'simple-popover' : undefined + const isRepository = selectedNode?.node_type?.toLowerCase() === 'repository' + const isShowCreateTestButton = !!(selectedNode && selectedNode?.node_type?.toLowerCase() === 'function') return ( @@ -216,24 +221,63 @@ export const NodeControls = memo(() => { open={open} transformOrigin={{ vertical: 'top', horizontal: 'right' }} > - { - mergeTopicModal() - handleClose() - }} - > - Merge - - { - addEdgeToNodeModal() - handleClose() - }} - > - Add edge - + {!isRepository ? ( + <> + { + mergeTopicModal() + handleClose() + }} + > + Merge + + { + addEdgeToNodeModal() + handleClose() + }} + > + Add edge + + + ) : ( + <> + { + handleClose() + }} + > + Generate Tests + + { + handleClose() + }} + > + Add Comments + + { + handleClose() + }} + > + Review Bugs + + { + handleClose() + }} + > + Find Vulnerabilities + + + )}