diff options
author | Lena <lena.becker-3@mni.thm.de> | 2021-03-15 02:03:26 +0100 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-04-13 19:07:57 +0200 |
commit | ad51d884a6926bc69073d1d5aaf584acd7db2c34 (patch) | |
tree | 27ae6bb462d2612ed4af80de17ef6581820cd869 /webui/src/components | |
parent | cdbb083d196333a1a09ec5c903c584d2ef7443fb (diff) | |
download | git-bug-ad51d884a6926bc69073d1d5aaf584acd7db2c34.tar.gz |
Make Link to User Page in Popup Menu #12
Diffstat (limited to 'webui/src/components')
-rw-r--r-- | webui/src/components/CurrentIdentity/CurrentIdentity.tsx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/webui/src/components/CurrentIdentity/CurrentIdentity.tsx b/webui/src/components/CurrentIdentity/CurrentIdentity.tsx index bec8d14f..f3dff5ed 100644 --- a/webui/src/components/CurrentIdentity/CurrentIdentity.tsx +++ b/webui/src/components/CurrentIdentity/CurrentIdentity.tsx @@ -4,6 +4,7 @@ import { Button, ClickAwayListener, Grow, + Link, MenuItem, MenuList, Paper, @@ -22,6 +23,9 @@ const useStyles = makeStyles((theme) => ({ hidden: { display: 'none', }, + profileLink: { + ...theme.typography.button, + }, })); const CurrentIdentity = () => { @@ -58,7 +62,10 @@ const CurrentIdentity = () => { {user.displayName.charAt(0).toUpperCase()} </Avatar> </Button> - <LockIcon color="primary" className={!user.isProtected ? '' : ''} /> + <LockIcon + color="secondary" + className={user.isProtected ? '' : classes.hidden} + /> <Popper open={open} anchorEl={anchorRef.current} @@ -77,14 +84,14 @@ const CurrentIdentity = () => { <Paper> <ClickAwayListener onClickAway={handleClose}> <MenuList autoFocusItem={open} id="menu-list-grow"> - <MenuItem>Name: {user.name ? user.name : 'none'}</MenuItem> - <MenuItem title={user.id}> - Id: {user.humanId ? user.humanId : 'none'} - </MenuItem> - <MenuItem>Email: {user.email ? user.email : 'none'}</MenuItem> - <MenuItem>Login: {user.login ? user.login : 'none'}</MenuItem> - <MenuItem className={user.isProtected ? '' : classes.hidden}> - Protected: {user.isProtected} + <MenuItem> + <Link + color="inherit" + className={classes.profileLink} + href="/user" + > + Open profile + </Link> </MenuItem> </MenuList> </ClickAwayListener> |