schildi-web/src/components/structures/BottomLeftMenu.js

55 lines
1.9 KiB
JavaScript
Raw Normal View History

2015-07-13 00:51:24 +00:00
/*
2016-01-07 04:17:56 +00:00
Copyright 2015, 2016 OpenMarket Ltd
2017-05-05 13:26:13 +00:00
Copyright 2017 Vector Creations Ltd
2015-07-13 00:51:24 +00:00
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.
*/
import React from 'react';
import sdk from 'matrix-react-sdk';
2015-07-15 14:04:24 +00:00
2015-07-13 00:51:24 +00:00
module.exports = React.createClass({
displayName: 'BottomLeftMenu',
2015-07-15 14:04:24 +00:00
propTypes: {
collapsed: React.PropTypes.bool.isRequired,
},
render: function() {
2017-05-05 13:26:13 +00:00
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;
if (this.props.teamToken) {
2017-05-05 13:26:13 +00:00
homeButton = <HomeButton tooltip={true} />;
}
2015-07-13 00:51:24 +00:00
return (
<div className="mx_BottomLeftMenu">
<div className="mx_BottomLeftMenu_options">
{ homeButton }
2017-05-05 13:26:13 +00:00
<StartChatButton tooltip={true} />
<RoomDirectoryButton tooltip={true} />
<CreateRoomButton tooltip={true} />
<span className="mx_BottomLeftMenu_settings">
2017-05-05 13:26:13 +00:00
<SettingsButton tooltip={true} />
</span>
2015-07-13 00:51:24 +00:00
</div>
</div>
);
}
});