diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js
index a5070cfa21..fc212cce98 100644
--- a/src/components/views/rooms/RoomSettings.js
+++ b/src/components/views/rooms/RoomSettings.js
@@ -430,6 +430,27 @@ module.exports = React.createClass({
});
},
+ onEnableEncryptionClick() {
+ var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
+ Modal.createDialog(QuestionDialog, {
+ title: "Warning!",
+ description: (
+
+
End-to-end encryption is in beta and may not be reliable.
+
You should not yet trust it to secure data.
+
Once encryption is enabled for a room it cannot be turned off again (for now).
+
Encrypted messages will not be visible on clients that do not yet implement encryption
+ (e.g. Vector/iOS and Vector/Android).
+
+ ),
+ onFinished: confirm=>{
+ if (!confirm) {
+ this.refs.encrypt.checked = false;
+ }
+ },
+ });
+ },
+
_renderEncryptionSection: function() {
if (!UserSettingsStore.isFeatureEnabled("e2e_encryption")) {
return null;
@@ -439,27 +460,27 @@ module.exports = React.createClass({
var roomState = this.props.room.currentState;
var isEncrypted = cli.isRoomEncrypted(this.props.room.roomId);
- var text = "Encryption is " + (isEncrypted ? "" : "not ") +
- "enabled in this room.";
-
- var button;
if (!isEncrypted &&
roomState.mayClientSendStateEvent("m.room.encryption", cli)) {
- button = (
+ return (
);
}
-
- return (
-
-
Encryption
-
- {button}
-
- );
+ else {
+ return (
+
+ );
+ }
},
render: function() {
@@ -628,33 +649,30 @@ module.exports = React.createClass({
}
- var integrations_section;
+ var integrationsButton;
if (UserSettingsStore.isFeatureEnabled("integration_management")) {
- let integrations_body;
-
if (this.scalarClient.hasCredentials()) {
- integrations_body = (
-
-
Manage integrations
+ integrationsButton = (
+
+ Manage Integrations
);
} else if (this.state.scalar_error) {
- integrations_body =
- Unable to contact integrations server
-
;
+ console.error("Unable to contact integrations server");
} else {
- integrations_body =
;
+ integrationsButton = (
+
+
+
+ );
}
- integrations_section =
-
Integrations
- {integrations_body}
- ;
}
return (
{ leaveButton }
+ { integrationsButton }
{ tagsSection }
@@ -685,6 +703,7 @@ module.exports = React.createClass({
{ addressWarning }
+ { this._renderEncryptionSection() }
- { integrations_section }
-
Advanced
This room's internal ID is { this.props.room.roomId }