mirror of
https://github.com/bitwarden/browser
synced 2026-02-02 01:33:22 +00:00
* consolidated session timeout settings component * rename preferences to appearance * race condition bug on computed signal * outdated header for browser * unnecessary padding * remove required on action, fix build * rename localization key * missing user id * required * cleanup task * eslint fix signals rollback * takeUntilDestroyed, null checks * move browser specific logic outside shared component * explicit input type * input name * takeUntilDestroyed, no toast * unit tests * cleanup * cleanup, correct link to deprecation jira * tech debt todo with jira * missing web localization key when policy is on * relative import * extracting timeout options to component service * duplicate localization key * fix failing test * subsequent timeout action selecting opening without dialog on first dialog cancellation * default locale can be null * unit tests failing * rename, simplifications * one if else feature flag * timeout input component rendering before async pipe completion
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { Component, OnInit } from "@angular/core";
|
|
import { Observable } from "rxjs";
|
|
|
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
|
|
|
import { HeaderModule } from "../../../layouts/header/header.module";
|
|
import { SharedModule } from "../../../shared";
|
|
|
|
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
|
@Component({
|
|
templateUrl: "security.component.html",
|
|
imports: [SharedModule, HeaderModule],
|
|
})
|
|
export class SecurityComponent implements OnInit {
|
|
showChangePassword = true;
|
|
changePasswordRoute = "password";
|
|
consolidatedSessionTimeoutComponent$: Observable<boolean>;
|
|
|
|
constructor(
|
|
private userVerificationService: UserVerificationService,
|
|
private configService: ConfigService,
|
|
) {
|
|
this.consolidatedSessionTimeoutComponent$ = this.configService.getFeatureFlag$(
|
|
FeatureFlag.ConsolidatedSessionTimeoutComponent,
|
|
);
|
|
}
|
|
|
|
async ngOnInit() {
|
|
this.showChangePassword = await this.userVerificationService.hasMasterPassword();
|
|
}
|
|
}
|