Skip to content

Commit b057e8a

Browse files
authored
Merge pull request element-hq#3989 from vector-im/luke/new-guest-access-set-pwd-dialog-fuzzy
Add warm-fuzzy for successful password entry
2 parents 24584be + 9fc5778 commit b057e8a

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

‎src/components/views/dialogs/SetPasswordDialog.js‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ export default React.createClass({
3434
getInitialState: function() {
3535
return {
3636
error: null,
37+
success: false,
3738
};
3839
},
3940

4041
_onPasswordChanged: function() {
42+
this.setState({
43+
success: true,
44+
});
45+
},
46+
47+
_onContinueClicked: function() {
4148
this.props.onFinished(true);
4249
},
4350

@@ -58,6 +65,30 @@ export default React.createClass({
5865
const ChangePassword = sdk.getComponent('views.settings.ChangePassword');
5966
const Spinner = sdk.getComponent('elements.Spinner');
6067

68+
if (this.state.success) {
69+
return (
70+
<BaseDialog className="mx_SetPasswordDialog"
71+
onFinished={this.props.onFinished}
72+
title="You have successfully set a new password!"
73+
>
74+
<div className="mx_Dialog_content">
75+
<p>
76+
You can now return to your account after signing out,
77+
and sign in on other devices.
78+
</p>
79+
</div>
80+
<div className="mx_Dialog_buttons">
81+
<button
82+
className="mx_Dialog_primary"
83+
autoFocus={true}
84+
onClick={this._onContinueClicked}>
85+
Continue
86+
</button>
87+
</div>
88+
</BaseDialog>
89+
);
90+
}
91+
6192
return (
6293
<BaseDialog className="mx_SetPasswordDialog"
6394
onFinished={this.props.onFinished}

0 commit comments

Comments
 (0)