From 89c066069c33a2c7510f8c48a99884152b1ea5b1 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 4 Jun 2019 05:56:33 +0200 Subject: [PATCH] If an environment is configured, show the hostname in the lock screen (#258) * If an environment is configured, show the hostname in the lock screen. * Restore back src/locales/en_GB/messages.json --- src/app/accounts/lock.component.html | 5 ++++- src/app/accounts/lock.component.ts | 5 +++-- src/locales/en/messages.json | 13 +++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/app/accounts/lock.component.html b/src/app/accounts/lock.component.html index 9d99980f..57f6f605 100644 --- a/src/app/accounts/lock.component.html +++ b/src/app/accounts/lock.component.html @@ -24,7 +24,10 @@ - diff --git a/src/app/accounts/lock.component.ts b/src/app/accounts/lock.component.ts index 42448205..3b8b3078 100644 --- a/src/app/accounts/lock.component.ts +++ b/src/app/accounts/lock.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import { Router } from '@angular/router'; +import { EnvironmentService } from 'jslib/abstractions/environment.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { LockService } from 'jslib/abstractions/lock.service'; @@ -19,8 +20,8 @@ export class LockComponent extends BaseLockComponent { constructor(router: Router, i18nService: I18nService, platformUtilsService: PlatformUtilsService, messagingService: MessagingService, userService: UserService, cryptoService: CryptoService, - storageService: StorageService, lockService: LockService) { + storageService: StorageService, lockService: LockService, environmentService: EnvironmentService) { super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService, - storageService, lockService); + storageService, lockService, environmentService); } } diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 2a4a468d..d7c52f85 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -749,6 +749,19 @@ } } }, + "loggedInAsOn": { + "message": "Logged in as $EMAIL$ on $WEBVAULTHOSTNAME$.", + "placeholders": { + "email": { + "content": "$1", + "example": "name@example.com" + }, + "webVaultHostname": { + "content": "$2", + "example": "bitwarden.example.com" + } + } + }, "invalidMasterPassword": { "message": "Invalid master password" },