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:
@@ -81,7 +81,7 @@ export default class Auths extends React.Component {
|
|||||||
}).toArray()
|
}).toArray()
|
||||||
}
|
}
|
||||||
<div className="auth-btn-wrapper">
|
<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>
|
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>
|
: <Button type="submit" className="btn modal-btn auth authorize">Authorize</Button>
|
||||||
|
|||||||
@@ -39,6 +39,13 @@ export default class Oauth2 extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close = (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
let { authActions } = this.props
|
||||||
|
|
||||||
|
authActions.showDefinitions(false)
|
||||||
|
}
|
||||||
|
|
||||||
authorize =() => {
|
authorize =() => {
|
||||||
let { authActions, errActions, getConfigs, authSelectors } = this.props
|
let { authActions, errActions, getConfigs, authSelectors } = this.props
|
||||||
let configs = getConfigs()
|
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 authorize" onClick={ this.authorize }>Authorize</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Close</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user