[ARVADOS-WORKBENCH2] updated: b0cb49beedbfcac126469abb37cdf8a061081075
Git user
git at public.curoverse.com
Wed Jun 6 02:20:12 EDT 2018
Summary of changes:
src/views/workbench/workbench.tsx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
via b0cb49beedbfcac126469abb37cdf8a061081075 (commit)
from 7e58fd10a7abc133b32a5084796c2b061e03ecd8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit b0cb49beedbfcac126469abb37cdf8a061081075
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Wed Jun 6 08:20:10 2018 +0200
Add displaying logged user name
Feature #13563
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>:
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 8f0562b..13c7ea2 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -23,7 +23,7 @@ import IconButton from "@material-ui/core/IconButton/IconButton";
import Menu from "@material-ui/core/Menu/Menu";
import MenuItem from "@material-ui/core/MenuItem/MenuItem";
import { AccountCircle } from "@material-ui/icons";
-import { AnyAction } from "redux";
+import { User } from "../../models/user";
const drawerWidth = 240;
@@ -59,6 +59,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: Theme) => ({
interface WorkbenchDataProps {
projects: Project[];
+ user: User;
}
interface WorkbenchActionProps {
@@ -79,12 +80,12 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
}
login = () => {
- this.props.dispatch(authActions.LOGIN() as AnyAction);
+ this.props.dispatch(authActions.LOGIN());
};
logout = () => {
this.handleClose();
- this.props.dispatch(authActions.LOGOUT() as AnyAction);
+ this.props.dispatch(authActions.LOGOUT());
};
handleOpenMenu = (event: React.MouseEvent<any>) => {
@@ -111,6 +112,9 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
</Typography>
{userLoggedIn ?
<div>
+ <Typography variant="title" color="inherit" noWrap>
+ {this.props.user.firstName} {this.props.user.lastName}
+ </Typography>
<IconButton
aria-owns={this.state.anchorEl ? 'menu-appbar' : undefined}
aria-haspopup="true"
@@ -164,7 +168,8 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
export default connect<WorkbenchDataProps>(
(state: RootState) => ({
- projects: state.projects
+ projects: state.projects,
+ user: state.auth.user!
})
)(
withStyles(styles)(Workbench)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list