mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
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',
|
||||
id: 'e2e_encryption'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Integration Management',
|
||||
id: 'integration_management'
|
||||
},
|
||||
];
|
||||
|
||||
// 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: tags,
|
||||
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
|
||||
// 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
|
||||
// if we have it (although this could race if the user saves before we load whether
|
||||
// the room is published or not).
|
||||
isRoomPublished: this._originalIsRoomPublished,
|
||||
>>>>>>> develop
|
||||
scalar_token: null,
|
||||
scalar_error: null,
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -621,18 +617,20 @@ module.exports = React.createClass({
|
|||
}
|
||||
|
||||
var integrations_section;
|
||||
if (this.state.scalar_token) {
|
||||
integrations_section = (
|
||||
<div className="mx_RoomSettings_settings">
|
||||
<a href="#" onClick={ this.onManageIntegrations }>Manage integrations</a>
|
||||
</div>
|
||||
);
|
||||
} else if (this.state.scalar_error) {
|
||||
integrations_section = <div className="error">
|
||||
Unable to contact integrations server
|
||||
</div>;
|
||||
} else {
|
||||
integrations_section = <Loader />;
|
||||
if (UserSettingsStore.isFeatureEnabled("integration_management")) {
|
||||
if (this.state.scalar_token) {
|
||||
integrations_section = (
|
||||
<div className="mx_RoomSettings_settings">
|
||||
<a href="#" onClick={ this.onManageIntegrations }>Manage integrations</a>
|
||||
</div>
|
||||
);
|
||||
} else if (this.state.scalar_error) {
|
||||
integrations_section = <div className="error">
|
||||
Unable to contact integrations server
|
||||
</div>;
|
||||
} else {
|
||||
integrations_section = <Loader />;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue