Skip to content
Snippets Groups Projects
Verified Commit 74bf97f4 authored by Kathleen Brade's avatar Kathleen Brade Committed by Pier Angelo Vendrame
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 789fd64d
Branches
Tags
No related merge requests found
......@@ -48,6 +48,7 @@ ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => {
const ABOUT_LOGINS_ORIGIN = "about:logins";
const AUTH_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
const PRIMARY_PASSWORD_NOTIFICATION_ID = "primary-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.
......@@ -327,6 +328,7 @@ export class AboutLoginsParent extends JSWindowActorParent {
Services.policies.isAllowed("profileImport") &&
AppConstants.platform != "linux",
preselectedLogin: this.preselectedLogin,
canCreateLogins: !Services.prefs.getBoolPref(NOCERTDB_PREF, false),
});
await AboutLogins.sendAllLoginRelatedObjects(
......
......@@ -62,6 +62,11 @@ login-item[data-editing="true"] + login-intro,
display: none;
}
/* Do not promote Mozilla Sync. */
login-intro {
display: none !important;
}
.heading-wrapper {
display: flex;
justify-content: center;
......
......@@ -24,6 +24,9 @@ const gElements = {
".menuitem-remove-all-logins"
);
},
get createNewLoginButton() {
return this.loginList.shadowRoot.querySelector(".create-login-button");
},
};
let numberOfLogins = 0;
......@@ -129,6 +132,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": {
......
......@@ -8,6 +8,11 @@
align-items: center;
}
/* Do not promote Mozilla Sync. */
.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. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment