PR feedback

This commit is contained in:
David Baker 2017-02-13 19:09:43 +00:00
parent 8fc3104507
commit 36d126f3a9
4 changed files with 7 additions and 15 deletions

View file

@ -38,6 +38,10 @@ export default React.createClass({
// callback
makeRequest: React.PropTypes.func.isRequired,
// callback called when the auth process has finished
// @param {bool} status True if the operation requiring
// auth was completed sucessfully, false if canceled.
// @param result The result of the authenticated call
onFinished: React.PropTypes.func.isRequired,
},
@ -107,10 +111,6 @@ export default React.createClass({
}
},
_onCancel: function() {
this.props.onFinished(false);
},
_submitAuthDict: function(authData) {
this._authLogic.submitAuthDict(authData);
},
@ -131,8 +131,6 @@ export default React.createClass({
},
render: function() {
const Loader = sdk.getComponent("elements.Spinner");
let error = null;
if (this.state.errorText) {
error = (

View file

@ -61,8 +61,6 @@ export default React.createClass({
},
_onCancelClick: function(e) {
e.stopPropagation();
e.preventDefault();
this.props.onFinished();
},

View file

@ -49,10 +49,6 @@ export default React.createClass({
};
},
_onCancelClick: function() {
this.props.onFinished(false);
},
render: function() {
const InteractiveAuth = sdk.getComponent("structures.InteractiveAuth");
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');

View file

@ -21,7 +21,7 @@ import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
/* This file contains a collection of components which are used by the
* InteractiveAuthDialog to prompt the user to enter the information needed
* InteractiveAuth to prompt the user to enter the information needed
* for an auth stage. (The intention is that they could also be used for other
* components, such as the registration flow).
*
@ -187,7 +187,7 @@ export const FallbackAuthEntry = React.createClass({
}
},
onSubmitClick: function() {
_onShowFallbackClick: function() {
var url = MatrixClientPeg.get().getFallbackAuthUrl(
this.props.loginType,
this.props.authSessionId
@ -207,7 +207,7 @@ export const FallbackAuthEntry = React.createClass({
render: function() {
return (
<div>
Click "Submit" to authenticate
<a onClick={this._onShowFallbackClick}>Start authentication</a>
<div className="error">
{this.props.errorText}
</div>