mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-14562] Risk insights notification feature flag (#13095)
* Risk insights notification feature flag * Feature flag should be false
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<div class="tw-mt-4 tw-flex tw-flex-col" *ngIf="!loading && dataSource.data.length">
|
||||
<div class="tw-flex tw-justify-between tw-mb-4">
|
||||
<h2 bitTypography="h2">{{ "criticalApplications" | i18n }}</h2>
|
||||
<button bitButton buttonType="primary" type="button">
|
||||
<button *ngIf="isNotificationsFeatureEnabled" bitButton buttonType="primary" type="button">
|
||||
<i class="bwi bwi-envelope tw-mr-2"></i>
|
||||
{{ "requestPasswordChange" | i18n }}
|
||||
</button>
|
||||
|
||||
@@ -15,6 +15,8 @@ import {
|
||||
ApplicationHealthReportDetailWithCriticalFlag,
|
||||
ApplicationHealthReportSummary,
|
||||
} from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { OrganizationId } from "@bitwarden/common/types/guid";
|
||||
import {
|
||||
@@ -47,8 +49,12 @@ export class CriticalApplicationsComponent implements OnInit {
|
||||
protected organizationId: string;
|
||||
protected applicationSummary = {} as ApplicationHealthReportSummary;
|
||||
noItemsIcon = Icons.Security;
|
||||
isNotificationsFeatureEnabled: boolean = false;
|
||||
|
||||
ngOnInit() {
|
||||
async ngOnInit() {
|
||||
this.isNotificationsFeatureEnabled = await this.configService.getFeatureFlag(
|
||||
FeatureFlag.EnableRiskInsightsNotifications,
|
||||
);
|
||||
this.organizationId = this.activatedRoute.snapshot.paramMap.get("organizationId") ?? "";
|
||||
combineLatest([
|
||||
this.dataService.applications$,
|
||||
@@ -111,6 +117,7 @@ export class CriticalApplicationsComponent implements OnInit {
|
||||
protected criticalAppsService: CriticalAppsService,
|
||||
protected reportService: RiskInsightsReportService,
|
||||
protected i18nService: I18nService,
|
||||
private configService: ConfigService,
|
||||
) {
|
||||
this.searchControl.valueChanges
|
||||
.pipe(debounceTime(200), takeUntilDestroyed())
|
||||
|
||||
Reference in New Issue
Block a user