Browse Source

settings keys export passphrase visibility toggle

all-modes
pbca26 8 years ago
parent
commit
ec91a7a520
  1. 4
      react/change.log
  2. 36
      react/src/components/dashboard/settings.js
  3. 8
      react/src/components/dashboard/settings.render.js
  4. 4
      react/src/translate/en.js

4
react/change.log

@ -1,5 +1,7 @@
v0.2.0.2a-beta
--------------
front:
- fixed native t to t bug that led to interest loss
- added pending request(s) spinner
- added missing native z_balance api call for z-addresses
- fixed native t to z address send bug
@ -8,6 +10,8 @@ front:
- minor UI reorder change
- limit http stack history to 150 calls of each type
- sort http stack history desc
- swapped gettotalbalance interest with getinfo interest
- extended settings / export keys ui
back:
- added cli route

36
react/src/components/dashboard/settings.js

@ -41,6 +41,7 @@ class Settings extends React.Component {
cliCoin: null,
cliResponse: null,
exportWifKeysRaw: false,
seedInputVisibility: false,
};
this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this);
@ -53,6 +54,7 @@ class Settings extends React.Component {
this.renderSNPeersList = this.renderSNPeersList.bind(this);
this._saveAppConfig = this._saveAppConfig.bind(this);
this.exportWifKeysRaw = this.exportWifKeysRaw.bind(this);
this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this);
}
componentDidMount() {
@ -73,6 +75,12 @@ class Settings extends React.Component {
}
}
toggleSeedInputVisibility() {
this.setState({
seedInputVisibility: !this.state.seedInputVisibility,
});
}
execCliCmd() {
Store.dispatch(shepherdCli('passthru', this.state.cliCoin, this.state.cliCmd));
}
@ -115,12 +123,14 @@ class Settings extends React.Component {
renderPeersList() {
if (this.state.getPeersCoin) {
const coin = this.state.getPeersCoin.split('|')[0];
if (this.props.Settings.rawPeers &&
this.state.getPeersCoin &&
this.props.Settings.rawPeers[coin]) {
return this.props.Settings.rawPeers[coin].map((ip) =>
const _getPeersCoin = this.state.getPeersCoin;
const _rawPeers = this.props.Settings.rawPeers;
const coin = _getPeersCoin.split('|')[0];
if (_rawPeers &&
_getPeersCoin &&
_rawPeers[coin]) {
return _rawPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div>
);
} else {
@ -143,12 +153,14 @@ class Settings extends React.Component {
renderSNPeersList() {
if (this.state.getPeersCoin) {
const coin = this.state.getPeersCoin.split('|')[0];
if (this.props.Settings.supernetPeers &&
this.state.getPeersCoin &&
this.props.Settings.supernetPeers[coin]) {
return this.props.Settings.supernetPeers[coin].map((ip) =>
const _getPeersCoin = this.state.getPeersCoin;
const _supernetPeers = this.props.Settings.supernetPeers;
const coin = _getPeersCoin.split('|')[0];
if (_supernetPeers &&
_getPeersCoin &&
_supernetPeers[coin]) {
return _supernetPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div>
);
} else {

8
react/src/components/dashboard/settings.render.js

@ -280,8 +280,7 @@ export const SettingsRender = function() {
<p>
<div className="padding-bottom-20">{ this.renderLB('INDEX.ONLY_ACTIVE_WIF_KEYS') }</div>
<div className="padding-bottom-20">
<i>Note: it's important that you provide the same passphrase as you used to login to the wallet!<br />
In case passphrases will not match wallet is going to log you out of current session.</i>
<i>{ this.renderLB('SETTINGS.EXPORT_KEYS_NOTE') }</i>
</div>
<strong>
<i>{ translate('INDEX.PLEASE_KEEP_KEYS_SAFE') }</i>
@ -291,11 +290,14 @@ export const SettingsRender = function() {
<form className="wifkeys-form" method="post" action="javascript:" autoComplete="off">
<div className="form-group form-material floating">
<input
type="password"
type={ this.state.seedInputVisibility ? 'text' : 'password' }
className="form-control"
name="wifkeysPassphrase"
id="wifkeysPassphrase"
onChange={ this.updateInput } />
<i
className={ this.state.seedInputVisibility ? 'seed-toggle fa fa-eye-slash' : 'seed-toggle fa fa-eye' }
onClick={ this.toggleSeedInputVisibility }></i>
<label className="floating-label" htmlFor="wifkeysPassphrase">{ translate('INDEX.PASSPHRASE') }</label>
</div>
<div className="col-sm-12 col-xs-12 text-align-center">

4
react/src/translate/en.js

@ -426,7 +426,9 @@ export const _lang = {
'BIN': 'Bin',
'DIR': 'Dir',
'ADD_PEER_IP': 'Add Peer IP',
'APP_SESSION': 'App Session'
'APP_SESSION': 'App Session',
'EXPORT_KEYS_NOTE': 'Note: it\'s important that you provide the same passphrase you used to login to the wallet!<br>' +
'In case passphrases will not match wallet is going to log you out of current session.'
},
'TX_INFO': {
'ADDRESS': 'address',

Loading…
Cancel
Save