From 043f1ab3f08c2ba2d783b822d4019adfba5194d6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Feb 2019 16:58:09 +0000 Subject: [PATCH] Remove key backup & sas from labs --- src/components/structures/RoomView.js | 1 - .../views/dialogs/DeviceVerifyDialog.js | 2 +- src/components/views/dialogs/LogoutDialog.js | 115 +++++++----------- .../settings/tabs/SecuritySettingsTab.js | 19 ++- src/settings/Settings.js | 12 -- 5 files changed, 53 insertions(+), 96 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4778f1a76a..50fa18e075 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1635,7 +1635,6 @@ module.exports = React.createClass({ ); const showRoomRecoveryReminder = ( - SettingsStore.isFeatureEnabled("feature_keybackup") && SettingsStore.getValue("showRoomRecoveryReminder") && MatrixClientPeg.get().isRoomEncrypted(this.state.room.roomId) && !MatrixClientPeg.get().getKeyBackupEnabled() diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index d0643a60c4..72f094e1e5 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -48,7 +48,7 @@ export default class DeviceVerifyDialog extends React.Component { this._showSasEvent = null; this.state = { phase: PHASE_START, - mode: SettingsStore.isFeatureEnabled("feature_sas") ? MODE_SAS : MODE_LEGACY, + mode: MODE_SAS, sasVerified: false, }; } diff --git a/src/components/views/dialogs/LogoutDialog.js b/src/components/views/dialogs/LogoutDialog.js index 1f81472cc0..2707ff33f9 100644 --- a/src/components/views/dialogs/LogoutDialog.js +++ b/src/components/views/dialogs/LogoutDialog.js @@ -79,86 +79,59 @@ export default class LogoutDialog extends React.Component { } render() { - let description; - if (SettingsStore.isFeatureEnabled("feature_keybackup")) { - description =
-

{_t( - "When you log out, you'll lose your secure message history. To prevent " + - "this, set up a recovery method.", - )}

-

{_t( - "Alternatively, advanced users can also manually export encryption keys in " + - "Settings before logging out.", {}, - { - a: sub => {sub}, - }, - )}

-
; - } else { - description =
{_t( - "For security, logging out will delete any end-to-end " + - "encryption keys from this browser. If you want to be able " + - "to decrypt your conversation history from future Riot sessions, " + - "please export your room keys for safe-keeping.", - )}
; - } + const description =
+

{_t( + "When you log out, you'll lose your secure message history. To prevent " + + "this, set up a recovery method.", + )}

+

{_t( + "Alternatively, advanced users can also manually export encryption keys in " + + "Settings before logging out.", {}, + { + a: sub => {sub}, + }, + )}

+
; - if (SettingsStore.isFeatureEnabled("feature_keybackup")) { - if (!MatrixClientPeg.get().getKeyBackupEnabled()) { - const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); - // Not quite a standard question dialog as the primary button cancels - // the action and does something else instead, whilst non-default button - // confirms the action. - return ( +
+ { description } +
+ -
- { description } -
- - - -
); - } else { - const QuestionDialog = sdk.getComponent('views.dialogs.QuestionDialog'); - return (); - } + + + ); } else { const QuestionDialog = sdk.getComponent('views.dialogs.QuestionDialog'); return ( - { _t("Export E2E room keys") } - ), - ]} onFinished={this._onFinished} />); } diff --git a/src/components/views/settings/tabs/SecuritySettingsTab.js b/src/components/views/settings/tabs/SecuritySettingsTab.js index a2a30a2190..0f05376e54 100644 --- a/src/components/views/settings/tabs/SecuritySettingsTab.js +++ b/src/components/views/settings/tabs/SecuritySettingsTab.js @@ -196,18 +196,15 @@ export default class SecuritySettingsTab extends React.Component { const DevicesPanel = sdk.getComponent('views.settings.DevicesPanel'); const SettingsFlag = sdk.getComponent('views.elements.SettingsFlag'); - let keyBackup = null; - if (SettingsStore.isFeatureEnabled("feature_keybackup")) { - const KeyBackupPanel = sdk.getComponent('views.settings.KeyBackupPanel'); - keyBackup = ( -
- {_t("Key backup")} -
- -
+ const KeyBackupPanel = sdk.getComponent('views.settings.KeyBackupPanel'); + const keyBackup = ( +
+ {_t("Key backup")} +
+
- ); - } +
+ ); return (
diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 02c2bad14b..9dfbc7d51e 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -105,24 +105,12 @@ export const SETTINGS = { supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_keybackup": { - isFeature: true, - displayName: _td("Backup of encryption keys to server"), - supportedLevels: LEVELS_FEATURE, - default: false, - }, "feature_state_counters": { isFeature: true, displayName: _td("Render simple counters in room header"), supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_sas": { - isFeature: true, - displayName: _td("Two-way device verification using short text"), - supportedLevels: LEVELS_FEATURE, - default: false, - }, "MessageComposerInput.suggestEmoji": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: _td('Enable Emoji suggestions while typing'),