Skip to content

Commit

Permalink
Merge branch '2228-show-disabled-witness-in-grey' of https://github.c…
Browse files Browse the repository at this point in the history
…om/netuoso/condenser into 2228-show-disabled-witness-in-grey
  • Loading branch information
roadscape committed May 30, 2018
2 parents 4d9c0d0 + ea70ba8 commit 41f2df4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/components/pages/Witnesses.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Witnesses extends React.Component {
this.onWitnessChange = e => {
const customUsername = e.target.value;
this.setState({ customUsername });
// Force update to ensure witness vote appears
this.forceUpdate();
};
this.accountWitnessProxy = e => {
e.preventDefault();
Expand Down Expand Up @@ -76,6 +78,10 @@ class Witnesses extends React.Component {
const owner = item.get('owner');
const thread = item.get('url');
const myVote = witness_votes ? witness_votes.has(owner) : null;
const signingKey = item.get('signing_key');
const witnessIsDisabled = /STM1111111111111111111111111111111114T1Anm/.test(signingKey);
const priceFeed = item.get('sbd_exchange_rate');
const noPriceFeed = /0.000 STEEM/.test(priceFeed.get('base'));
const classUp =
'Voting__button Voting__button-up' +
(myVote === true ? ' Voting__button--upvoted' : '');
Expand All @@ -96,7 +102,9 @@ class Witnesses extends React.Component {
}
}
return (
<tr key={owner}>
<tr
key={owner}
style = { witnessIsDisabled || noPriceFeed ? { opacity: '0.4' } : null }>
<td width="75">
{rank < 10 && '0'}
{rank++}
Expand All @@ -115,7 +123,7 @@ class Witnesses extends React.Component {
</a>
</span>
</td>
<td>
<td style = { witnessIsDisabled || noPriceFeed ? { textDecoration: 'line-through' } : null }>
<Link to={'/@' + owner}>{owner}</Link>
</td>
<td>{witness_thread}</td>
Expand Down

0 comments on commit 41f2df4

Please sign in to comment.