mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Dedicated classes for the buttons
This commit is contained in:
parent
1001c98a3c
commit
c27f39714a
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2015, 2016 OpenMarket Ltd
|
Copyright 2015, 2016 OpenMarket Ltd
|
||||||
|
Copyright 2017 Vector Creations Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -26,22 +27,26 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
const RoleButton = sdk.getComponent('elements.RoleButton');
|
const HomeButton = sdk.getComponent('elements.HomeButton');
|
||||||
|
const StartChatButton = sdk.getComponent('elements.StartChatButton');
|
||||||
|
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
|
||||||
|
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
|
||||||
|
const SettingsButton = sdk.getComponent('elements.SettingsButton');
|
||||||
|
|
||||||
var homeButton;
|
var homeButton;
|
||||||
if (this.props.teamToken) {
|
if (this.props.teamToken) {
|
||||||
homeButton = <RoleButton role='home_page' tooltip={true} />;
|
homeButton = <HomeButton tooltip={true} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_BottomLeftMenu">
|
<div className="mx_BottomLeftMenu">
|
||||||
<div className="mx_BottomLeftMenu_options">
|
<div className="mx_BottomLeftMenu_options">
|
||||||
{ homeButton }
|
{ homeButton }
|
||||||
<RoleButton role='start_chat' tooltip={true} />
|
<StartChatButton tooltip={true} />
|
||||||
<RoleButton role='room_directory' tooltip={true} />
|
<RoomDirectoryButton tooltip={true} />
|
||||||
<RoleButton role='create_room' tooltip={true} />
|
<CreateRoomButton tooltip={true} />
|
||||||
<span className="mx_BottomLeftMenu_settings">
|
<span className="mx_BottomLeftMenu_settings">
|
||||||
<RoleButton role='settings' tooltip={true} />
|
<SettingsButton tooltip={true} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user