mirror of https://github.com/vector-im/riot-web
				
				
				
			Error if no sessions decrypted
Tell the user if they entered the wrong recovery key Fixes https://github.com/vector-im/riot-web/issues/8143pull/21833/head
							parent
							
								
									efcfaed335
								
							
						
					
					
						commit
						0a2b79b62d
					
				| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
Copyright 2018 New Vector Ltd
 | 
			
		||||
Copyright 2018, 2019 New Vector Ltd
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			@ -184,6 +184,15 @@ export default React.createClass({
 | 
			
		|||
        } else if (this.state.backupInfo === null) {
 | 
			
		||||
            title = _t("Error");
 | 
			
		||||
            content = _t("No backup found!");
 | 
			
		||||
        } else if (this.state.recoverInfo && this.state.recoverInfo.imported === 0) {
 | 
			
		||||
            title = _t("Error Restoring Backup");
 | 
			
		||||
            let failedToDecrypt;
 | 
			
		||||
            content = <div>
 | 
			
		||||
                <p>{_t(
 | 
			
		||||
                    "Failed to decrypt any sessions: check that the recovery key " +
 | 
			
		||||
                    "used is the correct one for this backup."
 | 
			
		||||
                )}</p>
 | 
			
		||||
            </div>;
 | 
			
		||||
        } else if (this.state.recoverInfo) {
 | 
			
		||||
            title = _t("Backup Restored");
 | 
			
		||||
            let failedToDecrypt;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,8 +114,6 @@
 | 
			
		|||
    "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.",
 | 
			
		||||
| 
						 | 
				
			
			@ -1048,6 +1046,8 @@
 | 
			
		|||
    "Unable to load backup status": "Unable to load backup status",
 | 
			
		||||
    "Unable to restore backup": "Unable to restore backup",
 | 
			
		||||
    "No backup found!": "No backup found!",
 | 
			
		||||
    "Error Restoring Backup": "Error Restoring Backup",
 | 
			
		||||
    "Failed to decrypt any sessions: check that the recovery key used is the correct one for this backup.": "Failed to decrypt any sessions: check that the recovery key used is the correct one for this backup.",
 | 
			
		||||
    "Backup Restored": "Backup Restored",
 | 
			
		||||
    "Failed to decrypt %(failedCount)s sessions!": "Failed to decrypt %(failedCount)s sessions!",
 | 
			
		||||
    "Restored %(sessionCount)s session keys": "Restored %(sessionCount)s session keys",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue