-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PM-13115] Allow users to disable extension content script injections…
… by domain (#11826) * add disabledInteractionsUris state to the domain settings service * add routes and ui for user disabledInteractionsUris state management * use disabled URIs service state as a preemptive conditon to injecting content scripts * move disabled domains navigation button from account security settings to autofill settings * update disabled domain terminology to blocked domain terminology * update copy * handle blocked domains initializing with null value * add dismissable banner to the vault view when the active autofill tab is on the blocked domains list * add autofill blocked domain indicators to autofill suggestions section header * add BlockBrowserInjectionsByDomain feature flag and put feature behind it * update router config to new style * update tests and cleanup * use full-width-notice slot for domain script injection blocked banner * convert thrown error on content script injection block to a warning and early return * simplify and enspeeden state resolution for blockedInteractionsUris * refactor feature flag state fetching and update tests * document domain settings service * remove vault component presentational updates
- Loading branch information
Showing
23 changed files
with
623 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
apps/browser/src/autofill/popup/settings/blocked-domains.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<popup-page> | ||
<popup-header slot="header" pageTitle="{{ 'blockedDomains' | i18n }}" showBackButton> | ||
<ng-container slot="end"> | ||
<app-pop-out></app-pop-out> | ||
</ng-container> | ||
</popup-header> | ||
|
||
<div class="tw-bg-background-alt"> | ||
<p>{{ "blockedDomainsDesc" | i18n }}</p> | ||
<bit-section *ngIf="!isLoading"> | ||
<bit-section-header> | ||
<h2 bitTypography="h6">{{ "domainsTitle" | i18n }}</h2> | ||
<span bitTypography="body2" slot="end">{{ blockedDomainsState?.length || 0 }}</span> | ||
</bit-section-header> | ||
|
||
<ng-container *ngIf="blockedDomainsState"> | ||
<bit-item | ||
*ngFor="let domain of blockedDomainsState; let i = index; trackBy: trackByFunction" | ||
> | ||
<bit-item-content> | ||
<bit-label *ngIf="i >= fieldsEditThreshold">{{ | ||
"websiteItemLabel" | i18n: i + 1 | ||
}}</bit-label> | ||
<input | ||
*ngIf="i >= fieldsEditThreshold" | ||
#uriInput | ||
appInputVerbatim | ||
bitInput | ||
id="excludedDomain{{ i }}" | ||
inputmode="url" | ||
name="excludedDomain{{ i }}" | ||
type="text" | ||
(change)="fieldChange()" | ||
[(ngModel)]="blockedDomainsState[i]" | ||
/> | ||
<div id="excludedDomain{{ i }}" *ngIf="i < fieldsEditThreshold">{{ domain }}</div> | ||
</bit-item-content> | ||
<button | ||
*ngIf="i < fieldsEditThreshold" | ||
appA11yTitle="{{ 'remove' | i18n }}" | ||
bitIconButton="bwi-minus-circle" | ||
buttonType="danger" | ||
size="small" | ||
slot="end" | ||
type="button" | ||
(click)="removeDomain(i)" | ||
></button> | ||
</bit-item> | ||
</ng-container> | ||
<button bitLink class="tw-pt-2" type="button" linkType="primary" (click)="addNewDomain()"> | ||
<i class="bwi bwi-plus-circle bwi-fw" aria-hidden="true"></i> {{ "addDomain" | i18n }} | ||
</button> | ||
</bit-section> | ||
</div> | ||
<popup-footer slot="footer"> | ||
<button | ||
bitButton | ||
buttonType="primary" | ||
type="submit" | ||
[disabled]="dataIsPristine" | ||
(click)="saveChanges()" | ||
> | ||
{{ "save" | i18n }} | ||
</button> | ||
</popup-footer> | ||
</popup-page> |
Oops, something went wrong.