mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
Navigate the user from the autofill nudge to the proper destination based on their browser (#15876)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
[subtitle]="'autofillSpotlightDesc' | i18n"
|
||||
[buttonText]="spotlightButtonText"
|
||||
(onDismiss)="dismissSpotlight()"
|
||||
(onButtonClick)="openURI($event, disablePasswordManagerURI)"
|
||||
(onButtonClick)="disableBrowserAutofillSettingsFromNudge($event)"
|
||||
[buttonIcon]="spotlightButtonIcon"
|
||||
></bit-spotlight>
|
||||
</div>
|
||||
|
||||
@@ -585,4 +585,16 @@ export class AutofillComponent implements OnInit {
|
||||
}
|
||||
return hints;
|
||||
}
|
||||
|
||||
/** Navigates the user from the Autofill Nudge to the proper destination based on their browser. */
|
||||
async disableBrowserAutofillSettingsFromNudge(event: Event) {
|
||||
// When we can programmatically disable the autofill setting, do that first
|
||||
// otherwise open the appropriate URI for the browser
|
||||
if (this.canOverrideBrowserAutofillSetting) {
|
||||
this.defaultBrowserAutofillDisabled = true;
|
||||
await this.updateDefaultBrowserAutofillDisabled();
|
||||
} else {
|
||||
await this.openURI(event, this.disablePasswordManagerURI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user