Remove temporary key backup button

This removes the temporary extra key backup setup button in Settings used for
testing with and without cross-signing. With this change, there's only one
button and the path you take is determined by the labs flag.

Fixes https://github.com/vector-im/riot-web/issues/11890
This commit is contained in:
J. Ryan Stinnett 2020-01-20 20:19:38 +00:00
parent 7193e7dcb0
commit e947a68e13
2 changed files with 1 additions and 31 deletions

View file

@ -127,19 +127,7 @@ export default class KeyBackupPanel extends React.PureComponent {
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup', Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'), import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
{ {
secureSecretStorage: false, secureSecretStorage: SettingsStore.isFeatureEnabled("feature_cross_signing"),
onFinished: () => {
this._loadBackupStatus();
},
}, null, /* priority = */ false, /* static = */ true,
);
}
_startNewBackupWithSecureSecretStorage = async () => {
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
{
secureSecretStorage: true,
onFinished: () => { onFinished: () => {
this._loadBackupStatus(); this._loadBackupStatus();
}, },
@ -361,22 +349,6 @@ export default class KeyBackupPanel extends React.PureComponent {
{buttonRow} {buttonRow}
</div>; </div>;
} else { } else {
// This is a temporary button for testing the new path which stores
// the key backup key in SSSS. Initialising SSSS depends on
// cross-signing and is part of the same project, so we only show
// this mode when the cross-signing feature is enabled.
// TODO: Clean this up when removing the feature flag.
let secureSecretStorageKeyBackup;
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
secureSecretStorageKeyBackup = (
<div className="mx_KeyBackupPanel_buttonRow">
<AccessibleButton kind="primary" onClick={this._startNewBackupWithSecureSecretStorage}>
{_t("Start using Key Backup with Secure Secret Storage")}
</AccessibleButton>
</div>
);
}
return <div> return <div>
<div> <div>
<p>{_t( <p>{_t(
@ -391,7 +363,6 @@ export default class KeyBackupPanel extends React.PureComponent {
{_t("Start using Key Backup")} {_t("Start using Key Backup")}
</AccessibleButton> </AccessibleButton>
</div> </div>
{secureSecretStorageKeyBackup}
</div>; </div>;
} }
} }

View file

@ -588,7 +588,6 @@
"Backup version: ": "Backup version: ", "Backup version: ": "Backup version: ",
"Algorithm: ": "Algorithm: ", "Algorithm: ": "Algorithm: ",
"Backup key stored: ": "Backup key stored: ", "Backup key stored: ": "Backup key stored: ",
"Start using Key Backup with Secure Secret Storage": "Start using Key Backup with Secure Secret Storage",
"Your keys are <b>not being backed up from this device</b>.": "Your keys are <b>not being backed up from this device</b>.", "Your keys are <b>not being backed up from this device</b>.": "Your keys are <b>not being backed up from this device</b>.",
"Back up your keys before signing out to avoid losing them.": "Back up your keys before signing out to avoid losing them.", "Back up your keys before signing out to avoid losing them.": "Back up your keys before signing out to avoid losing them.",
"Start using Key Backup": "Start using Key Backup", "Start using Key Backup": "Start using Key Backup",