Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
jprusik committed Nov 11, 2024
1 parent 7916c95 commit 5b208b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
</bit-no-items>
</div>

<bit-banner
*ngIf="vaultState !== VaultStateEnum.Empty && scriptInjectionIsBlocked$"
id="domain-script-injection-blocked-banner"
bannerType="info"
>
Autofill is blocked for this website. Review or change this in settings.
<a bitLink linkType="contrast" class="tw-cursor-pointer" rel="noreferrer noopener">
{{ "routeToPaymentMethodTrigger" | i18n }}
</a>
</bit-banner>

<!-- Show search & filters outside of the scroll area of the page -->
<div slot="above-scroll-area" class="tw-p-4" *ngIf="vaultState !== VaultStateEnum.Empty">
<app-vault-v2-search> </app-vault-v2-search>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { combineLatest, Observable, shareReplay, switchMap } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid";
import { CipherType } from "@bitwarden/common/vault/enums";
import { ButtonModule, Icons, NoItemsModule } from "@bitwarden/components";
import { BannerModule, ButtonModule, Icons, NoItemsModule } from "@bitwarden/components";
import { VaultIcons } from "@bitwarden/vault";

import { CurrentAccountComponent } from "../../../../auth/popup/account-switching/current-account.component";
Expand Down Expand Up @@ -47,6 +47,7 @@ enum VaultState {
AutofillVaultListItemsComponent,
VaultListItemsContainerComponent,
VaultListFiltersComponent,
BannerModule,
ButtonModule,
RouterLink,
VaultV2SearchComponent,
Expand All @@ -61,6 +62,8 @@ export class VaultV2Component implements OnInit, OnDestroy {
protected favoriteCiphers$ = this.vaultPopupItemsService.favoriteCiphers$;
protected remainingCiphers$ = this.vaultPopupItemsService.remainingCiphers$;
protected loading$ = this.vaultPopupItemsService.loading$;
// @TODO if feature flag is on and site matches
protected scriptInjectionIsBlocked$ = true;

protected newItemItemValues$: Observable<NewItemInitialValues> =
this.vaultPopupListFiltersService.filters$.pipe(
Expand Down
2 changes: 2 additions & 0 deletions libs/common/src/enums/feature-flag.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum FeatureFlag {
SSHKeyVaultItem = "ssh-key-vault-item",
SSHAgent = "ssh-agent",
NotificationBarAddLoginImprovements = "notification-bar-add-login-improvements",
BlockBrowserInjectionsByDomain = "block-browser-injections-by-domain",
AC2476_DeprecateStripeSourcesAPI = "AC-2476-deprecate-stripe-sources-api",
CipherKeyEncryption = "cipher-key-encryption",
VerifiedSsoDomainEndpoint = "pm-12337-refactor-sso-details-endpoint",
Expand Down Expand Up @@ -79,6 +80,7 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.SSHKeyVaultItem]: FALSE,
[FeatureFlag.SSHAgent]: FALSE,
[FeatureFlag.NotificationBarAddLoginImprovements]: FALSE,
[FeatureFlag.BlockBrowserInjectionsByDomain]: FALSE,
[FeatureFlag.AC2476_DeprecateStripeSourcesAPI]: FALSE,
[FeatureFlag.CipherKeyEncryption]: FALSE,
[FeatureFlag.VerifiedSsoDomainEndpoint]: FALSE,
Expand Down

0 comments on commit 5b208b3

Please sign in to comment.