From 6a6118e136776ce27c2e7456dd517df083dba493 Mon Sep 17 00:00:00 2001 From: Jason Papakostas Date: Tue, 24 May 2016 19:08:09 -0500 Subject: [PATCH 01/34] serve config.json statically instead of bundling it issue #1344 --- package.json | 1 + src/vector/index.js | 26 +++++++++++++++++++++++--- vector/config.json | 1 + 3 files changed, 25 insertions(+), 3 deletions(-) create mode 120000 vector/config.json diff --git a/package.json b/package.json index c2400cedf..0da702490 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ }, "dependencies": { "babel-polyfill": "^6.5.0", + "browser-request": "^0.3.3", "classnames": "^2.1.2", "extract-text-webpack-plugin": "^0.9.1", "filesize": "^3.1.2", diff --git a/src/vector/index.js b/src/vector/index.js index db353c250..af48b4b07 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -40,8 +40,9 @@ var ReactDOM = require("react-dom"); var sdk = require("matrix-react-sdk"); sdk.loadSkin(require('../component-index')); var VectorConferenceHandler = require('../VectorConferenceHandler'); -var configJson = require("../../config.json"); var UpdateChecker = require("./updater"); +var q = require('q'); +var request = require('browser-request'); var qs = require("querystring"); @@ -181,7 +182,24 @@ window.onload = function() { } } -function loadApp() { +function getConfig() { + let deferred = q.defer(); + + request( + { method: "GET", url: "config.json", json: true }, + (err, response, body) => { + if (err || response.status < 200 || response.status >= 300) { + throw "failed to load config.json"; + } + + deferred.resolve(body); + } + ); + + return deferred.promise; +} + +async function loadApp() { if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { if (confirm("Vector works much better on iOS as an app. Switch to the app?")) { window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067"; @@ -194,7 +212,9 @@ function loadApp() { return; } } - + + let configJson = await getConfig(); + console.log("Vector starting at "+window.location); if (validBrowser) { var MatrixChat = sdk.getComponent('structures.MatrixChat'); diff --git a/vector/config.json b/vector/config.json new file mode 120000 index 000000000..28e148537 --- /dev/null +++ b/vector/config.json @@ -0,0 +1 @@ +../config.json \ No newline at end of file From 7e563b89c73523627532b464a2e688c5b8f00b15 Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Fri, 27 May 2016 10:17:01 +0530 Subject: [PATCH 02/34] initial version of rich text editor --- package.json | 1 + src/vector/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/package.json b/package.json index c2400cedf..8a47fbee0 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "dependencies": { "babel-polyfill": "^6.5.0", "classnames": "^2.1.2", + "draft-js": "^0.7.0", "extract-text-webpack-plugin": "^0.9.1", "filesize": "^3.1.2", "flux": "~2.0.3", diff --git a/src/vector/index.js b/src/vector/index.js index 0ca1c698f..6d966d2f5 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -26,6 +26,7 @@ require('../../vector/components.css'); require('gemini-scrollbar/gemini-scrollbar.css'); require('gfm.css/gfm.css'); require('highlight.js/styles/github.css'); +require('draft-js/dist/Draft.css'); // add React and ReactPerf to the global namespace, to make them easier to From f9aaf7d9030ca46fe779d1485fdb5e5c45321fd1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 6 Jun 2016 19:13:30 +0100 Subject: [PATCH 03/34] Use the SdkConfig interface rather than pulling in config.json directly. json-loader appears to still be necessary due to some horrendous json dependency in the depths of sanitize-html. --- src/components/views/settings/Notifications.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 8b283191e..359802417 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -21,7 +21,7 @@ var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore'); var Modal = require('matrix-react-sdk/lib/Modal'); -var configJson = require("../../../../config.json"); +var SdkConfig = require("matrix-react-sdk/lib/SdkConfig"); var notifications = require('../../../notifications'); @@ -118,8 +118,8 @@ module.exports = React.createClass({ var emailPusherPromise; if (event.target.checked) { var data = {} - if (configJson.brand) { - data['brand'] = configJson.brand; + if (SdkConfig.get().brand) { + data['brand'] = SdkConfig.get().brand; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { From ed1554f4afea11e0db60aea781bef872fe266ae8 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 7 Jun 2016 22:01:56 +0100 Subject: [PATCH 04/34] index.js: fix wording in android popup --- src/vector/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 67ce24e6a..9ecf8f813 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -184,18 +184,18 @@ window.onload = function() { function getConfig() { let deferred = q.defer(); - + request( { method: "GET", url: "config.json", json: true }, (err, response, body) => { if (err || response.status < 200 || response.status >= 300) { throw "failed to load config.json"; } - + deferred.resolve(body); } ); - + return deferred.promise; } @@ -207,14 +207,14 @@ async function loadApp() { } } else if (/Android/.test(navigator.userAgent)) { - if (confirm("Vector runs much better as an app on Vector. Get the app?")) { + if (confirm("Vector runs much better as an app on Android. Get the app?")) { window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha"; return; } } - + let configJson = await getConfig(); - + console.log("Vector starting at "+window.location); if (validBrowser) { var MatrixChat = sdk.getComponent('structures.MatrixChat'); From 1e40fd750fb104e652172cb854aa3a29b2542ef3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Jun 2016 14:55:47 +0100 Subject: [PATCH 05/34] Don't use SdkConfig instead take brand from a prop --- src/components/views/settings/Notifications.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 359802417..771037863 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -21,7 +21,6 @@ var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore'); var Modal = require('matrix-react-sdk/lib/Modal'); -var SdkConfig = require("matrix-react-sdk/lib/SdkConfig"); var notifications = require('../../../notifications'); @@ -73,6 +72,8 @@ module.exports = React.createClass({ propTypes: { // The array of threepids from the JS SDK (required for email notifications) threepids: React.PropTypes.array.isRequired, + // The brand string set when creating an email pusher + brand: React.PropTypes.string, }, getDefaultProps: function() { @@ -118,8 +119,8 @@ module.exports = React.createClass({ var emailPusherPromise; if (event.target.checked) { var data = {} - if (SdkConfig.get().brand) { - data['brand'] = SdkConfig.get().brand; + if (this.props.brand) { + data['brand'] = this.props.brand; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { From e24851456aa42072f3e04db8436572f84fc48595 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 8 Jun 2016 17:03:28 +0100 Subject: [PATCH 06/34] CSS for the MemberDeviceInfo view --- .../views/rooms/MemberDeviceInfo.css | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css new file mode 100644 index 000000000..86a304f6b --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css @@ -0,0 +1,37 @@ +/* +Copyright 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. +*/ + +.mx_MemberDeviceInfo { + font-size: 12px; + margin-top: 5px; +} + +.mx_MemberDeviceInfo div { + display: inline; + margin-right: 5px; +} + +.mx_MemberDeviceInfo_textButton { + color: #fff; + background-color: #76cfa6; + height: 20px; + border-radius: 20px; + text-align: center; + padding-left: 1em; + padding-right: 1em; + + cursor: pointer; +} From 5f29729e82a10505ab90c492710989ca72c1e0fb Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 8 Jun 2016 17:03:54 +0100 Subject: [PATCH 07/34] Make unverified encrypted events red and verified ones green --- .../vector/css/matrix-react-sdk/views/rooms/EventTile.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css index 6c0218b53..cb71d481d 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css @@ -36,6 +36,14 @@ limitations under the License. margin-top: 8px ! important; } +.mx_EventTile_verified { + background-color: #eaf5f0; +} + +.mx_EventTile_unverified { + background-color: #ffa0a0; +} + .mx_EventTile .mx_SenderProfile { color: #454545; opacity: 0.5; From f6aa9a7ea48efda6a597ead25b1d0774de847dda Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Jun 2016 18:46:21 +0100 Subject: [PATCH 08/34] Make the config optional Accept 404 errors from getting the config and start MatrixChat with no config, make other errors display a simple error message to prevent a completely blank page if the config does fail to load. --- .../views/settings/Notifications.js | 2 ++ src/vector/index.js | 24 ++++++++++++++++--- vector/config.json | 1 - config.json => vector/config.sample.json | 0 4 files changed, 23 insertions(+), 4 deletions(-) delete mode 120000 vector/config.json rename config.json => vector/config.sample.json (100%) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 771037863..bd12bdf9c 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -121,6 +121,8 @@ module.exports = React.createClass({ var data = {} if (this.props.brand) { data['brand'] = this.props.brand; + } else if (this.props.brand === undefined) { + data['brand'] = 'Vector'; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { diff --git a/src/vector/index.js b/src/vector/index.js index 9ecf8f813..c2e16108e 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -79,6 +79,7 @@ var validBrowser = checkBrowserFeatures([ "displaytable", "flexbox", "es5object", "es5function", "localstorage", "objectfit" ]); +var configError; // We want to support some name / value pairs in the fragment // so we're re-using query string like format @@ -112,6 +113,8 @@ function parseQs(location) { // Here, we do some crude URL analysis to allow // deep-linking. function routeUrl(location) { + if (!window.matrixChat) return; + console.log("Routing URL "+window.location); var params = parseQs(location); var loginToken = params.loginToken; @@ -189,7 +192,7 @@ function getConfig() { { method: "GET", url: "config.json", json: true }, (err, response, body) => { if (err || response.status < 200 || response.status >= 300) { - throw "failed to load config.json"; + deferred.reject({err: err, response: response}); } deferred.resolve(body); @@ -213,10 +216,25 @@ async function loadApp() { } } - let configJson = await getConfig(); + let configJson; + try { + configJson = await getConfig(); + } catch (e) { + // On 404 errors, carry on without a config, + // but on other errors, fail, otherwise it will + // lead to subtle errors where the app runs with + // the default config it fails to fetch config.json. + if (e.response.status != 404) { + configError = e; + } + } console.log("Vector starting at "+window.location); - if (validBrowser) { + if (configError) { + window.matrixChat = ReactDOM.render(
+ Unable to load config file: please refresh the page to try again. +
, document.getElementById('matrixchat')); + } else if (validBrowser) { var MatrixChat = sdk.getComponent('structures.MatrixChat'); var fragParts = parseQsFromFragment(window.location); window.matrixChat = ReactDOM.render( diff --git a/vector/config.json b/vector/config.json deleted file mode 120000 index 28e148537..000000000 --- a/vector/config.json +++ /dev/null @@ -1 +0,0 @@ -../config.json \ No newline at end of file diff --git a/config.json b/vector/config.sample.json similarity index 100% rename from config.json rename to vector/config.sample.json From 7999a70cabaf0f77f86e5e906dd81f7b10d2fe13 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 24 Mar 2016 17:39:49 +0000 Subject: [PATCH 09/34] Switch to dev versions of react-sdk and js-sdk --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 723d5533c..cfc90011e 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.0.0-beta.4", - "matrix-js-sdk": "^0.5.4", - "matrix-react-sdk": "^0.6.3", + "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", + "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", "modernizr": "^3.1.0", "q": "^1.4.1", "react": "^15.0.1", From 4fc311da90ab976e9df88b680b6f92b631f6e3b6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 09:56:11 +0100 Subject: [PATCH 10/34] Style fix --- src/components/views/settings/Notifications.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index bd12bdf9c..a69081184 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -120,9 +120,7 @@ module.exports = React.createClass({ if (event.target.checked) { var data = {} if (this.props.brand) { - data['brand'] = this.props.brand; - } else if (this.props.brand === undefined) { - data['brand'] = 'Vector'; + data['brand'] = this.props.brand || 'Vector'; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { From e4ea00ca23f6d4e28340338787697cc6fe193621 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 09:56:57 +0100 Subject: [PATCH 11/34] Return here, else we'll call resolve too --- src/vector/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vector/index.js b/src/vector/index.js index c2e16108e..e5850f41e 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -193,6 +193,7 @@ function getConfig() { (err, response, body) => { if (err || response.status < 200 || response.status >= 300) { deferred.reject({err: err, response: response}); + return; } deferred.resolve(body); From 3040d0a474832a629db5b4a329a9520187155328 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 09:57:44 +0100 Subject: [PATCH 12/34] Comment typo --- src/vector/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.js b/src/vector/index.js index e5850f41e..4b4e3a953 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -224,7 +224,7 @@ async function loadApp() { // On 404 errors, carry on without a config, // but on other errors, fail, otherwise it will // lead to subtle errors where the app runs with - // the default config it fails to fetch config.json. + // the default config if fails to fetch config.json. if (e.response.status != 404) { configError = e; } From 24602119c5f20bb9df8b23294f78c08ca258c3a3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 09:59:37 +0100 Subject: [PATCH 13/34] This doesn't actually need to be global (because the rendering isn't in a render method here) --- src/vector/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.js b/src/vector/index.js index 4b4e3a953..9f98cf971 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -79,7 +79,6 @@ var validBrowser = checkBrowserFeatures([ "displaytable", "flexbox", "es5object", "es5function", "localstorage", "objectfit" ]); -var configError; // We want to support some name / value pairs in the fragment // so we're re-using query string like format @@ -218,6 +217,7 @@ async function loadApp() { } let configJson; + let configError; try { configJson = await getConfig(); } catch (e) { From f595f6f141f2c417f494be55393d1cf3916429bb Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 10:25:49 +0100 Subject: [PATCH 14/34] This check shouldn't be here with the || --- src/components/views/settings/Notifications.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index a69081184..7f0b57545 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -119,9 +119,7 @@ module.exports = React.createClass({ var emailPusherPromise; if (event.target.checked) { var data = {} - if (this.props.brand) { - data['brand'] = this.props.brand || 'Vector'; - } + data['brand'] = this.props.brand || 'Vector'; emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address); From 4dd477e064023895633e52597457f03d8989ce9c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 9 Jun 2016 10:38:51 +0100 Subject: [PATCH 15/34] index.js: fix comment typo Fix dave's typo for him --- src/vector/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.js b/src/vector/index.js index 9f98cf971..08d89c3de 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -224,7 +224,7 @@ async function loadApp() { // On 404 errors, carry on without a config, // but on other errors, fail, otherwise it will // lead to subtle errors where the app runs with - // the default config if fails to fetch config.json. + // the default config if it fails to fetch config.json. if (e.response.status != 404) { configError = e; } From f61cfbc54276afc303afd640e9cad7a9261b22df Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 16:41:01 +0100 Subject: [PATCH 16/34] Fix RoomDirectory to join by alias whenever possible. --- src/components/structures/RoomDirectory.js | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index d78082309..c6aca6189 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -81,20 +81,30 @@ module.exports = React.createClass({ // }); }, - showRoom: function(roomId) { + showRoom: function(roomIdOrAlias) { // extract the metadata from the publicRooms structure to pass // as out-of-band data to view_room, because we get information // here that we can't get other than by joining the room in some // cases. var room; - for (var i = 0; i < this.state.publicRooms.length; ++i) { - if (this.state.publicRooms[i].room_id == roomId) { - room = this.state.publicRooms[i]; - break; + if (roomIdOrAlias[0] == '!') { + for (var i = 0; i < this.state.publicRooms.length; ++i) { + if (this.state.publicRooms[i].room_id == roomIdOrAlias) { + room = this.state.publicRooms[i]; + break; + } } } var oob_data = {}; if (room) { + // pluck the alias out of the room data and use it to join the room, as we cannot + // really join rooms by ID (the HS has no way to get candidate servers). However, + // we still have to do this for room in the public room list that don't have an alias + // since this is currently the only choice. + // (Note we don't just pass the room alias to this function: we still want to be able to + // look up the oob data for which we need the room id). + var alias = room.canonical_alias || (room.aliases ? room.aliases[0] : undefined); + if (alias) roomIdOrAlias = alias; if (MatrixClientPeg.get().isGuest()) { if (!room.world_readable && !room.guest_can_join) { var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog"); @@ -114,9 +124,12 @@ module.exports = React.createClass({ }; } + // XXX: this interface needs to change to officially accept room IDs + // or aliases, rather than it happening to work if you pass an alias + // as room_id dis.dispatch({ action: 'view_room', - room_id: roomId, + room_id: roomIdOrAlias, oob_data: oob_data, }); }, From a030e46c6990754cb2de3240b689dcd7c4bf2602 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 9 Jun 2016 17:13:02 +0100 Subject: [PATCH 17/34] Use join_room_by_alias in RoomDirectory This still doesn't actually cause the room to be joined by alias though, so still need to fix that --- src/components/structures/RoomDirectory.js | 39 +++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index c6aca6189..1f1d4a8cb 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -81,15 +81,15 @@ module.exports = React.createClass({ // }); }, - showRoom: function(roomIdOrAlias) { + showRoom: function(roomId, roomAlias) { // extract the metadata from the publicRooms structure to pass // as out-of-band data to view_room, because we get information // here that we can't get other than by joining the room in some // cases. var room; - if (roomIdOrAlias[0] == '!') { + if (roomId) { for (var i = 0; i < this.state.publicRooms.length; ++i) { - if (this.state.publicRooms[i].room_id == roomIdOrAlias) { + if (this.state.publicRooms[i].room_id == roomId) { room = this.state.publicRooms[i]; break; } @@ -97,14 +97,6 @@ module.exports = React.createClass({ } var oob_data = {}; if (room) { - // pluck the alias out of the room data and use it to join the room, as we cannot - // really join rooms by ID (the HS has no way to get candidate servers). However, - // we still have to do this for room in the public room list that don't have an alias - // since this is currently the only choice. - // (Note we don't just pass the room alias to this function: we still want to be able to - // look up the oob data for which we need the room id). - var alias = room.canonical_alias || (room.aliases ? room.aliases[0] : undefined); - if (alias) roomIdOrAlias = alias; if (MatrixClientPeg.get().isGuest()) { if (!room.world_readable && !room.guest_can_join) { var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog"); @@ -124,14 +116,21 @@ module.exports = React.createClass({ }; } - // XXX: this interface needs to change to officially accept room IDs - // or aliases, rather than it happening to work if you pass an alias - // as room_id - dis.dispatch({ - action: 'view_room', - room_id: roomIdOrAlias, + var payload = { oob_data: oob_data, - }); + }; + if (roomAlias) { + payload.action = 'view_room_alias'; + payload.room_alias = roomAlias; + } else { + // It's not really possible to join Matrix rooms by ID because the HS has no way to know + // which servers to start querying. However, there's no other way to join rooms in + // this list without aliases at present. + payload.action = 'view_room'; + payload.room_id = roomId; + } + + dis.dispatch(payload); }, getRows: function(filter) { @@ -177,7 +176,7 @@ module.exports = React.createClass({ topic = linkifyString(sanitizeHtml(topic)); rows.unshift( - + Date: Thu, 9 Jun 2016 18:51:25 +0100 Subject: [PATCH 18/34] gitignore config.json now it isn't versioned --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index df91879d0..5b2b6dafb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /packages/ /vector/bundle.* /vector/components.css +/vector/config.json From 819e06e2cd66540e58ba0afece2f8d28de1eea2c Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Fri, 10 Jun 2016 04:41:59 +0530 Subject: [PATCH 19/34] MessageComposer styling for Draft --- .../views/elements/RichText.css | 14 ++++++++++ .../views/rooms/MessageComposer.css | 27 ++++++++++++------- 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css diff --git a/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css new file mode 100644 index 000000000..8b8d3bd92 --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css @@ -0,0 +1,14 @@ +.mx_UserPill { + color: white; + background-color: #76cfa6; + padding: 2px 8px; + border-radius: 16px; +} + +.mx_RoomPill { + background-color: white; + color: #76cfa6; + border: 1px solid #76cfa6; + padding: 2px 8px; + border-radius: 16px; +} diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css index daf15001a..a6d30b374 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css @@ -22,15 +22,16 @@ limitations under the License. } .mx_MessageComposer_row { - display: table-row; + display: flex; + flex-direction: row; + align-items: center; width: 100%; } .mx_MessageComposer .mx_MessageComposer_avatar { - display: table-cell; + /*display: table-cell;*/ padding-left: 10px; padding-right: 28px; - vertical-align: middle; } .mx_MessageComposer .mx_MessageComposer_avatar .mx_BaseAvatar { @@ -42,9 +43,8 @@ limitations under the License. } .mx_MessageComposer_noperm_error { - display: table-cell; + /*display: table-cell;*/ width: 100%; - vertical-align: middle; height: 60px; text-align: center; font-style: italic; @@ -52,10 +52,17 @@ limitations under the License. } .mx_MessageComposer_input { - display: table-cell; - width: 100%; + /*display: table-cell;*/ + flex: 1; vertical-align: middle; - height: 60px; + min-height: 60px; + max-height: 120px; + display: flex; + align-items: center; +} + +.mx_MessageComposer_input .DraftEditor-root { + flex: 1; } .mx_MessageComposer_input textarea { @@ -92,8 +99,8 @@ limitations under the License. .mx_MessageComposer_hangup, .mx_MessageComposer_voicecall, .mx_MessageComposer_videocall { - display: table-cell; - vertical-align: middle; + /*display: table-cell;*/ + /*vertical-align: middle;*/ padding-left: 10px; padding-right: 10px; cursor: pointer; From d7504aeda5b6d802417e4b5362e5c51af149b9f0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 10 Jun 2016 15:13:41 +0100 Subject: [PATCH 20/34] Switch to new view_room --- src/components/structures/RoomDirectory.js | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 1f1d4a8cb..2a37616b6 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -116,21 +116,16 @@ module.exports = React.createClass({ }; } - var payload = { + // It's not really possible to join Matrix rooms by ID because the HS has no way to know + // which servers to start querying. However, there's no other way to join rooms in + // this list without aliases at present, so if roomAlias isn't set here we'll rely + // on view_room falling back to using the ID + dis.dispatch({ oob_data: oob_data, - }; - if (roomAlias) { - payload.action = 'view_room_alias'; - payload.room_alias = roomAlias; - } else { - // It's not really possible to join Matrix rooms by ID because the HS has no way to know - // which servers to start querying. However, there's no other way to join rooms in - // this list without aliases at present. - payload.action = 'view_room'; - payload.room_id = roomId; - } - - dis.dispatch(payload); + action: 'view_room', + room_id: roomId, + room_alias: roomAlias, + }); }, getRows: function(filter) { From f6ed21559a0d298cec76a9ed9f3638f3b0ffc86a Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Sat, 11 Jun 2016 15:54:43 +0530 Subject: [PATCH 21/34] RTE mode switch styling & cleanup --- .../css/matrix-react-sdk/views/rooms/MessageComposer.css | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css index a6d30b374..8cced52c7 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css @@ -29,7 +29,6 @@ limitations under the License. } .mx_MessageComposer .mx_MessageComposer_avatar { - /*display: table-cell;*/ padding-left: 10px; padding-right: 28px; } @@ -43,7 +42,6 @@ limitations under the License. } .mx_MessageComposer_noperm_error { - /*display: table-cell;*/ width: 100%; height: 60px; text-align: center; @@ -52,13 +50,18 @@ limitations under the License. } .mx_MessageComposer_input { - /*display: table-cell;*/ flex: 1; vertical-align: middle; min-height: 60px; max-height: 120px; display: flex; align-items: center; + overflow: auto; + transition: 0.6s border-top ease; + border-top: 2px solid rgba(255, 255, 255, 0); +} +.mx_MessageComposer_input_rte { + border-top: 2px solid #76cfa6; /* placeholder RTE indicator */ } .mx_MessageComposer_input .DraftEditor-root { From eb37032d8a92292c2ed9b9734b101aa60696f8ae Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sun, 12 Jun 2016 01:04:22 +0200 Subject: [PATCH 22/34] Markdown: styles for bold/italics --- .../css/matrix-react-sdk/views/elements/RichText.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css index 8b8d3bd92..171482a36 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css +++ b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css @@ -12,3 +12,11 @@ padding: 2px 8px; border-radius: 16px; } + +.mx_Markdown_BOLD { + font-weight: bold; +} + +.mx_Markdown_ITALIC { + font-style: italic; +} From 3547bd8d00cef7a202b38cf8158d7dcc9005c0f1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 13:02:34 +0100 Subject: [PATCH 23/34] Update for react-sdk dbkr/fix_peeking branch With the react-sdk update, this does nothing functionally since the room ID would just have been ignored, but update this to correctly supply only one of ID/alias. --- src/components/structures/RoomDirectory.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 2a37616b6..cc16e3c6e 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -116,16 +116,20 @@ module.exports = React.createClass({ }; } - // It's not really possible to join Matrix rooms by ID because the HS has no way to know - // which servers to start querying. However, there's no other way to join rooms in - // this list without aliases at present, so if roomAlias isn't set here we'll rely - // on view_room falling back to using the ID - dis.dispatch({ + var payload = { oob_data: oob_data, action: 'view_room', - room_id: roomId, - room_alias: roomAlias, - }); + }; + // It's not really possible to join Matrix rooms by ID because the HS has no way to know + // which servers to start querying. However, there's no other way to join rooms in + // this list without aliases at present, so if roomAlias isn't set here we have no + // choice but to supply the ID. + if (roomAlias) { + payload.room_alias = roomAlias; + } else { + payload.room_id = roomId; + } + dis.dispatch(payload); }, getRows: function(filter) { From b643d8ff6af990815fc6d731477da3ccab6cc9f9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 15:12:35 +0100 Subject: [PATCH 24/34] Update README.md To reflect the fact that you can now sensibly deploy from a package (ie. be able to configure the app). Make the first thing be downloading a prebuilt package so people who only read the first part don't end up running npm start in production and complain about needing npm. --- README.md | 66 +++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 7a45339f6..332b38529 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,23 @@ Vector/Web Vector is a Matrix web client built using the Matrix React SDK (https://github.com/matrix-org/matrix-react-sdk). -Getting started +Getting Started =============== +Vector is a modular webapp built with modern ES6 and requires and npm build system to build. +Instructions for building are below, but building from source shouldn't be necessary +for simple deployments. + +1. Download the latest version from https://vector.im/packages/ +1. Untar the tarball on your web server +1. Move (or symlink) the vector-x.x.x directory to an appropriate name +1. If desired, copy `config.sample.json` to `config.json` and edit it + as desired. See below for details. +1. Enter the URL into your browser and log into vector! + +Building From Source +==================== + +If you do wish to build vector from source: 1. Install or update `node.js` so that your `npm` is at least at version `2.0.0` 1. Clone the repo: `git clone https://github.com/vector-im/vector-web.git` @@ -13,19 +28,21 @@ Getting started 1. If you are using the `develop` branch of vector, you will probably need to rebuild one of the dependencies, due to https://github.com/npm/npm/issues/3055: `(cd node_modules/matrix-react-sdk && npm install)` -1. Start the development builder and a testing server: `npm start` -1. Wait a few seconds for the initial build to finish (the command won't - terminate: it's running a web server for you). -1. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector. +1. Configure the app by modifying the `config.json` file (see below for details) +1. `npm run package` to build a tarball to deploy. Untaring this file will give + a version-specific directory containing all the files that need to go on your + web server. -With `npm start`, any changes you make to the source files will cause a rebuild so -your changes will show up when you refresh. This development server also disables -caching, so do NOT use it in production. +Note that `npm run package` is not supported on Windows, so Windows users can run `npm +run build`, which will build all the necessary files into the `vector` +directory. The version of Vector will not appear in Settings without +using the package script. You can then mount the vector directory on your +webserver to actually serve up the app, which is entirely static content. -Configuring +config.json =========== -Configure the app by modifying the `config.json` file: +You can configure the app by modifying the `config.json` file: 1. `default_hs_url` is the default home server url. 1. `default_is_url` is the default identity server url (this is the server used @@ -33,31 +50,13 @@ Configure the app by modifying the `config.json` file: registering with an email address or adding an email address to your account will not work. -You will need to re-run `npm run build` after editing `config.json`. - -Deployment -========== - -On a Unix-based OS, run `npm run package` to build a tarball package. Untaring -this file will give a version-specific directory containing all the files that -need to go on your web server. - -The package script is not supported on Windows, so Windows users can run `npm -run build`, which will build all the necessary files into the `vector` -directory. Note that the version of Vector will not appear in Settings without -using the package script. You can then mount the vector directory on your -webserver to actually serve up the app, which is entirely static content. - Development =========== -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, much of the functionality in Vector is actually in the -`matrix-react-sdk` and `matrix-js-sdk` modules. It is possible to set these up -in a way that makes it easy to track the `develop` branches in git and to make -local changes without having to manually rebuild each time. +Much of the functionality in Vector is actually in the `matrix-react-sdk` and +`matrix-js-sdk` modules. It is possible to set these up in a way that makes it +easy to track the `develop` branches in git and to make local changes without +having to manually rebuild each time. [Be aware that there may be problems with this process under npm version 3.] @@ -102,7 +101,8 @@ Finally, build and start vector itself: + 1013 hidden modules ``` Remember, the command will not terminate since it runs the web server - and rebuilds source files when they change. + and rebuilds source files when they change. This development server also + disables caching, so do NOT use it in production. 1. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector. When you make changes to `matrix-js-sdk` or `matrix-react-sdk`, you will need From 22cef7a6a06e826ba155611e82b964afeaf798f6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 15:41:55 +0100 Subject: [PATCH 25/34] Copy config.json first --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 332b38529..6728d184b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ If you do wish to build vector from source: 1. If you are using the `develop` branch of vector, you will probably need to rebuild one of the dependencies, due to https://github.com/npm/npm/issues/3055: `(cd node_modules/matrix-react-sdk && npm install)` -1. Configure the app by modifying the `config.json` file (see below for details) +1. Configure the app by copying `config.sample.json` to `config.json` and modifying + it (see below for details) 1. `npm run package` to build a tarball to deploy. Untaring this file will give a version-specific directory containing all the files that need to go on your web server. From a7598ea81507d77958a414c96a18be0ca1773968 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 15:52:03 +0100 Subject: [PATCH 26/34] Mention copying sample file here too --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6728d184b..6bbda7bf9 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ webserver to actually serve up the app, which is entirely static content. config.json =========== -You can configure the app by modifying the `config.json` file: +You can configure the app by copying the sample and modifying the `config.json` file: 1. `default_hs_url` is the default home server url. 1. `default_is_url` is the default identity server url (this is the server used From a8cee87c086f4a0c2dcdfc2ef203ca269204ba05 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 15:53:13 +0100 Subject: [PATCH 27/34] js-sdk doesn't have a build step --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6bbda7bf9..ea3501746 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,10 @@ Finally, build and start vector itself: disables caching, so do NOT use it in production. 1. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector. -When you make changes to `matrix-js-sdk` or `matrix-react-sdk`, you will need -to run `npm run build` in the relevant directory. You can do this automatically -by instead running `npm start` in each directory, to start a development -builder which will watch for changes to the files and rebuild automatically. +When you make changes to `matrix-react-sdk`, you will need to run `npm run +build` in the relevant directory. You can do this automatically by instead +running `npm start` in the directory, to start a development builder which +will watch for changes to the files and rebuild automatically. 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`. From 0635a6f5627d3c42ee619a4f0366057e001bd4b1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 16:32:07 +0100 Subject: [PATCH 28/34] Fix karma tests As we now use draft-js: https://github.com/facebook/fbjs/issues/133#event-617440260 --- karma.conf.js | 1 + 1 file changed, 1 insertion(+) diff --git a/karma.conf.js b/karma.conf.js index b97273796..971e96823 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -27,6 +27,7 @@ module.exports = function (config) { // list of files / patterns to load in the browser files: [ + 'node_modules/babel-polyfill/browser.js', testFile, {pattern: 'vector/img/*', watched: false, included: false, served: true, nocache: false}, ], From a373849b5b4515b73a9d16300aca5067965bed33 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 15 Jun 2016 11:03:52 +0100 Subject: [PATCH 29/34] Give better instructions for modifying config. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea3501746..ba8ad940a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ webserver to actually serve up the app, which is entirely static content. config.json =========== -You can configure the app by copying the sample and modifying the `config.json` file: +You can configure the app by copying `vector/config.sample.json` to +`vector/config.json` and customising it: 1. `default_hs_url` is the default home server url. 1. `default_is_url` is the default identity server url (this is the server used From 795986f14695965621a8bfed91cca22cf6e4c763 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 16 Jun 2016 07:39:34 +0100 Subject: [PATCH 30/34] Karma: fix warning by ignoring olm If olm is not installed, the webpack build for the karma tests gives an ugly error. None of the tests currently care if olm is installed or not, so fix this for now by just ignoring the olm module. --- karma.conf.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 971e96823..f05186af9 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -36,7 +36,7 @@ module.exports = function (config) { proxies: { "/img/": "/base/vector/img/", }, - + // preprocess matching files before serving them to the browser // available preprocessors: // https://npmjs.org/browse/keyword/karma-preprocessor @@ -123,7 +123,7 @@ module.exports = function (config) { // same goes for js-sdk "matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'), - + sinon: 'sinon/pkg/sinon.js', }, root: [ @@ -131,6 +131,11 @@ module.exports = function (config) { path.resolve('./test'), ], }, + plugins: [ + // olm may not be installed, so avoid webpack warnings by + // ignoring it. + new webpack.IgnorePlugin(/^olm$/), + ], devtool: 'inline-source-map', }, }); From a90492e393adbec50dc44e1da1f3598f812c86b6 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 9 Jun 2016 11:49:55 -0700 Subject: [PATCH 31/34] fix CSS --- .../vector/css/matrix-react-sdk/views/rooms/EventTile.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css index cb71d481d..e8f42aac1 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css @@ -17,7 +17,7 @@ limitations under the License. .mx_EventTile { max-width: 100%; clear: both; - margin-top: 24px; + padding-top: 24px; margin-left: 65px; } @@ -33,7 +33,7 @@ limitations under the License. } .mx_EventTile_continuation { - margin-top: 8px ! important; + padding-top: 8px ! important; } .mx_EventTile_verified { From 95a0bc92d6b4fef759bac13b7e60dd3bbee69c0d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 9 Jun 2016 19:08:31 +0100 Subject: [PATCH 32/34] CSS for unverify button (supports change in react-sdk) --- .../matrix-react-sdk/views/rooms/MemberDeviceInfo.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css index 86a304f6b..2031f4f18 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberDeviceInfo.css @@ -26,7 +26,6 @@ limitations under the License. .mx_MemberDeviceInfo_textButton { color: #fff; - background-color: #76cfa6; height: 20px; border-radius: 20px; text-align: center; @@ -35,3 +34,11 @@ limitations under the License. cursor: pointer; } + +.mx_MemberDeviceInfo_verify { + background-color: #76cfa6; +} + +.mx_MemberDeviceInfo_unverify { + background-color: #e55e5e; +} \ No newline at end of file From 607923b58f3defe58ebe2df1fd01f2a0fdeb354d Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Jun 2016 17:49:11 +0100 Subject: [PATCH 33/34] Fix test since we peek by room ID, not alias --- test/app-tests/joining.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/app-tests/joining.js b/test/app-tests/joining.js index 1b47889a1..37a3e9e65 100644 --- a/test/app-tests/joining.js +++ b/test/app-tests/joining.js @@ -77,6 +77,7 @@ describe('joining a room', function () { httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' }); httpBackend.when('GET', '/sync').respond(200, {}); httpBackend.when('GET', '/publicRooms').respond(200, {chunk: []}); + httpBackend.when('GET', '/directory/room/'+encodeURIComponent(ROOM_ALIAS)).respond(200, { room_id: ROOM_ID }); // start with a logged-in client peg.replaceUsingAccessToken(HS_URL, IS_URL, USER_ID, ACCESS_TOKEN); @@ -102,7 +103,7 @@ describe('joining a room', function () { // that should create a roomview which will start a peek; wait // for the peek. - httpBackend.when('GET', '/rooms/'+encodeURIComponent(ROOM_ALIAS)+"/initialSync") + httpBackend.when('GET', '/rooms/'+encodeURIComponent(ROOM_ID)+"/initialSync") .respond(401, {errcode: 'M_GUEST_ACCESS_FORBIDDEN'}); return httpBackend.flush(); }).then(() => { From 654429dbdb016ecb4f7fd8249828a820877564ff Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 18 Jun 2016 21:12:32 +0100 Subject: [PATCH 34/34] improve wording on 'search room names' --- src/components/structures/SearchBox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/SearchBox.js b/src/components/structures/SearchBox.js index 9a38089e1..5e5a19e65 100644 --- a/src/components/structures/SearchBox.js +++ b/src/components/structures/SearchBox.js @@ -103,7 +103,7 @@ module.exports = React.createClass({ className="mx_SearchBox_search" value={ this.state.searchTerm } onChange={ this.onChange } - placeholder="Search room names" + placeholder="Filter room names" /> ]; }