Commit cdd336de authored by Sam Foster's avatar Sam Foster
Browse files

Bug 1688261 - Stub in about:loginsimportreport. r=mossop,fluent-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D102809
parent a13023a8
......@@ -189,6 +189,7 @@ let JSWINDOWACTORS = {
AboutLoginsDismissBreachAlert: { wantUntrusted: true },
AboutLoginsImportFromBrowser: { wantUntrusted: true },
AboutLoginsImportFromFile: { wantUntrusted: true },
AboutLoginsImportReportInit: { wantUntrusted: true },
AboutLoginsInit: { wantUntrusted: true },
AboutLoginsGetHelp: { wantUntrusted: true },
AboutLoginsOpenPreferences: { wantUntrusted: true },
......@@ -202,7 +203,7 @@ let JSWINDOWACTORS = {
AboutLoginsExportPasswords: { wantUntrusted: true },
},
},
matches: ["about:logins", "about:logins?*"],
matches: ["about:logins", "about:logins?*", "about:loginsimportreport"],
},
AboutNewInstall: {
......
......@@ -63,6 +63,11 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
{"loginsimportreport",
"chrome://browser/content/aboutlogins/aboutLoginsImportReport.html",
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
{"tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},
......
......@@ -11,6 +11,7 @@ pages = [
'framecrashed',
'home',
'logins',
'loginsimportreport',
'newinstall',
'newtab',
'ion',
......
......@@ -111,6 +111,11 @@ class AboutLoginsChild extends JSWindowActorChild {
);
break;
}
case "AboutLoginsImportReportInit": {
this.sendAsyncMessage("AboutLogins:ImportReportInit");
break;
}
case "AboutLoginsCopyLoginDetail": {
ClipboardHelper.copyString(event.detail);
break;
......@@ -210,6 +215,9 @@ class AboutLoginsChild extends JSWindowActorChild {
receiveMessage(message) {
switch (message.name) {
case "AboutLogins:ImportReportData":
this.sendToContent("ImportReportData", message.data);
break;
case "AboutLogins:MasterPasswordResponse":
if (masterPasswordPromise) {
masterPasswordPromise.resolve(message.data.result);
......
......@@ -172,6 +172,14 @@ class AboutLoginsParent extends JSWindowActorParent {
}
break;
}
case "AboutLogins:ImportReportInit": {
// TODO: Bug 1649940 - Retrieve and forward login import report data
let reportData = [];
this.sendAsyncMessage("AboutLogins:ImportReportData", reportData);
break;
}
case "AboutLogins:GetHelp": {
const SUPPORT_URL =
Services.urlFormatter.formatURLPref("app.support.baseURL") +
......
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#report-body {
padding: 10px;
}
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; object-src 'none'; script-src resource: chrome:; img-src data: blob: https://firefoxusercontent.com;"/>
<title data-l10n-id="about-logins-import-report-page-title"></title>
<link rel="localization" href="branding/brand.ftl">
<link rel="localization" href="browser/branding/sync-brand.ftl">
<link rel="localization" href="browser/branding/brandings.ftl">
<link rel="localization" href="browser/aboutLogins.ftl">
<script type="module" src="chrome://browser/content/aboutlogins/aboutLoginsImportReport.js"></script>
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/aboutLogins.css">
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/aboutLoginsImportReport.css">
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/common.css">
<link rel="icon" href="chrome://browser/content/aboutlogins/icons/favicon.svg">
</head>
<body class="importreport">
<header>
<img id="branding-logo" src="chrome://branding/content/aboutlogins.svg" alt=""/>
</header>
<section id="report-body">
</section>
</body>
</html>
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Begin code that executes on page load.
document.dispatchEvent(
new CustomEvent("AboutLoginsImportReportInit", { bubbles: true })
);
window.addEventListener("AboutLoginsChromeToContent", event => {
switch (event.detail.messageType) {
case "ImportReportData":
// TODO: Bug 1649940 - Render the report summary
console.log(
"about:loginsimportreport: Got ImportReportData message: ",
event
);
break;
}
});
......@@ -35,5 +35,8 @@ browser.jar:
content/browser/aboutlogins/aboutLogins.css (content/aboutLogins.css)
content/browser/aboutlogins/aboutLogins.js (content/aboutLogins.js)
content/browser/aboutlogins/aboutLogins.html (content/aboutLogins.html)
content/browser/aboutlogins/aboutLoginsImportReport.css (content/aboutLoginsImportReport.css)
content/browser/aboutlogins/aboutLoginsImportReport.js (content/aboutLoginsImportReport.js)
content/browser/aboutlogins/aboutLoginsImportReport.html (content/aboutLoginsImportReport.html)
content/browser/aboutlogins/aboutLoginsUtils.js (content/aboutLoginsUtils.js)
content/browser/aboutlogins/common.css (content/common.css)
......@@ -312,3 +312,7 @@ about-logins-import-dialog-error-no-logins-imported = No logins have been import
about-logins-import-dialog-error-learn-more = Learn more
about-logins-import-dialog-error-try-again = Try Again…
about-logins-import-dialog-error-cancel = Cancel
## Logins import report page
about-logins-import-report-page-title = Import Summary Report
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment