From b551d2f43a0a1fb2f23f32e9e832a49d662b5fe4 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 Jan 2019 16:45:00 +0000 Subject: [PATCH] Say when backup is signed by unknown device rather than say it isn't signed by any devices https://github.com/vector-im/riot-web/issues/8142 Requires https://github.com/matrix-org/matrix-js-sdk/pull/826 --- src/components/views/settings/KeyBackupPanel.js | 13 +++++++++---- src/i18n/strings/en_EN.json | 9 ++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index b1c94c3067..473b52ff12 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -186,18 +186,23 @@ export default class KeyBackupPanel extends React.PureComponent { } let backupSigStatuses = this.state.backupSigStatus.sigs.map((sig, i) => { - const deviceName = sig.device.getDisplayName() || sig.device.deviceId; + const deviceName = sig.device ? (sig.device.getDisplayName() || sig.device.deviceId) : null; const validity = sub => {sub} ; const verify = sub => - + {sub} ; const device = sub => {deviceName}; let sigStatus; - if (sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key()) { + if (!sig.device) { + sigStatus = _t( + "Backup has a signature from unknown device with ID %(deviceId)s.", + { deviceId: sig.deviceId }, { verify }, + ); + } else if (sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key()) { sigStatus = _t( "Backup has a valid signature from this device", {}, { validity }, @@ -229,7 +234,7 @@ export default class KeyBackupPanel extends React.PureComponent { } let verifyButton; - if (!sig.device.isVerified()) { + if (!sig.device || !sig.device.isVerified()) { verifyButton =

{ _t("Verify...") } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ef0ff1ebf7..f6e1fd4f5e 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -114,6 +114,8 @@ "Failed to invite": "Failed to invite", "Failed to invite users to the room:": "Failed to invite users to the room:", "Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:", + "Waiting for %(userId)s to accept...": "Waiting for %(userId)s to accept...", + "Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...", "You need to be logged in.": "You need to be logged in.", "You need to be able to invite users to do that.": "You need to be able to invite users to do that.", "Unable to create widget.": "Unable to create widget.", @@ -265,7 +267,6 @@ "Increase performance by only loading room members on first view": "Increase performance by only loading room members on first view", "Backup of encryption keys to server": "Backup of encryption keys to server", "Render simple counters in room header": "Render simple counters in room header", - "Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu": "Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu", "Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing", "Use compact timeline layout": "Use compact timeline layout", "Hide removed messages": "Hide removed messages", @@ -361,6 +362,7 @@ "This device is not using key backup": "This device is not using key backup", "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.", "Backup has a valid signature from this device": "Backup has a valid signature from this device", "Backup has a valid signature from verified device ": "Backup has a valid signature from verified device ", "Backup has a valid signature from unverified device ": "Backup has a valid signature from unverified device ", @@ -542,7 +544,6 @@ "Forget room": "Forget room", "Search": "Search", "Share room": "Share room", - "Toggle right panel": "Toggle right panel", "Drop here to favourite": "Drop here to favourite", "Drop here to tag direct chat": "Drop here to tag direct chat", "Drop here to restore": "Drop here to restore", @@ -644,9 +645,9 @@ "This room version is vulnerable to malicious modification of room state.": "This room version is vulnerable to malicious modification of room state.", "Click here to upgrade to the latest room version and ensure room integrity is protected.": "Click here to upgrade to the latest room version and ensure room integrity is protected.", "Only room administrators will see this warning": "Only room administrators will see this warning", - "Search…": "Search…", "This Room": "This Room", "All Rooms": "All Rooms", + "Search…": "Search…", "Cancel": "Cancel", "You don't currently have any stickerpacks enabled": "You don't currently have any stickerpacks enabled", "Add some now": "Add some now", @@ -1091,7 +1092,6 @@ "Update status": "Update status", "Set status": "Set status", "Set a new status...": "Set a new status...", - "View as Grid": "View as Grid", "View Community": "View Community", "Sorry, your browser is not able to run Riot.": "Sorry, your browser is not able to run Riot.", "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.": "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.", @@ -1102,7 +1102,6 @@ "You must register to use this functionality": "You must register to use this functionality", "You must join the room to see its files": "You must join the room to see its files", "There are no visible files in this room": "There are no visible files in this room", - "No room in this tile yet.": "No room in this tile yet.", "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even use 'img' tags\n

\n": "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even use 'img' tags\n

\n", "Add rooms to the community summary": "Add rooms to the community summary", "Which rooms would you like to add to this summary?": "Which rooms would you like to add to this summary?",