Merge pull request #3989 from vector-im/luke/new-guest-access-set-pwd-dialog-fuzzy
Add warm-fuzzy for successful password entry
This commit is contained in:
commit
b057e8a92f
|
@ -34,10 +34,17 @@ export default React.createClass({
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
error: null,
|
error: null,
|
||||||
|
success: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPasswordChanged: function() {
|
_onPasswordChanged: function() {
|
||||||
|
this.setState({
|
||||||
|
success: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onContinueClicked: function() {
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -58,6 +65,30 @@ export default React.createClass({
|
||||||
const ChangePassword = sdk.getComponent('views.settings.ChangePassword');
|
const ChangePassword = sdk.getComponent('views.settings.ChangePassword');
|
||||||
const Spinner = sdk.getComponent('elements.Spinner');
|
const Spinner = sdk.getComponent('elements.Spinner');
|
||||||
|
|
||||||
|
if (this.state.success) {
|
||||||
|
return (
|
||||||
|
<BaseDialog className="mx_SetPasswordDialog"
|
||||||
|
onFinished={this.props.onFinished}
|
||||||
|
title="You have successfully set a new password!"
|
||||||
|
>
|
||||||
|
<div className="mx_Dialog_content">
|
||||||
|
<p>
|
||||||
|
You can now return to your account after signing out,
|
||||||
|
and sign in on other devices.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="mx_Dialog_buttons">
|
||||||
|
<button
|
||||||
|
className="mx_Dialog_primary"
|
||||||
|
autoFocus={true}
|
||||||
|
onClick={this._onContinueClicked}>
|
||||||
|
Continue
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</BaseDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseDialog className="mx_SetPasswordDialog"
|
<BaseDialog className="mx_SetPasswordDialog"
|
||||||
onFinished={this.props.onFinished}
|
onFinished={this.props.onFinished}
|
||||||
|
|
Loading…
Reference in New Issue