Skip to content

Commit

Permalink
Add password input UI
Browse files Browse the repository at this point in the history
  • Loading branch information
floating committed Mar 21, 2018
1 parent fff75c6 commit 42fe49e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions app/App/Panel/Signer/Requests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Requests extends React.Component {
transactionRequest (req, i) {
let requestClass = 'signerRequest'
if (req.status === 'success') requestClass += ' signerRequestSuccess'
if (req.status === 'declined') requestClass += ' signerRequestDeclined'
if (req.status === 'declined' || req.status === 'error') requestClass += ' signerRequestDeclined'
if (req.status === 'pending') requestClass += ' signerRequestPending'
return (
<div key={i} className={requestClass}>
Expand All @@ -63,10 +63,21 @@ class Requests extends React.Component {
) : (
<div className='unknownType'>{'Unknown: ' + req.type}</div>
)}
<div className='requestApprove'>
<div className='requestDecline' onClick={() => this.decline(req.handlerId)}>{'Decline'}</div>
<div className='requestSign' onClick={() => this.approve(req.handlerId, req)}>{'Sign'}</div>
</div>
{req.require === 'password' ? (
<div className='requestApproveWithPassword'>
<input className='passwordInput' onChange={e => this.setState({password: e.target.value})} />
<div className='passwordInputLabel'>{'Account Password'}</div>
<div className='requestApprove'>
<div className='requestDecline' onClick={() => this.decline(req.handlerId)}>{'Decline'}</div>
<div className='requestSign' onClick={() => this.supplyPassword(this.state.password)}>{'Approve'}</div>
</div>
</div>
) : (
<div className='requestApprove'>
<div className='requestDecline' onClick={() => this.decline(req.handlerId)}>{'Decline'}</div>
<div className='requestSign' onClick={() => this.approve(req.handlerId, req)}>{'Sign'}</div>
</div>
)}
</div>
)
}
Expand Down

0 comments on commit 42fe49e

Please sign in to comment.