Merge pull request #4581 from matrix-org/bwindels/remove-asym-4s
Remove UI for upgrading 4S to symmetric encryptionpull/21833/head
commit
4a8e642400
|
@ -225,14 +225,6 @@ export default class DeviceListener {
|
|||
});
|
||||
}
|
||||
}
|
||||
} else if (await cli.secretStorageKeyNeedsUpgrade()) {
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: THIS_DEVICE_TOAST_KEY,
|
||||
title: _t("Encryption upgrade available"),
|
||||
icon: "verification_warning",
|
||||
props: {kind: 'upgrade_ssss'},
|
||||
component: sdk.getComponent("toasts.SetupEncryptionToast"),
|
||||
});
|
||||
} else {
|
||||
// cross-signing is ready, and we don't need to upgrade encryption
|
||||
ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
|
||||
|
|
|
@ -36,7 +36,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
userSigningPrivateKeyCached: false,
|
||||
sessionBackupKeyCached: false,
|
||||
secretStorageKeyInAccount: false,
|
||||
secretStorageKeyNeedsUpgrade: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -88,7 +87,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
const homeserverSupportsCrossSigning =
|
||||
await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing");
|
||||
const crossSigningReady = await cli.isCrossSigningReady();
|
||||
const secretStorageKeyNeedsUpgrade = await cli.secretStorageKeyNeedsUpgrade();
|
||||
|
||||
this.setState({
|
||||
crossSigningPublicKeysOnDevice,
|
||||
|
@ -100,7 +98,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
secretStorageKeyInAccount,
|
||||
homeserverSupportsCrossSigning,
|
||||
crossSigningReady,
|
||||
secretStorageKeyNeedsUpgrade,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -150,7 +147,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
secretStorageKeyInAccount,
|
||||
homeserverSupportsCrossSigning,
|
||||
crossSigningReady,
|
||||
secretStorageKeyNeedsUpgrade,
|
||||
} = this.state;
|
||||
|
||||
let errorSection;
|
||||
|
@ -259,10 +255,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
<td>{_t("Homeserver feature support:")}</td>
|
||||
<td>{homeserverSupportsCrossSigning ? _t("exists") : _t("not found")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{_t("Secret Storage key format:")}</td>
|
||||
<td>{secretStorageKeyNeedsUpgrade ? _t("outdated") : _t("up to date")}</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</details>
|
||||
{errorSection}
|
||||
|
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Modal from '../../../Modal';
|
||||
import { MatrixClientPeg } from '../../../MatrixClientPeg';
|
||||
import * as sdk from "../../../index";
|
||||
import { _t } from '../../../languageHandler';
|
||||
import DeviceListener from '../../../DeviceListener';
|
||||
|
@ -31,7 +30,6 @@ export default class SetupEncryptionToast extends React.PureComponent {
|
|||
'set_up_encryption',
|
||||
'verify_this_session',
|
||||
'upgrade_encryption',
|
||||
'upgrade_ssss',
|
||||
]).isRequired,
|
||||
};
|
||||
|
||||
|
@ -39,24 +37,6 @@ export default class SetupEncryptionToast extends React.PureComponent {
|
|||
DeviceListener.sharedInstance().dismissEncryptionSetup();
|
||||
};
|
||||
|
||||
async _waitForCompletion() {
|
||||
if (this.props.kind === 'upgrade_ssss') {
|
||||
return new Promise(resolve => {
|
||||
const recheck = async () => {
|
||||
const needsUpgrade = await MatrixClientPeg.get().secretStorageKeyNeedsUpgrade();
|
||||
if (!needsUpgrade) {
|
||||
MatrixClientPeg.get().removeListener('accountData', recheck);
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
MatrixClientPeg.get().on('accountData', recheck);
|
||||
recheck();
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_onSetupClick = async () => {
|
||||
if (this.props.kind === "verify_this_session") {
|
||||
Modal.createTrackedDialog('Verify session', 'Verify session', SetupEncryptionDialog,
|
||||
|
@ -68,7 +48,6 @@ export default class SetupEncryptionToast extends React.PureComponent {
|
|||
);
|
||||
try {
|
||||
await accessSecretStorage();
|
||||
await this._waitForCompletion();
|
||||
} finally {
|
||||
modal.close();
|
||||
}
|
||||
|
@ -82,8 +61,6 @@ export default class SetupEncryptionToast extends React.PureComponent {
|
|||
return _t('Verify yourself & others to keep your chats safe');
|
||||
case 'verify_this_session':
|
||||
return _t('Other users may not trust it');
|
||||
case 'upgrade_ssss':
|
||||
return _t('Update your secure storage');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +69,6 @@ export default class SetupEncryptionToast extends React.PureComponent {
|
|||
case 'set_up_encryption':
|
||||
return _t('Set up');
|
||||
case 'upgrade_encryption':
|
||||
case 'upgrade_ssss':
|
||||
return _t('Upgrade');
|
||||
case 'verify_this_session':
|
||||
return _t('Verify');
|
||||
|
|
|
@ -569,7 +569,6 @@
|
|||
"Review": "Review",
|
||||
"Verify yourself & others to keep your chats safe": "Verify yourself & others to keep your chats safe",
|
||||
"Other users may not trust it": "Other users may not trust it",
|
||||
"Update your secure storage": "Update your secure storage",
|
||||
"Set up": "Set up",
|
||||
"Upgrade": "Upgrade",
|
||||
"Verify": "Verify",
|
||||
|
@ -621,9 +620,6 @@
|
|||
"in account data": "in account data",
|
||||
"Homeserver feature support:": "Homeserver feature support:",
|
||||
"exists": "exists",
|
||||
"Secret Storage key format:": "Secret Storage key format:",
|
||||
"outdated": "outdated",
|
||||
"up to date": "up to date",
|
||||
"Your homeserver does not support session management.": "Your homeserver does not support session management.",
|
||||
"Unable to load session list": "Unable to load session list",
|
||||
"Confirm deleting these sessions by using Single Sign On to prove your identity.|other": "Confirm deleting these sessions by using Single Sign On to prove your identity.",
|
||||
|
|
Loading…
Reference in New Issue