mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-28 04:08:47 +02:00
focus password on lock page after timeout
This commit is contained in:
parent
14fb60233a
commit
8d710456c4
@ -15,7 +15,7 @@
|
|||||||
<div class="row-main">
|
<div class="row-main">
|
||||||
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
||||||
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}" name="MasterPassword"
|
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}" name="MasterPassword"
|
||||||
class="monospaced" [(ngModel)]="masterPassword" required appAutofocus>
|
class="monospaced" [(ngModel)]="masterPassword" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<a class="row-btn" href="#" appStopClick appBlurClick
|
<a class="row-btn" href="#" appStopClick appBlurClick
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { Component } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
OnInit,
|
||||||
|
} from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
@ -16,7 +19,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 {
|
export class LockComponent extends BaseLockComponent implements OnInit {
|
||||||
constructor(router: Router, analytics: Angulartics2,
|
constructor(router: Router, analytics: Angulartics2,
|
||||||
toasterService: ToasterService, i18nService: I18nService,
|
toasterService: ToasterService, i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
|
platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
|
||||||
@ -25,4 +28,10 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
messagingService, userService, cryptoService);
|
messagingService, userService, cryptoService);
|
||||||
this.successRoute = '/tabs/current';
|
this.successRoute = '/tabs/current';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
window.setTimeout(() => {
|
||||||
|
document.getElementById('masterPassword').focus();
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user