From e0143e0dac7d7b2559ddf8d2a3c8a659a97d82bd Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Wed, 9 Jun 2021 17:41:24 +0300
Subject: [PATCH] Adjust top bar layout

---
 src/client/components/main_layout/TopBarSearchField.js | 5 +++--
 src/client/components/perspectives/sampo/TopBar.js     | 4 +++-
 src/client/translations/sampo/localeEN.json            | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/client/components/main_layout/TopBarSearchField.js b/src/client/components/main_layout/TopBarSearchField.js
index 697c32b5..726f8d2e 100644
--- a/src/client/components/main_layout/TopBarSearchField.js
+++ b/src/client/components/main_layout/TopBarSearchField.js
@@ -16,9 +16,10 @@ const styles = theme => ({
     '&:hover': {
       backgroundColor: fade(theme.palette.common.white, 0.25)
     },
-    marginRight: theme.spacing(3),
-    marginLeft: theme.spacing(2.5),
+    // marginRight: theme.spacing(3),
+    // marginLeft: theme.spacing(2.5),
     width: '100%',
+    maxWidth: 300,
     [theme.breakpoints.up('sm')]: {
       marginLeft: theme.spacing(3),
       width: 'auto'
diff --git a/src/client/components/perspectives/sampo/TopBar.js b/src/client/components/perspectives/sampo/TopBar.js
index 0015a85a..b1136f90 100644
--- a/src/client/components/perspectives/sampo/TopBar.js
+++ b/src/client/components/perspectives/sampo/TopBar.js
@@ -218,7 +218,9 @@ const TopBar = props => {
       <AppBar position='static'>
         <Toolbar className={classes.topBarToolbar}>
           <Button component={AdapterLink} to='/'>
-            <Typography className={classes.homeButtonText} variant='h6'>{intl.get('appTitle.short')}</Typography>
+            <Typography className={classes.homeButtonText} variant='h6'>
+              {props.xsScreen ? intl.get('appTitle.mobile') : intl.get('appTitle.short')}
+            </Typography>
           </Button>
           {!clientFSMode &&
             <TopBarSearchField
diff --git a/src/client/translations/sampo/localeEN.json b/src/client/translations/sampo/localeEN.json
index b0074b87..3361aa4b 100644
--- a/src/client/translations/sampo/localeEN.json
+++ b/src/client/translations/sampo/localeEN.json
@@ -6,6 +6,7 @@
   },
   "appTitle": {
     "short": "Sampo-UI",
+    "mobile": "S-UI",
     "long": "&nbsp; &nbsp; Sampo-UI &nbsp; &nbsp;",
     "subheading": "\"Here to forge for us the Sampo, Hammer us the lid in colors\""
   },
-- 
GitLab