2019-01-08 05:29:50 +01:00
|
|
|
import { Component } from '@angular/core';
|
2018-04-05 04:59:42 +02:00
|
|
|
import { Router } from '@angular/router';
|
|
|
|
|
|
|
|
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
2019-06-04 06:03:27 +02:00
|
|
|
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
2018-04-05 04:59:42 +02:00
|
|
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
2019-02-13 05:53:04 +01:00
|
|
|
import { LockService } from 'jslib/abstractions/lock.service';
|
2018-04-05 04:59:42 +02:00
|
|
|
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
|
|
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
2019-07-02 14:26:33 +02:00
|
|
|
import { StateService } from 'jslib/abstractions/state.service';
|
2019-02-13 05:53:04 +01:00
|
|
|
import { StorageService } from 'jslib/abstractions/storage.service';
|
2018-04-05 04:59:42 +02:00
|
|
|
import { UserService } from 'jslib/abstractions/user.service';
|
|
|
|
|
|
|
|
import { LockComponent as BaseLockComponent } from 'jslib/angular/components/lock.component';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-lock',
|
2018-04-06 17:48:45 +02:00
|
|
|
templateUrl: 'lock.component.html',
|
2018-04-05 04:59:42 +02:00
|
|
|
})
|
2019-01-08 05:29:50 +01:00
|
|
|
export class LockComponent extends BaseLockComponent {
|
2018-10-03 06:21:22 +02:00
|
|
|
constructor(router: Router, i18nService: I18nService,
|
2018-04-05 04:59:42 +02:00
|
|
|
platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
|
2019-02-13 05:53:04 +01:00
|
|
|
userService: UserService, cryptoService: CryptoService,
|
2019-06-04 06:03:27 +02:00
|
|
|
storageService: StorageService, lockService: LockService,
|
2019-07-02 14:26:33 +02:00
|
|
|
environmentService: EnvironmentService, stateService: StateService) {
|
2019-02-13 05:53:04 +01:00
|
|
|
super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService,
|
2019-07-02 14:26:33 +02:00
|
|
|
storageService, lockService, environmentService, stateService);
|
2018-04-05 04:59:42 +02:00
|
|
|
this.successRoute = '/tabs/current';
|
|
|
|
}
|
2018-04-19 17:17:07 +02:00
|
|
|
|
2019-01-08 05:29:50 +01:00
|
|
|
async ngOnInit() {
|
|
|
|
await super.ngOnInit();
|
2018-04-19 17:17:07 +02:00
|
|
|
window.setTimeout(() => {
|
2019-02-13 05:53:04 +01:00
|
|
|
document.getElementById(this.pinLock ? 'pin' : 'masterPassword').focus();
|
2018-04-19 17:17:07 +02:00
|
|
|
}, 100);
|
|
|
|
}
|
2018-04-05 04:59:42 +02:00
|
|
|
}
|