From e304a1925d4e349214c6046b78983f0db8445ecb Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 16:12:38 +0000 Subject: [PATCH 1/4] Add VectorLoginFooter with vector references --- .../views/login/VectorLoginFooter.js | 34 +++++++++++++++++++ src/skins/vector/skindex.js | 1 + 2 files changed, 35 insertions(+) create mode 100644 src/components/views/login/VectorLoginFooter.js diff --git a/src/components/views/login/VectorLoginFooter.js b/src/components/views/login/VectorLoginFooter.js new file mode 100644 index 0000000000..cf9841d6f8 --- /dev/null +++ b/src/components/views/login/VectorLoginFooter.js @@ -0,0 +1,34 @@ +/* +Copyright 2015 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. +*/ + +'use strict'; + +var React = require('react'); + +module.exports = React.createClass({ + displayName: 'VectorLoginFooter', + + render: function() { + return ( +
+ blog  ·   + twitter  ·   + github  ·   + powered by Matrix +
+ ); + } +}); diff --git a/src/skins/vector/skindex.js b/src/skins/vector/skindex.js index d5b559c68c..bbc5e54e6d 100644 --- a/src/skins/vector/skindex.js +++ b/src/skins/vector/skindex.js @@ -36,6 +36,7 @@ skin['rooms.RoomDropTarget'] = require('../../components/views/rooms/RoomDropTar skin['rooms.RoomTooltip'] = require('../../components/views/rooms/RoomTooltip'); skin['rooms.SearchBar'] = require('../../components/views/rooms/SearchBar'); skin['globals.MatrixToolbar'] = require('../../components/views/globals/MatrixToolbar'); +skin['login.LoginFooter'] = require('../../components/views/login/VectorLoginFooter'); skin['structures.BottomLeftMenu'] = require('../../components/structures/BottomLeftMenu'); skin['structures.LeftPanel'] = require('../../components/structures/LeftPanel'); skin['structures.RightPanel'] = require('../../components/structures/RightPanel'); From 8d31f72f8320294ec30a9210606ccd7619532b73 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 16:27:23 +0000 Subject: [PATCH 2/4] Add VectorLoginHeader --- .../views/login/VectorLoginHeader.js | 31 +++++++++++++++++++ src/skins/vector/skindex.js | 1 + 2 files changed, 32 insertions(+) create mode 100644 src/components/views/login/VectorLoginHeader.js diff --git a/src/components/views/login/VectorLoginHeader.js b/src/components/views/login/VectorLoginHeader.js new file mode 100644 index 0000000000..2c1d9072a1 --- /dev/null +++ b/src/components/views/login/VectorLoginHeader.js @@ -0,0 +1,31 @@ +/* +Copyright 2015 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. +*/ + +'use strict'; + +var React = require('react'); + +module.exports = React.createClass({ + displayName: 'VectorLoginHeader', + + render: function() { + return ( +
+ vector +
+ ); + } +}); diff --git a/src/skins/vector/skindex.js b/src/skins/vector/skindex.js index bbc5e54e6d..f847bb39c4 100644 --- a/src/skins/vector/skindex.js +++ b/src/skins/vector/skindex.js @@ -37,6 +37,7 @@ skin['rooms.RoomTooltip'] = require('../../components/views/rooms/RoomTooltip'); skin['rooms.SearchBar'] = require('../../components/views/rooms/SearchBar'); skin['globals.MatrixToolbar'] = require('../../components/views/globals/MatrixToolbar'); skin['login.LoginFooter'] = require('../../components/views/login/VectorLoginFooter'); +skin['login.LoginHeader'] = require('../../components/views/login/VectorLoginHeader'); skin['structures.BottomLeftMenu'] = require('../../components/structures/BottomLeftMenu'); skin['structures.LeftPanel'] = require('../../components/structures/LeftPanel'); skin['structures.RightPanel'] = require('../../components/structures/RightPanel'); From a2b28b826cf6bb8c5cfc9b7cf700722b21ec8a8e Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 16:48:51 +0000 Subject: [PATCH 3/4] Add CustomServerDialog for vector --- .../views/login/VectorCustomServerDialog.js | 52 +++++++++++++++++++ src/skins/vector/skindex.js | 6 ++- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/components/views/login/VectorCustomServerDialog.js diff --git a/src/components/views/login/VectorCustomServerDialog.js b/src/components/views/login/VectorCustomServerDialog.js new file mode 100644 index 0000000000..b40675b76b --- /dev/null +++ b/src/components/views/login/VectorCustomServerDialog.js @@ -0,0 +1,52 @@ +/* +Copyright 2015 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. +*/ + +var React = require("react"); + +module.exports = React.createClass({ + displayName: 'VectorCustomServerDialog', + + render: function() { + console.log("State: %s", JSON.stringify(this.state)); + console.log("Props: %s", JSON.stringify(this.props)); + return ( +
+
+ Custom Server Options +
+
+ + You can use the custom server options to log into other Matrix + servers by specifying a different Home server URL. +
+ This allows you to use Vector with an existing Matrix account on + a different Home server. +
+
+ You can also set a custom Identity server but this will affect + people's ability to find you if you use a server in a group other + than the main Matrix.org group. +
+
+
+ +
+
+ ); + } +}); diff --git a/src/skins/vector/skindex.js b/src/skins/vector/skindex.js index f847bb39c4..1b6f1b70c4 100644 --- a/src/skins/vector/skindex.js +++ b/src/skins/vector/skindex.js @@ -24,6 +24,10 @@ limitations under the License. var skin = {}; // Vector-specific stuff +skin['login.LoginFooter'] = require('../../components/views/login/VectorLoginFooter'); +skin['login.LoginHeader'] = require('../../components/views/login/VectorLoginHeader'); +skin['login.CustomServerDialog'] = require("../../components/views/login/VectorCustomServerDialog"); + skin['elements.Spinner'] = require('../../components/views/elements/Spinner'); skin['elements.ImageView'] = require('../../components/views/elements/ImageView'); skin['messages.MessageTimestamp'] = require('../../components/views/messages/MessageTimestamp'); @@ -36,8 +40,6 @@ skin['rooms.RoomDropTarget'] = require('../../components/views/rooms/RoomDropTar skin['rooms.RoomTooltip'] = require('../../components/views/rooms/RoomTooltip'); skin['rooms.SearchBar'] = require('../../components/views/rooms/SearchBar'); skin['globals.MatrixToolbar'] = require('../../components/views/globals/MatrixToolbar'); -skin['login.LoginFooter'] = require('../../components/views/login/VectorLoginFooter'); -skin['login.LoginHeader'] = require('../../components/views/login/VectorLoginHeader'); skin['structures.BottomLeftMenu'] = require('../../components/structures/BottomLeftMenu'); skin['structures.LeftPanel'] = require('../../components/structures/LeftPanel'); skin['structures.RightPanel'] = require('../../components/structures/RightPanel'); From e21d435d8489c8bea8e427d62dbae07d518bcff0 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 16:57:40 +0000 Subject: [PATCH 4/4] Remove debug logging --- src/components/views/login/VectorCustomServerDialog.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/views/login/VectorCustomServerDialog.js b/src/components/views/login/VectorCustomServerDialog.js index b40675b76b..4fb18fffdb 100644 --- a/src/components/views/login/VectorCustomServerDialog.js +++ b/src/components/views/login/VectorCustomServerDialog.js @@ -20,8 +20,6 @@ module.exports = React.createClass({ displayName: 'VectorCustomServerDialog', render: function() { - console.log("State: %s", JSON.stringify(this.state)); - console.log("Props: %s", JSON.stringify(this.props)); return (