mirror of https://github.com/vector-im/riot-web
Merge pull request #566 from matrix-org/rav/remove_dead_labs_settings
Get rid of always-on labs settingspull/21833/head
commit
06f12b91b8
|
@ -30,16 +30,6 @@ module.exports = {
|
||||||
id: 'rich_text_editor',
|
id: 'rich_text_editor',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'End-to-End Encryption',
|
|
||||||
id: 'e2e_encryption',
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Integration Management',
|
|
||||||
id: 'integration_management',
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
loadProfileInfo: function() {
|
loadProfileInfo: function() {
|
||||||
|
|
|
@ -27,7 +27,6 @@ var sdk = require('../../../index');
|
||||||
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
||||||
var Modal = require("../../../Modal");
|
var Modal = require("../../../Modal");
|
||||||
var SdkConfig = require('../../../SdkConfig');
|
var SdkConfig = require('../../../SdkConfig');
|
||||||
var UserSettingsStore = require('../../../UserSettingsStore');
|
|
||||||
|
|
||||||
linkifyMatrix(linkify);
|
linkifyMatrix(linkify);
|
||||||
|
|
||||||
|
@ -213,16 +212,6 @@ module.exports = React.createClass({
|
||||||
// which requires the user to click through and THEN we can open the link in a new tab because
|
// which requires the user to click through and THEN we can open the link in a new tab because
|
||||||
// the window.open command occurs in the same stack frame as the onClick callback.
|
// the window.open command occurs in the same stack frame as the onClick callback.
|
||||||
|
|
||||||
let integrationsEnabled = UserSettingsStore.isFeatureEnabled("integration_management");
|
|
||||||
if (!integrationsEnabled) {
|
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
|
||||||
Modal.createDialog(ErrorDialog, {
|
|
||||||
title: "Integrations disabled",
|
|
||||||
description: "You need to enable the Labs option 'Integrations Management' in your Riot user settings first.",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Go fetch a scalar token
|
// Go fetch a scalar token
|
||||||
let scalarClient = new ScalarAuthClient();
|
let scalarClient = new ScalarAuthClient();
|
||||||
scalarClient.connect().then(() => {
|
scalarClient.connect().then(() => {
|
||||||
|
@ -304,4 +293,3 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ var classNames = require('classnames');
|
||||||
var dis = require("../../../dispatcher");
|
var dis = require("../../../dispatcher");
|
||||||
var Modal = require("../../../Modal");
|
var Modal = require("../../../Modal");
|
||||||
var sdk = require('../../../index');
|
var sdk = require('../../../index');
|
||||||
var UserSettingsStore = require('../../../UserSettingsStore');
|
|
||||||
var createRoom = require('../../../createRoom');
|
var createRoom = require('../../../createRoom');
|
||||||
var DMRoomMap = require('../../../utils/DMRoomMap');
|
var DMRoomMap = require('../../../utils/DMRoomMap');
|
||||||
var Unread = require('../../../Unread');
|
var Unread = require('../../../Unread');
|
||||||
|
@ -71,10 +70,8 @@ module.exports = WithMatrixClient(React.createClass({
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
this._cancelDeviceList = null;
|
this._cancelDeviceList = null;
|
||||||
|
|
||||||
// only display the devices list if our client supports E2E *and* the
|
// only display the devices list if our client supports E2E
|
||||||
// feature is enabled in the user settings
|
this._enableDevices = this.props.matrixClient.isCryptoEnabled();
|
||||||
this._enableDevices = this.props.matrixClient.isCryptoEnabled() &&
|
|
||||||
UserSettingsStore.isFeatureEnabled("e2e_encryption");
|
|
||||||
|
|
||||||
const cli = this.props.matrixClient;
|
const cli = this.props.matrixClient;
|
||||||
cli.on("deviceVerificationChanged", this.onDeviceVerificationChanged);
|
cli.on("deviceVerificationChanged", this.onDeviceVerificationChanged);
|
||||||
|
|
|
@ -24,7 +24,6 @@ var ObjectUtils = require("../../../ObjectUtils");
|
||||||
var dis = require("../../../dispatcher");
|
var dis = require("../../../dispatcher");
|
||||||
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
var ScalarAuthClient = require("../../../ScalarAuthClient");
|
||||||
var ScalarMessaging = require('../../../ScalarMessaging');
|
var ScalarMessaging = require('../../../ScalarMessaging');
|
||||||
var UserSettingsStore = require('../../../UserSettingsStore');
|
|
||||||
|
|
||||||
// parse a string as an integer; if the input is undefined, or cannot be parsed
|
// parse a string as an integer; if the input is undefined, or cannot be parsed
|
||||||
// as an integer, return a default.
|
// as an integer, return a default.
|
||||||
|
@ -81,7 +80,6 @@ module.exports = React.createClass({
|
||||||
console.error("Failed to get room visibility: " + err);
|
console.error("Failed to get room visibility: " + err);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (UserSettingsStore.isFeatureEnabled("integration_management")) {
|
|
||||||
this.scalarClient = new ScalarAuthClient();
|
this.scalarClient = new ScalarAuthClient();
|
||||||
this.scalarClient.connect().done(() => {
|
this.scalarClient.connect().done(() => {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
@ -89,8 +87,7 @@ module.exports = React.createClass({
|
||||||
this.setState({
|
this.setState({
|
||||||
scalar_error: err
|
scalar_error: err
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
|
||||||
|
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'ui_opacity',
|
action: 'ui_opacity',
|
||||||
|
@ -477,10 +474,6 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderEncryptionSection: function() {
|
_renderEncryptionSection: function() {
|
||||||
if (!UserSettingsStore.isFeatureEnabled("e2e_encryption")) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
var roomState = this.props.room.currentState;
|
var roomState = this.props.room.currentState;
|
||||||
var isEncrypted = cli.isRoomEncrypted(this.props.room.roomId);
|
var isEncrypted = cli.isRoomEncrypted(this.props.room.roomId);
|
||||||
|
@ -684,7 +677,7 @@ module.exports = React.createClass({
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (UserSettingsStore.isFeatureEnabled("integration_management")) {
|
|
||||||
if (this.scalarClient.hasCredentials()) {
|
if (this.scalarClient.hasCredentials()) {
|
||||||
integrationsButton = (
|
integrationsButton = (
|
||||||
<div className="mx_RoomSettings_integrationsButton" onClick={ this.onManageIntegrations }>
|
<div className="mx_RoomSettings_integrationsButton" onClick={ this.onManageIntegrations }>
|
||||||
|
@ -705,7 +698,6 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomSettings">
|
<div className="mx_RoomSettings">
|
||||||
|
|
Loading…
Reference in New Issue