mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
logged in as on
This commit is contained in:
parent
4382490823
commit
59f1dcca12
3 changed files with 15 additions and 7 deletions
|
@ -22,6 +22,7 @@ namespace Bit.App.Pages
|
|||
private readonly IUserService _userService;
|
||||
private readonly IMessagingService _messagingService;
|
||||
private readonly IStorageService _secureStorageService;
|
||||
private readonly IEnvironmentService _environmentService;
|
||||
|
||||
private bool _hasKey;
|
||||
private string _email;
|
||||
|
@ -44,6 +45,7 @@ namespace Bit.App.Pages
|
|||
_userService = ServiceContainer.Resolve<IUserService>("userService");
|
||||
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
|
||||
_secureStorageService = ServiceContainer.Resolve<IStorageService>("secureStorageService");
|
||||
_environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
|
||||
|
||||
PageTitle = AppResources.VerifyMasterPassword;
|
||||
TogglePasswordCommand = new Command(TogglePassword);
|
||||
|
@ -104,7 +106,13 @@ namespace Bit.App.Pages
|
|||
PinLock = (_pinSet.Item1 && _hasKey) || _pinSet.Item2;
|
||||
FingerprintLock = await _lockService.IsFingerprintLockSetAsync();
|
||||
_email = await _userService.GetEmailAsync();
|
||||
LoggedInAsText = string.Format(AppResources.LoggedInAs, _email);
|
||||
var webVault = _environmentService.GetWebVaultUrl();
|
||||
if(string.IsNullOrWhiteSpace(webVault))
|
||||
{
|
||||
webVault = "https://bitwarden.com";
|
||||
}
|
||||
var webVaultHostname = CoreHelpers.GetHostname(webVault);
|
||||
LoggedInAsText = string.Format(AppResources.LoggedInAsOn, _email, webVaultHostname);
|
||||
if(PinLock)
|
||||
{
|
||||
PageTitle = AppResources.VerifyPIN;
|
||||
|
|
6
src/App/Resources/AppResources.Designer.cs
generated
6
src/App/Resources/AppResources.Designer.cs
generated
|
@ -2230,11 +2230,11 @@ namespace Bit.App.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Logged in as {0}..
|
||||
/// Looks up a localized string similar to Logged in as {0} on {1}..
|
||||
/// </summary>
|
||||
public static string LoggedInAs {
|
||||
public static string LoggedInAsOn {
|
||||
get {
|
||||
return ResourceManager.GetString("LoggedInAs", resourceCulture);
|
||||
return ResourceManager.GetString("LoggedInAsOn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1499,9 +1499,9 @@
|
|||
<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 name="LoggedInAsOn" xml:space="preserve">
|
||||
<value>Logged in as {0} on {1}.</value>
|
||||
<comment>ex: Logged in as user@example.com on bitwarden.com.</comment>
|
||||
</data>
|
||||
<data name="VaultLockedMasterPassword" xml:space="preserve">
|
||||
<value>Your vault is locked. Verify your master password to continue.</value>
|
||||
|
|
Loading…
Reference in a new issue