mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Add warm-fuzzy for successful password entry
This commit is contained in:
parent
24584bee4a
commit
9fc57786f1
@ -34,10 +34,17 @@ export default React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
error: null,
|
||||
success: false,
|
||||
};
|
||||
},
|
||||
|
||||
_onPasswordChanged: function() {
|
||||
this.setState({
|
||||
success: true,
|
||||
});
|
||||
},
|
||||
|
||||
_onContinueClicked: function() {
|
||||
this.props.onFinished(true);
|
||||
},
|
||||
|
||||
@ -58,6 +65,30 @@ export default React.createClass({
|
||||
const ChangePassword = sdk.getComponent('views.settings.ChangePassword');
|
||||
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 (
|
||||
<BaseDialog className="mx_SetPasswordDialog"
|
||||
onFinished={this.props.onFinished}
|
||||
|
Loading…
Reference in New Issue
Block a user