mirror of https://github.com/vector-im/riot-web
Merge pull request #3187 from matrix-org/travis/soft-logout-keys
Change soft logout rehydrate text if there's pending key backupspull/21833/head
commit
370fa27de3
|
@ -64,6 +64,7 @@ export default class SoftLogout extends React.Component {
|
|||
userId,
|
||||
displayName,
|
||||
loginView: LOGIN_VIEW.LOADING,
|
||||
keyBackupNeeded: true, // assume we do while we figure it out (see componentWillMount)
|
||||
|
||||
busy: false,
|
||||
password: "",
|
||||
|
@ -73,6 +74,10 @@ export default class SoftLogout extends React.Component {
|
|||
|
||||
componentDidMount(): void {
|
||||
this._initLogin();
|
||||
|
||||
MatrixClientPeg.get().flagAllGroupSessionsForBackup().then(remaining => {
|
||||
this.setState({keyBackupNeeded: remaining > 0});
|
||||
});
|
||||
}
|
||||
|
||||
onClearAll = () => {
|
||||
|
@ -160,9 +165,16 @@ export default class SoftLogout extends React.Component {
|
|||
error = <span className='mx_Login_error'>{this.state.errorText}</span>;
|
||||
}
|
||||
|
||||
let introText = _t("Enter your password to sign in and regain access to your account.");
|
||||
if (this.state.keyBackupNeeded) {
|
||||
introText = _t(
|
||||
"Regain access your account and recover encryption keys stored on this device. " +
|
||||
"Without them, you won’t be able to read all of your secure messages on any device.");
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={this.onPasswordLogin}>
|
||||
<p>{_t("Enter your password to sign in and regain access to your account.")}</p>
|
||||
<p>{introText}</p>
|
||||
{error}
|
||||
<Field
|
||||
id="softlogout_password"
|
||||
|
|
|
@ -1587,8 +1587,10 @@
|
|||
"You can now close this window or <a>log in</a> to your new account.": "You can now close this window or <a>log in</a> to your new account.",
|
||||
"Registration Successful": "Registration Successful",
|
||||
"Create your account": "Create your account",
|
||||
"Failed to re-authenticate due to a homeserver problem": "Failed to re-authenticate due to a homeserver problem",
|
||||
"Failed to re-authenticate": "Failed to re-authenticate",
|
||||
"Enter your password to sign in and regain access to your account.": "Enter your password to sign in and regain access to your account.",
|
||||
"Regain access your account and recover encryption keys stored on this device. Without them, you won’t be able to read all of your secure messages on any device.": "Regain access your account and recover encryption keys stored on this device. Without them, you won’t be able to read all of your secure messages on any device.",
|
||||
"Forgotten your password?": "Forgotten your password?",
|
||||
"Cannot re-authenticate with your account. Please contact your homeserver admin for more information.": "Cannot re-authenticate with your account. Please contact your homeserver admin for more information.",
|
||||
"You're signed out": "You're signed out",
|
||||
|
|
Loading…
Reference in New Issue