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

Commit

Permalink
Merge pull request #6969 from cezaraugusto/feature/ledger/6966
Browse files Browse the repository at this point in the history
Polish on Payments Panel
  • Loading branch information
bsclifton authored Feb 1, 2017
2 parents 296c6d6 + 7d3ba08 commit a084fb0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ off=off
on=on
ok=Ok
minimumPercentage=Hide sites with less than 1% usage
autoSuggestSites=auto-include sites
autoSuggestSites=auto-include
notifications=Show notifications
moneyAdd=Use your debit/credit card
moneyAddSubTitle=No Bitcoin needed!
Expand Down
6 changes: 4 additions & 2 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class SettingCheckbox extends ImmutableComponent {
}
return <div {...props}>
<SwitchControl id={this.props.prefKey}
small={this.props.small}
disabled={this.props.disabled}
onClick={this.onClick}
checkedOn={this.props.checked !== undefined ? this.props.checked : getSetting(this.props.prefKey, this.props.settings)} />
Expand Down Expand Up @@ -170,6 +171,7 @@ class SiteSettingCheckbox extends ImmutableComponent {
render () {
return <div style={this.props.style} className='settingItem siteSettingItem'>
<SwitchControl
small={this.props.small}
disabled={this.props.disabled}
onClick={this.onClick}
checkedOn={this.props.checked} />
Expand Down Expand Up @@ -256,7 +258,7 @@ class LedgerTable extends ImmutableComponent {
value: site
},
{
html: <SiteSettingCheckbox hostPattern={this.getHostPattern(synopsis)} defaultValue={defaultSiteSetting} prefKey='ledgerPayments' siteSettings={this.props.siteSettings} checked={this.enabledForSite(synopsis)} />,
html: <SiteSettingCheckbox small hostPattern={this.getHostPattern(synopsis)} defaultValue={defaultSiteSetting} prefKey='ledgerPayments' siteSettings={this.props.siteSettings} checked={this.enabledForSite(synopsis)} />,
value: this.enabledForSite(synopsis) ? 1 : 0
},
views,
Expand All @@ -274,7 +276,7 @@ class LedgerTable extends ImmutableComponent {
}
return <div className='ledgerTable'>
<div className='hideExcludedSites'>
<SettingCheckbox
<SettingCheckbox small
dataL10nId='hideExcluded'
prefKey={settings.HIDE_EXCLUDED_SITES}
settings={this.props.settings}
Expand Down
1 change: 1 addition & 0 deletions js/components/switchControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class SwitchControl extends ImmutableComponent {
[this.props.className]: !!this.props.className,
disabled: this.props.disabled,
large: this.props.large,
small: this.props.small,
hasTopText: this.props.topl10nId
})}>
{
Expand Down
14 changes: 13 additions & 1 deletion less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,6 @@ table.sortableTable {

label {
font-weight: bold;
color: @braveOrange;
}
}

Expand Down Expand Up @@ -1464,6 +1463,19 @@ table.sortableTable {
}
}

&.small {
.switchBackground {
height: @smallSwitchHeight;
width: @smallSwitchWidth;
.switchIndicator {
height: @smallSwitchNubDiameter;
width: @smallSwitchNubDiameter;
top: 1px;
right: calc(@smallSwitchWidth - @smallSwitchNubDiameter - @switchNubRightMargin);
}
}
}

> label {
vertical-align: middle;
}
Expand Down
3 changes: 3 additions & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
@switchBG_dis: #e8e8e8;
@switchBGTransition: background-color 100ms;
@switchHeight: 16px;
@smallSwitchHeight: 12px;
@smallSwitchWidth: 30px;
@switchWidth: 45px;
@switchRadius: 10px;
@switchShadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
@smallSwitchNubDiameter: 10px;
@switchNubDiameter: 12px;
@switchNubTopMargin: 2px;
@switchNubLeftMargin: 2px;
Expand Down

0 comments on commit a084fb0

Please sign in to comment.