mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
[PM-21280] - hide setings UI changes behind feature flag (#14665)
* hide setings UI changes behind feature flag * protect observable. remove pipe
This commit is contained in:
@@ -23,6 +23,12 @@
|
|||||||
<i slot="end" class="bwi bwi-external-link" aria-hidden="true"></i>
|
<i slot="end" class="bwi bwi-external-link" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</bit-item>
|
</bit-item>
|
||||||
|
<bit-item *ngIf="!(isNudgeFeatureEnabled$ | async)">
|
||||||
|
<a bit-item-content routerLink="/more-from-bitwarden">
|
||||||
|
{{ "moreFromBitwarden" | i18n }}
|
||||||
|
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
</bit-item>
|
||||||
<bit-item>
|
<bit-item>
|
||||||
<button type="button" bit-item-content (click)="rate()">
|
<button type="button" bit-item-content (click)="rate()">
|
||||||
{{ "rateExtension" | i18n }}
|
{{ "rateExtension" | i18n }}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import { firstValueFrom } from "rxjs";
|
|||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { DeviceType } from "@bitwarden/common/enums";
|
import { DeviceType } from "@bitwarden/common/enums";
|
||||||
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||||
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { DialogService, ItemModule } from "@bitwarden/components";
|
import { DialogService, ItemModule } from "@bitwarden/components";
|
||||||
@@ -47,12 +49,17 @@ export class AboutPageV2Component {
|
|||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private environmentService: EnvironmentService,
|
private environmentService: EnvironmentService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
|
private configService: ConfigService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
about() {
|
about() {
|
||||||
this.dialogService.open(AboutDialogComponent);
|
this.dialogService.open(AboutDialogComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected isNudgeFeatureEnabled$ = this.configService.getFeatureFlag$(
|
||||||
|
FeatureFlag.PM8851_BrowserOnboardingNudge,
|
||||||
|
);
|
||||||
|
|
||||||
async launchHelp() {
|
async launchHelp() {
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "continueToHelpCenter" },
|
title: { key: "continueToHelpCenter" },
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
|
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</bit-item>
|
</bit-item>
|
||||||
<bit-item>
|
<bit-item *ngIf="isNudgeFeatureEnabled$ | async">
|
||||||
<a bit-item-content routerLink="/download-bitwarden">
|
<a bit-item-content routerLink="/download-bitwarden">
|
||||||
<i slot="start" class="bwi bwi-mobile" aria-hidden="true"></i>
|
<i slot="start" class="bwi bwi-mobile" aria-hidden="true"></i>
|
||||||
<div class="tw-flex tw-items-center tw-justify-center">
|
<div class="tw-flex tw-items-center tw-justify-center">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
|
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</bit-item>
|
</bit-item>
|
||||||
<bit-item>
|
<bit-item *ngIf="isNudgeFeatureEnabled$ | async">
|
||||||
<a bit-item-content routerLink="/more-from-bitwarden">
|
<a bit-item-content routerLink="/more-from-bitwarden">
|
||||||
<i slot="start" class="bwi bwi-filter" aria-hidden="true"></i>
|
<i slot="start" class="bwi bwi-filter" aria-hidden="true"></i>
|
||||||
{{ "moreFromBitwarden" | i18n }}
|
{{ "moreFromBitwarden" | i18n }}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import { filter, firstValueFrom, Observable, shareReplay, switchMap } from "rxjs
|
|||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||||
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { UserId } from "@bitwarden/common/types/guid";
|
import { UserId } from "@bitwarden/common/types/guid";
|
||||||
import { BadgeComponent, ItemModule } from "@bitwarden/components";
|
import { BadgeComponent, ItemModule } from "@bitwarden/components";
|
||||||
import { NudgeStatus, VaultNudgesService, VaultNudgeType } from "@bitwarden/vault";
|
import { NudgeStatus, VaultNudgesService, VaultNudgeType } from "@bitwarden/vault";
|
||||||
@@ -49,9 +51,14 @@ export class SettingsV2Component {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected isNudgeFeatureEnabled$ = this.configService.getFeatureFlag$(
|
||||||
|
FeatureFlag.PM8851_BrowserOnboardingNudge,
|
||||||
|
);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly vaultNudgesService: VaultNudgesService,
|
private readonly vaultNudgesService: VaultNudgesService,
|
||||||
private readonly accountService: AccountService,
|
private readonly accountService: AccountService,
|
||||||
|
private readonly configService: ConfigService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async dismissBadge(type: VaultNudgeType) {
|
async dismissBadge(type: VaultNudgeType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user