logged in as and verify messages

This commit is contained in:
Kyle Spearrin 2019-05-17 10:01:45 -04:00
parent 961e23f0b8
commit c96daf2d68
4 changed files with 69 additions and 1 deletions

View File

@ -85,6 +85,13 @@
Grid.Column="1"
Grid.RowSpan="2" />
</Grid>
<Label
Text="{Binding LockedVerifyText}"
StyleClass="box-footer-label" />
<Label
Text="{Binding LoggedInAsText}"
StyleClass="box-footer-label"
Margin="0, 10, 0, 0" />
</StackLayout>
<StackLayout Padding="10, 0">
<Button Text="{Binding FingerprintButtonText}" Clicked="Fingerprint_Clicked"

View File

@ -27,6 +27,8 @@ namespace Bit.App.Pages
private bool _pinLock;
private bool _fingerprintLock;
private string _fingerprintButtonText;
private string _loggedInAsText;
private string _lockedVerifyText;
private int _invalidPinAttempts = 0;
private Tuple<bool, bool> _pinSet;
@ -72,6 +74,18 @@ namespace Bit.App.Pages
set => SetProperty(ref _fingerprintButtonText, value);
}
public string LoggedInAsText
{
get => _loggedInAsText;
set => SetProperty(ref _loggedInAsText, value);
}
public string LockedVerifyText
{
get => _lockedVerifyText;
set => SetProperty(ref _lockedVerifyText, value);
}
public Command TogglePasswordCommand { get; }
public string ShowPasswordIcon => ShowPassword ? "" : "";
public string MasterPassword { get; set; }
@ -84,7 +98,17 @@ namespace Bit.App.Pages
PinLock = (_pinSet.Item1 && _hasKey) || _pinSet.Item2;
FingerprintLock = await _lockService.IsFingerprintLockSetAsync();
_email = await _userService.GetEmailAsync();
PageTitle = PinLock ? AppResources.VerifyPIN : AppResources.VerifyMasterPassword;
LoggedInAsText = string.Format(AppResources.LoggedInAs, _email);
if(PinLock)
{
PageTitle = AppResources.VerifyPIN;
LockedVerifyText = AppResources.VaultLockedPIN;
}
else
{
PageTitle = AppResources.VerifyMasterPassword;
LockedVerifyText = AppResources.VaultLockedMasterPassword;
}
if(FingerprintLock)
{

View File

@ -2130,6 +2130,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Logged in as {0}..
/// </summary>
public static string LoggedInAs {
get {
return ResourceManager.GetString("LoggedInAs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Logging in....
/// </summary>
@ -3687,6 +3696,24 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Your vault is locked. Verify your master password to continue..
/// </summary>
public static string VaultLockedMasterPassword {
get {
return ResourceManager.GetString("VaultLockedMasterPassword", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your vault is locked. Verify your PIN code to continue..
/// </summary>
public static string VaultLockedPIN {
get {
return ResourceManager.GetString("VaultLockedPIN", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verification Code.
/// </summary>

View File

@ -1499,4 +1499,14 @@
<data name="SetPINDescription" xml:space="preserve">
<value>Set your PIN code for unlocking Bitwarden. Your PIN settings will be reset if you ever fully log out of the application.</value>
</data>
<data name="LoggedInAs" xml:space="preserve">
<value>Logged in as {0}.</value>
<comment>ex: Logged in as user@example.com.</comment>
</data>
<data name="VaultLockedMasterPassword" xml:space="preserve">
<value>Your vault is locked. Verify your master password to continue.</value>
</data>
<data name="VaultLockedPIN" xml:space="preserve">
<value>Your vault is locked. Verify your PIN code to continue.</value>
</data>
</root>