show dialog when server says e-mail hasn't been verified yet

as it's confusing to have nothing happen at all when clicking
continue straight away.
This commit is contained in:
Bruno Windels 2019-10-07 17:43:51 +02:00
parent 48b8044937
commit 040bc5e157
2 changed files with 10 additions and 2 deletions

View file

@ -193,8 +193,14 @@ export default class EmailAddresses extends React.Component {
this.props.onEmailsChange(emails);
}).catch((err) => {
this.setState({continueDisabled: false});
if (err.errcode !== 'M_THREEPID_AUTH_FAILED') {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
if (err.errcode === 'M_THREEPID_AUTH_FAILED') {
Modal.createTrackedDialog("Email hasn't been verified yet", "", ErrorDialog, {
title: _t("Your email address hasn't been verified yet"),
description: _t("Click the link in the email you received to verify, " +
"and then click continue again."),
});
} else {
console.error("Unable to verify email address: " + err);
Modal.createTrackedDialog('Unable to verify email address', '', ErrorDialog, {
title: _t("Unable to verify email address."),

View file

@ -759,6 +759,8 @@
"Invalid Email Address": "Invalid Email Address",
"This doesn't appear to be a valid email address": "This doesn't appear to be a valid email address",
"Unable to add email address": "Unable to add email address",
"Your e-mail address hasn't been verified yet": "Your e-mail address hasn't been verified yet",
"Click the link in the e-mail you received to verify, and then click continue again.": "Click the link in the e-mail you received to verify, and then click continue again.",
"Add": "Add",
"We've sent you an email to verify your address. Please follow the instructions there and then click the button below.": "We've sent you an email to verify your address. Please follow the instructions there and then click the button below.",
"Email Address": "Email Address",