From 8602e0665db076cd18d463380594eb34ea64ccad Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 17 Nov 2015 10:57:44 +0000 Subject: [PATCH] PR feedback from #355 --- src/{skins/vector/views/pages => components/login}/Login.js | 2 +- .../vector/views/molecules => components/login}/ServerConfig.js | 0 src/skins/vector/skindex.js | 2 -- src/skins/vector/views/pages/MatrixChat.js | 2 +- src/skins/vector/views/templates/Register.js | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) rename src/{skins/vector/views/pages => components/login}/Login.js (98%) rename src/{skins/vector/views/molecules => components/login}/ServerConfig.js (100%) diff --git a/src/skins/vector/views/pages/Login.js b/src/components/login/Login.js similarity index 98% rename from src/skins/vector/views/pages/Login.js rename to src/components/login/Login.js index b8f0e43e..f9434092 100644 --- a/src/skins/vector/views/pages/Login.js +++ b/src/components/login/Login.js @@ -22,6 +22,7 @@ var sdk = require('matrix-react-sdk'); var Signup = require("matrix-react-sdk/lib/Signup"); var PasswordLogin = require("matrix-react-sdk/lib/components/PasswordLogin"); var CasLogin = require("matrix-react-sdk/lib/components/CasLogin"); +var ServerConfig = require("./ServerConfig"); /** * A wire component which glues together login UI components and Signup logic @@ -159,7 +160,6 @@ module.exports = React.createClass({displayName: 'Login', render: function() { var Loader = sdk.getComponent("atoms.Spinner"); var loader = this.state.busy ?
: null; - var ServerConfig = sdk.getComponent("molecules.ServerConfig"); return (
diff --git a/src/skins/vector/views/molecules/ServerConfig.js b/src/components/login/ServerConfig.js similarity index 100% rename from src/skins/vector/views/molecules/ServerConfig.js rename to src/components/login/ServerConfig.js diff --git a/src/skins/vector/skindex.js b/src/skins/vector/skindex.js index 84f26499..b1ac8499 100644 --- a/src/skins/vector/skindex.js +++ b/src/skins/vector/skindex.js @@ -64,7 +64,6 @@ skin['molecules.RoomTile'] = require('./views/molecules/RoomTile'); skin['molecules.RoomTooltip'] = require('./views/molecules/RoomTooltip'); skin['molecules.SearchBar'] = require('./views/molecules/SearchBar'); skin['molecules.SenderProfile'] = require('./views/molecules/SenderProfile'); -skin['molecules.ServerConfig'] = require('./views/molecules/ServerConfig'); skin['molecules.UnknownMessageTile'] = require('./views/molecules/UnknownMessageTile'); skin['molecules.UserSelector'] = require('./views/molecules/UserSelector'); skin['molecules.voip.CallView'] = require('./views/molecules/voip/CallView'); @@ -86,7 +85,6 @@ skin['organisms.UserSettings'] = require('./views/organisms/UserSettings'); skin['organisms.ViewSource'] = require('./views/organisms/ViewSource'); skin['pages.CompatibilityPage'] = require('./views/pages/CompatibilityPage'); skin['pages.MatrixChat'] = require('./views/pages/MatrixChat'); -skin['pages.Login'] = require('./views/pages/Login'); skin['templates.Register'] = require('./views/templates/Register'); module.exports = skin; \ No newline at end of file diff --git a/src/skins/vector/views/pages/MatrixChat.js b/src/skins/vector/views/pages/MatrixChat.js index f8708f0e..5ed96c37 100644 --- a/src/skins/vector/views/pages/MatrixChat.js +++ b/src/skins/vector/views/pages/MatrixChat.js @@ -167,7 +167,7 @@ module.exports = React.createClass({ /> ); } else { - var Login = sdk.getComponent("pages.Login"); + var Login = require("../../../../components/login/Login"); return ( ); diff --git a/src/skins/vector/views/templates/Register.js b/src/skins/vector/views/templates/Register.js index 945d607c..8d6bbf42 100644 --- a/src/skins/vector/views/templates/Register.js +++ b/src/skins/vector/views/templates/Register.js @@ -22,6 +22,7 @@ var sdk = require('matrix-react-sdk') var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg') var RegisterController = require('../../../../controllers/templates/Register') +var ServerConfig = require("../../../../components/login/ServerConfig"); var config = require('../../../../../config.json'); @@ -102,7 +103,6 @@ module.exports = React.createClass({ case 'initial': var serverConfigStyle = {}; serverConfigStyle.display = this.state.serverConfigVisible ? 'block' : 'none'; - var ServerConfig = sdk.getComponent("molecules.ServerConfig"); return (