bitwarden-estensione-browser/src/popup/accounts/login.component.ts

38 lines
1.8 KiB
TypeScript
Raw Normal View History

2018-04-04 15:19:28 +02:00
import { Component } from '@angular/core';
2018-04-04 04:14:54 +02:00
import { Router } from '@angular/router';
import { AuthService } from 'jslib/abstractions/auth.service';
import { CryptoFunctionService } from 'jslib/abstractions/cryptoFunction.service';
import { EnvironmentService } from 'jslib/abstractions/environment.service';
2018-04-04 04:14:54 +02:00
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
2018-10-03 05:33:56 +02:00
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
2019-07-02 14:26:33 +02:00
import { StateService } from 'jslib/abstractions/state.service';
2018-07-13 15:29:08 +02:00
import { StorageService } from 'jslib/abstractions/storage.service';
2018-04-04 04:14:54 +02:00
import { SyncService } from 'jslib/abstractions/sync.service';
2018-04-04 15:19:28 +02:00
import { LoginComponent as BaseLoginComponent } from 'jslib/angular/components/login.component';
2018-04-04 04:14:54 +02:00
@Component({
selector: 'app-login',
2018-04-06 17:48:45 +02:00
templateUrl: 'login.component.html',
2018-04-04 04:14:54 +02:00
})
2018-04-04 15:19:28 +02:00
export class LoginComponent extends BaseLoginComponent {
constructor(authService: AuthService, router: Router,
protected platformUtilsService: PlatformUtilsService, protected i18nService: I18nService,
protected stateService: StateService, protected environmentService: EnvironmentService,
protected passwordGenerationService: PasswordGenerationService,
protected cryptoFunctionService: CryptoFunctionService, storageService: StorageService,
syncService: SyncService) {
super(authService, router, platformUtilsService, i18nService, stateService, environmentService, passwordGenerationService, cryptoFunctionService, storageService);
2018-07-13 16:45:43 +02:00
super.onSuccessfulLogin = () => {
2018-04-25 18:08:23 +02:00
return syncService.fullSync(true);
};
super.successRoute = '/tabs/vault';
2018-04-04 04:14:54 +02:00
}
2018-04-04 15:19:28 +02:00
settings() {
this.router.navigate(['environment']);
2018-04-04 04:14:54 +02:00
}
}