diff --git a/src/components/CanvasAnnotations.js b/src/components/CanvasAnnotations.js index 365a207674b734cb792a863c1256f2d39e192054..0fa2f787b2bfdb61f29bfdcecd4ee5fd6a9aba61 100644 --- a/src/components/CanvasAnnotations.js +++ b/src/components/CanvasAnnotations.js @@ -154,6 +154,14 @@ export class CanvasAnnotations extends Component { </ScrollTo> )) } + {annotations.length == 0 + && ( + <MenuItem> + <Typography> + {t('noAnnotationFound')} + </Typography> + </MenuItem> + )} </MenuList> </> ); diff --git a/src/containers/CanvasAnnotations.js b/src/containers/CanvasAnnotations.js index b334dcfcb32df152c3848b53c543ae2c5b7304ab..d4b90c97631006b6bb0b2be252e5c9b08c937713 100644 --- a/src/containers/CanvasAnnotations.js +++ b/src/containers/CanvasAnnotations.js @@ -80,25 +80,9 @@ const styles = theme => ({ flexGrow: 1, }, hovered: {}, - inputInput: { - padding: theme.spacing(1, 1, 1, 0), - // vertical padding + font size from searchIcon - paddingLeft: `calc(1em + ${theme.spacing(4)}px)`, - transition: theme.transitions.create('width'), - width: '100%', - [theme.breakpoints.up('md')]: { - width: '20ch', - }, - }, - inputRoot: { - color: 'inherit', - }, manifestLabel: { fontSize: '10px', }, - menuButton: { - marginRight: theme.spacing(2), - }, searchAnnotationsTextfield: { width: '100%', }, diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 238cd98aea7a6fceaf44ada0f9c7ced99cd6926a..aeea99ae9b3566ba6338ce5080868d2090ebcd8a 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -96,6 +96,7 @@ "multipartCollection": "Multipart Collection", "nextCanvas": "Next item", "noItemSelected": "No item selected", + "noAnnotationFound": "No annotation found", "numItems_one": "{{number}} item", "numItems_other": "{{number}} items", "off": "Off", diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json index 4cc56f10173e0352b51c041ddfbeb0f540016bcc..2cc24e282b588b293cd1e9033e21a55f094c7db4 100644 --- a/src/locales/fr/translation.json +++ b/src/locales/fr/translation.json @@ -92,6 +92,7 @@ "moveCompanionWindowToRight": "Déplacer à droite", "nextCanvas": "Suivant", "noItemSelected": "Aucun élément sélectionné", + "noAnnotationFound": "Aucune annotation trouvé", "numItems_one": "{{number}} image", "numItems_other": "{{number}} images", "off": "aucun",