From 46541a3f2e67e17221e83c1a1d57f42714907896 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 18 Nov 2015 20:47:14 +0000 Subject: [PATCH] logout button on splashscreen to avoid wedging users whose server has gone awol --- src/skins/vector/css/pages/MatrixChat.css | 12 ++++++++++++ src/skins/vector/views/pages/MatrixChat.js | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/pages/MatrixChat.css b/src/skins/vector/css/pages/MatrixChat.css index b95f6a415c..2190e49601 100644 --- a/src/skins/vector/css/pages/MatrixChat.css +++ b/src/skins/vector/css/pages/MatrixChat.css @@ -14,6 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ +.mx_MatrixChat_splash { + position: relative; + height: 100%; +} + +.mx_MatrixChat_splashButtons { + text-align: center; + width: 100%; + position: absolute; + bottom: 30px; +} + .mx_MatrixChat_wrapper { display: -webkit-box; display: -moz-box; diff --git a/src/skins/vector/views/pages/MatrixChat.js b/src/skins/vector/views/pages/MatrixChat.js index e4e031d812..1a2ea288b6 100644 --- a/src/skins/vector/views/pages/MatrixChat.js +++ b/src/skins/vector/views/pages/MatrixChat.js @@ -61,6 +61,14 @@ module.exports = React.createClass({ }); }, + onLogoutClick: function(event) { + dis.dispatch({ + action: 'logout' + }); + event.stopPropagation(); + event.preventDefault(); + }, + handleResize: function(e) { var hideLhsThreshold = 1000; var showLhsThreshold = 1000; @@ -157,7 +165,10 @@ module.exports = React.createClass({ } else if (this.state.logged_in) { var Spinner = sdk.getComponent('atoms.Spinner'); return ( - +
+ + Logout +
); } else if (this.state.screen == 'register') { return (