mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #3196 from vector-im/luke/rts-thread-team-token
Use the teamToken threaded through from react sdk
This commit is contained in:
commit
b6741d9b10
@ -27,6 +27,7 @@ module.exports = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
collapsed: React.PropTypes.bool.isRequired,
|
||||
teamToken: React.PropTypes.string,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
@ -36,13 +37,6 @@ module.exports = React.createClass({
|
||||
homeHover: false,
|
||||
peopleHover : false,
|
||||
settingsHover : false,
|
||||
teamToken: null,
|
||||
});
|
||||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
this.setState({
|
||||
teamToken: window.localStorage.getItem('mx_team_token'),
|
||||
});
|
||||
},
|
||||
|
||||
@ -122,7 +116,7 @@ module.exports = React.createClass({
|
||||
var TintableSvg = sdk.getComponent('elements.TintableSvg');
|
||||
|
||||
var homeButton;
|
||||
if (this.state.teamToken) {
|
||||
if (this.props.teamToken) {
|
||||
homeButton = (
|
||||
<AccessibleButton className="mx_BottomLeftMenu_homePage" onClick={ this.onHomeClick } onMouseEnter={ this.onHomeMouseEnter } onMouseLeave={ this.onHomeMouseLeave } >
|
||||
<TintableSvg src="img/icons-home.svg" width="25" height="25" />
|
||||
|
@ -28,6 +28,11 @@ var CallHandler = require("matrix-react-sdk/lib/CallHandler");
|
||||
var LeftPanel = React.createClass({
|
||||
displayName: 'LeftPanel',
|
||||
|
||||
propTypes: {
|
||||
collapsed: React.PropTypes.bool.isRequired,
|
||||
teamToken: React.PropTypes.string,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
showCallElement: null,
|
||||
@ -124,7 +129,7 @@ var LeftPanel = React.createClass({
|
||||
collapsed={this.props.collapsed}
|
||||
searchFilter={this.state.searchFilter}
|
||||
ConferenceHandler={VectorConferenceHandler} />
|
||||
<BottomLeftMenu collapsed={this.props.collapsed}/>
|
||||
<BottomLeftMenu collapsed={this.props.collapsed} teamToken={this.props.teamToken}/>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user