51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
|
import {
|
||
|
ChangeDetectorRef,
|
||
|
Component,
|
||
|
NgZone,
|
||
|
OnDestroy,
|
||
|
OnInit,
|
||
|
} from '@angular/core';
|
||
|
|
||
|
import { Router } from '@angular/router';
|
||
|
|
||
|
import { ToasterService } from 'angular2-toaster';
|
||
|
import { Angulartics2 } from 'angulartics2';
|
||
|
|
||
|
import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType';
|
||
|
|
||
|
import { ApiService } from 'jslib/abstractions/api.service';
|
||
|
import { AuthService } from 'jslib/abstractions/auth.service';
|
||
|
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
||
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||
|
|
||
|
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||
|
|
||
|
import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib/angular/components/two-factor.component';
|
||
|
|
||
|
const BroadcasterSubscriptionId = 'TwoFactorComponent';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-two-factor',
|
||
|
templateUrl: 'two-factor.component.html',
|
||
|
})
|
||
|
export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||
|
showNewWindowMessage = false;
|
||
|
|
||
|
constructor(authService: AuthService, router: Router,
|
||
|
analytics: Angulartics2, toasterService: ToasterService,
|
||
|
i18nService: I18nService, apiService: ApiService,
|
||
|
platformUtilsService: PlatformUtilsService, syncService: SyncService,
|
||
|
environmentService: EnvironmentService, private ngZone: NgZone,
|
||
|
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef) {
|
||
|
super(authService, router, analytics, toasterService, i18nService, apiService,
|
||
|
platformUtilsService, window, environmentService);
|
||
|
this.successRoute = '/vault';
|
||
|
}
|
||
|
|
||
|
anotherMethod() {
|
||
|
this.router.navigate(['2fa-options']);
|
||
|
}
|
||
|
}
|