Skip to content

Commit 861cc65

Browse files
charlescappsshockey
authored andcommitted
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
1 parent 4900b11 commit 861cc65

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/core/components/auth/auths.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default class Auths extends React.Component {
8181
}).toArray()
8282
}
8383
<div className="auth-btn-wrapper">
84-
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Done</Button>
84+
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Close</Button>
8585
{
8686
nonOauthDefinitions.size === authorizedAuth.size ? <Button className="btn modal-btn auth" onClick={ this.logoutClick }>Logout</Button>
8787
: <Button type="submit" className="btn modal-btn auth authorize">Authorize</Button>

src/core/components/auth/oauth2.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ export default class Oauth2 extends React.Component {
3939
}
4040
}
4141

42+
close = (e) => {
43+
e.preventDefault()
44+
let { authActions } = this.props
45+
46+
authActions.showDefinitions(false)
47+
}
48+
4249
authorize =() => {
4350
let { authActions, errActions, getConfigs, authSelectors } = this.props
4451
let configs = getConfigs()
@@ -231,6 +238,7 @@ export default class Oauth2 extends React.Component {
231238
: <Button className="btn modal-btn auth authorize" onClick={ this.authorize }>Authorize</Button>
232239
)
233240
}
241+
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Close</Button>
234242
</div>
235243

236244
</div>

0 commit comments

Comments
 (0)