unlock message improvements

This commit is contained in:
Kyle Spearrin 2019-01-07 23:29:50 -05:00
parent d6e257b1ce
commit a70306ea4a
4 changed files with 25 additions and 8 deletions

2
jslib

@ -1 +1 @@
Subproject commit e7464785e134e5d723a4901cf54c5dd1668efb5c Subproject commit f3f17138c82b59a65c68cc2c20d8bb6112192743

View File

@ -295,6 +295,21 @@
"verifyMasterPassword": { "verifyMasterPassword": {
"message": "Verify Master Password" "message": "Verify Master Password"
}, },
"yourVaultIsLocked": {
"message": "Your vault is locked. Verify your master password to continue."
},
"unlock": {
"message": "Unlock"
},
"loggedInAs": {
"message": "Currently logged in as $EMAIL$.",
"placeholders": {
"email": {
"content": "$1",
"example": "name@example.com"
}
}
},
"invalidMasterPassword": { "invalidMasterPassword": {
"message": "Invalid master password" "message": "Invalid master password"
}, },

View File

@ -5,7 +5,7 @@
<span class="title">{{'verifyMasterPassword' | i18n}}</span> <span class="title">{{'verifyMasterPassword' | i18n}}</span>
</div> </div>
<div class="right"> <div class="right">
<button type="submit" appBlurClick>{{'submit' | i18n}}</button> <button type="submit" appBlurClick>{{'unlock' | i18n}}</button>
</div> </div>
</header> </header>
<content> <content>
@ -26,6 +26,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="box-footer">
<p>{{'yourVaultIsLocked' | i18n}}</p>
{{'loggedInAs' | i18n : email}}
</div>
</div> </div>
<p class="text-center"> <p class="text-center">
<a href="#" appStopClick (click)="logOut()">{{'logOut' | i18n}}</a> <a href="#" appStopClick (click)="logOut()">{{'logOut' | i18n}}</a>

View File

@ -1,7 +1,4 @@
import { import { Component } from '@angular/core';
Component,
OnInit,
} from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { CryptoService } from 'jslib/abstractions/crypto.service'; import { CryptoService } from 'jslib/abstractions/crypto.service';
@ -16,7 +13,7 @@ import { LockComponent as BaseLockComponent } from 'jslib/angular/components/loc
selector: 'app-lock', selector: 'app-lock',
templateUrl: 'lock.component.html', templateUrl: 'lock.component.html',
}) })
export class LockComponent extends BaseLockComponent implements OnInit { export class LockComponent extends BaseLockComponent {
constructor(router: Router, i18nService: I18nService, constructor(router: Router, i18nService: I18nService,
platformUtilsService: PlatformUtilsService, messagingService: MessagingService, platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
userService: UserService, cryptoService: CryptoService) { userService: UserService, cryptoService: CryptoService) {
@ -24,7 +21,8 @@ export class LockComponent extends BaseLockComponent implements OnInit {
this.successRoute = '/tabs/current'; this.successRoute = '/tabs/current';
} }
ngOnInit() { async ngOnInit() {
await super.ngOnInit();
window.setTimeout(() => { window.setTimeout(() => {
document.getElementById('masterPassword').focus(); document.getElementById('masterPassword').focus();
}, 100); }, 100);