diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 44244f688b..1a28b89354 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -33,6 +33,8 @@ export default class KeyBackupPanel extends React.PureComponent { loading: true, error: null, backupInfo: null, + backupSigStatus: null, + backupKeyStored: null, sessionsRemaining: 0, }; } @@ -74,9 +76,11 @@ export default class KeyBackupPanel extends React.PureComponent { async _checkKeyBackupStatus() { try { const {backupInfo, trustInfo} = await MatrixClientPeg.get().checkKeyBackup(); + const backupKeyStored = await MatrixClientPeg.get().isKeyBackupKeyStored(); this.setState({ backupInfo, backupSigStatus: trustInfo, + backupKeyStored, error: null, loading: false, }); @@ -87,6 +91,7 @@ export default class KeyBackupPanel extends React.PureComponent { error: e, backupInfo: null, backupSigStatus: null, + backupKeyStored: null, loading: false, }); } @@ -97,11 +102,13 @@ export default class KeyBackupPanel extends React.PureComponent { try { const backupInfo = await MatrixClientPeg.get().getKeyBackupVersion(); const backupSigStatus = await MatrixClientPeg.get().isKeyBackupTrusted(backupInfo); + const backupKeyStored = await MatrixClientPeg.get().isKeyBackupKeyStored(); if (this._unmounted) return; this.setState({ error: null, backupInfo, backupSigStatus, + backupKeyStored, loading: false, }); } catch (e) { @@ -111,6 +118,7 @@ export default class KeyBackupPanel extends React.PureComponent { error: e, backupInfo: null, backupSigStatus: null, + backupKeyStored: null, loading: false, }); } @@ -220,6 +228,13 @@ export default class KeyBackupPanel extends React.PureComponent { restoreButtonCaption = _t("Connect this device to Key Backup"); } + let keyStatus; + if (this.state.backupKeyStored === true) { + keyStatus = _t("in secret storage"); + } else { + keyStatus = _t("not stored"); + } + let uploadStatus; const { sessionsRemaining } = this.state; if (!MatrixClientPeg.get().getKeyBackupEnabled()) { @@ -331,6 +346,7 @@ export default class KeyBackupPanel extends React.PureComponent { {_t("Advanced")}
{_t("Backup version: ")}{this.state.backupInfo.version}
{_t("Algorithm: ")}{this.state.backupInfo.algorithm}
+
{_t("Backup key stored: ")}{keyStatus}
{uploadStatus}
{backupSigStatuses}
{trustedLocally}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f6bc9c7c41..a12f98ebb5 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -527,6 +527,7 @@ "This device is not backing up your keys, but you do have an existing backup you can restore from and add to going forward.": "This device is not backing up your keys, but you do have an existing backup you can restore from and add to going forward.", "Connect this device to key backup before signing out to avoid losing any keys that may only be on this device.": "Connect this device to key backup before signing out to avoid losing any keys that may only be on this device.", "Connect this device to Key Backup": "Connect this device to Key Backup", + "not stored": "not stored", "Backing up %(sessionsRemaining)s keys...": "Backing up %(sessionsRemaining)s keys...", "All keys backed up": "All keys backed up", "Backup has a valid signature from this user": "Backup has a valid signature from this user", @@ -543,6 +544,7 @@ "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: ", "Algorithm: ": "Algorithm: ", + "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 not being backed up from this device.": "Your keys are not being backed up from this device.", "Back up your keys before signing out to avoid losing them.": "Back up your keys before signing out to avoid losing them.",