mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Improve the profile feature to Show the logged user name
This commit is contained in:
parent
d28d3ef310
commit
d19d9f20c4
@ -102,6 +102,7 @@ class App extends React.Component {
|
||||
window.location.origin + "/publisher-ui-request-handler/user",
|
||||
"platform=publisher"
|
||||
).then(res => {
|
||||
config.user = res.data.data;
|
||||
const pageURL = window.location.pathname;
|
||||
const lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1);
|
||||
if (lastURLSegment === "login") {
|
||||
|
||||
@ -122,7 +122,7 @@ class Dashboard extends React.Component {
|
||||
<SubMenu className="profile"
|
||||
title={
|
||||
<span className="submenu-title-wrapper">
|
||||
<Icon type="user"/>Profile
|
||||
<Icon type="user"/>{this.config.user}
|
||||
</span>}>
|
||||
<Logout/>
|
||||
</SubMenu>
|
||||
|
||||
@ -82,6 +82,7 @@ class App extends React.Component {
|
||||
window.location.origin + "/store-ui-request-handler/user",
|
||||
"platform=publisher"
|
||||
).then(res => {
|
||||
config.user = res.data.data;
|
||||
const pageURL = window.location.pathname;
|
||||
const lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1);
|
||||
if (lastURLSegment === "login") {
|
||||
|
||||
@ -41,6 +41,7 @@ class Dashboard extends React.Component {
|
||||
collapsed: false
|
||||
};
|
||||
this.logo = this.props.context.theme.logo;
|
||||
this.config = this.props.context;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@ -138,7 +139,7 @@ class Dashboard extends React.Component {
|
||||
title={
|
||||
<span className="submenu-title-wrapper">
|
||||
<Icon type="user"/>
|
||||
Profile
|
||||
{this.config.user}
|
||||
</span> }>
|
||||
<Logout/>
|
||||
</SubMenu>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user