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

Commit

Permalink
display verified badge for verified publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
jkup committed Oct 25, 2016
1 parent f37459c commit 3d7f3dc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
12 changes: 10 additions & 2 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ class LedgerTable extends ImmutableComponent {
return `https?://${synopsis.get('site')}`
}

getVerifiedIcon (synopsis) {
return <span className='verified fa-stack'>
<i className='fa fa-circle fa-stack-2x' />
<i className='fa fa-check fa-stack-1x' />
</span>
}

enabledForSite (synopsis) {
const hostSettings = this.props.siteSettings.get(this.getHostPattern(synopsis))
if (hostSettings) {
Expand All @@ -239,9 +246,10 @@ class LedgerTable extends ImmutableComponent {
if (!synopsis || !synopsis.get || !this.shouldShow(synopsis)) {
return []
}
const faviconURL = synopsis.get('faviconURL') || appConfig.defaultFavicon
const faviconURL = synopsis.get('faviconURL')
const rank = synopsis.get('rank')
const views = synopsis.get('views')
const verified = synopsis.get('verified')
const duration = synopsis.get('duration')
const publisherURL = synopsis.get('publisherURL')
const percentage = synopsis.get('percentage')
Expand All @@ -251,7 +259,7 @@ class LedgerTable extends ImmutableComponent {
return [
rank,
{
html: <a href={publisherURL} target='_blank'><img src={faviconURL} alt={site} /><span>{site}</span></a>,
html: <a href={publisherURL} target='_blank'>{verified ? this.getVerifiedIcon() : null}{faviconURL ? <img src={faviconURL} alt={site} /> : <span className='fa fa-file-o' />}<span>{site}</span></a>,
value: site
},
{
Expand Down
21 changes: 21 additions & 0 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,27 @@ div.nextPaymentSubmission {
}
}

.fa-file-o {
font-size: 15px;
margin-right: 6px;
text-align: center;
width: 24px;
}

.verified{
left: -10px;
position: absolute;
font-size: 10px;

.fa-circle {
color: #67B640;
}

.fa-check {
color: white;
}
}

&.alignRight {
text-align: right;
}
Expand Down

0 comments on commit 3d7f3dc

Please sign in to comment.