Merge pull request #3075 from matrix-org/dbkr/wait_for_token_request
Look busy whilst requesting the email token
This commit is contained in:
commit
a591a939fd
1 changed files with 14 additions and 1 deletions
|
@ -97,7 +97,7 @@ export default React.createClass({
|
||||||
sessionId: this.props.sessionId,
|
sessionId: this.props.sessionId,
|
||||||
clientSecret: this.props.clientSecret,
|
clientSecret: this.props.clientSecret,
|
||||||
emailSid: this.props.emailSid,
|
emailSid: this.props.emailSid,
|
||||||
requestEmailToken: this.props.requestEmailToken,
|
requestEmailToken: this._requestEmailToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
this._authLogic.attemptAuth().then((result) => {
|
this._authLogic.attemptAuth().then((result) => {
|
||||||
|
@ -135,6 +135,19 @@ export default React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_requestEmailToken: async function(...args) {
|
||||||
|
this.setState({
|
||||||
|
busy: true,
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
return await this.props.requestEmailToken(...args);
|
||||||
|
} finally {
|
||||||
|
this.setState({
|
||||||
|
busy: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
tryContinue: function() {
|
tryContinue: function() {
|
||||||
if (this.refs.stageComponent && this.refs.stageComponent.tryContinue) {
|
if (this.refs.stageComponent && this.refs.stageComponent.tryContinue) {
|
||||||
this.refs.stageComponent.tryContinue();
|
this.refs.stageComponent.tryContinue();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue