@@ -20,7 +20,7 @@ import CardContent from '@material-ui/core/CardActions';
20
20
import DialogContentText from '@material-ui/core/DialogContentText' ;
21
21
import DialogContent from '@material-ui/core/DialogContent' ;
22
22
import Dialog from '@material-ui/core/Dialog' ;
23
- import Delete from '@material-ui/icons/Delete ' ;
23
+ import HighlightOffOutlined from '@material-ui/icons/HighlightOffOutlined ' ;
24
24
import DialogTitle from '@material-ui/core/DialogTitle' ;
25
25
import DialogActions from '@material-ui/core/DialogActions' ;
26
26
import { themeMode } from '../../withRoot' ;
@@ -328,7 +328,7 @@ export class AccessControl extends React.Component<AccessControlProps, AccessCon
328
328
const icon = this . getIcon ( provider ) ;
329
329
const dirty = ! this . equals ( oldScopes , newScopes ) ;
330
330
const identity = this . state . user && this . state . user . identities . find ( i => i . authProviderId === provider . authProviderId ) ;
331
- return ( < Card key = { this . renderKey ++ }
331
+ return ( < Card key = { `provider-token- ${ this . renderKey ++ } ` }
332
332
style = { {
333
333
verticalAlign : "top" ,
334
334
textAlign : 'center' ,
@@ -375,6 +375,15 @@ export class AccessControl extends React.Component<AccessControlProps, AccessCon
375
375
</ CardContent >
376
376
</ Grid >
377
377
378
+ { identity && ( < Grid item direction = "column" >
379
+ < span style = { { fontSize : "80%" } } >
380
+ Connected as < strong > { identity . authName } </ strong >
381
+ < IconButton style = { { padding : '4px' , marginLeft : '2px' } } onClick = { ( ) => this . setState ( { disconnectDialog : { authHost : provider . host } } ) } title = "Disconnect" >
382
+ < HighlightOffOutlined fontSize = "small" style = { { verticalAlign : 'middle' , color : 'var(--font-color2)' } } />
383
+ </ IconButton >
384
+ </ span >
385
+ </ Grid > ) }
386
+
378
387
< Grid item direction = "column" >
379
388
< CardActions style = { { display : 'block' , textAlign : 'center' , paddingTop : 15 , paddingRight : 10 , paddingBottom : 12 } } disableActionSpacing = { true } >
380
389
{ ! provider . isReadonly && (
@@ -384,11 +393,6 @@ export class AccessControl extends React.Component<AccessControlProps, AccessCon
384
393
// for authorization we set the required (if any) plus the new scopes
385
394
[ ...( provider . requirements && provider . requirements . default || [ ] ) , ...Array . from ( newScopes ) ] ) , 'Connect' ) )
386
395
}
387
- { identity && (
388
- < IconButton className = "delete-button" onClick = { ( ) => this . setState ( { disconnectDialog : { authHost : provider . host } } ) } title = "Disconnect" >
389
- < Delete fontSize = "small" />
390
- </ IconButton >
391
- ) }
392
396
</ CardActions >
393
397
</ Grid >
394
398
</ Card > ) ;
@@ -492,7 +496,7 @@ export class AccessControl extends React.Component<AccessControlProps, AccessCon
492
496
</ DialogContentText > ) ;
493
497
494
498
const returnTo = encodeURIComponent ( thisUrl . with ( { search : `updated=${ authHost } ` } ) . toString ( ) ) ;
495
- const deauthorizeUrl = window . location . href = thisUrl . withApi ( {
499
+ const deauthorizeUrl = thisUrl . withApi ( {
496
500
pathname : '/deauthorize' ,
497
501
search : `returnTo=${ returnTo } &host=${ authHost } `
498
502
} ) . toString ( ) ;
0 commit comments