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

display verified badge for verified publishers #5108

Merged
merged 1 commit into from
Oct 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 22 additions & 0 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ div.nextPaymentSubmission {
-webkit-font-smoothing: antialiased;
text-align: left;
vertical-align: top;
position: relative;

a {
vertical-align: middle;
Expand All @@ -777,6 +778,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