diff --git a/api-editor/gui/src/features/annotations/AnnotationView.tsx b/api-editor/gui/src/features/annotations/AnnotationView.tsx index 884ff768c..cc0dbb934 100644 --- a/api-editor/gui/src/features/annotations/AnnotationView.tsx +++ b/api-editor/gui/src/features/annotations/AnnotationView.tsx @@ -1,6 +1,6 @@ import { Button, ButtonGroup, Icon, IconButton, Stack, Text as ChakraText, Tooltip } from '@chakra-ui/react'; import React from 'react'; -import { FaCheck, FaFlag, FaQuestion, FaTimes, FaTrash, FaWrench } from 'react-icons/fa'; +import { FaCheck, FaFlag, FaQuestion, FaRobot, FaTimes, FaTrash, FaUser, FaWrench } from 'react-icons/fa'; import { useAppDispatch, useAppSelector } from '../../app/hooks'; import { removeBoundaryAnnotation, @@ -35,6 +35,7 @@ import { selectRemoveAnnotation, selectRenameAnnotation, selectTodoAnnotation, + selectUsername, selectUsernameIsValid, selectValueAnnotation, } from './annotationSlice'; @@ -332,6 +333,14 @@ const AnnotationTag: React.FC = function ({ const authors = annotation.authors ?? []; const authorText = createAuthorText(authors); + const username = useAppSelector(selectUsername); + + let rightIcon; + if (authors.includes(username)) { + rightIcon = ; + } else if (authors.length === 1 && authors[0] === '$autogen$') { + rightIcon = ; + } const isReportable = reportable && authors.length === 1 && authors.includes('$autogen$'); @@ -375,6 +384,7 @@ const AnnotationTag: React.FC = function ({