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">
<checkbox id="relayIntegration"
class="tail-with-learn-more"
data-l10n-id="relay-integration"
search-l10n-ids="relay-integration.label" />
data-l10n-id="preferences-relay-integration-checkbox"
search-l10n-ids="preferences-relay-integration-checkbox.label" />
<html:a id="relayIntegrationLearnMoreLink" class="learnMore"
data-l10n-id="relay-integration-learn-more-link"/>
</hbox>

View File

@ -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();

View File

@ -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.

View File

@ -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);
}