From 06267f00901a2a7ea157529279ee893abbf28766 Mon Sep 17 00:00:00 2001 From: Arsam Islami Date: Fri, 8 Jul 2022 11:14:46 +0200 Subject: [PATCH 1/5] feat: Added a user icon for annotations which where added by the current user. --- api-editor/gui/src/features/annotations/AnnotationView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api-editor/gui/src/features/annotations/AnnotationView.tsx b/api-editor/gui/src/features/annotations/AnnotationView.tsx index 884ff768c..230623ef2 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, 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,7 @@ const AnnotationTag: React.FC = function ({ const authors = annotation.authors ?? []; const authorText = createAuthorText(authors); + const username = useAppSelector(selectUsername); const isReportable = reportable && authors.length === 1 && authors.includes('$autogen$'); @@ -375,6 +377,7 @@ const AnnotationTag: React.FC = function ({