-
+
+
+ { header }
+ { registerBody }
+ { signIn }
+ { errorText }
+
+
+
);
},
});
diff --git a/src/components/structures/LoginBox.js b/src/components/views/auth/AuthButtons.js
similarity index 67%
rename from src/components/structures/LoginBox.js
rename to src/components/views/auth/AuthButtons.js
index 168014daa5..35bfabbbca 100644
--- a/src/components/structures/LoginBox.js
+++ b/src/components/views/auth/AuthButtons.js
@@ -1,6 +1,6 @@
/*
Copyright 2017 Vector Creations Ltd
-Copyright 2018 New Vector Ltd
+Copyright 2018, 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,12 +18,12 @@ limitations under the License.
'use strict';
const React = require('react');
-import { _t } from '../../languageHandler';
-const dis = require('../../dispatcher');
-const AccessibleButton = require('../../components/views/elements/AccessibleButton');
+import { _t } from '../../../languageHandler';
+const dis = require('../../../dispatcher');
+const AccessibleButton = require('../elements/AccessibleButton');
module.exports = React.createClass({
- displayName: 'LoginBox',
+ displayName: 'AuthButtons',
propTypes: {
},
@@ -38,18 +38,18 @@ module.exports = React.createClass({
render: function() {
const loginButton = (
-
-
+
+
{ _t("Login") }
-
+
{ _t("Register") }
);
return (
-
+
{ loginButton }
);
diff --git a/src/components/views/login/LoginFooter.js b/src/components/views/auth/AuthFooter.js
similarity index 89%
rename from src/components/views/login/LoginFooter.js
rename to src/components/views/auth/AuthFooter.js
index 392d36e288..ea43bf322c 100644
--- a/src/components/views/login/LoginFooter.js
+++ b/src/components/views/auth/AuthFooter.js
@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
+Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,11 +21,11 @@ import { _t } from '../../../languageHandler';
import React from 'react';
module.exports = React.createClass({
- displayName: 'LoginFooter',
+ displayName: 'AuthFooter',
render: function() {
return (
-
);
diff --git a/src/components/views/login/LoginHeader.js b/src/components/views/auth/AuthHeader.js
similarity index 77%
rename from src/components/views/login/LoginHeader.js
rename to src/components/views/auth/AuthHeader.js
index cd1f9c6a28..08c9ad41c9 100644
--- a/src/components/views/login/LoginHeader.js
+++ b/src/components/views/auth/AuthHeader.js
@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
+Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -19,12 +20,14 @@ limitations under the License.
const React = require('react');
module.exports = React.createClass({
- displayName: 'LoginHeader',
+ displayName: 'AuthHeader',
render: function() {
return (
-
- Matrix
+
+
+ Matrix
+
);
},
diff --git a/src/components/views/auth/AuthPage.js b/src/components/views/auth/AuthPage.js
new file mode 100644
index 0000000000..d5f82f7264
--- /dev/null
+++ b/src/components/views/auth/AuthPage.js
@@ -0,0 +1,34 @@
+/*
+Copyright 2015, 2016 OpenMarket Ltd
+Copyright 2019 New Vector 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.
+*/
+
+'use strict';
+
+const React = require('react');
+
+module.exports = React.createClass({
+ displayName: 'AuthPage',
+
+ render: function() {
+ return (
+
+
+ { this.props.children }
+
+
+ );
+ },
+});
diff --git a/src/components/views/login/CaptchaForm.js b/src/components/views/auth/CaptchaForm.js
similarity index 100%
rename from src/components/views/login/CaptchaForm.js
rename to src/components/views/auth/CaptchaForm.js
diff --git a/src/components/views/login/CountryDropdown.js b/src/components/views/auth/CountryDropdown.js
similarity index 100%
rename from src/components/views/login/CountryDropdown.js
rename to src/components/views/auth/CountryDropdown.js
diff --git a/src/components/views/login/CustomServerDialog.js b/src/components/views/auth/CustomServerDialog.js
similarity index 100%
rename from src/components/views/login/CustomServerDialog.js
rename to src/components/views/auth/CustomServerDialog.js
diff --git a/src/components/views/login/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js
similarity index 99%
rename from src/components/views/login/InteractiveAuthEntryComponents.js
rename to src/components/views/auth/InteractiveAuthEntryComponents.js
index 73b46959b0..6a78898179 100644
--- a/src/components/views/login/InteractiveAuthEntryComponents.js
+++ b/src/components/views/auth/InteractiveAuthEntryComponents.js
@@ -187,7 +187,7 @@ export const RecaptchaAuthEntry = React.createClass({
return ;
}
- const CaptchaForm = sdk.getComponent("views.login.CaptchaForm");
+ const CaptchaForm = sdk.getComponent("views.auth.CaptchaForm");
const sitePublicKey = this.props.stageParams.public_key;
let errorSection;
diff --git a/src/components/views/login/PasswordLogin.js b/src/components/views/auth/PasswordLogin.js
similarity index 99%
rename from src/components/views/login/PasswordLogin.js
rename to src/components/views/auth/PasswordLogin.js
index 59d4db379c..1d36c52a24 100644
--- a/src/components/views/login/PasswordLogin.js
+++ b/src/components/views/auth/PasswordLogin.js
@@ -201,7 +201,7 @@ class PasswordLogin extends React.Component {
disabled={disabled}
/>;
case PasswordLogin.LOGIN_FIELD_PHONE: {
- const CountryDropdown = sdk.getComponent('views.login.CountryDropdown');
+ const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
classes.mx_Login_phoneNumberField = true;
classes.mx_Login_field_has_prefix = true;
classes.error = this.props.loginIncorrect && !this.state.phoneNumber;
diff --git a/src/components/views/login/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js
similarity index 99%
rename from src/components/views/login/RegistrationForm.js
rename to src/components/views/auth/RegistrationForm.js
index 137aeada91..a0fc79b947 100644
--- a/src/components/views/login/RegistrationForm.js
+++ b/src/components/views/auth/RegistrationForm.js
@@ -323,7 +323,7 @@ module.exports = React.createClass({
}
}
- const CountryDropdown = sdk.getComponent('views.login.CountryDropdown');
+ const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
let phoneSection;
if (!SdkConfig.get().disable_3pid_login) {
const phonePlaceholder = this._authStepIsRequired('m.login.msisdn') ? _t("Mobile phone number") : _t("Mobile phone number (optional)");
diff --git a/src/components/views/login/ServerConfig.js b/src/components/views/auth/ServerConfig.js
similarity index 98%
rename from src/components/views/login/ServerConfig.js
rename to src/components/views/auth/ServerConfig.js
index 2f04011273..57535e80d8 100644
--- a/src/components/views/login/ServerConfig.js
+++ b/src/components/views/auth/ServerConfig.js
@@ -138,7 +138,7 @@ module.exports = React.createClass({
},
showHelpPopup: function() {
- const CustomServerDialog = sdk.getComponent('login.CustomServerDialog');
+ const CustomServerDialog = sdk.getComponent('auth.CustomServerDialog');
Modal.createTrackedDialog('Custom Server Dialog', '', CustomServerDialog);
},
diff --git a/src/components/views/login/LoginPage.js b/src/components/views/login/LoginPage.js
deleted file mode 100644
index 9eba53188e..0000000000
--- a/src/components/views/login/LoginPage.js
+++ /dev/null
@@ -1,59 +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.
-*/
-
-'use strict';
-
-import SettingsStore from "../../../settings/SettingsStore";
-
-const React = require('react');
-
-module.exports = React.createClass({
- displayName: 'LoginPage',
-
- render: function() {
- // FIXME: this should be turned into a proper skin with a StatusLoginPage component
- if (SettingsStore.getValue("theme") === 'status') {
- return (
-
-
-
-
-
-
-
Status Community Chat
-
- A safer, decentralised communication
- platform powered by Riot
-
-
- { this.props.children }
-
-
This channel is for our development community.
-
Interested in SNT and discussions on the cryptocurrency market?
- );
- }
- },
-});
diff --git a/src/components/views/settings/AddPhoneNumber.js b/src/components/views/settings/AddPhoneNumber.js
index 82169c9868..27164e6517 100644
--- a/src/components/views/settings/AddPhoneNumber.js
+++ b/src/components/views/settings/AddPhoneNumber.js
@@ -141,7 +141,7 @@ export default withMatrixClient(React.createClass({
return ;
}
- const CountryDropdown = sdk.getComponent('views.login.CountryDropdown');
+ const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
// XXX: This CSS relies on the CSS surrounding it in UserSettings as its in
// a tabular format to align the submit buttons
return (
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 16c40460e2..cfd5168152 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1328,7 +1328,6 @@
"Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.",
"Sign in with single sign-on": "Sign in with single sign-on",
"Try the app first": "Try the app first",
- "Sign in to get started": "Sign in to get started",
"Failed to fetch avatar URL": "Failed to fetch avatar URL",
"Set a display name:": "Set a display name:",
"Upload an avatar:": "Upload an avatar:",
diff --git a/src/stores/LifecycleStore.js b/src/stores/LifecycleStore.js
index 2ce3be5a33..fcdfe93cf9 100644
--- a/src/stores/LifecycleStore.js
+++ b/src/stores/LifecycleStore.js
@@ -22,8 +22,8 @@ const INITIAL_STATE = {
};
/**
- * A class for storing application state to do with login/registration. This is a simple
- * flux store that listens for actions and updates its state accordingly, informing any
+ * A class for storing application state to do with authentication. This is a simple flux
+ * store that listens for actions and updates its state accordingly, informing any
* listeners (views) of state changes.
*/
class LifecycleStore extends Store {
diff --git a/test/components/structures/login/Registration-test.js b/test/components/structures/auth/Registration-test.js
similarity index 98%
rename from test/components/structures/login/Registration-test.js
rename to test/components/structures/auth/Registration-test.js
index 7287bb0d95..4827bf4c12 100644
--- a/test/components/structures/login/Registration-test.js
+++ b/test/components/structures/auth/Registration-test.js
@@ -23,7 +23,7 @@ const expect = require('expect');
const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk');
-const Registration = sdk.getComponent('structures.login.Registration');
+const Registration = sdk.getComponent('structures.auth.Registration');
let rtsClient;
let client;
diff --git a/test/components/views/login/RegistrationForm-test.js b/test/components/views/auth/RegistrationForm-test.js
similarity index 97%
rename from test/components/views/login/RegistrationForm-test.js
rename to test/components/views/auth/RegistrationForm-test.js
index 2d1c1be026..265f158bb9 100644
--- a/test/components/views/login/RegistrationForm-test.js
+++ b/test/components/views/auth/RegistrationForm-test.js
@@ -23,7 +23,7 @@ const expect = require('expect');
const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk');
-const RegistrationForm = sdk.getComponent('views.login.RegistrationForm');
+const RegistrationForm = sdk.getComponent('views.auth.RegistrationForm');
const TEAM_CONFIG = {
supportEmail: "support@some.domain",