diff --git a/.prettierignore b/.prettierignore index 3ae3d13fbf5..70bd31ae35c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -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/ diff --git a/components/brave_shields/resources/domain_block_interstitial.css b/components/brave_shields/resources/domain_block_interstitial.css index ae3b3bb544c..9dfc12d2225 100644 --- a/components/brave_shields/resources/domain_block_interstitial.css +++ b/components/brave_shields/resources/domain_block_interstitial.css @@ -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; } diff --git a/components/brave_shields/resources/domain_block_interstitial.js b/components/brave_shields/resources/domain_block_interstitial.js index c00e8a8e7ff..d638cb37f6f 100644 --- a/components/brave_shields/resources/domain_block_interstitial.js +++ b/components/brave_shields/resources/domain_block_interstitial.js @@ -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) diff --git a/components/brave_shields/resources/panel_new/components/main_card.tsx b/components/brave_shields/resources/panel_new/components/main_card.tsx index 3bddb2093c3..1a1e99819bd 100644 --- a/components/brave_shields/resources/panel_new/components/main_card.tsx +++ b/components/brave_shields/resources/panel_new/components/main_card.tsx @@ -53,7 +53,12 @@ export function MainCard() { >
- {favicon && {siteHost}} + {favicon && ( + {siteHost} + )}

{siteHost}