hide integration management behind labs checkbox
This commit is contained in:
parent
90e5ab2ca3
commit
cf70f1731e
2 changed files with 21 additions and 19 deletions
|
@ -34,7 +34,11 @@ const LABS_FEATURES = [
|
||||||
{
|
{
|
||||||
name: 'End-to-End Encryption',
|
name: 'End-to-End Encryption',
|
||||||
id: 'e2e_encryption'
|
id: 'e2e_encryption'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
name: 'Integration Management',
|
||||||
|
id: 'integration_management'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// if this looks like a release, use the 'version' from package.json; else use
|
// if this looks like a release, use the 'version' from package.json; else use
|
||||||
|
|
|
@ -67,18 +67,14 @@ module.exports = React.createClass({
|
||||||
tags_changed: false,
|
tags_changed: false,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
areNotifsMuted: areNotifsMuted,
|
areNotifsMuted: areNotifsMuted,
|
||||||
<<<<<<< HEAD
|
|
||||||
isRoomPublished: this._originalIsRoomPublished, // loaded async in componentWillMount
|
|
||||||
scalar_token: null,
|
|
||||||
scalar_error: null,
|
|
||||||
=======
|
|
||||||
// isRoomPublished is loaded async in componentWillMount so when the component
|
// isRoomPublished is loaded async in componentWillMount so when the component
|
||||||
// inits, the saved value will always be undefined, however getInitialState()
|
// inits, the saved value will always be undefined, however getInitialState()
|
||||||
// is also called from the saving code so we must return the correct value here
|
// is also called from the saving code so we must return the correct value here
|
||||||
// if we have it (although this could race if the user saves before we load whether
|
// if we have it (although this could race if the user saves before we load whether
|
||||||
// the room is published or not).
|
// the room is published or not).
|
||||||
isRoomPublished: this._originalIsRoomPublished,
|
isRoomPublished: this._originalIsRoomPublished,
|
||||||
>>>>>>> develop
|
scalar_token: null,
|
||||||
|
scalar_error: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -621,18 +617,20 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
var integrations_section;
|
var integrations_section;
|
||||||
if (this.state.scalar_token) {
|
if (UserSettingsStore.isFeatureEnabled("integration_management")) {
|
||||||
integrations_section = (
|
if (this.state.scalar_token) {
|
||||||
<div className="mx_RoomSettings_settings">
|
integrations_section = (
|
||||||
<a href="#" onClick={ this.onManageIntegrations }>Manage integrations</a>
|
<div className="mx_RoomSettings_settings">
|
||||||
</div>
|
<a href="#" onClick={ this.onManageIntegrations }>Manage integrations</a>
|
||||||
);
|
</div>
|
||||||
} else if (this.state.scalar_error) {
|
);
|
||||||
integrations_section = <div className="error">
|
} else if (this.state.scalar_error) {
|
||||||
Unable to contact integrations server
|
integrations_section = <div className="error">
|
||||||
</div>;
|
Unable to contact integrations server
|
||||||
} else {
|
</div>;
|
||||||
integrations_section = <Loader />;
|
} else {
|
||||||
|
integrations_section = <Loader />;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue