Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions src/app/shared/components/confirm-email/confirm-email.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,19 @@ export class ConfirmEmailComponent {
this.actions
.deleteEmail(this.email.id)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(() => {
let showSuccessText = isMerge ? 'home.confirmEmail.merge.emailNotAdded' : 'home.confirmEmail.add.emailNotAdded';
this.toastService.showSuccess(showSuccessText, { name: this.email.emailAddress });
this.dialogRef.close();
.subscribe({
next: () => {
let showSuccessText = isMerge
? 'home.confirmEmail.merge.emailNotAdded'
: 'home.confirmEmail.add.emailNotAdded';
this.toastService.showSuccess(showSuccessText, { name: this.email.emailAddress });
this.dialogRef.close();
},
error: () => {
let showErrorText = isMerge ? 'home.confirmEmail.merge.denyError' : 'home.confirmEmail.add.denyError';
this.toastService.showError(showErrorText, { name: this.email.emailAddress });
this.dialogRef.close();
},
});
}

Expand All @@ -61,7 +70,11 @@ export class ConfirmEmailComponent {
this.toastService.showSuccess(showSuccessText, { name: this.email.emailAddress });
this.dialogRef.close();
},
error: () => this.dialogRef.close(),
error: () => {
let showErrorText = isMerge ? 'home.confirmEmail.merge.verifyError' : 'home.confirmEmail.add.verifyError';
this.toastService.showError(showErrorText, { name: this.email.emailAddress });
this.dialogRef.close();
},
});
}
}
12 changes: 8 additions & 4 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,24 @@
},
"confirmEmail": {
"merge": {
"title": "Merge account",
"title": "Merge account?",
"description": "Would you like to merge ",
"description2": "into your account? This action is irreversible.",
"goToEmails": "Merge account",
"emailNotAdded": "{{name}} has not been merged into your account.",
"emailVerified": "{{name}} has been merged into your account."
"emailVerified": "{{name}} has been merged into your account.",
"verifyError": "There was a problem merging {{name}} into your account.",
"denyError": "There was a problem canceling the request to merge {{name}} into your account."
},
"add": {
"title": "Add alternative email",
"title": "Add alternative email?",
"description": "Do you want to add ",
"description2": "to your profile ?",
"goToEmails": "Add email",
"emailNotAdded": "{{name}} has not been added to your account.",
"emailVerified": "{{name}} has been added to your account."
"emailVerified": "{{name}} has been added to your account.",
"verifyError": "There was a problem adding {{name} to your account.",
"denyError": "There was a problem canceling the request to add {{name}} to your account."
}
}
},
Expand Down
Loading