Rename login directory to auth

This commit is contained in:
J. Ryan Stinnett 2019-01-21 16:11:10 -06:00
parent 6160db7a82
commit 29be3ee4b5
26 changed files with 45 additions and 45 deletions

View file

@ -1,11 +1,11 @@
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update. # autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
src/component-index.js src/component-index.js
src/components/structures/auth/ForgotPassword.js
src/components/structures/BottomLeftMenu.js src/components/structures/BottomLeftMenu.js
src/components/structures/CompatibilityPage.js src/components/structures/CompatibilityPage.js
src/components/structures/CreateRoom.js src/components/structures/CreateRoom.js
src/components/structures/LoggedInView.js src/components/structures/LoggedInView.js
src/components/structures/login/ForgotPassword.js
src/components/structures/MessagePanel.js src/components/structures/MessagePanel.js
src/components/structures/NotificationPanel.js src/components/structures/NotificationPanel.js
src/components/structures/RoomDirectory.js src/components/structures/RoomDirectory.js
@ -15,6 +15,11 @@ src/components/structures/ScrollPanel.js
src/components/structures/SearchBox.js src/components/structures/SearchBox.js
src/components/structures/TimelinePanel.js src/components/structures/TimelinePanel.js
src/components/structures/UploadBar.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/BaseAvatar.js
src/components/views/avatars/MemberAvatar.js src/components/views/avatars/MemberAvatar.js
src/components/views/create_room/RoomAlias.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/MatrixToolbar.js
src/components/views/globals/NewVersionBar.js src/components/views/globals/NewVersionBar.js
src/components/views/globals/UpdateCheckBar.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/MFileBody.js
src/components/views/messages/RoomAvatarEvent.js src/components/views/messages/RoomAvatarEvent.js
src/components/views/messages/TextualBody.js src/components/views/messages/TextualBody.js
@ -98,12 +98,12 @@ src/VectorConferenceHandler.js
src/Velociraptor.js src/Velociraptor.js
src/WhoIsTyping.js src/WhoIsTyping.js
src/wrappers/withMatrixClient.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/MessagePanel-test.js
test/components/structures/ScrollPanel-test.js test/components/structures/ScrollPanel-test.js
test/components/structures/TimelinePanel-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/dialogs/InteractiveAuthDialog-test.js
test/components/views/login/RegistrationForm-test.js
test/components/views/rooms/MessageComposerInput-test.js test/components/views/rooms/MessageComposerInput-test.js
test/components/views/rooms/RoomSettings-test.js test/components/views/rooms/RoomSettings-test.js
test/mock-clock.js test/mock-clock.js

View file

@ -23,7 +23,9 @@
@import "./structures/_UploadBar.scss"; @import "./structures/_UploadBar.scss";
@import "./structures/_UserSettings.scss"; @import "./structures/_UserSettings.scss";
@import "./structures/_ViewSource.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/_BaseAvatar.scss";
@import "./views/avatars/_MemberStatusMessageAvatar.scss"; @import "./views/avatars/_MemberStatusMessageAvatar.scss";
@import "./views/context_menus/_MessageContextMenu.scss"; @import "./views/context_menus/_MessageContextMenu.scss";
@ -75,8 +77,6 @@
@import "./views/groups/_GroupPublicityToggle.scss"; @import "./views/groups/_GroupPublicityToggle.scss";
@import "./views/groups/_GroupRoomList.scss"; @import "./views/groups/_GroupRoomList.scss";
@import "./views/groups/_GroupUserSettings.scss"; @import "./views/groups/_GroupUserSettings.scss";
@import "./views/login/_InteractiveAuthEntryComponents.scss";
@import "./views/login/_ServerConfig.scss";
@import "./views/messages/_CreateEvent.scss"; @import "./views/messages/_CreateEvent.scss";
@import "./views/messages/_DateSeparator.scss"; @import "./views/messages/_DateSeparator.scss";
@import "./views/messages/_MEmoteBody.scss"; @import "./views/messages/_MEmoteBody.scss";

View file

@ -20,7 +20,7 @@ const InteractiveAuth = Matrix.InteractiveAuth;
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {getEntryComponentForLoginType} from '../views/login/InteractiveAuthEntryComponents'; import {getEntryComponentForLoginType} from '../views/auth/InteractiveAuthEntryComponents';
export default React.createClass({ export default React.createClass({
displayName: 'InteractiveAuth', displayName: 'InteractiveAuth',

View file

@ -183,7 +183,7 @@ export default React.createClass({
register_is_url: null, register_is_url: null,
register_id_sid: 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, defaultServerName: this.props.config.default_server_name,
defaultHsUrl: this.props.config.default_hs_url, defaultHsUrl: this.props.config.default_hs_url,
defaultIsUrl: this.props.config.default_is_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 // needs to be before normal PageTypes as you are logged in technically
if (this.state.view === VIEWS.POST_REGISTRATION) { if (this.state.view === VIEWS.POST_REGISTRATION) {
const PostRegistration = sdk.getComponent('structures.login.PostRegistration'); const PostRegistration = sdk.getComponent('structures.auth.PostRegistration');
return ( return (
<PostRegistration <PostRegistration
onComplete={this.onFinishPostRegistration} /> onComplete={this.onFinishPostRegistration} />
@ -1906,7 +1906,7 @@ export default React.createClass({
} }
if (this.state.view === VIEWS.REGISTER) { if (this.state.view === VIEWS.REGISTER) {
const Registration = sdk.getComponent('structures.login.Registration'); const Registration = sdk.getComponent('structures.auth.Registration');
return ( return (
<Registration <Registration
clientSecret={this.state.register_client_secret} clientSecret={this.state.register_client_secret}
@ -1935,7 +1935,7 @@ export default React.createClass({
if (this.state.view === VIEWS.FORGOT_PASSWORD) { if (this.state.view === VIEWS.FORGOT_PASSWORD) {
const ForgotPassword = sdk.getComponent('structures.login.ForgotPassword'); const ForgotPassword = sdk.getComponent('structures.auth.ForgotPassword');
return ( return (
<ForgotPassword <ForgotPassword
defaultServerName={this.getDefaultServerName()} defaultServerName={this.getDefaultServerName()}
@ -1951,7 +1951,7 @@ export default React.createClass({
} }
if (this.state.view === VIEWS.LOGIN) { if (this.state.view === VIEWS.LOGIN) {
const Login = sdk.getComponent('structures.login.Login'); const Login = sdk.getComponent('structures.auth.Login');
return ( return (
<Login <Login
onLoggedIn={Lifecycle.setLoggedIn} onLoggedIn={Lifecycle.setLoggedIn}

View file

@ -183,10 +183,10 @@ module.exports = React.createClass({
}, },
render: function() { render: function() {
const LoginPage = sdk.getComponent("login.LoginPage"); const LoginPage = sdk.getComponent("auth.LoginPage");
const LoginHeader = sdk.getComponent("login.LoginHeader"); const LoginHeader = sdk.getComponent("auth.LoginHeader");
const LoginFooter = sdk.getComponent("login.LoginFooter"); const LoginFooter = sdk.getComponent("auth.LoginFooter");
const ServerConfig = sdk.getComponent("login.ServerConfig"); const ServerConfig = sdk.getComponent("auth.ServerConfig");
const Spinner = sdk.getComponent("elements.Spinner"); const Spinner = sdk.getComponent("elements.Spinner");
let resetPasswordJsx; let resetPasswordJsx;
@ -234,7 +234,7 @@ module.exports = React.createClass({
errorText = <div className="mx_Login_error">{ err }</div>; errorText = <div className="mx_Login_error">{ err }</div>;
} }
const LanguageSelector = sdk.getComponent('structures.login.LanguageSelector'); const LanguageSelector = sdk.getComponent('structures.auth.LanguageSelector');
resetPasswordJsx = ( resetPasswordJsx = (
<div> <div>

View file

@ -486,7 +486,7 @@ module.exports = React.createClass({
}, },
_renderPasswordStep: function() { _renderPasswordStep: function() {
const PasswordLogin = sdk.getComponent('login.PasswordLogin'); const PasswordLogin = sdk.getComponent('auth.PasswordLogin');
return ( return (
<PasswordLogin <PasswordLogin
onSubmit={this.onPasswordLogin} onSubmit={this.onPasswordLogin}
@ -515,10 +515,10 @@ module.exports = React.createClass({
render: function() { render: function() {
const Loader = sdk.getComponent("elements.Spinner"); const Loader = sdk.getComponent("elements.Spinner");
const LoginPage = sdk.getComponent("login.LoginPage"); const LoginPage = sdk.getComponent("auth.LoginPage");
const LoginHeader = sdk.getComponent("login.LoginHeader"); const LoginHeader = sdk.getComponent("auth.LoginHeader");
const LoginFooter = sdk.getComponent("login.LoginFooter"); const LoginFooter = sdk.getComponent("auth.LoginFooter");
const ServerConfig = sdk.getComponent("login.ServerConfig"); const ServerConfig = sdk.getComponent("auth.ServerConfig");
const loader = this.state.busy ? <div className="mx_Login_loader"><Loader /></div> : null; const loader = this.state.busy ? <div className="mx_Login_loader"><Loader /></div> : null;
const errorText = this.props.defaultServerDiscoveryError || this.state.discoveryError || this.state.errorText; 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 ( return (
<LoginPage> <LoginPage>

View file

@ -60,8 +60,8 @@ module.exports = React.createClass({
render: function() { render: function() {
const ChangeDisplayName = sdk.getComponent('settings.ChangeDisplayName'); const ChangeDisplayName = sdk.getComponent('settings.ChangeDisplayName');
const ChangeAvatar = sdk.getComponent('settings.ChangeAvatar'); const ChangeAvatar = sdk.getComponent('settings.ChangeAvatar');
const LoginPage = sdk.getComponent('login.LoginPage'); const LoginPage = sdk.getComponent('auth.LoginPage');
const LoginHeader = sdk.getComponent('login.LoginHeader'); const LoginHeader = sdk.getComponent('auth.LoginHeader');
return ( return (
<LoginPage> <LoginPage>
<div className="mx_Login_box"> <div className="mx_Login_box">

View file

@ -24,7 +24,7 @@ import PropTypes from 'prop-types';
import sdk from '../../../index'; import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg'; import MatrixClientPeg from '../../../MatrixClientPeg';
import RegistrationForm from '../../views/login/RegistrationForm'; import RegistrationForm from '../../views/auth/RegistrationForm';
import RtsClient from '../../../RtsClient'; import RtsClient from '../../../RtsClient';
import { _t, _td } from '../../../languageHandler'; import { _t, _td } from '../../../languageHandler';
import SdkConfig from '../../../SdkConfig'; import SdkConfig from '../../../SdkConfig';
@ -396,12 +396,12 @@ module.exports = React.createClass({
}, },
render: function() { render: function() {
const LoginHeader = sdk.getComponent('login.LoginHeader'); const LoginHeader = sdk.getComponent('auth.LoginHeader');
const LoginFooter = sdk.getComponent('login.LoginFooter'); const LoginFooter = sdk.getComponent('auth.LoginFooter');
const LoginPage = sdk.getComponent('login.LoginPage'); const LoginPage = sdk.getComponent('auth.LoginPage');
const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth'); const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth');
const Spinner = sdk.getComponent("elements.Spinner"); const Spinner = sdk.getComponent("elements.Spinner");
const ServerConfig = sdk.getComponent('views.login.ServerConfig'); const ServerConfig = sdk.getComponent('views.auth.ServerConfig');
let registerBody; let registerBody;
if (this.state.doingUIAuth) { 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 ( return (
<LoginPage> <LoginPage>

View file

@ -187,7 +187,7 @@ export const RecaptchaAuthEntry = React.createClass({
return <Loader />; return <Loader />;
} }
const CaptchaForm = sdk.getComponent("views.login.CaptchaForm"); const CaptchaForm = sdk.getComponent("views.auth.CaptchaForm");
const sitePublicKey = this.props.stageParams.public_key; const sitePublicKey = this.props.stageParams.public_key;
let errorSection; let errorSection;

View file

@ -201,7 +201,7 @@ class PasswordLogin extends React.Component {
disabled={disabled} disabled={disabled}
/>; />;
case PasswordLogin.LOGIN_FIELD_PHONE: { 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_phoneNumberField = true;
classes.mx_Login_field_has_prefix = true; classes.mx_Login_field_has_prefix = true;
classes.error = this.props.loginIncorrect && !this.state.phoneNumber; classes.error = this.props.loginIncorrect && !this.state.phoneNumber;

View file

@ -323,7 +323,7 @@ module.exports = React.createClass({
} }
} }
const CountryDropdown = sdk.getComponent('views.login.CountryDropdown'); const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
let phoneSection; let phoneSection;
if (!SdkConfig.get().disable_3pid_login) { if (!SdkConfig.get().disable_3pid_login) {
const phonePlaceholder = this._authStepIsRequired('m.login.msisdn') ? _t("Mobile phone number") : _t("Mobile phone number (optional)"); const phonePlaceholder = this._authStepIsRequired('m.login.msisdn') ? _t("Mobile phone number") : _t("Mobile phone number (optional)");

View file

@ -138,7 +138,7 @@ module.exports = React.createClass({
}, },
showHelpPopup: function() { showHelpPopup: function() {
const CustomServerDialog = sdk.getComponent('login.CustomServerDialog'); const CustomServerDialog = sdk.getComponent('auth.CustomServerDialog');
Modal.createTrackedDialog('Custom Server Dialog', '', CustomServerDialog); Modal.createTrackedDialog('Custom Server Dialog', '', CustomServerDialog);
}, },

View file

@ -141,7 +141,7 @@ export default withMatrixClient(React.createClass({
return <div />; return <div />;
} }
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 // XXX: This CSS relies on the CSS surrounding it in UserSettings as its in
// a tabular format to align the submit buttons // a tabular format to align the submit buttons
return ( return (

View file

@ -22,8 +22,8 @@ const INITIAL_STATE = {
}; };
/** /**
* A class for storing application state to do with login/registration. This is a simple * A class for storing application state to do with authentication. This is a simple flux
* flux store that listens for actions and updates its state accordingly, informing any * store that listens for actions and updates its state accordingly, informing any
* listeners (views) of state changes. * listeners (views) of state changes.
*/ */
class LifecycleStore extends Store { class LifecycleStore extends Store {

View file

@ -23,7 +23,7 @@ const expect = require('expect');
const testUtils = require('test-utils'); const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk'); const sdk = require('matrix-react-sdk');
const Registration = sdk.getComponent('structures.login.Registration'); const Registration = sdk.getComponent('structures.auth.Registration');
let rtsClient; let rtsClient;
let client; let client;

View file

@ -23,7 +23,7 @@ const expect = require('expect');
const testUtils = require('test-utils'); const testUtils = require('test-utils');
const sdk = require('matrix-react-sdk'); const sdk = require('matrix-react-sdk');
const RegistrationForm = sdk.getComponent('views.login.RegistrationForm'); const RegistrationForm = sdk.getComponent('views.auth.RegistrationForm');
const TEAM_CONFIG = { const TEAM_CONFIG = {
supportEmail: "support@some.domain", supportEmail: "support@some.domain",