From 379fed813e0719cb369c175df49932ecb874f3d6 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 25 Oct 2015 02:42:41 +0000 Subject: [PATCH 1/3] actually use the config file for default HS and IS URLs... --- src/skins/vector/views/templates/Register.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/skins/vector/views/templates/Register.js b/src/skins/vector/views/templates/Register.js index 6db0786ee..24f88b05e 100644 --- a/src/skins/vector/views/templates/Register.js +++ b/src/skins/vector/views/templates/Register.js @@ -25,10 +25,9 @@ var Loader = require("react-loader"); var RegisterController = require('../../../../controllers/templates/Register') -module.exports = React.createClass({ - DEFAULT_HS_URL: 'https://matrix.org', - DEFAULT_IS_URL: 'https://vector.im', +var config = require('../../../../../config.json'); +module.exports = React.createClass({ displayName: 'Register', mixins: [RegisterController], @@ -39,8 +38,8 @@ module.exports = React.createClass({ }, componentWillMount: function() { - this.customHsUrl = this.DEFAULT_HS_URL; - this.customIsUrl = this.DEFAULT_IS_URL; + this.customHsUrl = config.default_hs_url; + this.customIsUrl = config.default_is_url; }, getRegFormVals: function() { @@ -56,7 +55,7 @@ module.exports = React.createClass({ if (this.state.serverConfigVisible) { return this.customHsUrl; } else { - return this.DEFAULT_HS_URL; + return config.default_hs_url; } }, @@ -64,7 +63,7 @@ module.exports = React.createClass({ if (this.state.serverConfigVisible) { return this.customIsUrl; } else { - return this.DEFAULT_IS_URL; + return config.default_is_url; } }, From 8257f325c4077e669a42b6af432b0f4bf631b685 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 25 Oct 2015 11:51:17 +0000 Subject: [PATCH 2/3] s/getMembersWithMemership/getMembersWithMembership/ --- src/skins/vector/views/molecules/RoomSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skins/vector/views/molecules/RoomSettings.js b/src/skins/vector/views/molecules/RoomSettings.js index bbba0fccf..c5e08ff96 100644 --- a/src/skins/vector/views/molecules/RoomSettings.js +++ b/src/skins/vector/views/molecules/RoomSettings.js @@ -142,7 +142,7 @@ module.exports = React.createClass({ ; } - var banned = this.props.room.getMembersWithMemership("ban"); + var banned = this.props.room.getMembersWithMembership("ban"); return (
From 5844fb40205eb875be5dfc35917018c068340e87 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 25 Oct 2015 11:56:29 +0000 Subject: [PATCH 3/3] spell out that developers need to use npm link --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 811f52f2b..75fba1467 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,24 @@ into the `vector` directory and run your own server. Development =========== -You can work on any of the source files within Vector with the setup above, -and your changes will cause an instant rebuild. If you also need to make -changes to the react sdk, you can: + +For simple tweaks, you can work on any of the source files within Vector with the +setup above, and your changes will cause an instant rebuild. + +However, all serious development on Vector happens on the `develop` branch. This typically +depends on the `develop` snapshot versions of `matrix-react-sdk` and `matrix-js-sdk` +too, which isn't expressed in Vector's `package.json`. To do this, check out +the `develop` branches of these libraries and then use `npm link` to tell Vector +about them: 1. Link the react sdk package into the example: `npm link path/to/your/react/sdk` 2. Start the development rebuilder in your react SDK directory: `npm start` +Similarly, you may need to `npm link path/to/your/js/sdk` in your `matrix-react-sdk` +directory. + If you add or remove any components from the Vector skin, you will need to rebuild the skin's index by running, `npm run reskindex`.