mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Use the teamToken threaded through from react sdk
The bottom left menu now uses the same teamToken that the rest of the components use. This will require changes to react-sdk: https://github.com/matrix-org/matrix-react-sdk/pull/684
This commit is contained in:
parent
f2a6d2cc5a
commit
78aaf6b47e
@ -27,6 +27,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
collapsed: React.PropTypes.bool.isRequired,
|
collapsed: React.PropTypes.bool.isRequired,
|
||||||
|
teamToken: React.PropTypes.string,
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
@ -36,13 +37,6 @@ module.exports = React.createClass({
|
|||||||
homeHover: false,
|
homeHover: false,
|
||||||
peopleHover : false,
|
peopleHover : false,
|
||||||
settingsHover : 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 TintableSvg = sdk.getComponent('elements.TintableSvg');
|
||||||
|
|
||||||
var homeButton;
|
var homeButton;
|
||||||
if (this.state.teamToken) {
|
if (this.props.teamToken) {
|
||||||
homeButton = (
|
homeButton = (
|
||||||
<AccessibleButton className="mx_BottomLeftMenu_homePage" onClick={ this.onHomeClick } onMouseEnter={ this.onHomeMouseEnter } onMouseLeave={ this.onHomeMouseLeave } >
|
<AccessibleButton className="mx_BottomLeftMenu_homePage" onClick={ this.onHomeClick } onMouseEnter={ this.onHomeMouseEnter } onMouseLeave={ this.onHomeMouseLeave } >
|
||||||
<TintableSvg src="img/icons-home.svg" width="25" height="25" />
|
<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({
|
var LeftPanel = React.createClass({
|
||||||
displayName: 'LeftPanel',
|
displayName: 'LeftPanel',
|
||||||
|
|
||||||
|
propTypes: {
|
||||||
|
collapsed: React.PropTypes.bool.isRequired,
|
||||||
|
teamToken: React.PropTypes.string,
|
||||||
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
showCallElement: null,
|
showCallElement: null,
|
||||||
@ -124,7 +129,7 @@ var LeftPanel = React.createClass({
|
|||||||
collapsed={this.props.collapsed}
|
collapsed={this.props.collapsed}
|
||||||
searchFilter={this.state.searchFilter}
|
searchFilter={this.state.searchFilter}
|
||||||
ConferenceHandler={VectorConferenceHandler} />
|
ConferenceHandler={VectorConferenceHandler} />
|
||||||
<BottomLeftMenu collapsed={this.props.collapsed}/>
|
<BottomLeftMenu collapsed={this.props.collapsed} teamToken={this.props.teamToken}/>
|
||||||
</aside>
|
</aside>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user