From 59f1dcca12b6607813a7a110114bd081ca72eac1 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 3 Jun 2019 09:58:35 -0400 Subject: [PATCH] logged in as on --- src/App/Pages/Accounts/LockPageViewModel.cs | 10 +++++++++- src/App/Resources/AppResources.Designer.cs | 6 +++--- src/App/Resources/AppResources.resx | 6 +++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/App/Pages/Accounts/LockPageViewModel.cs b/src/App/Pages/Accounts/LockPageViewModel.cs index 5242e69de..01038f9e3 100644 --- a/src/App/Pages/Accounts/LockPageViewModel.cs +++ b/src/App/Pages/Accounts/LockPageViewModel.cs @@ -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("userService"); _messagingService = ServiceContainer.Resolve("messagingService"); _secureStorageService = ServiceContainer.Resolve("secureStorageService"); + _environmentService = ServiceContainer.Resolve("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; diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index 348660eb7..6ba0da97a 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -2230,11 +2230,11 @@ namespace Bit.App.Resources { } /// - /// Looks up a localized string similar to Logged in as {0}.. + /// Looks up a localized string similar to Logged in as {0} on {1}.. /// - public static string LoggedInAs { + public static string LoggedInAsOn { get { - return ResourceManager.GetString("LoggedInAs", resourceCulture); + return ResourceManager.GetString("LoggedInAsOn", resourceCulture); } } diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 8316e4ee1..04434072d 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -1499,9 +1499,9 @@ Set your PIN code for unlocking Bitwarden. Your PIN settings will be reset if you ever fully log out of the application. - - Logged in as {0}. - ex: Logged in as user@example.com. + + Logged in as {0} on {1}. + ex: Logged in as user@example.com on bitwarden.com. Your vault is locked. Verify your master password to continue.