Commit a7bd7598 authored by Kathleen Brade's avatar Kathleen Brade Committed by Georg Koppen
Browse files

Bug 33852: Clean up about:logins (LockWise) to avoid mentioning sync, etc.

Hide elements on about:logins that mention sync, "Firefox LockWise", and
Mozilla's LockWise mobile apps.

Disable the "Create New Login" button when security.nocertdb is true.
parent 9d44824a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ XPCOMUtils.defineLazyGetter(this, "AboutLoginsL10n", () => {

const ABOUT_LOGINS_ORIGIN = "about:logins";
const MASTER_PASSWORD_NOTIFICATION_ID = "master-password-login-required";
const NOCERTDB_PREF = "security.nocertdb";

// about:logins will always use the privileged content process,
// even if it is disabled for other consumers such as about:newtab.
@@ -273,6 +274,7 @@ class AboutLoginsParent extends JSWindowActorParent {
            importVisible:
              Services.policies.isAllowed("profileImport") &&
              AppConstants.platform != "linux",
            canCreateLogins: !Services.prefs.getBoolPref(NOCERTDB_PREF, false),
          });

          await AboutLogins._sendAllLoginRelatedObjects(
+7 −1
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@ login-item {
  grid-area: login;
}

/* Do not promote Mozilla Sync in Tor Browser. */
login-intro {
  display: none !important;
}

#branding-logo {
  flex-basis: var(--sidebar-width);
  flex-shrink: 0;
@@ -83,7 +88,8 @@ login-item {
  }
}

:root:not(.official-branding) #branding-logo {
/* Hide "Firefox LockWise" branding in Tor Browser. */
#branding-logo {
  visibility: hidden;
}

+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ const gElements = {
      ".menuitem-remove-all-logins"
    );
  },
  get createNewLoginButton() {
    return this.loginList.shadowRoot.querySelector(".create-login-button");
  },
};

let numberOfLogins = 0;
@@ -128,6 +131,9 @@ window.addEventListener("AboutLoginsChromeToContent", event => {
      gElements.loginList.setSortDirection(event.detail.value.selectedSort);
      document.documentElement.classList.add("initialized");
      gElements.loginList.classList.add("initialized");
      if (!event.detail.value.canCreateLogins) {
        gElements.createNewLoginButton.disabled = true;
      }
      break;
    }
    case "ShowLoginItemError": {
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@
  align-items: center;
}

/* Do not promote Mozilla Sync in Tor Browser. */
.logged-out-view {
  display: none !important;
}

.fxaccounts-extra-text {
  /* Only show at most 3 lines of text to limit the
     text from overflowing the header. */
+10 −0
Original line number Diff line number Diff line
@@ -92,3 +92,13 @@
.menuitem-preferences {
  background-image: url("chrome://global/skin/icons/settings.svg");
}

/*
 * Do not promote LockWise mobile apps in Tor Browser: hide the menu items
 * and the separator line that precedes them.
 */
.menuitem-mobile-android,
.menuitem-mobile-ios,
button[data-event-name="AboutLoginsGetHelp"] + hr {
  display: none !important;
}