mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1693133 - Update refresh Firefox dialog for Proton r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D109452
This commit is contained in:
parent
6c00541d5c
commit
a51c508d35
@ -61,7 +61,7 @@
|
||||
<p class="message" id="message"></p>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="confirm-button danger-button"></button>
|
||||
<button class="confirm-button primary danger-button"></button>
|
||||
<button class="cancel-button" data-l10n-id="confirmation-dialog-cancel-button"></button>
|
||||
</div>
|
||||
</div>
|
||||
@ -152,7 +152,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="confirm-button danger-button"></button>
|
||||
<button class="confirm-button primary danger-button"></button>
|
||||
<button class="cancel-button" data-l10n-id="confirmation-dialog-cancel-button"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,14 +2,10 @@
|
||||
* 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/. */
|
||||
|
||||
#migratedItems {
|
||||
margin-inline-start: 1.5em;
|
||||
}
|
||||
|
||||
#resetProfileFooter {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#resetProfileProgressDialog {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#learnMoreDescription {
|
||||
margin-block: 16px 0;
|
||||
}
|
||||
|
@ -5,6 +5,21 @@
|
||||
"use strict";
|
||||
|
||||
document.addEventListener("dialogaccept", onResetProfileAccepted);
|
||||
document
|
||||
.getElementById("refreshProfileLearnMore")
|
||||
.addEventListener("click", e => {
|
||||
e.preventDefault();
|
||||
let retVals = window.arguments[0];
|
||||
retVals.learnMore = true;
|
||||
window.close();
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document
|
||||
.getElementById("resetProfileDialog")
|
||||
.getButton("accept")
|
||||
.classList.add("danger-button");
|
||||
});
|
||||
|
||||
function onResetProfileAccepted() {
|
||||
let retVals = window.arguments[0];
|
||||
|
@ -5,14 +5,18 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css"?>
|
||||
<?xml-stylesheet href="chrome://global/content/commonDialog.css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/commonDialog.css"?>
|
||||
<?xml-stylesheet href="chrome://global/content/resetProfile.css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
<window id="resetProfileDialogWindow"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
data-l10n-id="refresh-profile-dialog">
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
aria-describedby="infoBody">
|
||||
<dialog id="resetProfileDialog"
|
||||
buttons="accept,cancel"
|
||||
defaultButton="cancel"
|
||||
defaultButton="accept"
|
||||
buttonidaccept="refresh-profile-dialog-button">
|
||||
<!-- The empty onload event handler is a hack to get the accept button text applied by Fluent. -->
|
||||
|
||||
@ -21,14 +25,22 @@
|
||||
<html:link rel="localization" href="toolkit/global/resetProfile.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<!-- The <div> was added in bug 1606617 to workaround bug 1614447 -->
|
||||
<div xmlns="http://www.w3.org/1999/xhtml">
|
||||
<div id="dialogGrid">
|
||||
<div class="dialogRow" id="infoRow">
|
||||
<div id="iconContainer">
|
||||
<xul:image id="infoIcon"/>
|
||||
</div>
|
||||
<div id="infoContainer">
|
||||
<xul:description id="infoTitle" data-l10n-id="refresh-profile-dialog-title"/>
|
||||
<xul:description id="infoBody" context="contentAreaContextMenu" noinitialfocus="true" data-l10n-id="refresh-profile-dialog-description"/>
|
||||
<xul:description id="learnMoreDescription"><a id="refreshProfileLearnMore" data-l10n-id="refresh-profile-learn-more" href=""></a></xul:description>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="chrome://global/content/resetProfile.js"/>
|
||||
|
||||
<description data-l10n-id="refresh-profile-description"/>
|
||||
<label data-l10n-id="refresh-profile-description-details"/>
|
||||
|
||||
<vbox id="migratedItems">
|
||||
<label class="migratedLabel" data-l10n-id="refresh-profile-remove"/>
|
||||
<label class="migratedLabel" data-l10n-id="refresh-profile-restore"/>
|
||||
</vbox>
|
||||
</dialog>
|
||||
</window>
|
||||
|
@ -2,13 +2,10 @@
|
||||
# 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/.
|
||||
|
||||
refresh-profile-dialog =
|
||||
.title = Refresh { -brand-short-name }
|
||||
refresh-profile-dialog-title = Refresh { -brand-short-name } to its default settings?
|
||||
refresh-profile-dialog-button =
|
||||
.label = Refresh { -brand-short-name }
|
||||
refresh-profile-description = Start fresh to fix problems and restore performance.
|
||||
refresh-profile-description-details = This will:
|
||||
refresh-profile-remove = Remove your add-ons and customizations
|
||||
refresh-profile-restore = Restore your browser settings to their defaults
|
||||
refresh-profile-dialog-description = Start fresh to fix performance issues. This will remove your extensions and customizations. You won’t lose essential information like bookmarks and passwords.
|
||||
refresh-profile = Give { -brand-short-name } a tune up
|
||||
refresh-profile-button = Refresh { -brand-short-name }…
|
||||
refresh-profile-learn-more = Learn more
|
||||
|
@ -49,17 +49,44 @@ var ResetProfile = {
|
||||
/**
|
||||
* Ask the user if they wish to restart the application to reset the profile.
|
||||
*/
|
||||
openConfirmationDialog(window) {
|
||||
// Prompt the user to confirm.
|
||||
async openConfirmationDialog(window) {
|
||||
let win = window;
|
||||
// If we are, for instance, on an about page, get the chrome window to
|
||||
// access its gDialogBox.
|
||||
if (win.docShell.chromeEventHandler) {
|
||||
win = win.browsingContext?.topChromeWindow;
|
||||
}
|
||||
|
||||
let params = {
|
||||
learnMore: false,
|
||||
reset: false,
|
||||
};
|
||||
window.browsingContext.topChromeWindow.openDialog(
|
||||
|
||||
if (win.gDialogBox) {
|
||||
await win.gDialogBox.open(
|
||||
"chrome://global/content/resetProfile.xhtml",
|
||||
params
|
||||
);
|
||||
} else {
|
||||
win.openDialog(
|
||||
"chrome://global/content/resetProfile.xhtml",
|
||||
null,
|
||||
"modal,centerscreen,titlebar",
|
||||
params
|
||||
);
|
||||
}
|
||||
|
||||
if (params.learnMore) {
|
||||
win.openTrustedLinkIn(
|
||||
"https://support.mozilla.org/kb/refresh-firefox-reset-add-ons-and-settings",
|
||||
"tab",
|
||||
{
|
||||
fromChrome: true,
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!params.reset) {
|
||||
return;
|
||||
}
|
||||
|
@ -34,6 +34,9 @@
|
||||
--in-content-primary-button-background: #0061e0;
|
||||
--in-content-primary-button-background-hover: #0250bb;
|
||||
--in-content-primary-button-background-active: #053e94;
|
||||
--in-content-danger-button-background: #e22850;
|
||||
--in-content-danger-button-background-hover: #c50042;
|
||||
--in-content-danger-button-background-active: #810220;
|
||||
--in-content-focus-outline-color: var(--in-content-primary-button-background);
|
||||
|
||||
/* Note: 1px smaller than we want because we have a 1px transparent border. */
|
||||
@ -138,6 +141,10 @@
|
||||
--in-content-button-background-hover: rgba(249,249,250,0.15);
|
||||
--in-content-button-background-active: rgba(249,249,250,0.2);
|
||||
|
||||
--in-content-danger-button-background: #ff848b;
|
||||
--in-content-danger-button-background-hover: #ffbdc5;
|
||||
--in-content-danger-button-background-active: #ffdfe7;
|
||||
|
||||
--in-content-table-background: #202023;
|
||||
--in-content-table-border-dark-color: rgba(249,249,250,0.2);
|
||||
--in-content-table-header-background: #002b57;
|
||||
@ -388,17 +395,11 @@ xul|button.primary:not([disabled="true"]):hover:active {
|
||||
background-color: var(--in-content-primary-button-background-active);
|
||||
}
|
||||
|
||||
html|button.danger-button {
|
||||
background-color: var(--red-60);
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
html|button.danger-button:enabled:hover {
|
||||
background-color: var(--red-70);
|
||||
}
|
||||
|
||||
html|button.danger-button:enabled:hover:active {
|
||||
background-color: var(--red-80);
|
||||
.danger-button {
|
||||
--in-content-primary-button-background: var(--in-content-danger-button-background);
|
||||
--in-content-primary-button-background-hover: var(--in-content-danger-button-background-hover);
|
||||
--in-content-primary-button-background-active: var(--in-content-danger-button-background-active);
|
||||
--in-content-focus-outline-color: var(--in-content-danger-button-background);
|
||||
}
|
||||
|
||||
html|button.ghost-button {
|
||||
|
Loading…
Reference in New Issue
Block a user