mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +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"
|
[subtitle]="'autofillSpotlightDesc' | i18n"
|
||||||
[buttonText]="spotlightButtonText"
|
[buttonText]="spotlightButtonText"
|
||||||
(onDismiss)="dismissSpotlight()"
|
(onDismiss)="dismissSpotlight()"
|
||||||
(onButtonClick)="openURI($event, disablePasswordManagerURI)"
|
(onButtonClick)="disableBrowserAutofillSettingsFromNudge($event)"
|
||||||
[buttonIcon]="spotlightButtonIcon"
|
[buttonIcon]="spotlightButtonIcon"
|
||||||
></bit-spotlight>
|
></bit-spotlight>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -585,4 +585,16 @@ export class AutofillComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
return hints;
|
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