Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Shields v2 GA version #70

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ action("brave-extension") {
"app/background/store.ts",
"app/braveShieldsPanel.tsx",
"app/components/braveShields/braveShields.tsx",
"app/components/braveShields/braveShieldsControls.tsx",
"app/components/braveShields/braveShieldsFooter.tsx",
"app/components/braveShields/braveShieldsHeader.tsx",
"app/components/braveShields/braveShieldsStats.tsx",
"app/components/noScript/noScript.tsx",
"app/components/braveShields/footer.tsx",
"app/components/braveShields/header.tsx",
"app/components/braveShields/interfaceControls.tsx",
"app/components/braveShields/privacyControls.tsx",
"app/components/braveShields/securityControls.tsx",
"app/constants/cosmeticFilterTypes.ts",
"app/constants/resourceIdentifiers.ts",
"app/constants/runtimeActionTypes.ts",
Expand All @@ -48,6 +48,7 @@ action("brave-extension") {
"app/content.ts",
"app/helpers/arrayUtils.ts",
"app/helpers/urlUtils.ts",
"app/helpers/shieldsUtils.ts",
"app/state/shieldsPanelState.ts",
"app/types/actions/cosmeticFilterActions.ts",
"app/types/actions/index.ts",
Expand Down
195 changes: 83 additions & 112 deletions app/_locales/en_US/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,121 +3,92 @@
"message": "The Brave Extension",
"description": "The name of the the extension."
},

"shieldsStatsAdsTrackersBlocked": {
"message": "Ads and Trackers Blocked",
"description": "Website ads and trackering elements such as pixels, images, scripts, etc."
"shields": {
"message": "Shields",
"description": "The Shields feature name"
},
"shieldsStatsHttpsUpgrades": {
"message": "HTTPS Upgrades",
"description": "Label for shields stats, HTTPS upgrades count"
"up": {
"message": "up",
"description": "Message for when shields is enabled"
},
"shieldsStatsScriptsBlocked": {
"message": "Scripts Blocked",
"description": "Label for shields stats, Scripts Blocked count"
"down": {
"message": "down",
"description": "Message for when shields is disabled"
},
"shieldsFingerPrintingBlocked": {
"message": "Fingerprinting Methods Blocked",
"description": "Label for shields stats, Fingerprinting Methods Blocked count"
"totalBlocked": {
"message": "Total blocked",
"description": "Message showing the amount of all blocked resources"
},

"shieldsHeaderShieldsToggle": {
"message": "Shields",
"description": "Label for top shields switch in shields header"
},
"shieldsHeaderToggleLeftPosition": {
"message": "Down",
"description": "Label for top shields switch in shields header turned off position"
},
"shieldsHeaderToggleRightPosition": {
"message": "Up",
"description": "Label for top shields switch in shields header turned on position"
},
"shieldsHeaderForSite": {
"message": "Site shield settings for",
"description": "Label for shields header near current site name"
},

"shieldsControlsAdvancedControls": {
"message": "Advanced Controls",
"description": "Label for advanced controls group"
},

"shieldsControlsAdControl": {
"message": "Ad Control",
"description": "Label for Advertisement Control dropdown box options "
},
"shieldsControlsAdControlOptionBlockAds": {
"message": "Block Ads",
"description": "Ad Control dropdown box, option block ads"
},
"shieldsControlsAdControlOptionAllowAdsTracking": {
"message": "Allow Ads and Tracking",
"description": "Ad Control dropdown box, option allow ads and tracking"
},

"shieldsControlsCookieControl": {
"message": "Cookie Control",
"description": "Label Cookie Control dropdown options"
},
"shieldsControlsCookieOptionBlock3p": {
"message": "Block 3rd Party Cookies",
"description": "Cookie control dropdown option Block 3rd Party Cookies"
},
"shieldsControlsCookieOptionAllowAll": {
"message": "Allow All Cookies",
"description": "Cookie control dropdown option Allow All Cookies"
},
"shieldsControlsCookieOptionBlockAll": {
"message": "Block All Cookies",
"description": "Cookie control dropdown option Block All Cookies"
},

"shieldsControlsFingerprintingProtection": {
"message": "Fingerprinting Protection",
"description": "Label Fingerprinting Protection dropdown options"
},
"shieldsControlsFingerprintingOptionBlock3p": {
"message": "Block 3rd Party Fingerprinting",
"description": "Fingerprinting control dropdown option Block 3rd Party Fingerprinting"
},
"shieldsControlsFingerprintingOptionAllowAll": {
"message": "Allow All Fingerprinting",
"description": "Fingerprinting control dropdown option Allow All Fingerprinting"
},
"shieldsControlsFingerprintingOptionBlockAll": {
"message": "Block All Fingerprinting",
"description": "Fingerprinting control dropdown option Block All Fingerprinting"
},

"shieldsControlsHttpsEverywhereSwitch": {
"message": "HTTPS Everywhere",
"description": "Shields controls, switch for HTTPS Everywhere"
},
"shieldsControlsBlockScriptsSwitch": {
"message": "Block Scripts",
"description": "Shields controls, switch for Block Scripts"
},
"shieldsControlsBlockPhishingMalwareSwitch": {
"message": "Block Phishing/Malware",
"description": "Shields controls, switch for Block Phishing/Malware"
},

"noScriptSwitches": {
"message": "Toggle switches to disable script blocking",
"description": "Instructions for per-origin noScript switches"
},
"noScriptApplyOnce": {
"message": "Apply",
"description": "Label for applying per-origin noScript settings"
},

"shieldsFooterEditDefault":{
"message": "Edit default shield settings...",
"description": "Shields controls footer, link to edit default shields settings"
},
"shieldsFooterReload":{
"message": "Reload...",
"description": "Shields controls footer, label for action reload page to apply current shields settings"
"forThisSite": {
"message": "for this site",
"description": "Partial string for the phrase `shields is up *for this site*`"
},
"enabledMessage": {
"message": "If a site appears broken, try shields down",
"description": "Message telling the user to disable shields if a site appears broken"
},
"disabledMessage": {
"message": "You’re browsing this site without any privacy and security protections.",
"description": "Message telling the user that shields are disabled"
},
"blockAds": {
"message": "Ads and trackers blocked",
"description": "Message indicating the number of ads and trackers blocked"
},
"blockPopups": {
"message": "Pop-ups blocked",
"description": "Message indicating the number of pop-ups blocked"
},
"blockImages": {
"message": "Images blocked",
"description": "Message indicating the number of images blocked"
},
"block3partyCookies": {
"message": "3rd-party cookies blocked",
"description": "Message for the select option about cookies blocked, blocking 3rd party cookies"
},
"allowAllCookies": {
"message": "All cookies allowed",
"description": "Message for the select option about cookies blocked, allowing all cookies"
},
"blockAllCookies": {
"message": "All cookies blocked",
"description": "Message for the select option about cookies blocked, blocking all cookies"
},
"block3partyScripts": {
"message": "3rd-party scripts blocked",
"description": "Message for the select option about scripts blocked, blocking 3rd party scripts"
},
"allowAllScripts": {
"message": "Allow all scripts",
"description": "Message for the select option about scripts blocked, allowing all scripts"
},
"blockAllScripts": {
"message": "All scripts blocked",
"description": "Message for the select option about scripts blocked, blocking all scripts"
},
"block3partyFingerprinting": {
"message": "3rd-party device recognition blocked",
"description": "Message for the select option about fingerprinting blocked, blocking 3rd party fingerprinting"
},
"allowAllFingerprinting": {
"message": "All device recognition allowed",
"description": "Message for the select option about fingerprinting blocked, allowing all fingerprinting"
},
"blockAllFingerprinting": {
"message": "All device recognition blocked",
"description": "Message for the select option about fingerprinting blocked, blocking all fingerprinting"
},
"blockPishing": {
"message": "Phishing/malware attempts blocked",
"description": "Message indicating the number of phishing/malware blocked"
},
"connectionsEncrypted": {
"message": "Connections encrypted",
"description": "Message indicating the number of connections encrypted"
},
"editDefaults": {
"message": "Global shield defaults",
"description": "Message linking shields to the global shield settings"
}
}
16 changes: 2 additions & 14 deletions app/actions/shieldsPanelActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,13 @@ export const blockAdsTrackers: actions.BlockAdsTrackers = (setting) => {
}
}

export const controlsToggled: actions.ControlsToggled = (setting = true) => {
export const blockJavaScript: actions.BlockJavaScript = (setting) => {
return {
type: types.CONTROLS_TOGGLED,
type: types.JAVASCRIPT_BLOCKED,
setting
}
}

export const httpsEverywhereToggled: actions.HttpsEverywhereToggled = () => {
return {
type: types.HTTPS_EVERYWHERE_TOGGLED
}
}

export const javascriptToggled: actions.JavascriptToggled = () => {
return {
type: types.JAVASCRIPT_TOGGLED
}
}

export const blockFingerprinting: actions.BlockFingerprinting = (setting) => {
return {
type: types.BLOCK_FINGERPRINTING,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading