@@ -779,6 +785,7 @@ class Summary extends React.Component {
enable_offers,
is_expert,
is_expanded,
+ current_theme
} = this.props;
const { disableBlocking } = this.state;
const isCondensed = this._isCondensed();
@@ -787,39 +794,46 @@ class Summary extends React.Component {
'Summary--expert': is_expert && !is_expanded,
'Summary--condensed': isCondensed,
});
+ const foregroundClassNames = ClassNames('Summary__foreground', {
+ active: current_theme === 'palm-theme'
+ || current_theme === 'leaf-theme',
+ });
return (
- {!isCondensed && disableBlocking && (
)}
- {!isCondensed && !disableBlocking && this._renderDonut()}
- {!isCondensed && !disableBlocking && this._renderPageHostReadout()}
-
- {isCondensed && !disableBlocking && this._renderTotalTrackersFound()}
+
+
+ {!isCondensed && disableBlocking && (
)}
+ {!isCondensed && !disableBlocking && this._renderDonut()}
+ {!isCondensed && !disableBlocking && this._renderPageHostReadout()}
+
+ {isCondensed && !disableBlocking && this._renderTotalTrackersFound()}
+
+
+ {!disableBlocking && this._renderTotalTrackersBlocked()}
+ {!disableBlocking && this._renderTotalRequestsModified()}
+ {!disableBlocking && this._renderPageLoadTime()}
+
-
- {!disableBlocking && this._renderTotalTrackersBlocked()}
- {!disableBlocking && this._renderTotalRequestsModified()}
- {!disableBlocking && this._renderPageLoadTime()}
-
+ {isCondensed && disableBlocking && (
+
+ )}
- {isCondensed && disableBlocking && (
-
- )}
+
+ {this._renderGhosteryFeature('trust')}
+ {this._renderGhosteryFeature('restrict', 'Summary__ghosteryFeatureContainer--middle')}
+ {this._renderPauseButton()}
+
+
+ {this._renderCliqzAntiTracking()}
+ {this._renderCliqzAdBlock()}
+ {this._renderCliqzSmartBlock()}
+
+ {this._renderStatsNavicon()}
+ {enable_offers && this._renderRewardsNavicon()}
-
- {this._renderGhosteryFeature('trust')}
- {this._renderGhosteryFeature('restrict', 'Summary__ghosteryFeatureContainer--middle')}
- {this._renderPauseButton()}
+ {!isCondensed && this._renderPlusUpgradeBannerOrSubscriberIcon()}
-
- {this._renderCliqzAntiTracking()}
- {this._renderCliqzAdBlock()}
- {this._renderCliqzSmartBlock()}
-
- {this._renderStatsNavicon()}
- {enable_offers && this._renderRewardsNavicon()}
-
- {!isCondensed && this._renderPlusUpgradeBannerOrSubscriberIcon()}
);
}
diff --git a/app/panel/containers/SummaryContainer.js b/app/panel/containers/SummaryContainer.js
index 826400617..fac24f3ba 100644
--- a/app/panel/containers/SummaryContainer.js
+++ b/app/panel/containers/SummaryContainer.js
@@ -29,7 +29,8 @@ const mapStateToProps = state => Object.assign({}, state.summary, state.panel, {
is_expanded: state.panel.is_expanded,
is_expert: state.panel.is_expert,
tab_id: state.panel.tab_id,
- user: state.account.user
+ user: state.account.user,
+ current_theme: state.panel.current_theme,
});
/**
* Bind Summary view component action creators using Redux's bindActionCreators
diff --git a/app/panel/contexts/ThemeContext.js b/app/panel/contexts/ThemeContext.js
new file mode 100644
index 000000000..f47652914
--- /dev/null
+++ b/app/panel/contexts/ThemeContext.js
@@ -0,0 +1,16 @@
+/**
+ * Theme Context
+ *
+ * Ghostery Browser Extension
+ * https://www.ghostery.com/
+ *
+ * Copyright 2019 Ghostery, Inc. All rights reserved.
+ *
+ * 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 React from 'react';
+
+export const ThemeContext = React.createContext(null);
diff --git a/app/panel/utils/utils.js b/app/panel/utils/utils.js
index a92dde970..2e4a07148 100644
--- a/app/panel/utils/utils.js
+++ b/app/panel/utils/utils.js
@@ -213,17 +213,16 @@ export function doXHR(method, url, query) {
* @param {string} theme css of the theme
*/
export function setTheme(doc, name, account) {
- // if themeName is 'default' all we have to do is to remove style element
const styleTitlePrefix = 'Ghostery Theme';
- // First remove all other style elements which may be there
const styleList = doc.head.getElementsByTagName('style');
- // Other kinds of loops are not supported equally across browsers
- for (let i = 0; i < styleList.length; i++) {
- const style = styleList[i];
+ let themeStyle = null;
+ // Get style tag for the active theme
+ // forEach loops are supported equally across browsers
+ Array.from(styleList).forEach((style) => {
if (style.title.startsWith(styleTitlePrefix)) {
- doc.head.removeChild(style);
+ themeStyle = style;
}
- }
+ });
if (name !== 'default') {
if (!account) { return; }
@@ -232,12 +231,20 @@ export function setTheme(doc, name, account) {
const { css } = themeData[name];
// Create element for the theme being set, if it is not there
- const themeStyle = doc.createElement('style');
- themeStyle.id = name;
- themeStyle.title = `${styleTitlePrefix} ${name}`;
-
- // Set content of style element to the theme text.
+ if (!themeStyle) {
+ themeStyle = doc.createElement('style');
+ themeStyle.id = name;
+ themeStyle.title = `${styleTitlePrefix}`;
+ themeStyle.textContent = css;
+ doc.head.appendChild(themeStyle);
+ }
themeStyle.textContent = css;
- document.head.appendChild(themeStyle);
+ } else {
+ // if themeName is 'default' all we have to do is to remove style element
+ Array.from(styleList).forEach((style) => {
+ if (style.title.startsWith(styleTitlePrefix)) {
+ doc.head.removeChild(style);
+ }
+ });
}
}
diff --git a/app/scss/partials/_blocking_category.scss b/app/scss/partials/_blocking_category.scss
index 75fdf1930..518a8b212 100644
--- a/app/scss/partials/_blocking_category.scss
+++ b/app/scss/partials/_blocking_category.scss
@@ -62,20 +62,21 @@
border-top: 0;
padding-top: 0;
}
-
.caret-down {
@extend %pointer;
display: inline-block;
- width: 40px;
- height: 20px;
- background: url("../../app/images/panel/caret-down.svg") no-repeat center;
+ margin: 0 15px 4px 0;
+ path {
+ fill: $tundora;
+ }
}
.caret-up {
@extend %pointer;
display: inline-block;
- width: 40px;
- height: 20px;
- background: url("../../app/images/panel/caret-up.svg") no-repeat center;
+ margin: 0 15px 4px 0;
+ path {
+ fill: $tundora;
+ }
}
.checkbox-container {
display: inline-block;
diff --git a/app/scss/partials/_blocking_tracker.scss b/app/scss/partials/_blocking_tracker.scss
index a238516aa..9f4e9c58e 100644
--- a/app/scss/partials/_blocking_tracker.scss
+++ b/app/scss/partials/_blocking_tracker.scss
@@ -45,9 +45,20 @@
// vertical alignment with text label
position: relative;
top: -2px;
-
display: inline-block;
padding-right: 6px;
+ &.ads-icon.default > g {
+ .inner-background {
+ fill: #FFF;
+ }
+ path:nth-child(2) {
+ stroke: #1DAFED;
+ }
+ }
+ &.cookies-and-fingerprints-icon.default > path {
+ stroke: #1DAFED;
+ fill: #FFF;
+ }
}
.trk-cliqz-stat {
color: #1dafed;
@@ -143,6 +154,7 @@
align-items: center;
justify-content: space-between;
+
&:not(.whitelisted) {
.cliqz-tracker-trust {
visibility: hidden;
@@ -152,8 +164,29 @@
.trust-circle { stroke: #9B9B9B; }
}
+ .cliqz-tracker-trust > g > path:nth-child(1) {
+ stroke: #00AEF0;
+ }
+ .cliqz-tracker-trust > g > path:nth-child(2) {
+ fill: #00AEF0;
+ }
+ .cliqz-tracker-scrub > g > .border {
+ fill: #FFF;
+ stroke: #00AEF0;
+ }
+ .cliqz-tracker-scrub > g > .background {
+ fill: #00AEF0;
+ stroke: #FFF;
+ }
+
.cliqz-tracker-scrub {
pointer-events: none;
+ .background.protected {
+ fill: #00AEF0;
+ }
+ .background.restricted {
+ fill: #00AEF0;
+ }
}
}
diff --git a/app/scss/partials/_stats_graph.scss b/app/scss/partials/_stats_graph.scss
index a6d087809..5a19435e2 100644
--- a/app/scss/partials/_stats_graph.scss
+++ b/app/scss/partials/_stats_graph.scss
@@ -119,4 +119,13 @@ so that you can support switching between midnight theme and regular theme */
background-image: buildRightCaret(#00AEF0);
background-repeat: no-repeat;
}
+ .point-group {
+ .default, .midnight-theme {
+ fill: #124559;
+ }
+ }
+ .line.default,
+ .line.midnight-theme {
+ fill: #124559;
+ }
}
diff --git a/app/shared-components/Modal/Modal.scss b/app/shared-components/Modal/Modal.scss
index 518bcb9fe..eeb0e48b9 100644
--- a/app/shared-components/Modal/Modal.scss
+++ b/app/shared-components/Modal/Modal.scss
@@ -19,8 +19,9 @@
right: 0;
bottom: 0;
left: 0;
+ z-index: 2147483647;
}
.Modal__background {
background-color: rgba(#000000, 0.25);
- z-index: 9;
}
+
diff --git a/manifest.json b/manifest.json
index c3e8075bd..7cad3c9d9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -7,7 +7,6 @@
"version_name": "8.5.0",
"default_locale": "en",
"description": "__MSG_short_description__",
- "debug": true,
"log": true,
"icons": {
"16": "app/images/icon16.png",