Add a dedicated "Continue" button to the terms auth stage
The button itself is conditionally enabled because the ILAG dialog already has a continue button. It'd be confusing to users to have 2 continue buttons on the same dialog, so this commit adds the structure required to pass along clicks from the dialog's button down to the UI auth component. The other place the continue button would appear is on the register page (not ILAG). The button's style is different here, however that will be improved in a later commit. Part of https://github.com/vector-im/riot-web/issues/7700
This commit is contained in:
parent
fe27fae80f
commit
2ffc024fab
5 changed files with 47 additions and 7 deletions
|
@ -68,6 +68,11 @@ export default React.createClass({
|
|||
// If true, poll to see if the auth flow has been completed
|
||||
// out-of-band
|
||||
poll: PropTypes.bool,
|
||||
|
||||
// If true, components will be told that the 'Continue' button
|
||||
// is managed by some other party and should not be managed by
|
||||
// the component itself.
|
||||
continueIsManaged: PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -128,6 +133,12 @@ export default React.createClass({
|
|||
}
|
||||
},
|
||||
|
||||
tryContinue: function() {
|
||||
if (this.refs.stageComponent && this.refs.stageComponent.tryContinue) {
|
||||
this.refs.stageComponent.tryContinue();
|
||||
}
|
||||
},
|
||||
|
||||
_authStateUpdated: function(stageType, stageState) {
|
||||
const oldStage = this.state.authStage;
|
||||
this.setState({
|
||||
|
@ -192,6 +203,7 @@ export default React.createClass({
|
|||
fail={this._onAuthStageFailed}
|
||||
setEmailSid={this._setEmailSid}
|
||||
makeRegistrationUrl={this.props.makeRegistrationUrl}
|
||||
hideContinue={this.props.continueIsManaged}
|
||||
/>
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue