improve: add "Close" button to OAuth dialog, rename "Done" button elsewhere (#4212)

* Rename "Done" button to "Close", and add "Close" button OAuth dialog
* move Close button to the right
This commit is contained in:
Charles Capps
2018-03-02 18:40:54 -08:00
committed by kyle
parent 4900b11079
commit 861cc65cff
2 changed files with 9 additions and 1 deletions

View File

@@ -81,7 +81,7 @@ export default class Auths extends React.Component {
}).toArray()
}
<div className="auth-btn-wrapper">
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Done</Button>
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Close</Button>
{
nonOauthDefinitions.size === authorizedAuth.size ? <Button className="btn modal-btn auth" onClick={ this.logoutClick }>Logout</Button>
: <Button type="submit" className="btn modal-btn auth authorize">Authorize</Button>

View File

@@ -39,6 +39,13 @@ export default class Oauth2 extends React.Component {
}
}
close = (e) => {
e.preventDefault()
let { authActions } = this.props
authActions.showDefinitions(false)
}
authorize =() => {
let { authActions, errActions, getConfigs, authSelectors } = this.props
let configs = getConfigs()
@@ -231,6 +238,7 @@ export default class Oauth2 extends React.Component {
: <Button className="btn modal-btn auth authorize" onClick={ this.authorize }>Authorize</Button>
)
}
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Close</Button>
</div>
</div>