Move the location of the username in the appbar.

master
Tom Hacohen 7 years ago
parent 529d96d026
commit 4e3ddcb29b

@ -8,7 +8,6 @@ import AppBar from 'material-ui/AppBar';
import Drawer from 'material-ui/Drawer'; import Drawer from 'material-ui/Drawer';
import IconButton from 'material-ui/IconButton'; import IconButton from 'material-ui/IconButton';
import { List, ListItem } from 'material-ui/List'; import { List, ListItem } from 'material-ui/List';
import FlatButton from 'material-ui/FlatButton';
import Subheader from 'material-ui/Subheader'; import Subheader from 'material-ui/Subheader';
import Divider from 'material-ui/Divider'; import Divider from 'material-ui/Divider';
import ActionCode from 'material-ui/svg-icons/action/code'; import ActionCode from 'material-ui/svg-icons/action/code';
@ -103,8 +102,8 @@ class App extends React.Component {
render() { render() {
const username = (this.props.credentials && this.props.credentials.value) ? const username = (this.props.credentials && this.props.credentials.value) ?
<FlatButton label={this.props.credentials.value.credentials.email} /> this.props.credentials.value.credentials.email
: undefined; : C.appName;
return ( return (
<MuiThemeProvider muiTheme={muiTheme}> <MuiThemeProvider muiTheme={muiTheme}>
@ -113,7 +112,6 @@ class App extends React.Component {
<AppBar <AppBar
title={C.appName} title={C.appName}
iconElementLeft={<IconButton onClick={this.toggleDrawer}><NavigationMenu /></IconButton>} iconElementLeft={<IconButton onClick={this.toggleDrawer}><NavigationMenu /></IconButton>}
iconElementRight={username}
/> />
<Drawer <Drawer
docked={false} docked={false}
@ -124,7 +122,7 @@ class App extends React.Component {
<div className="App-drawer-header"> <div className="App-drawer-header">
<img className="App-drawer-logo" src={logo} /> <img className="App-drawer-logo" src={logo} />
<div style={{color: getPalette('alternateTextColor')}} > <div style={{color: getPalette('alternateTextColor')}} >
{C.appName} {username}
</div> </div>
</div> </div>
<List> <List>

Loading…
Cancel
Save