From 29be3ee4b5aa0fd7ddb10936545344d091dfe340 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 21 Jan 2019 16:11:10 -0600 Subject: [PATCH] Rename login directory to auth --- .eslintignore.errorfiles | 16 ++++++++-------- res/css/_components.scss | 6 +++--- res/css/structures/{login => auth}/_Login.scss | 0 .../_InteractiveAuthEntryComponents.scss | 0 res/css/views/{login => auth}/_ServerConfig.scss | 0 src/components/structures/InteractiveAuth.js | 2 +- src/components/structures/MatrixChat.js | 10 +++++----- .../structures/{login => auth}/ForgotPassword.js | 10 +++++----- .../{login => auth}/LanguageSelector.js | 0 .../structures/{login => auth}/Login.js | 12 ++++++------ .../{login => auth}/PostRegistration.js | 4 ++-- .../structures/{login => auth}/Registration.js | 12 ++++++------ .../views/{login => auth}/CaptchaForm.js | 0 .../views/{login => auth}/CountryDropdown.js | 0 .../views/{login => auth}/CustomServerDialog.js | 0 .../InteractiveAuthEntryComponents.js | 2 +- .../views/{login => auth}/LoginFooter.js | 0 .../views/{login => auth}/LoginHeader.js | 0 .../views/{login => auth}/LoginPage.js | 0 .../views/{login => auth}/PasswordLogin.js | 2 +- .../views/{login => auth}/RegistrationForm.js | 2 +- .../views/{login => auth}/ServerConfig.js | 2 +- src/components/views/settings/AddPhoneNumber.js | 2 +- src/stores/LifecycleStore.js | 4 ++-- .../{login => auth}/Registration-test.js | 2 +- .../{login => auth}/RegistrationForm-test.js | 2 +- 26 files changed, 45 insertions(+), 45 deletions(-) rename res/css/structures/{login => auth}/_Login.scss (100%) rename res/css/views/{login => auth}/_InteractiveAuthEntryComponents.scss (100%) rename res/css/views/{login => auth}/_ServerConfig.scss (100%) rename src/components/structures/{login => auth}/ForgotPassword.js (97%) rename src/components/structures/{login => auth}/LanguageSelector.js (100%) rename src/components/structures/{login => auth}/Login.js (98%) rename src/components/structures/{login => auth}/PostRegistration.js (95%) rename src/components/structures/{login => auth}/Registration.js (97%) rename src/components/views/{login => auth}/CaptchaForm.js (100%) rename src/components/views/{login => auth}/CountryDropdown.js (100%) rename src/components/views/{login => auth}/CustomServerDialog.js (100%) rename src/components/views/{login => auth}/InteractiveAuthEntryComponents.js (99%) rename src/components/views/{login => auth}/LoginFooter.js (100%) rename src/components/views/{login => auth}/LoginHeader.js (100%) rename src/components/views/{login => auth}/LoginPage.js (100%) rename src/components/views/{login => auth}/PasswordLogin.js (99%) rename src/components/views/{login => auth}/RegistrationForm.js (99%) rename src/components/views/{login => auth}/ServerConfig.js (98%) rename test/components/structures/{login => auth}/Registration-test.js (98%) rename test/components/views/{login => auth}/RegistrationForm-test.js (97%) diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index 30cc55377c..42dc3b4810 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -1,11 +1,11 @@ # autogenerated file: run scripts/generate-eslint-error-ignore-file to update. src/component-index.js +src/components/structures/auth/ForgotPassword.js src/components/structures/BottomLeftMenu.js src/components/structures/CompatibilityPage.js src/components/structures/CreateRoom.js src/components/structures/LoggedInView.js -src/components/structures/login/ForgotPassword.js src/components/structures/MessagePanel.js src/components/structures/NotificationPanel.js src/components/structures/RoomDirectory.js @@ -15,6 +15,11 @@ src/components/structures/ScrollPanel.js src/components/structures/SearchBox.js src/components/structures/TimelinePanel.js src/components/structures/UploadBar.js +src/components/views/auth/CountryDropdown.js +src/components/views/auth/InteractiveAuthEntryComponents.js +src/components/views/auth/PasswordLogin.js +src/components/views/auth/RegistrationForm.js +src/components/views/auth/ServerConfig.js src/components/views/avatars/BaseAvatar.js src/components/views/avatars/MemberAvatar.js src/components/views/create_room/RoomAlias.js @@ -31,11 +36,6 @@ src/components/views/elements/UserSelector.js src/components/views/globals/MatrixToolbar.js src/components/views/globals/NewVersionBar.js src/components/views/globals/UpdateCheckBar.js -src/components/views/login/CountryDropdown.js -src/components/views/login/InteractiveAuthEntryComponents.js -src/components/views/login/PasswordLogin.js -src/components/views/login/RegistrationForm.js -src/components/views/login/ServerConfig.js src/components/views/messages/MFileBody.js src/components/views/messages/RoomAvatarEvent.js src/components/views/messages/TextualBody.js @@ -98,12 +98,12 @@ src/VectorConferenceHandler.js src/Velociraptor.js src/WhoIsTyping.js src/wrappers/withMatrixClient.js -test/components/structures/login/Registration-test.js +test/components/structures/auth/Registration-test.js test/components/structures/MessagePanel-test.js test/components/structures/ScrollPanel-test.js test/components/structures/TimelinePanel-test.js +test/components/views/auth/RegistrationForm-test.js test/components/views/dialogs/InteractiveAuthDialog-test.js -test/components/views/login/RegistrationForm-test.js test/components/views/rooms/MessageComposerInput-test.js test/components/views/rooms/RoomSettings-test.js test/mock-clock.js diff --git a/res/css/_components.scss b/res/css/_components.scss index 6b353ba72b..a1b575a0a1 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -23,7 +23,9 @@ @import "./structures/_UploadBar.scss"; @import "./structures/_UserSettings.scss"; @import "./structures/_ViewSource.scss"; -@import "./structures/login/_Login.scss"; +@import "./structures/auth/_Login.scss"; +@import "./views/auth/_InteractiveAuthEntryComponents.scss"; +@import "./views/auth/_ServerConfig.scss"; @import "./views/avatars/_BaseAvatar.scss"; @import "./views/avatars/_MemberStatusMessageAvatar.scss"; @import "./views/context_menus/_MessageContextMenu.scss"; @@ -75,8 +77,6 @@ @import "./views/groups/_GroupPublicityToggle.scss"; @import "./views/groups/_GroupRoomList.scss"; @import "./views/groups/_GroupUserSettings.scss"; -@import "./views/login/_InteractiveAuthEntryComponents.scss"; -@import "./views/login/_ServerConfig.scss"; @import "./views/messages/_CreateEvent.scss"; @import "./views/messages/_DateSeparator.scss"; @import "./views/messages/_MEmoteBody.scss"; diff --git a/res/css/structures/login/_Login.scss b/res/css/structures/auth/_Login.scss similarity index 100% rename from res/css/structures/login/_Login.scss rename to res/css/structures/auth/_Login.scss diff --git a/res/css/views/login/_InteractiveAuthEntryComponents.scss b/res/css/views/auth/_InteractiveAuthEntryComponents.scss similarity index 100% rename from res/css/views/login/_InteractiveAuthEntryComponents.scss rename to res/css/views/auth/_InteractiveAuthEntryComponents.scss diff --git a/res/css/views/login/_ServerConfig.scss b/res/css/views/auth/_ServerConfig.scss similarity index 100% rename from res/css/views/login/_ServerConfig.scss rename to res/css/views/auth/_ServerConfig.scss diff --git a/src/components/structures/InteractiveAuth.js b/src/components/structures/InteractiveAuth.js index 2883c8cca4..89ff4d43a3 100644 --- a/src/components/structures/InteractiveAuth.js +++ b/src/components/structures/InteractiveAuth.js @@ -20,7 +20,7 @@ const InteractiveAuth = Matrix.InteractiveAuth; import React from 'react'; import PropTypes from 'prop-types'; -import {getEntryComponentForLoginType} from '../views/login/InteractiveAuthEntryComponents'; +import {getEntryComponentForLoginType} from '../views/auth/InteractiveAuthEntryComponents'; export default React.createClass({ displayName: 'InteractiveAuth', diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index e5cf6a986a..7acceb4bb7 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -183,7 +183,7 @@ export default React.createClass({ register_is_url: null, register_id_sid: null, - // Parameters used for setting up the login/registration views + // Parameters used for setting up the authentication views defaultServerName: this.props.config.default_server_name, defaultHsUrl: this.props.config.default_hs_url, defaultIsUrl: this.props.config.default_is_url, @@ -1851,7 +1851,7 @@ export default React.createClass({ // needs to be before normal PageTypes as you are logged in technically if (this.state.view === VIEWS.POST_REGISTRATION) { - const PostRegistration = sdk.getComponent('structures.login.PostRegistration'); + const PostRegistration = sdk.getComponent('structures.auth.PostRegistration'); return ( @@ -1906,7 +1906,7 @@ export default React.createClass({ } if (this.state.view === VIEWS.REGISTER) { - const Registration = sdk.getComponent('structures.login.Registration'); + const Registration = sdk.getComponent('structures.auth.Registration'); return ( { err }; } - const LanguageSelector = sdk.getComponent('structures.login.LanguageSelector'); + const LanguageSelector = sdk.getComponent('structures.auth.LanguageSelector'); resetPasswordJsx = (
diff --git a/src/components/structures/login/LanguageSelector.js b/src/components/structures/auth/LanguageSelector.js similarity index 100% rename from src/components/structures/login/LanguageSelector.js rename to src/components/structures/auth/LanguageSelector.js diff --git a/src/components/structures/login/Login.js b/src/components/structures/auth/Login.js similarity index 98% rename from src/components/structures/login/Login.js rename to src/components/structures/auth/Login.js index 6206b7660d..a1f0327835 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/auth/Login.js @@ -486,7 +486,7 @@ module.exports = React.createClass({ }, _renderPasswordStep: function() { - const PasswordLogin = sdk.getComponent('login.PasswordLogin'); + const PasswordLogin = sdk.getComponent('auth.PasswordLogin'); return (
: null; const errorText = this.props.defaultServerDiscoveryError || this.state.discoveryError || this.state.errorText; @@ -555,7 +555,7 @@ module.exports = React.createClass({ ); } - const LanguageSelector = sdk.getComponent('structures.login.LanguageSelector'); + const LanguageSelector = sdk.getComponent('structures.auth.LanguageSelector'); return ( diff --git a/src/components/structures/login/PostRegistration.js b/src/components/structures/auth/PostRegistration.js similarity index 95% rename from src/components/structures/login/PostRegistration.js rename to src/components/structures/auth/PostRegistration.js index f6165348bd..826db89b93 100644 --- a/src/components/structures/login/PostRegistration.js +++ b/src/components/structures/auth/PostRegistration.js @@ -60,8 +60,8 @@ module.exports = React.createClass({ render: function() { const ChangeDisplayName = sdk.getComponent('settings.ChangeDisplayName'); const ChangeAvatar = sdk.getComponent('settings.ChangeAvatar'); - const LoginPage = sdk.getComponent('login.LoginPage'); - const LoginHeader = sdk.getComponent('login.LoginHeader'); + const LoginPage = sdk.getComponent('auth.LoginPage'); + const LoginHeader = sdk.getComponent('auth.LoginHeader'); return (
diff --git a/src/components/structures/login/Registration.js b/src/components/structures/auth/Registration.js similarity index 97% rename from src/components/structures/login/Registration.js rename to src/components/structures/auth/Registration.js index 74e3685bb5..617c9d6983 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -24,7 +24,7 @@ import PropTypes from 'prop-types'; import sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import RegistrationForm from '../../views/login/RegistrationForm'; +import RegistrationForm from '../../views/auth/RegistrationForm'; import RtsClient from '../../../RtsClient'; import { _t, _td } from '../../../languageHandler'; import SdkConfig from '../../../SdkConfig'; @@ -396,12 +396,12 @@ module.exports = React.createClass({ }, render: function() { - const LoginHeader = sdk.getComponent('login.LoginHeader'); - const LoginFooter = sdk.getComponent('login.LoginFooter'); - const LoginPage = sdk.getComponent('login.LoginPage'); + const LoginHeader = sdk.getComponent('auth.LoginHeader'); + const LoginFooter = sdk.getComponent('auth.LoginFooter'); + const LoginPage = sdk.getComponent('auth.LoginPage'); const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth'); const Spinner = sdk.getComponent("elements.Spinner"); - const ServerConfig = sdk.getComponent('views.login.ServerConfig'); + const ServerConfig = sdk.getComponent('views.auth.ServerConfig'); let registerBody; if (this.state.doingUIAuth) { @@ -471,7 +471,7 @@ module.exports = React.createClass({ ); } - const LanguageSelector = sdk.getComponent('structures.login.LanguageSelector'); + const LanguageSelector = sdk.getComponent('structures.auth.LanguageSelector'); return ( 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/LoginFooter.js b/src/components/views/auth/LoginFooter.js similarity index 100% rename from src/components/views/login/LoginFooter.js rename to src/components/views/auth/LoginFooter.js diff --git a/src/components/views/login/LoginHeader.js b/src/components/views/auth/LoginHeader.js similarity index 100% rename from src/components/views/login/LoginHeader.js rename to src/components/views/auth/LoginHeader.js diff --git a/src/components/views/login/LoginPage.js b/src/components/views/auth/LoginPage.js similarity index 100% rename from src/components/views/login/LoginPage.js rename to src/components/views/auth/LoginPage.js 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/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/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",