Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1975 Theme Framework & GH-1972 Palm Theme #517

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Add antiTracking, adBlocking and smartBlocking tracker counts to Cliq…
…z feature buttons
  • Loading branch information
benstrumeyer committed Mar 26, 2020
commit 260c6275be31b43ea5ef5b32bef43273d9e7e073
@@ -51,10 +51,10 @@ class CliqzFeature extends React.Component {
}

_getStatus(active) {
const { current_theme } = this.props;
const { current_theme, trackerCount } = this.props;
switch (current_theme) {
case 'palm-theme':
return active ? t('on') : (<div className="rectangle" />);
return active ? (<span>{trackerCount}</span>) : (<div className="rectangle" />);
default:
return active ? t('on') : t('off');
}
@@ -124,7 +124,6 @@ class CliqzFeature extends React.Component {
isTooltipHeader,
tooltipPosition,
type,
current_theme,
} = this.props;

const cliqzFeatureClassNames = ClassNames('CliqzFeature', {
@@ -624,6 +624,7 @@ class Summary extends React.Component {
enable_anti_tracking,
is_expert,
current_theme,
antiTracking,
} = this.props;
const isCondensed = this._isCondensed();

@@ -640,6 +641,7 @@ class Summary extends React.Component {
isTooltipBody={!isCondensed}
tooltipPosition={isCondensed ? 'right' : is_expert ? 'top top-right' : 'top'}
current_theme={current_theme}
trackerCount={antiTracking.trackerCount}
/>
</div>
);
@@ -650,6 +652,7 @@ class Summary extends React.Component {
enable_ad_block,
is_expert,
current_theme,
adBlock,
} = this.props;
const isCondensed = this._isCondensed();

@@ -666,6 +669,7 @@ class Summary extends React.Component {
isTooltipBody={!isCondensed}
tooltipPosition={isCondensed ? 'right' : 'top'}
current_theme={current_theme}
trackerCount={adBlock.trackerCount}
/>
</div>
);
@@ -676,6 +680,7 @@ class Summary extends React.Component {
enable_smart_block,
is_expert,
current_theme,
smartBlock
} = this.props;
const isCondensed = this._isCondensed();

@@ -692,6 +697,7 @@ class Summary extends React.Component {
isTooltipBody={!isCondensed}
tooltipPosition={isCondensed ? 'right' : is_expert ? 'top top-left' : 'top'}
current_theme={current_theme}
trackerCount={Object.keys(smartBlock.blocked).length}
/>
</div>
);
ProTip! Use n and p to navigate between commits in a pull request.