diff --git a/BUILD.gn b/BUILD.gn index 39ef014..111c4cb 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -32,11 +32,13 @@ 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/blockedResources/blockedResources.tsx", + "app/components/braveShields/blockedResources/scriptsList.tsx", + "app/components/braveShields/blockedResources/staticList.tsx", "app/constants/cosmeticFilterTypes.ts", "app/constants/resourceIdentifiers.ts", "app/constants/runtimeActionTypes.ts", @@ -48,6 +50,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", diff --git a/app/_locales/en_US/messages.json b/app/_locales/en_US/messages.json index e76bc4d..eb92525 100644 --- a/app/_locales/en_US/messages.json +++ b/app/_locales/en_US/messages.json @@ -3,121 +3,164 @@ "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": { + "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": "Cookies blocked", + "description": "Message for the select option about cookies blocked, blocking all cookies" + }, + "blockSomeScripts": { + "message": "Some scripts blocked", + "description": "Message for the select option about scripts blocked, blocking 3rd party scripts" + }, + "allowAllScripts": { + "message": "All scripts allowed", + "description": "Message for the select option about scripts blocked, allowing all scripts" + }, + "blockAllScriptsOrigins": { + "message": "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": "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" + }, + "cookiesOnThisSite": { + "message": "Cookies on this site", + "description": "Message for the cookie resources blocked panel" + }, + "deviceRecognitionAttempts": { + "message": "Device recognition attempts", + "description": "Message for the device recognition attempts blocked panel" + }, + "scriptsOnThisSite": { + "message": "Scripts on this site", + "description": "Message for the script resources blocked panel" + }, + "blockedScripts": { + "message": "Blocked scripts", + "description": "Message for the script resources blocked" + }, + "allowedScripts": { + "message": "Allowed scripts", + "description": "Message for the script resources allowed" + }, + "allowAll": { + "message": "Allow all", + "description": "Message for the resources blocked *allow all* option" + }, + "allow": { + "message": "Allow", + "description": "Message for the resources blocked *allow* option" + }, + "allowed": { + "message": "Allowed", + "description": "Message for the resources blocked *allowed* option" + }, + "blockAll": { + "message": "Block all", + "description": "Message for the resources blocked *block all* option" + }, + "block": { + "message": "Block", + "description": "Message for the resources blocked *block* option" + }, + "blocked": { + "message": "Blocked", + "description": "Message for the resources blocked *blocked* option" + }, + "apply": { "message": "Apply", - "description": "Label for applying per-origin noScript settings" + "description": "Message for the button inside dynamic list of resources blocked" + }, + "applyOnce": { + "message": "Apply once", + "description": "Message for the dropdown option inside dynamic list of resources blocked to *apply once*" + }, + "applyUntilRestart": { + "message": "Apply until restart", + "description": "Message for the dropdown option inside dynamic list of resources blocked to *apply until restart*" + }, + "alwaysApply": { + "message": "Always apply", + "description": "Message for the dropdown option inside dynamic list of resources blocked to *always apply*" + }, + "undo": { + "message": "Undo", + "description": "Message for the resources blocked *undo* option" }, - - "shieldsFooterEditDefault":{ - "message": "Edit default shield settings...", - "description": "Shields controls footer, link to edit default shields settings" + "cancel": { + "message": "Cancel", + "description": "Message for the button inside the static list of resources blocked to cancel the operation" }, - "shieldsFooterReload":{ - "message": "Reload...", - "description": "Shields controls footer, label for action reload page to apply current shields settings" + "goBack": { + "message": "Go back", + "description": "Message for the button inside the static list of resources blocked to go back from the current screen" } } diff --git a/app/actions/shieldsPanelActions.ts b/app/actions/shieldsPanelActions.ts index 6603f5a..99546fe 100644 --- a/app/actions/shieldsPanelActions.ts +++ b/app/actions/shieldsPanelActions.ts @@ -40,15 +40,17 @@ export const controlsToggled: actions.ControlsToggled = (setting = true) => { } } -export const httpsEverywhereToggled: actions.HttpsEverywhereToggled = () => { +export const httpsEverywhereToggled: actions.HttpsEverywhereToggled = (setting) => { return { - type: types.HTTPS_EVERYWHERE_TOGGLED + type: types.HTTPS_EVERYWHERE_TOGGLED, + setting } } -export const javascriptToggled: actions.JavascriptToggled = () => { +export const blockJavaScript: actions.BlockJavaScript = (setting) => { return { - type: types.JAVASCRIPT_TOGGLED + type: types.JAVASCRIPT_TOGGLED, + setting } } @@ -79,3 +81,11 @@ export const changeNoScriptSettings: actions.ChangeNoScriptSettings = (origin) = origin } } + +export const changeAllNoScriptSettings: actions.ChangeAllNoScriptSettings = (origin, shouldBlock) => { + return { + type: types.CHANGE_ALL_NO_SCRIPT_SETTINGS, + origin, + shouldBlock + } +} diff --git a/app/assets/fonts/Muli-v11/Muli_300_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..2dd8484 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..a9f24cd Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..1a4aeb7 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_300_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..f48b172 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..e7ace44 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..c3c039a Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..a4e2b32 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..7c974b8 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..2a50230 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..34dbb30 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..8af1755 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..1b93e15 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..7213c98 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..0f0c572 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..ed7d556 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 new file mode 100644 index 0000000..9a5845b Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 new file mode 100644 index 0000000..cfa2943 Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2 differ diff --git a/app/assets/fonts/Muli-v11/Muli_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 b/app/assets/fonts/Muli-v11/Muli_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 new file mode 100644 index 0000000..052c5eb Binary files /dev/null and b/app/assets/fonts/Muli-v11/Muli_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..c5343fe Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..75f2e34 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..074e36c Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..d64906c Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..551379a Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..ee94627 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..8763f6b Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..5fa0acb Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..5ccb3e4 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..e07eaeb Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..dca9001 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..19f70c6 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..1cf59b2 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..eba3c79 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..766570c Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..cfebdd9 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..eac735d Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_500_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_500_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..b57f095 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_500_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..121091e Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..4d9bd8f Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..6128779 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 new file mode 100644 index 0000000..72edec6 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 new file mode 100644 index 0000000..94574ad Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2 differ diff --git a/app/assets/fonts/Poppins-v5/Poppins_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 b/app/assets/fonts/Poppins-v5/Poppins_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 new file mode 100644 index 0000000..b418923 Binary files /dev/null and b/app/assets/fonts/Poppins-v5/Poppins_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2 differ diff --git a/app/assets/fonts/muli.css b/app/assets/fonts/muli.css new file mode 100644 index 0000000..4652c3a --- /dev/null +++ b/app/assets/fonts/muli.css @@ -0,0 +1,144 @@ +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 300; + src: url(./Muli-v11/Muli_300_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 300; + src: url(./Muli-v11/Muli_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 300; + src: url(./Muli-v11/Muli_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 400; + src: url(./Muli-v11/Muli_400_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 400; + src: url(./Muli-v11/Muli_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 400; + src: url(./Muli-v11/Muli_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 600; + src: url(./Muli-v11/Muli_600_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 600; + src: url(./Muli-v11/Muli_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-weight: 600; + src: url(./Muli-v11/Muli_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 300; + src: url(./Muli-v11/Muli_300_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 300; + src: url(./Muli-v11/Muli_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 300; + src: url(./Muli-v11/Muli_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: url(./Muli-v11/Muli_400_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: url(./Muli-v11/Muli_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: url(./Muli-v11/Muli_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 600; + src: url(./Muli-v11/Muli_600_normal_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 600; + src: url(./Muli-v11/Muli_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v11.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 600; + src: url(./Muli-v11/Muli_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v11.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} diff --git a/app/assets/fonts/poppins.css b/app/assets/fonts/poppins.css new file mode 100644 index 0000000..82c9931 --- /dev/null +++ b/app/assets/fonts/poppins.css @@ -0,0 +1,193 @@ + +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_italic_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: italic; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_italic_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 300; + src: url(./Poppins-v5/Poppins_300_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 400; + src: url(./Poppins-v5/Poppins_400_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 500; + src: url(./Poppins-v5/Poppins_500_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* devanagari */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_normal_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2'); + unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB; +} +/* latin-ext */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_normal_78f97281f840d609aa7d345caef392c5_latin-ext_v5.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Poppins'; + font-style: normal; + font-weight: 600; + src: url(./Poppins-v5/Poppins_600_normal_bfa3a4d70cc392ea9c1260963baae6ed_latin_v5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} diff --git a/app/background/reducers/shieldsPanelReducer.ts b/app/background/reducers/shieldsPanelReducer.ts index 98db536..098b63f 100644 --- a/app/background/reducers/shieldsPanelReducer.ts +++ b/app/background/reducers/shieldsPanelReducer.ts @@ -23,12 +23,13 @@ import { reloadTab } from '../api/tabsAPI' import * as shieldsPanelState from '../../state/shieldsPanelState' import { State, Tab } from '../../types/state/shieldsPannelState' import { Actions } from '../../types/actions/index' +import { getTotalResourcesBlocked } from '../../helpers/shieldsUtils' const updateShieldsIconBadgeText = (state: State) => { const tabId: number = shieldsPanelState.getActiveTabId(state) const tab: Tab = state.tabs[tabId] if (tab) { - const total = tab.adsBlocked + tab.trackersBlocked + tab.javascriptBlocked + tab.fingerprintingBlocked + tab.httpsRedirected + const total = getTotalResourcesBlocked(tab) // do not show any badge if there are no blocked items setBadgeText(tabId, total > 99 ? '99+' : total > 0 ? total.toString() : '') } @@ -161,7 +162,7 @@ export default function shieldsPanelReducer (state: State = { tabs: {}, windows: break } - setAllowHTTPUpgradableResources(tabData.origin, toggleShieldsValue(tabData.httpUpgradableResources)) + setAllowHTTPUpgradableResources(tabData.origin, toggleShieldsValue(action.setting)) .then(() => { requestShieldPanelData(shieldsPanelState.getActiveTabId(state)) reloadTab(tabData.id, true).catch(() => { @@ -320,6 +321,12 @@ export default function shieldsPanelReducer (state: State = { tabs: {}, windows: state = shieldsPanelState.changeNoScriptSettings(state, tabId, action.origin) break } + case shieldsPanelTypes.CHANGE_ALL_NO_SCRIPT_SETTINGS: + { + const tabId: number = shieldsPanelState.getActiveTabId(state) + state = shieldsPanelState.changeAllNoScriptSettings(state, tabId, action.origin, action.shouldBlock) + break + } } return state } diff --git a/app/braveShieldsPanel.tsx b/app/braveShieldsPanel.tsx index 244fab1..b2cd83b 100644 --- a/app/braveShieldsPanel.tsx +++ b/app/braveShieldsPanel.tsx @@ -4,13 +4,18 @@ import * as React from 'react' import * as ReactDOM from 'react-dom' + +import Theme from 'brave-ui/theme/brave-default' +import { ThemeProvider } from 'brave-ui/theme' + import { Provider } from 'react-redux' import { Store } from 'react-chrome-redux' import BraveShields from './containers/braveShields' -import { State } from './types/state/shieldsPannelState' +require('./assets/fonts/muli.css') +require('./assets/fonts/poppins.css') chrome.storage.local.get('state', (obj) => { - const store: Store = new Store({ + const store: any = new Store({ portName: 'BRAVE' }) @@ -19,7 +24,9 @@ chrome.storage.local.get('state', (obj) => { const mountNode: HTMLElement | null = document.querySelector('#root') ReactDOM.render( - + + + , mountNode ) diff --git a/app/components/braveShields/blockedResources/blockedResources.tsx b/app/components/braveShields/blockedResources/blockedResources.tsx new file mode 100644 index 0000000..fbbeaa9 --- /dev/null +++ b/app/components/braveShields/blockedResources/blockedResources.tsx @@ -0,0 +1,61 @@ +/* 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/. */ + +import * as React from 'react' + +// Feature-specific components +import { + Label, + ResourcesGrid, + ResourcesSiteInfoGrid, + CloseButton, + CloseIcon, + EmptyButton, + StatFlex, + ShowLessIcon, + ResourcesStatusTitle, + ResourcesSiteInfoFlex, + ResourcesStatusGrid +} from 'brave-ui/features/shields' + +// Utils +import { getFavicon } from '../../../helpers/shieldsUtils' + +interface Props { + hostname: string + stats: number | undefined + title: string + url: string + onToggle: (event: React.MouseEvent) => void + dynamic?: boolean +} + +export default class BlockedResources extends React.PureComponent { + renderHeader = (stats: number | undefined, title: string, onToggle: (event: React.MouseEvent) => void) => { + return ( + + + {stats !== undefined ? {stats} : null} + {title} + + ) + } + + render () { + const { stats, hostname, title, url, onToggle, children } = this.props + return ( + + + + + + + + + {this.renderHeader(stats, title, onToggle)} + {children} + + ) + } +} diff --git a/app/components/braveShields/blockedResources/scriptsList.tsx b/app/components/braveShields/blockedResources/scriptsList.tsx new file mode 100644 index 0000000..35a5237 --- /dev/null +++ b/app/components/braveShields/blockedResources/scriptsList.tsx @@ -0,0 +1,187 @@ +/* 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/. */ + +import * as React from 'react' + +// Feature-specific components +import { + AllowedScriptsIcon, + BlockedScriptsIcon, + DismissOverlay, + ResourcesListScroll, + ResourcesSubTitle, + ResourcesFooterGrid, + ResourcesFooterGridColumnLeft, + ResourcesFooterGridColumnRight, + ResourcesListItem, + Link, + ResourcesListAllowedLink, + ResourcesListBlockedLink, + ResourcesSubTitleGrid, + ResourcesListGrid +} from 'brave-ui/features/shields' + +// Shared components +import { Button } from 'brave-ui/components' + +// Types +import * as shieldActions from '../../../types/actions/shieldsPanelActions' +import { BlockJSOptions } from '../../../types/other/blockTypes' +import { NoScriptInfo } from '../../../types/other/noScriptInfo' + +// Utils +import { getMessage } from '../../../background/api/localeAPI' + +interface Props { + origin: string + noScriptInfo: NoScriptInfo + onClickDismiss: () => void + javascript: BlockJSOptions + blockJavaScript: shieldActions.BlockJavaScript + allowScriptOriginsOnce: shieldActions.AllowScriptOriginsOnce + changeNoScriptSettings: shieldActions.ChangeNoScriptSettings + changeAllNoScriptSettings: shieldActions.ChangeAllNoScriptSettings +} + +interface State { + showApplyOptions: boolean +} + +export default class StaticList extends React.PureComponent { + constructor (props: Props) { + super(props) + this.state = { showApplyOptions: false } + } + + get blockedListSize () { + const { noScriptInfo } = this.props + return Object.keys(noScriptInfo) + .filter((origin: string) => noScriptInfo[origin].willBlock === true).length + } + + get allowedListSize () { + const { noScriptInfo } = this.props + return Object.keys(noScriptInfo) + .filter((origin: string) => noScriptInfo[origin].willBlock === false).length + } + + onClickOutsideBounds = () => { + this.setState({ showApplyOptions: false }) + } + + onClickToggleBlockOrAllowScript = (event: React.MouseEvent) => { + event.preventDefault() + this.props.changeNoScriptSettings(event.currentTarget.id) + } + + onClickBlockAll = (event: React.MouseEvent) => { + event.preventDefault() + const { origin } = this.props + this.props.changeAllNoScriptSettings(origin, true) + } + + onClickAllowAll = (event: React.MouseEvent) => { + event.preventDefault() + const { origin } = this.props + this.props.changeAllNoScriptSettings(origin, false) + this.setState({ showApplyOptions: false }) + } + + onClickApplyScriptsOnce = () => { + const { noScriptInfo } = this.props + const allOrigins = Object.keys(noScriptInfo) + this.props.allowScriptOriginsOnce(allOrigins.filter(key => noScriptInfo[key].willBlock === false)) + } + + renderEnabledList = (list: NoScriptInfo) => { + return Object.keys(list).map((origin: string, key: number) => { + if (list[origin].willBlock === false) { + return null + } + return ( + + { + list[origin].willBlock + ? {getMessage('blocked')} + : {getMessage('allow')} + } + {origin} + { + list[origin].willBlock + ? {getMessage('undo')} + : null + } + + ) + }) + } + + renderDisabledList = (list: NoScriptInfo) => { + return Object.keys(list).map((origin: string, key: number) => { + if (list[origin].willBlock === true) { + return null + } + return ( + + { + list[origin].willBlock + ? {getMessage('allowed')} + : {getMessage('block')} + } + {origin} + { + list[origin].willBlock + ? {getMessage('undo')} + : null + } + + ) + }) + } + + render () { + const { showApplyOptions } = this.state + const { noScriptInfo, onClickDismiss } = this.props + return ( + <> + + {showApplyOptions ? : null} + {/* blocked scripts */} + + + + {getMessage('blockedScripts')} ({this.blockedListSize}) + + {getMessage('allowAll')} + + {this.renderEnabledList(noScriptInfo)} + + {/* allowed scripts */} + + + + {getMessage('allowedScripts')} ({this.allowedListSize}) + + {getMessage('blockAll')} + + {this.renderDisabledList(noScriptInfo)} + + + + + {getMessage('cancel')} + + +