From aa604612a70c9944ab1b38655494214db8119e24 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 26 May 2017 18:42:07 +0100 Subject: [PATCH] Add "Login" button to RHS when user is a guest --- src/components/structures/RightPanel.js | 8 ++++++++ .../css/vector-web/structures/_RightPanel.scss | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 2c606e8c1..6d3436343 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -100,6 +100,10 @@ module.exports = React.createClass({ }); }, + onLoginClick: function() { + dis.dispatch({ action: 'start_login' }); + }, + onRoomStateMember: function(ev, state, member) { // redraw the badge on the membership list if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) { @@ -217,6 +221,10 @@ module.exports = React.createClass({ ; + } else if (MatrixClientPeg.get().isGuest()) { + buttonGroup = + Login + ; } if (!this.props.collapsed) { diff --git a/src/skins/vector/css/vector-web/structures/_RightPanel.scss b/src/skins/vector/css/vector-web/structures/_RightPanel.scss index bb60fa1e7..70cb2cb9b 100644 --- a/src/skins/vector/css/vector-web/structures/_RightPanel.scss +++ b/src/skins/vector/css/vector-web/structures/_RightPanel.scss @@ -30,6 +30,21 @@ limitations under the License. flex: 0 0 70px; } +.mx_RightPanel_loginButton { + margin-top: 15px; + width: 100%; + height: 40px; + border: 0px; + border-radius: 40px; + + background-color: $accent-color; + color: $primary-bg-color; + + cursor: pointer; + + font-size: 15px; +} + /** Fixme - factor this out with the main header **/ .mx_RightPanel_headerButtonGroup {