From 9fcf0fb6446150dd971e6dd02377061c3973eee7 Mon Sep 17 00:00:00 2001 From: Sergey Galich Date: Mon, 24 Apr 2023 16:31:13 +0000 Subject: [PATCH] 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 --- browser/components/preferences/privacy.inc.xhtml | 4 ++-- browser/components/preferences/privacy.js | 2 +- browser/locales/en-US/browser/preferences/preferences.ftl | 4 ++-- toolkit/components/passwordmgr/LoginHelper.sys.mjs | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml index ab31c243a866..3e01cca6bebf 100644 --- a/browser/components/preferences/privacy.inc.xhtml +++ b/browser/components/preferences/privacy.inc.xhtml @@ -487,8 +487,8 @@ + data-l10n-id="preferences-relay-integration-checkbox" + search-l10n-ids="preferences-relay-integration-checkbox.label" /> diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js index 88402a1d9b22..3807a0b83ba6 100644 --- a/browser/components/preferences/privacy.js +++ b/browser/components/preferences/privacy.js @@ -2822,7 +2822,7 @@ var gPrivacyPane = { toggleRelayIntegration() { const checkbox = document.getElementById("relayIntegration"); if (checkbox.checked) { - FirefoxRelay.markAsEnabled(); + FirefoxRelay.markAsAvailable(); FirefoxRelayTelemetry.recordRelayPrefEvent("enabled"); } else { FirefoxRelay.markAsDisabled(); diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl index 5da3add80c39..b98d41116921 100644 --- a/browser/locales/en-US/browser/preferences/preferences.ftl +++ b/browser/locales/en-US/browser/preferences/preferences.ftl @@ -1006,8 +1006,8 @@ forms-breach-alerts = .label = Show alerts about passwords for breached websites .accesskey = b forms-breach-alerts-learn-more-link = Learn more -relay-integration = - .label = Enable { -relay-brand-name } in your { -brand-short-name } password manager +preferences-relay-integration-checkbox = + .label = Suggest { -relay-brand-name } email masks to protect your email address 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. diff --git a/toolkit/components/passwordmgr/LoginHelper.sys.mjs b/toolkit/components/passwordmgr/LoginHelper.sys.mjs index 319f65e717a0..dbdba135ea1d 100644 --- a/toolkit/components/passwordmgr/LoginHelper.sys.mjs +++ b/toolkit/components/passwordmgr/LoginHelper.sys.mjs @@ -1830,6 +1830,10 @@ export class OptInFeature { return this.#currentPrefValue == OptInFeature.PREF_ENABLED_VALUE; } + markAsAvailable() { + this.#markAs(OptInFeature.PREF_AVAILABLE_VALUE); + } + markAsOffered() { this.#markAs(OptInFeature.PREF_OFFERED_VALUE); }