diff --git a/src/app/settings/two-factor-setup.component.ts b/src/app/settings/two-factor-setup.component.ts index 6c3df0f3..d3b39e98 100644 --- a/src/app/settings/two-factor-setup.component.ts +++ b/src/app/settings/two-factor-setup.component.ts @@ -207,6 +207,23 @@ export class TwoFactorSetupComponent implements OnInit { async submit() { try { + if (this.enableDeviceVerification) { + const email = await this.stateService.getEmail(); + const confirmed = await this.platformUtilsService.showDialog( + this.i18nService.t( + "areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX", + email + ), + this.i18nService.t("deviceVerification"), + this.i18nService.t("yes"), + this.i18nService.t("no"), + "warning" + ); + if (!confirmed) { + return; + } + } + this.formPromise = this.apiService.putDeviceVerificationSettings( new DeviceVerificationRequest(this.enableDeviceVerification) ); diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 7ae62031..d55d854a 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -5081,5 +5081,14 @@ }, "updatedDeviceVerification": { "message": "Updated Device Verification" + }, + "areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX": { + "message": "Are you sure you want to enable Device Verification? The verification code emails will arrive at: $EMAIL$", + "placeholders": { + "email": { + "content": "$1", + "example": "My Email" + } + } } }