From df599890c5cf684de6f4f2c7c55128a3f411de82 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 29 May 2017 01:32:31 +0100 Subject: [PATCH] add login link to SetMxIdDialog --- src/components/structures/MatrixChat.js | 4 ++++ src/components/structures/RoomView.js | 4 ++++ src/components/views/dialogs/SetMxIdDialog.js | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index c48a3731ae..1adb67887c 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -682,6 +682,10 @@ module.exports = React.createClass({ dis.dispatch({action: 'start_registration'}); close(); }, + onLoginClick: (ev) => { + dis.dispatch({action: 'start_login'}); + close(); + }, }).close; }, diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 7ed5ea6eab..6e853c135a 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -788,6 +788,10 @@ module.exports = React.createClass({ dis.dispatch({action: 'start_registration'}); close(); }, + onLoginClick: (ev) => { + dis.dispatch({action: 'start_login'}); + close(); + }, }).close; return; } diff --git a/src/components/views/dialogs/SetMxIdDialog.js b/src/components/views/dialogs/SetMxIdDialog.js index d0aa067a70..19924093de 100644 --- a/src/components/views/dialogs/SetMxIdDialog.js +++ b/src/components/views/dialogs/SetMxIdDialog.js @@ -36,6 +36,8 @@ export default React.createClass({ onFinished: React.PropTypes.func.isRequired, // Called when the user requests to register with a different homeserver onDifferentServerClicked: React.PropTypes.func.isRequired, + // Called if the user wants to switch to login instead + onLoginClick: React.PropTypes.func.isRequired, }, getInitialState: function() { @@ -245,6 +247,9 @@ export default React.createClass({ different server .

+

+ If you already have a Matrix account you can log in instead. +

{ auth } { authErrorIndicator }