Add config to hide the labs section

This commit is contained in:
David Baker 2016-08-05 16:13:06 +01:00
parent ff02c21252
commit e8ee5c2f96
2 changed files with 17 additions and 2 deletions

View file

@ -50,11 +50,15 @@ module.exports = React.createClass({
onClose: React.PropTypes.func,
// The brand string given when creating email pushers
brand: React.PropTypes.string,
// True to show the 'labs' section of experimental features
enableLabs: React.PropTypes.boolean,
},
getDefaultProps: function() {
return {
onClose: function() {}
onClose: function() {},
enableLabs: true,
};
},
@ -359,6 +363,8 @@ module.exports = React.createClass({
},
_renderLabs: function () {
if (!this.props.enableLabs) return false;
let features = LABS_FEATURES.map(feature => (
<div key={feature.id} className="mx_UserSettings_toggle">
<input