2018-04-11 05:49:46 +02:00
|
|
|
import { Component } from "@angular/core";
|
2018-04-04 16:08:30 +02:00
|
|
|
import { Router } from "@angular/router";
|
|
|
|
|
2022-02-24 18:14:04 +01:00
|
|
|
import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "jslib-angular/components/two-factor-options.component";
|
2021-06-07 19:25:37 +02:00
|
|
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
|
|
|
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
2022-02-08 00:06:37 +01:00
|
|
|
import { TwoFactorService } from "jslib-common/abstractions/twoFactor.service";
|
2018-04-04 16:08:30 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-two-factor-options",
|
2018-04-06 17:48:45 +02:00
|
|
|
templateUrl: "two-factor-options.component.html",
|
2018-04-04 16:08:30 +02:00
|
|
|
})
|
|
|
|
export class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {
|
|
|
|
constructor(
|
2022-02-08 00:06:37 +01:00
|
|
|
twoFactorService: TwoFactorService,
|
2018-04-04 16:08:30 +02:00
|
|
|
router: Router,
|
|
|
|
i18nService: I18nService,
|
|
|
|
platformUtilsService: PlatformUtilsService
|
|
|
|
) {
|
2022-02-08 00:06:37 +01:00
|
|
|
super(twoFactorService, router, i18nService, platformUtilsService, window);
|
2018-04-04 16:08:30 +02:00
|
|
|
}
|
2018-04-04 20:19:44 +02:00
|
|
|
|
|
|
|
choose(p: any) {
|
|
|
|
super.choose(p);
|
2022-02-08 00:06:37 +01:00
|
|
|
this.twoFactorService.setSelectedProvider(p.type);
|
2018-04-04 20:19:44 +02:00
|
|
|
this.router.navigate(["2fa"]);
|
|
|
|
}
|
2018-04-04 16:08:30 +02:00
|
|
|
}
|