diff --git a/src/components/views/rooms/RoomRecoveryReminder.js b/src/components/views/rooms/RoomRecoveryReminder.js
index e8c315ecf5..23f4e46df5 100644
--- a/src/components/views/rooms/RoomRecoveryReminder.js
+++ b/src/components/views/rooms/RoomRecoveryReminder.js
@@ -38,7 +38,7 @@ export default class RoomRecoveryReminder extends React.PureComponent {
this.state = {
loading: true,
error: null,
- unverifiedDevice: null,
+ backupInfo: null,
};
}
@@ -47,10 +47,12 @@ export default class RoomRecoveryReminder extends React.PureComponent {
}
async _loadBackupStatus() {
- let backupSigStatus;
try {
const backupInfo = await MatrixClientPeg.get().getKeyBackupVersion();
- backupSigStatus = await MatrixClientPeg.get().isKeyBackupTrusted(backupInfo);
+ this.setState({
+ loading: false,
+ backupInfo,
+ });
} catch (e) {
console.log("Unable to fetch key backup status", e);
this.setState({
@@ -59,44 +61,20 @@ export default class RoomRecoveryReminder extends React.PureComponent {
});
return;
}
-
- let unverifiedDevice;
- for (const sig of backupSigStatus.sigs) {
- if (sig.device && !sig.device.isVerified()) {
- unverifiedDevice = sig.device;
- break;
- }
- }
- this.setState({
- loading: false,
- unverifiedDevice,
- });
}
showSetupDialog = () => {
- if (this.state.unverifiedDevice) {
+ if (this.state.backupInfo) {
// A key backup exists for this account, but the creating device is not
- // verified, so we'll show the device verify dialog.
- // TODO: Should change to a restore key backup flow that checks the recovery
- // passphrase while at the same time also cross-signing the device as well in
- // a single flow (for cases where a key backup exists but the backup creating
- // device is unverified). Since we don't have that yet, we'll look for an
- // unverified device and verify it. Note that this means we won't restore
- // keys yet; instead we'll only trust the backup for sending our own new keys
- // to it.
- const DeviceVerifyDialog = sdk.getComponent('views.dialogs.DeviceVerifyDialog');
- Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, {
- userId: MatrixClientPeg.get().credentials.userId,
- device: this.state.unverifiedDevice,
- });
- return;
+ // verified, so restore the backup which will give us the keys from it and
+ // allow us to trust it (ie. upload keys to it)
+ const RestoreKeyBackupDialog = sdk.getComponent('dialogs.keybackup.RestoreKeyBackupDialog');
+ Modal.createTrackedDialog('Restore Backup', '', RestoreKeyBackupDialog, {});
+ } else {
+ Modal.createTrackedDialogAsync("Key Backup", "Key Backup",
+ import("../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog"),
+ );
}
-
- // The default case assumes that a key backup doesn't exist for this account, so
- // we'll show the create key backup flow.
- Modal.createTrackedDialogAsync("Key Backup", "Key Backup",
- import("../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog"),
- );
}
onDontAskAgainClick = () => {
@@ -133,53 +111,41 @@ export default class RoomRecoveryReminder extends React.PureComponent {
const AccessibleButton = sdk.getComponent("views.elements.AccessibleButton");
let body;
- let primaryCaption = _t("Set up");
if (this.state.error) {
body =
{sigStatus}
- {verifyButton}
;
});
if (this.state.backupSigStatus.sigs.length === 0) {
@@ -256,12 +232,15 @@ export default class KeyBackupPanel extends React.PureComponent {
}
return
-
{_t("Backup version: ")}{this.state.backupInfo.version}
-
{_t("Algorithm: ")}{this.state.backupInfo.algorithm}
{clientBackupStatus}
- {uploadStatus}
-
{backupSigStatuses}
-
{trustedLocally}
+
+ {_t("Advanced")}
+ {_t("Backup version: ")}{this.state.backupInfo.version}
+ {_t("Algorithm: ")}{this.state.backupInfo.algorithm}
+ {uploadStatus}
+ {backupSigStatuses}
+ {trustedLocally}
+
{ _t("Restore backup") }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index c181d40148..d74585920c 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -329,7 +329,6 @@
"Got It": "Got It",
"Verify this user by confirming the following number appears on their screen.": "Verify this user by confirming the following number appears on their screen.",
"For maximum security, we recommend you do this in person or use another trusted means of communication.": "For maximum security, we recommend you do this in person or use another trusted means of communication.",
- "To continue, click on each pair to confirm it's correct.": "To continue, click on each pair to confirm it's correct.",
"Continue": "Continue",
"Failed to upload profile picture!": "Failed to upload profile picture!",
"Upload new:": "Upload new:",
@@ -374,7 +373,7 @@
"Delete backup": "Delete backup",
"Unable to load key backup status": "Unable to load key backup status",
"This device is using key backup": "This device is using key backup",
- "This device is not using key backup": "This device is not using key backup",
+ "This device is not using key backup. Restore the backup to start using it.": "This device is not using key backup. Restore the backup to start using it.",
"Backing up %(sessionsRemaining)s keys...": "Backing up %(sessionsRemaining)s keys...",
"All keys backed up": "All keys backed up",
"Backup has a signature from unknown device with ID %(deviceId)s.": "Backup has a signature from unknown device with ID %(deviceId)s.",
@@ -383,7 +382,6 @@
"Backup has a valid signature from unverified device ": "Backup has a valid signature from unverified device ",
"Backup has an invalid signature from verified device ": "Backup has an invalid signature from verified device ",
"Backup has an invalid signature from unverified device ": "Backup has an invalid signature from unverified device ",
- "Verify...": "Verify...",
"Backup is not signed by any of your devices": "Backup is not signed by any of your devices",
"This backup is trusted because it has been restored on this device": "This backup is trusted because it has been restored on this device",
"Backup version: ": "Backup version: ",
@@ -719,13 +717,12 @@
"You are trying to access a room.": "You are trying to access a room.",
"Click here to join the discussion!": "Click here to join the discussion!",
"This is a preview of this room. Room interactions have been disabled": "This is a preview of this room. Room interactions have been disabled",
- "Set up": "Set up",
- "Secure Message Recovery has been set up on another device: ": "Secure Message Recovery has been set up on another device: ",
- "To view your secure message history and ensure you can view new messages on future devices, verify that device now.": "To view your secure message history and ensure you can view new messages on future devices, verify that device now.",
- "Verify device": "Verify device",
- "If you log out or use another device, you'll lose your secure message history. To prevent this, set up Secure Message Recovery.": "If you log out or use another device, you'll lose your secure message history. To prevent this, set up Secure Message Recovery.",
- "Secure Message Recovery": "Secure Message Recovery",
- "Don't ask again": "Don't ask again",
+ "Secure Key Backup should be active on all of your devices to avoid losing access to your encrypted messages.": "Secure Key Backup should be active on all of your devices to avoid losing access to your encrypted messages.",
+ "Securely back up your decryption keys to the server to make sure you'll always be able to read your encrypted messages.": "Securely back up your decryption keys to the server to make sure you'll always be able to read your encrypted messages.",
+ "Don't risk losing your encrypted messages!": "Don't risk losing your encrypted messages!",
+ "Activate Secure Key Backup": "Activate Secure Key Backup",
+ "No Thanks": "No Thanks",
+ "I'll download a copy of my decryption keys before I log out": "I'll download a copy of my decryption keys before I log out",
"Add a topic": "Add a topic",
"This room is using an unstable room version. If you aren't expecting this, please upgrade the room.": "This room is using an unstable room version. If you aren't expecting this, please upgrade the room.",
"Click here to upgrade to the latest room version.": "Click here to upgrade to the latest room version.",
@@ -860,6 +857,7 @@
"Unblacklist": "Unblacklist",
"Blacklist": "Blacklist",
"Unverify": "Unverify",
+ "Verify...": "Verify...",
"Join": "Join",
"No results": "No results",
"Delete": "Delete",
@@ -991,6 +989,7 @@
"Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)": "Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)",
"To continue, please enter your password:": "To continue, please enter your password:",
"password": "password",
+ "Verify device": "Verify device",
"Use Legacy Verification (for older clients)": "Use Legacy Verification (for older clients)",
"Verify by comparing a short text string.": "Verify by comparing a short text string.",
"Begin Verifying": "Begin Verifying",
@@ -1457,6 +1456,8 @@
"Retry": "Retry",
"Without setting up Secure Message Recovery, you'll lose your secure message history when you log out.": "Without setting up Secure Message Recovery, you'll lose your secure message history when you log out.",
"If you don't want to set this up now, you can later in Settings.": "If you don't want to set this up now, you can later in Settings.",
+ "Set up": "Set up",
+ "Don't ask again": "Don't ask again",
"New Recovery Method": "New Recovery Method",
"A new recovery passphrase and key for Secure Messages have been detected.": "A new recovery passphrase and key for Secure Messages have been detected.",
"If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.",