Skip to content
Snippets Groups Projects
Commit 36594510 authored by James Calfee's avatar James Calfee
Browse files

Flag shows vote weight testing is done.. just needs css layout #173

parent 0cc5b2b2
No related branches found
No related tags found
No related merge requests found
...@@ -106,6 +106,7 @@ class Voting extends React.Component { ...@@ -106,6 +106,7 @@ class Voting extends React.Component {
const {votingUp, votingDown, showWeight, weight} = this.state; const {votingUp, votingDown, showWeight, weight} = this.state;
// console.log('-- Voting.render -->', myVote, votingUp, votingDown); // console.log('-- Voting.render -->', myVote, votingUp, votingDown);
if(!active_votes) return <span></span> if(!active_votes) return <span></span>
if(flag && !username) return null
// if( payout[0] == '-' ) payout = "0.000 SBD"; // if( payout[0] == '-' ) payout = "0.000 SBD";
const votingUpActive = voting && votingUp const votingUpActive = voting && votingUp
const votingDownActive = voting && votingDown const votingDownActive = voting && votingDown
...@@ -115,36 +116,34 @@ class Voting extends React.Component { ...@@ -115,36 +116,34 @@ class Voting extends React.Component {
if (flag) { if (flag) {
// myVote === current vote // myVote === current vote
let voteDownClick = this.voteDown; const dropdown = <FoundationDropdown show={showWeight} className="Voting__adjust_weight_down">
let dropdown = null; <a href="#" onClick={this.voteDown} className="confirm_weight" title="Flag">
if (myVote == null && vesting_shares > VOTE_WEIGHT_DROPDOWN_THRESHOLD) { <Icon size="2x" name="chevron-down-circle" /></a>
voteDownClick = this.toggleWeightDown; {myVote == null && vesting_shares > VOTE_WEIGHT_DROPDOWN_THRESHOLD &&
dropdown = <div className="clear">
<FoundationDropdown show={showWeight} className="Voting__adjust_weight_down"> <div className="weight-display"> - {weight / 100}%</div>
<div className="clear"> <Slider min={100} max={10000} step={100} value={weight} onChange={this.handleWeightChange} />
<a href="#" onClick={this.voteDown} className="confirm_weight" title="Flag"><Icon size="2x" name="chevron-down-circle" /></a> </div>
<div className="weight-display"> - {weight / 100}%</div> }
<Slider min={100} max={10000} step={100} value={weight} onChange={this.handleWeightChange} /> <div className="clear">
</div> <p>{ABOUT_FLAG}</p>
<div className="clear"> <p>
<p>{ABOUT_FLAG}</p> <Follow follower={username} following={author} showFollow={false}
<p> className="float-right" what="blog">&nbsp;&nbsp;
<Follow follower={username} following={author} showFollow={false} Additionally, stop seeing content from this user?
className="float-right" what="blog">&nbsp;&nbsp; </Follow>
Stop seeing content from this user </p>
</Follow> </div>
</p> <CloseButton onClick={() => this.setState({showWeight: false})} />
</div> </FoundationDropdown>
<CloseButton onClick={() => this.setState({showWeight: false})} />
</FoundationDropdown>
}
// ? Remove negative votes unless full power -1000 (we had downvoting spam) // ? Remove negative votes unless full power -1000 (we had downvoting spam)
const down_votes = active_votes.filter( v => v.get('percent') < 0 /*=== -1000*/).size const down_votes = active_votes.filter( v => v.get('percent') < 0 /*=== -1000*/).size
return <span className="Voting"> return <span className="Voting">
<span className="Voting__inner"> <span className="Voting__inner">
<span className={classDown}> <span className={classDown}>
{down_votes > 0 && <span className="Voting__button-downvotes">{down_votes}</span>} {down_votes > 0 && <span className="Voting__button-downvotes">{down_votes}</span>}
{votingDownActive ? down : <a href="#" onClick={voteDownClick} title="Flag">{down}</a>} {votingDownActive ? down : <a href="#" onClick={this.toggleWeightDown} title="Flag">{down}</a>}
{dropdown} {dropdown}
</span> </span>
{payoutEl} {payoutEl}
......
...@@ -32,6 +32,7 @@ class ConfirmTransactionForm extends Component { ...@@ -32,6 +32,7 @@ class ConfirmTransactionForm extends Component {
<h4>{typeName(confirmBroadcastOperation)}</h4> <h4>{typeName(confirmBroadcastOperation)}</h4>
<hr /> <hr />
<div>{conf}</div> <div>{conf}</div>
<br />
<button className="button" onClick={okClick}>Ok</button> <button className="button" onClick={okClick}>Ok</button>
<button type="button hollow" className="button hollow" onClick={onCancel}>Cancel</button> <button type="button hollow" className="button hollow" onClick={onCancel}>Cancel</button>
</div> </div>
......
...@@ -128,7 +128,7 @@ class LoginForm extends Component { ...@@ -128,7 +128,7 @@ class LoginForm extends Component {
'Authenticate for this transaction' : 'Authenticate for this transaction' :
'Login to your Steem Account'; 'Login to your Steem Account';
const opType = loginBroadcastOperation ? loginBroadcastOperation.get('type') : null const opType = loginBroadcastOperation ? loginBroadcastOperation.get('type') : null
const authType = /vote|comment/.test(opType) ? 'Posting, Active, or Owner' : 'Active or Owner' const authType = /vote|comment/.test(opType) ? 'Posting' : 'Active or Owner'
const submitLabel = loginBroadcastOperation ? 'Sign' : 'Login'; const submitLabel = loginBroadcastOperation ? 'Sign' : 'Login';
let error = password.touched && password.error ? password.error : this.props.login_error let error = password.touched && password.error ? password.error : this.props.login_error
if (error === 'owner_login_blocked') { if (error === 'owner_login_blocked') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment