+ For security, logging out will delete any end-to-end encryption keys from this browser,
+ making previous encrypted chat history unreadable if you log back in.
+ In future this will be improved,
+ but for now be warned.
+
+ Resetting password will currently reset any end-to-end encryption keys on all devices,
+ making encrypted chat history unreadable.
+ In future this may be improved,
+ but for now be warned.
+
,
+ button: "Continue",
+ onFinished: (confirmed) => {
+ if (confirmed) {
+ this.submitPasswordReset(
+ this.state.enteredHomeserverUrl, this.state.enteredIdentityServerUrl,
+ this.state.email, this.state.password
+ );
+ }
+ },
+ });
}
},
diff --git a/src/components/views/dialogs/LogoutPrompt.js b/src/components/views/dialogs/LogoutPrompt.js
deleted file mode 100644
index c4bd7a0474e..00000000000
--- a/src/components/views/dialogs/LogoutPrompt.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-Copyright 2015, 2016 OpenMarket Ltd
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-var React = require('react');
-var dis = require("../../../dispatcher");
-
-module.exports = React.createClass({
- displayName: 'LogoutPrompt',
-
- propTypes: {
- onFinished: React.PropTypes.func,
- },
-
- logOut: function() {
- dis.dispatch({action: 'logout'});
- if (this.props.onFinished) {
- this.props.onFinished();
- }
- },
-
- cancelPrompt: function() {
- if (this.props.onFinished) {
- this.props.onFinished();
- }
- },
-
- onKeyDown: function(e) {
- if (e.keyCode === 27) { // escape
- e.stopPropagation();
- e.preventDefault();
- this.cancelPrompt();
- }
- },
-
- render: function() {
- return (
-
-
- Sign out?
-
-
-
-
-
-
- );
- }
-});
-
diff --git a/src/components/views/settings/ChangePassword.js b/src/components/views/settings/ChangePassword.js
index 5cd689ae44b..8b53a0e7790 100644
--- a/src/components/views/settings/ChangePassword.js
+++ b/src/components/views/settings/ChangePassword.js
@@ -18,6 +18,7 @@ limitations under the License.
var React = require('react');
var MatrixClientPeg = require("../../../MatrixClientPeg");
+var Modal = require("../../../Modal");
var sdk = require("../../../index");
import AccessibleButton from '../elements/AccessibleButton';
@@ -66,26 +67,42 @@ module.exports = React.createClass({
changePassword: function(old_password, new_password) {
var cli = MatrixClientPeg.get();
- var authDict = {
- type: 'm.login.password',
- user: cli.credentials.userId,
- password: old_password
- };
+ var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
+ Modal.createDialog(QuestionDialog, {
+ title: "Warning",
+ description:
+
+ Changing password will currently reset any end-to-end encryption keys on all devices,
+ making encrypted chat history unreadable.
+ This will be improved shortly,
+ but for now be warned.
+