Bug 1829427 - Update Relay integration checkbox in Settings r=credential-management-reviewers,fluent-reviewers,settings-reviewers,flod,jneuberger,mconley

Differential Revision: https://phabricator.services.mozilla.com/D176192
This commit is contained in:
Sergey Galich 2023-04-24 16:31:13 +00:00
parent 7df7d42bf2
commit 9fcf0fb644
4 changed files with 9 additions and 5 deletions

View File

@ -487,8 +487,8 @@
<hbox class="indent" id="relayIntegrationBox" flex="1" align="center"> <hbox class="indent" id="relayIntegrationBox" flex="1" align="center">
<checkbox id="relayIntegration" <checkbox id="relayIntegration"
class="tail-with-learn-more" class="tail-with-learn-more"
data-l10n-id="relay-integration" data-l10n-id="preferences-relay-integration-checkbox"
search-l10n-ids="relay-integration.label" /> search-l10n-ids="preferences-relay-integration-checkbox.label" />
<html:a id="relayIntegrationLearnMoreLink" class="learnMore" <html:a id="relayIntegrationLearnMoreLink" class="learnMore"
data-l10n-id="relay-integration-learn-more-link"/> data-l10n-id="relay-integration-learn-more-link"/>
</hbox> </hbox>

View File

@ -2822,7 +2822,7 @@ var gPrivacyPane = {
toggleRelayIntegration() { toggleRelayIntegration() {
const checkbox = document.getElementById("relayIntegration"); const checkbox = document.getElementById("relayIntegration");
if (checkbox.checked) { if (checkbox.checked) {
FirefoxRelay.markAsEnabled(); FirefoxRelay.markAsAvailable();
FirefoxRelayTelemetry.recordRelayPrefEvent("enabled"); FirefoxRelayTelemetry.recordRelayPrefEvent("enabled");
} else { } else {
FirefoxRelay.markAsDisabled(); FirefoxRelay.markAsDisabled();

View File

@ -1006,8 +1006,8 @@ forms-breach-alerts =
.label = Show alerts about passwords for breached websites .label = Show alerts about passwords for breached websites
.accesskey = b .accesskey = b
forms-breach-alerts-learn-more-link = Learn more forms-breach-alerts-learn-more-link = Learn more
relay-integration = preferences-relay-integration-checkbox =
.label = Enable { -relay-brand-name } in your { -brand-short-name } password manager .label = Suggest { -relay-brand-name } email masks to protect your email address
relay-integration-learn-more-link = Learn more relay-integration-learn-more-link = Learn more
# Checkbox which controls filling saved logins into fields automatically when they appear, in some cases without user interaction. # Checkbox which controls filling saved logins into fields automatically when they appear, in some cases without user interaction.

View File

@ -1830,6 +1830,10 @@ export class OptInFeature {
return this.#currentPrefValue == OptInFeature.PREF_ENABLED_VALUE; return this.#currentPrefValue == OptInFeature.PREF_ENABLED_VALUE;
} }
markAsAvailable() {
this.#markAs(OptInFeature.PREF_AVAILABLE_VALUE);
}
markAsOffered() { markAsOffered() {
this.#markAs(OptInFeature.PREF_OFFERED_VALUE); this.#markAs(OptInFeature.PREF_OFFERED_VALUE);
} }