From 36f409e15db7cb4b42b087417223b5f55d2b7d1f Mon Sep 17 00:00:00 2001
From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr>
Date: Wed, 1 Mar 2023 15:12:09 +0100
Subject: [PATCH] Update translation and remove useless css

---
 src/components/CanvasAnnotations.js |  8 ++++++++
 src/containers/CanvasAnnotations.js | 16 ----------------
 src/locales/en/translation.json     |  1 +
 src/locales/fr/translation.json     |  1 +
 4 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/components/CanvasAnnotations.js b/src/components/CanvasAnnotations.js
index 365a20767..0fa2f787b 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 b334dcfcb..d4b90c976 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 238cd98ae..aeea99ae9 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 4cc56f101..2cc24e282 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",
-- 
GitLab