diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index c832cfaf766..97e8e8814ac 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -51,6 +51,7 @@ viewPaymentHistory=View Payment History… paymentHistoryTitle=Your Payment History paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}. paymentHistoryOKText=OK +hideExcluded=hide excluded sites bravePayments=Brave Payments beta=beta contributionDate=Contribution Date @@ -112,6 +113,7 @@ views=Views timeSpent=Time Spent include=Include percentage=% +remove=Remove bravery=Bravery hintsTitle=Helpful hints hint0=The Bravery panel allows you to turn HTTPS Everywhere on or off. HTTPS Everywhere automatically changes your HTTP traffic to HTTPS for supported sites to keep you more secure. diff --git a/docs/state.md b/docs/state.md index ac78b58a578..d91f472e351 100644 --- a/docs/state.md +++ b/docs/state.md @@ -198,6 +198,7 @@ AppStore 'advanced.torrent-viewer-enabled': boolean, // Whether to render magnet links in the browser 'advanced.smooth-scroll-enabled': boolean, // false if smooth scrolling should be explicitly disabled 'advanced.send-crash-reports': boolean, // true or undefined if crash reports should be sent + 'advanced.hide-excluded-sites': boolean, // Whether to hide excluded sites in the payments list 'shutdown.clear-history': boolean, // true to clear history on shutdown 'shutdown.clear-downloads': boolean, // true to clear downloads on shutdown 'shutdown.clear-cache': boolean, // true to clear cache on shutdown diff --git a/js/about/preferences.js b/js/about/preferences.js index 934a1de3bce..8f2f61dc6be 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -248,6 +248,10 @@ class LedgerTable extends ImmutableComponent { return true } + banSite (hostPattern) { + aboutActions.changeSiteSetting(hostPattern, 'ledgerPaymentsShown', false) + } + getRow (synopsis) { if (!synopsis || !synopsis.get || !this.shouldShow(synopsis)) { return [] @@ -263,6 +267,10 @@ class LedgerTable extends ImmutableComponent { const defaultSiteSetting = true return [ + { + html:
, + value: '' + }, rank, { html:
{verified ? this.getVerifiedIcon() : null}{faviconURL ? {site} : }{site}
, @@ -286,11 +294,18 @@ class LedgerTable extends ImmutableComponent { return null } return
+
+ +
this.enabledForSite(item) ? '' : 'paymentsDisabled').toJS() @@ -303,7 +318,12 @@ class LedgerTable extends ImmutableComponent { location: entry.get('publisherURL') } }).toJS()} - rows={this.synopsis.map((synopsis) => this.getRow(synopsis)).toJS()} /> + rows={this.synopsis.filter((synopsis) => { + return !getSetting(settings.HIDE_EXCLUDED_SITES, this.props.settings) || this.enabledForSite(synopsis) + }).map((synopsis) => { + return this.getRow(synopsis) + }).toJS()} + />
} } @@ -971,6 +991,8 @@ class PaymentsTab extends ImmutableComponent { get tableContent () { // TODO: This should be sortable. #2497 return } diff --git a/js/constants/appConfig.js b/js/constants/appConfig.js index 3952c4e345e..cca3a83631e 100644 --- a/js/constants/appConfig.js +++ b/js/constants/appConfig.js @@ -143,6 +143,7 @@ module.exports = { 'advanced.smooth-scroll-enabled': false, 'advanced.send-crash-reports': true, 'advanced.send-usage-statistics': false, + 'advanced.hide-excluded-sites': false, 'advanced.minimum-visit-time': 8, 'advanced.minimum-visits': 5, 'advanced.minimum-percentage': false, diff --git a/js/constants/settings.js b/js/constants/settings.js index c2ca6980839..38063a9d70c 100644 --- a/js/constants/settings.js +++ b/js/constants/settings.js @@ -59,6 +59,7 @@ const settings = { SEND_CRASH_REPORTS: 'advanced.send-crash-reports', SEND_USAGE_STATISTICS: 'advanced.send-usage-statistics', ADBLOCK_CUSTOM_RULES: 'adblock.customRules', + HIDE_EXCLUDED_SITES: 'advanced.hide-excluded-sites', MINIMUM_VISIT_TIME: 'advanced.minimum-visit-time', MINIMUM_VISITS: 'advanced.minimum-visits', MINIMUM_PERCENTAGE: 'advanced.minimum-percentage', diff --git a/less/about/history.less b/less/about/history.less index 68b729151a7..3921612d235 100644 --- a/less/about/history.less +++ b/less/about/history.less @@ -50,6 +50,12 @@ .domain { font-size: 11pt; } + + td { + &:nth-of-type(2) { + width: 60%; + } + } } } } diff --git a/less/about/preferences.less b/less/about/preferences.less index d976e99f79d..5457e52473e 100644 --- a/less/about/preferences.less +++ b/less/about/preferences.less @@ -455,7 +455,6 @@ table.sortableTable { } .paymentsContainer { - @walletTableData: 235px + 30px; // .walletBar td (min-width + padding) @barMargin: 15px 0 30px; @fontSize: 14.5px; // .form-control @@ -472,14 +471,41 @@ table.sortableTable { } } + tr { + th, + td { + padding: 0 15px; + } + } + + .neverShowSiteIcon { + font-size: 20px; + text-align: center; + + .fa { + visibility: hidden; + } + + &:hover { + .fa { + visibility: visible; + } + } + } + th { color: @darkGray; font-weight: 600; } - .sort { - text-align: left; - } +.hideExcludedSites { + text-align: right; + margin: 10px 75px; +} + +.modal .dialog.paymentHistory .sectionTitle { + text-align: left; +} .modal { .dialog { @@ -1170,6 +1196,33 @@ table.sortableTable { } } + .sort { + width: 100%; + text-align: left; + } + + #paymentHistory { + background-color: #FFF; + tr { + th { + color: @darkGray; + font-weight: 500; + border-bottom: 2px solid @lightGray; + text-align: left; + width: 18%; + } + td { + text-align: left; + &.narrow { + color: @darkGray; + } + &.wide { + color: #777; + } + } + } + } + .ledgerTable { tr { height: 26px; diff --git a/less/sortableTable.less b/less/sortableTable.less index 0aae418b3bd..fa32313e2e9 100644 --- a/less/sortableTable.less +++ b/less/sortableTable.less @@ -60,12 +60,9 @@ table.sortableTable { td { color: @mediumGray; -webkit-font-smoothing: antialiased; + position: relative; width: auto; - &:nth-of-type(2) { - width: 60%; - } - input[type='range'] { background: transparent; -webkit-appearance: none;