Commit d6aaef43 authored by Matija Obreza's avatar Matija Obreza
Browse files

Show username in menu

parent e3a81677
......@@ -10,6 +10,7 @@
"users": "Users",
"login": "Login",
"logout": "Logout",
"logoutUser": "Logout <1>{{username}}</1>",
"changePassword": "Change password",
"accessions": "Accessions",
"inventory": "Inventory",
......
......@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { Divider, List, ListItem, ListItemText } from '@material-ui/core';
import Authorize from '@gringlobal-ce/client/ui/common/authorized/Authorize';
import { useTranslation } from 'react-i18next';
import { Trans, useTranslation } from 'react-i18next';
import { UserRole } from '@gringlobal-ce/client/model/gringlobal/SysUser';
import { bindActionCreators, compose } from 'redux';
import { logoutUserAction } from '@gringlobal-ce/client/action/login';
......@@ -125,7 +125,11 @@ function PublicMenu(props: { login: any, profile: any, logoutUserAction: () => v
<>
<Link to="/">
<ListItem button onClick={ props.logoutUserAction }>
<ListItemText primary={ t('navigation.logout') } />
<ListItemText primary={
<Trans i18nKey="navigation.logoutUser">
Logout <strong>{{username: props.login.user_name}}</strong>
</Trans>
} />
</ListItem>
</Link>
<ListItem button onClick={ openChangePasswordDialog }>
......
......@@ -10,6 +10,7 @@
"users": "Users",
"login": "Login",
"logout": "Logout",
"logoutUser": "Logout <1>{{username}}</1>",
"changePassword": "Change password",
"accessions": "Accessions",
"inventory": "Inventory",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment