diff --git a/src/App/Pages/Settings/ExportVaultPage.xaml b/src/App/Pages/Settings/ExportVaultPage.xaml
index aa3fdf385..44e82b0a6 100644
--- a/src/App/Pages/Settings/ExportVaultPage.xaml
+++ b/src/App/Pages/Settings/ExportVaultPage.xaml
@@ -25,22 +25,27 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -52,31 +57,34 @@
StyleClass="box-value"
IsEnabled="{Binding DisablePrivateVaultPolicyEnabled, Converter={StaticResource inverseBool}}" />
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ Grid.Row="0"
+ Grid.ColumnSpan="2" />
@@ -93,22 +101,33 @@
StyleClass="box-row-button, box-row-button-platform"
Text="{Binding ShowPasswordIcon}"
Command="{Binding TogglePasswordCommand}"
- Grid.Row="2"
+ Grid.Row="1"
Grid.Column="1"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n ToggleVisibility}"
IsVisible="{Binding UseOTPVerification, Converter={StaticResource inverseBool}}"/>
-
-
-
-
+ Text="{u:I18n ConfirmYourIdentity}"
+ StyleClass="box-footer-label"
+ LineBreakMode="WordWrap"
+ Grid.Row="2"
+ Margin="0,10,0,0"
+ IsVisible="{Binding UseOTPVerification}" />
+
+
+
+
+
+
diff --git a/src/App/Pages/Settings/ExportVaultPageViewModel.cs b/src/App/Pages/Settings/ExportVaultPageViewModel.cs
index e490571fc..da5b5857e 100644
--- a/src/App/Pages/Settings/ExportVaultPageViewModel.cs
+++ b/src/App/Pages/Settings/ExportVaultPageViewModel.cs
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Bit.Core.Enums;
+using Bit.Core.Exceptions;
#if !FDROID
using Microsoft.AppCenter.Crashes;
#endif
@@ -195,7 +196,23 @@ namespace Bit.App.Pages
public async Task RequestOTP()
{
- await _apiService.PostAccountRequestOTP();
+ try
+ {
+ await _deviceActionService.ShowLoadingAsync(AppResources.Sending);
+ await _apiService.PostAccountRequestOTP();
+ await _deviceActionService.HideLoadingAsync();
+ _platformUtilsService.ShowToast("success", null, AppResources.CodeSent);
+ }
+ catch (ApiException e)
+ {
+ await _deviceActionService.HideLoadingAsync();
+ if (e?.Error != null)
+ {
+ await _platformUtilsService.ShowDialogAsync(e.Error.GetSingleMessage(),
+ AppResources.AnErrorHasOccurred);
+ }
+ }
+
}
public async void SaveFileSelected(string contentUri, string filename)
diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs
index 47d6562fe..e44d0e8e2 100644
--- a/src/App/Resources/AppResources.Designer.cs
+++ b/src/App/Resources/AppResources.Designer.cs
@@ -2837,9 +2837,21 @@ namespace Bit.App.Resources {
}
}
- public static string ExportVaultOTPDescription {
+ public static string SendVerificationCodeToEmail {
get {
- return ResourceManager.GetString("ExportVaultOTPDescription", resourceCulture);
+ return ResourceManager.GetString("SendVerificationCodeToEmail", resourceCulture);
+ }
+ }
+
+ public static string CodeSent {
+ get {
+ return ResourceManager.GetString("CodeSent", resourceCulture);
+ }
+ }
+
+ public static string ConfirmYourIdentity {
+ get {
+ return ResourceManager.GetString("ConfirmYourIdentity", resourceCulture);
}
}
@@ -3701,9 +3713,15 @@ namespace Bit.App.Resources {
}
}
- public static string RequestOTP {
+ public static string SendCode {
get {
- return ResourceManager.GetString("RequestOTP", resourceCulture);
+ return ResourceManager.GetString("SendCode", resourceCulture);
+ }
+ }
+
+ public static string Sending {
+ get {
+ return ResourceManager.GetString("Sending", resourceCulture);
}
}
}
diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx
index 90e063c74..2a17ee638 100644
--- a/src/App/Resources/AppResources.resx
+++ b/src/App/Resources/AppResources.resx
@@ -1611,8 +1611,14 @@
Enter your master password to export your vault data.
-
- Enter the verification code to export your vault data.
+
+ Send a verification code to your email
+
+
+ Code Sent!
+
+
+ Confirm your identity to continue.
This export contains your vault data in an unencrypted format. You should not store or send the exported file over unsecure channels (such as email). Delete it immediately after you are done using it.
@@ -2084,7 +2090,10 @@
Invalid Verification Code.
-
- Request one-time password
+
+ Send Code
+
+
+ Sending