[Shields UI] Format new panel UI sources (#34162)
This change removes the new panel UI folder from .pretterignore and formats those files. The old panel UI sources are still ignored.
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ components/brave_wallet/resources/solana_web3_script.js
|
||||
# Ignore components folders with a lot of formatting issues
|
||||
/components/brave_new_tab_ui/
|
||||
/components/brave_rewards/resources/shared
|
||||
/components/brave_shields/
|
||||
/components/brave_shields/resources/panel
|
||||
/components/brave_vpn/
|
||||
/components/brave_news/
|
||||
/components/web-components/
|
||||
|
||||
@@ -5,32 +5,35 @@
|
||||
|
||||
.domainblock .icon {
|
||||
background-image: -webkit-image-set(
|
||||
url(../../../../components/security_interstitials/core/browser/resources/images/1x/info.png) 1x,
|
||||
url(../../../../components/security_interstitials/core/browser/resources/images/2x/info.png) 2x);
|
||||
url(../../../../components/security_interstitials/core/browser/resources/images/1x/info.png)
|
||||
1x,
|
||||
url(../../../../components/security_interstitials/core/browser/resources/images/2x/info.png)
|
||||
2x
|
||||
);
|
||||
}
|
||||
|
||||
.domainblock #domain {
|
||||
background-color: white;
|
||||
color: #fb542b;
|
||||
background-color: white;
|
||||
color: #fb542b;
|
||||
}
|
||||
|
||||
.domainblock #dont-warn-again {
|
||||
padding-top: 1em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
.domainblock input#dont-warn-again-checkbox {
|
||||
opacity: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.domainblock label {
|
||||
font-size: 110%;
|
||||
font-size: 110%;
|
||||
}
|
||||
.domainblock button#primary-button {
|
||||
background-color: #fb524b;
|
||||
border-color: #fb524b;
|
||||
color: white;
|
||||
background-color: #fb524b;
|
||||
border-color: #fb524b;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.domainblock button {
|
||||
border-radius: 28px;
|
||||
border-radius: 28px;
|
||||
}
|
||||
|
||||
@@ -5,35 +5,41 @@
|
||||
|
||||
/* global loadTimeDataRaw */
|
||||
|
||||
import { SecurityInterstitialCommandId, sendCommand } from 'chrome://interstitials/common/resources/interstitial_common.js';
|
||||
import {
|
||||
SecurityInterstitialCommandId,
|
||||
sendCommand,
|
||||
} from 'chrome://interstitials/common/resources/interstitial_common.js'
|
||||
|
||||
function setupEvents() {
|
||||
const primaryButton = document.querySelector('#primary-button');
|
||||
primaryButton.addEventListener('click', function() {
|
||||
sendCommand(SecurityInterstitialCommandId.CMD_PROCEED);
|
||||
});
|
||||
const primaryButton = document.querySelector('#primary-button')
|
||||
primaryButton.addEventListener('click', function () {
|
||||
sendCommand(SecurityInterstitialCommandId.CMD_PROCEED)
|
||||
})
|
||||
|
||||
const backButton = document.querySelector('#back-button');
|
||||
backButton.addEventListener('click', function() {
|
||||
sendCommand(SecurityInterstitialCommandId.CMD_DONT_PROCEED);
|
||||
});
|
||||
const backButton = document.querySelector('#back-button')
|
||||
backButton.addEventListener('click', function () {
|
||||
sendCommand(SecurityInterstitialCommandId.CMD_DONT_PROCEED)
|
||||
})
|
||||
|
||||
const dontWarnAgainCheckbox =
|
||||
document.querySelector('#dont-warn-again-checkbox');
|
||||
dontWarnAgainCheckbox.addEventListener('click', function() {
|
||||
sendCommand(dontWarnAgainCheckbox.checked ?
|
||||
SecurityInterstitialCommandId.CMD_DO_REPORT :
|
||||
SecurityInterstitialCommandId.CMD_DONT_REPORT);
|
||||
});
|
||||
const dontWarnAgainCheckbox = document.querySelector(
|
||||
'#dont-warn-again-checkbox',
|
||||
)
|
||||
dontWarnAgainCheckbox.addEventListener('click', function () {
|
||||
sendCommand(
|
||||
dontWarnAgainCheckbox.checked
|
||||
? SecurityInterstitialCommandId.CMD_DO_REPORT
|
||||
: SecurityInterstitialCommandId.CMD_DONT_REPORT,
|
||||
)
|
||||
})
|
||||
|
||||
// Check if we should hide the "Don't warn again" div.
|
||||
// We hide this in private browsing, because the checkbox
|
||||
// adds a custom exception rule.
|
||||
const showCheckbox = loadTimeDataRaw.showDontWarnAgainCheckbox;
|
||||
const showCheckbox = loadTimeDataRaw.showDontWarnAgainCheckbox
|
||||
if (showCheckbox) {
|
||||
const dontWarnAgainDiv = document.querySelector('#dont-warn-again');
|
||||
dontWarnAgainDiv.classList.remove('hidden');
|
||||
const dontWarnAgainDiv = document.querySelector('#dont-warn-again')
|
||||
dontWarnAgainDiv.classList.remove('hidden')
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', setupEvents);
|
||||
document.addEventListener('DOMContentLoaded', setupEvents)
|
||||
|
||||
@@ -53,7 +53,12 @@ export function MainCard() {
|
||||
>
|
||||
<div className='site-info'>
|
||||
<div className='site-icon'>
|
||||
{favicon && <img src={favicon} alt={siteHost} />}
|
||||
{favicon && (
|
||||
<img
|
||||
src={favicon}
|
||||
alt={siteHost}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className='site-text'>
|
||||
<h3>{siteHost}</h3>
|
||||
|
||||
Reference in New Issue
Block a user