masterPassOnRestart option for pin locking

This commit is contained in:
Kyle Spearrin 2019-05-31 15:30:22 -04:00
parent f3edae9bb1
commit e0e69920e9
3 changed files with 15 additions and 1 deletions

View file

@ -207,9 +207,11 @@ namespace Bit.App.Pages
{ {
var pin = await _deviceActionService.DisplayPromptAync(AppResources.EnterPIN, var pin = await _deviceActionService.DisplayPromptAync(AppResources.EnterPIN,
AppResources.SetPINDescription, null, AppResources.Submit, AppResources.Cancel, true); AppResources.SetPINDescription, null, AppResources.Submit, AppResources.Cancel, true);
var masterPassOnRestart = true;
if(!string.IsNullOrWhiteSpace(pin)) if(!string.IsNullOrWhiteSpace(pin))
{ {
var masterPassOnRestart = await _platformUtilsService.ShowDialogAsync(
AppResources.PINRequireMasterPasswordRestart, AppResources.UnlockWithPIN,
AppResources.Yes, AppResources.No);
if(masterPassOnRestart) if(masterPassOnRestart)
{ {
var encPin = await _cryptoService.EncryptAsync(pin); var encPin = await _cryptoService.EncryptAsync(pin);

View file

@ -2985,6 +2985,15 @@ namespace Bit.App.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to You you want to require unlocking with your master password when the application is restarted?.
/// </summary>
public static string PINRequireMasterPasswordRestart {
get {
return ResourceManager.GetString("PINRequireMasterPasswordRestart", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Possible Matching Items. /// Looks up a localized string similar to Possible Matching Items.
/// </summary> /// </summary>

View file

@ -1573,4 +1573,7 @@
<data name="ExitConfirmation" xml:space="preserve"> <data name="ExitConfirmation" xml:space="preserve">
<value>Are you sure you want to exit Bitwarden?</value> <value>Are you sure you want to exit Bitwarden?</value>
</data> </data>
<data name="PINRequireMasterPasswordRestart" xml:space="preserve">
<value>You you want to require unlocking with your master password when the application is restarted?</value>
</data>
</root> </root>