mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 21:08:58 +03:00
Merge pull request #4037 from vector-im/luke/new-guest-access-login-button
Add "Login" button to RHS when user is a guest
This commit is contained in:
commit
75eca60d76
2 changed files with 23 additions and 0 deletions
|
@ -100,6 +100,10 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onLoginClick: function() {
|
||||||
|
dis.dispatch({ action: 'start_login' });
|
||||||
|
},
|
||||||
|
|
||||||
onRoomStateMember: function(ev, state, member) {
|
onRoomStateMember: function(ev, state, member) {
|
||||||
// redraw the badge on the membership list
|
// redraw the badge on the membership list
|
||||||
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
|
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
|
||||||
|
@ -217,6 +221,10 @@ module.exports = React.createClass({
|
||||||
<TintableSvg src="img/minimise.svg" width="10" height="16"/>
|
<TintableSvg src="img/minimise.svg" width="10" height="16"/>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
} else if (MatrixClientPeg.get().isGuest()) {
|
||||||
|
buttonGroup = <AccessibleButton className="mx_RightPanel_loginButton" element="button" onClick={this.onLoginClick}>
|
||||||
|
Login
|
||||||
|
</AccessibleButton>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.props.collapsed) {
|
if (!this.props.collapsed) {
|
||||||
|
|
|
@ -30,6 +30,21 @@ limitations under the License.
|
||||||
flex: 0 0 70px;
|
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 **/
|
/** Fixme - factor this out with the main header **/
|
||||||
|
|
||||||
.mx_RightPanel_headerButtonGroup {
|
.mx_RightPanel_headerButtonGroup {
|
||||||
|
|
Loading…
Reference in a new issue