Add fields, id as tooltip, and display none if value not set #12

This commit is contained in:
Lena 2021-03-08 17:39:23 +01:00 committed by Sascha
parent cef44db8c7
commit e55761b2f8
2 changed files with 14 additions and 4 deletions

View File

@ -1,10 +1,14 @@
query CurrentIdentity { query CurrentIdentity {
repository { repository {
userIdentity { userIdentity {
id
humanId humanId
email
displayName displayName
email
name
avatarUrl avatarUrl
isProtected
login
} }
} }
} }

View File

@ -71,9 +71,15 @@ const CurrentIdentity = () => {
<Paper> <Paper>
<ClickAwayListener onClickAway={handleClose}> <ClickAwayListener onClickAway={handleClose}>
<MenuList autoFocusItem={open} id="menu-list-grow"> <MenuList autoFocusItem={open} id="menu-list-grow">
<MenuItem>Display Name: {user.displayName}</MenuItem> <MenuItem>Name: {user.name ? user.name : 'none'}</MenuItem>
<MenuItem>Human Id: {user.humanId}</MenuItem> <MenuItem title={user.id}>
<MenuItem>Email: {user.email}</MenuItem> Id: {user.humanId ? user.humanId : 'none'}
</MenuItem>
<MenuItem>Email: {user.email ? user.email : 'none'}</MenuItem>
<MenuItem>Login: {user.login ? user.login : 'none'}</MenuItem>
<MenuItem>
Protected: {user.isProtected ? user.login : 'not set'}
</MenuItem>
</MenuList> </MenuList>
</ClickAwayListener> </ClickAwayListener>
</Paper> </Paper>