2018-04-04 16:08:30 +02:00
|
|
|
import { Component } from "@angular/core";
|
2022-10-28 20:54:55 +02:00
|
|
|
import { ActivatedRoute, Router } from "@angular/router";
|
2018-04-04 16:08:30 +02:00
|
|
|
|
2023-02-06 22:53:37 +01:00
|
|
|
import { HintComponent as BaseHintComponent } from "@bitwarden/angular/auth/components/hint.component";
|
2024-03-30 19:00:27 +01:00
|
|
|
import { LoginEmailServiceAbstraction } from "@bitwarden/auth/common";
|
2022-06-14 17:10:53 +02:00
|
|
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
2023-06-06 22:34:53 +02:00
|
|
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
|
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
|
|
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
2018-04-04 16:08:30 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-hint",
|
2018-04-06 17:48:45 +02:00
|
|
|
templateUrl: "hint.component.html",
|
2018-04-04 16:08:30 +02:00
|
|
|
})
|
|
|
|
export class HintComponent extends BaseHintComponent {
|
2018-10-03 06:21:22 +02:00
|
|
|
constructor(
|
|
|
|
router: Router,
|
|
|
|
platformUtilsService: PlatformUtilsService,
|
2021-10-21 11:10:46 +02:00
|
|
|
i18nService: I18nService,
|
|
|
|
apiService: ApiService,
|
2022-10-28 20:54:55 +02:00
|
|
|
logService: LogService,
|
|
|
|
private route: ActivatedRoute,
|
2024-03-30 19:00:27 +01:00
|
|
|
loginEmailService: LoginEmailServiceAbstraction,
|
2021-10-21 11:10:46 +02:00
|
|
|
) {
|
2024-03-30 19:00:27 +01:00
|
|
|
super(router, i18nService, apiService, platformUtilsService, logService, loginEmailService);
|
2022-10-28 20:54:55 +02:00
|
|
|
|
|
|
|
super.onSuccessfulSubmit = async () => {
|
2024-02-02 21:13:37 +01:00
|
|
|
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2022-10-28 20:54:55 +02:00
|
|
|
this.router.navigate([this.successRoute]);
|
|
|
|
};
|
2018-04-04 16:08:30 +02:00
|
|
|
}
|
|
|
|
}
|