|
|
@ -1,7 +1,7 @@ |
|
|
|
import React from 'react'; |
|
|
|
import { translate } from '../../translate/translate'; |
|
|
|
/*import { dashboardChangeSection, toggleAddcoinModal, logout } from '../../actions/actionCreators'; |
|
|
|
import Store from '../../store';*/ |
|
|
|
import { iguanaActiveHandle, encryptWallet, test } from '../../actions/actionCreators'; |
|
|
|
import Store from '../../store'; |
|
|
|
import AddCoinOptionsCrypto from '../addcoin/addcoinOptionsCrypto'; |
|
|
|
import AddCoinOptionsAC from '../addcoin/addcoinOptionsAC'; |
|
|
|
import AddCoinOptionsACFiat from '../addcoin/addcoinOptionsACFiat'; |
|
|
@ -12,6 +12,11 @@ class Settings extends React.Component { |
|
|
|
this.state = { |
|
|
|
activeTab: 0, |
|
|
|
}; |
|
|
|
this.exportWifKeys = this.exportWifKeys.bind(this); |
|
|
|
} |
|
|
|
|
|
|
|
componentDidMount() { |
|
|
|
Store.dispatch(iguanaActiveHandle()); |
|
|
|
} |
|
|
|
|
|
|
|
openTab(tab) { |
|
|
@ -20,6 +25,10 @@ class Settings extends React.Component { |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
|
exportWifKeys() { |
|
|
|
Store.dispatch(encryptWallet('lime lime', test)); |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
return ( |
|
|
|
<div data-animsition-in="fade-in" data-animsition-out="fade-out" style={{marginLeft: '0'}}> |
|
|
@ -31,12 +40,12 @@ class Settings extends React.Component { |
|
|
|
<h4 className="font-size-14 text-uppercase">{translate('INDEX.WALLET_SETTINGS')}</h4> |
|
|
|
<div className="panel-group" id="SettingsAccordion" aria-multiselectable="true" role="tablist"> |
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="WalletInfo" role="tab"> |
|
|
|
<a className="panel-title" data-toggle="collapse" href="#WalletInfoTab" data-parent="#SettingsAccordion" aria-expanded="true" aria-controls="WalletInfoTab"> |
|
|
|
<div className="panel-heading" id="WalletInfo" role="tab" onClick={() => this.openTab(0)}> |
|
|
|
<a className={this.state.activeTab === 0 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon md-balance-wallet" aria-hidden="true"></i>{translate('INDEX.WALLET_INFO')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse in" id="WalletInfoTab" aria-labelledby="WalletInfo" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 0 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="WalletInfoTab" aria-labelledby="WalletInfo" role="tabpanel"> |
|
|
|
<div className="panel-body"> |
|
|
|
<table className="table" id="wallet-info-table"> |
|
|
|
<thead> |
|
|
@ -49,37 +58,37 @@ class Settings extends React.Component { |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>pubkey</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_pubkey_value"></div> |
|
|
|
<div id="winfo_pubkey_value">{this.props.Main.activeHandle.pubkey}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>btcpubkey</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_btcpubkey_value"></div> |
|
|
|
<div id="winfo_btcpubkey_value">{this.props.Main.activeHandle.btcpubkey}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>rmd160</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_rmd160_value"></div> |
|
|
|
<div id="winfo_rmd160_value">{this.props.Main.activeHandle.rmd160}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>NXT</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_NXT_value"></div> |
|
|
|
<div id="winfo_NXT_value">{this.props.Main.activeHandle.NXT}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>notary</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_notary_value"></div> |
|
|
|
<div id="winfo_notary_value">{this.props.Main.activeHandle.notary}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style={{fontWeight: 'bold'}}>status</td> |
|
|
|
<td> |
|
|
|
<div id="winfo_status_value"></div> |
|
|
|
<div id="winfo_status_value">{this.props.Main.activeHandle.status}</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
@ -89,12 +98,12 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="AddNodeforCoin" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="AddNodeforCoinTab"> |
|
|
|
<div className="panel-heading" id="AddNodeforCoin" role="tab" onClick={() => this.openTab(1)}> |
|
|
|
<a className={this.state.activeTab === 1 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon md-plus-square" aria-hidden="true"></i>{translate('INDEX.ADD_NODE')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="AddNodeforCoinTab" aria-labelledby="AddNodeforCoin" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 1 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="AddNodeforCoinTab" aria-labelledby="AddNodeforCoin" role="tabpanel"> |
|
|
|
<div className="panel-body"> |
|
|
|
<div className="row"> |
|
|
|
<div className="col-sm-6"> |
|
|
@ -112,7 +121,7 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="col-sm-4 col-xs-12" style={{textAlign: 'center'}}> |
|
|
|
<button type="button" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_getcoinpeers_btn" onClick="Settings_ShowCoinPeers">{translate('INDEX.CHECK_NODES')}</button> |
|
|
|
<button type="button" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_getcoinpeers_btn">{translate('INDEX.CHECK_NODES')}</button> |
|
|
|
</div> |
|
|
|
<div className="col-sm-12"> |
|
|
|
<h5> |
|
|
@ -144,7 +153,7 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="col-sm-4 col-xs-12" style={{textAlign: 'center'}}> |
|
|
|
<button type="button" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_addcoinpeers_btn" onClick="Settings_AddCoinPeers()">{translate('INDEX.ADD_NODE')}</button> |
|
|
|
<button type="button" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_addcoinpeers_btn">{translate('INDEX.ADD_NODE')}</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -153,34 +162,34 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="DumpWallet" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="DumpWalletTab"> |
|
|
|
<div className="panel-heading" id="DumpWallet" role="tab" onClick={() => this.openTab(2)}> |
|
|
|
<a className={this.state.activeTab === 2 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon wb-briefcase" aria-hidden="true"></i>{translate('INDEX.WALLET_BACKUP')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="DumpWalletTab" aria-labelledby="DumpWallet" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 2 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="DumpWalletTab" aria-labelledby="DumpWallet" role="tabpanel"> |
|
|
|
<div className="panel-body">Wallet Backup section to be updated soon.</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="FiatCurrencySettings" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="FiatCurrencySettingsTab"> |
|
|
|
<div className="panel-heading" id="FiatCurrencySettings" role="tab" onClick={() => this.openTab(3)}> |
|
|
|
<a className={this.state.activeTab === 3 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon fa-money" aria-hidden="true"></i>{translate('INDEX.FIAT_CURRENCY')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="FiatCurrencySettingsTab" aria-labelledby="FiatCurrencySettings" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 3 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="FiatCurrencySettingsTab" aria-labelledby="FiatCurrencySettings" role="tabpanel"> |
|
|
|
<div className="panel-body">Fiat currency settings section to be updated soon.</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="ExportKeys" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="ExportKeysTab"> |
|
|
|
<div className="panel-heading" id="ExportKeys" role="tab" onClick={() => this.openTab(4)}> |
|
|
|
<a className={this.state.activeTab === 4 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon md-key" aria-hidden="true"></i>{translate('INDEX.EXPORT_KEYS')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="ExportKeysTab" aria-labelledby="ExportKeys" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 4 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="ExportKeysTab" aria-labelledby="ExportKeys" role="tabpanel"> |
|
|
|
<div className="panel-body"> |
|
|
|
<p> |
|
|
|
<div>{translate('INDEX.ONLY_ACTIVE_WIF_KEYS')}</div><br/> |
|
|
@ -195,7 +204,7 @@ class Settings extends React.Component { |
|
|
|
<label className="floating-label" htmlFor="wifkeys_passphrase">{translate('INDEX.PASSPHRASE')}</label> |
|
|
|
</div> |
|
|
|
<div className="col-sm-12 col-xs-12" style={{textAlign: 'center'}}> |
|
|
|
<button type="submit" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="wifkeys_passphrase_btn">{translate('INDEX.GET_WIF_KEYS')}</button> |
|
|
|
<button type="button" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="wifkeys_passphrase_btn" onClick={this.exportWifKeys}>{translate('INDEX.GET_WIF_KEYS')}</button> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
|
|
|
@ -209,12 +218,12 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="ImportKeys" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" href="#ImportKeysTab" aria-expanded="false" aria-controls="ImportKeysTab"> |
|
|
|
<div className="panel-heading" id="ImportKeys" role="tab" onClick={() => this.openTab(5)}> |
|
|
|
<a className={this.state.activeTab === 5 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse"> |
|
|
|
<i className="icon md-key" aria-hidden="true"></i>{translate('INDEX.IMPORT_KEYS')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="ImportKeysTab" aria-labelledby="ImportKeys" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 5 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="ImportKeysTab" aria-labelledby="ImportKeys" role="tabpanel"> |
|
|
|
<div className="panel-body"> |
|
|
|
<p> |
|
|
|
<div>{translate('INDEX.IMPORT_KEYS_DESC_P1')}</div><br/> |
|
|
@ -244,12 +253,12 @@ class Settings extends React.Component { |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="panel"> |
|
|
|
<div className="panel-heading" id="DebugLog" role="tab"> |
|
|
|
<a className="panel-title collapsed" data-toggle="collapse" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="DebugLogTab"> |
|
|
|
<div className="panel-heading" id="DebugLog" role="tab" onClick={() => this.openTab(6)}> |
|
|
|
<a className={this.state.activeTab === 6 ? 'panel-title' : 'panel-title collapsed'} data-toggle="collapse" data-parent="#SettingsAccordion"> |
|
|
|
<i className="icon md-info" aria-hidden="true"></i>{translate('INDEX.DEBUG_LOG')} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div className="panel-collapse collapse" id="DebugLogTab" aria-labelledby="DebugLog" role="tabpanel"> |
|
|
|
<div className={this.state.activeTab === 6 ? 'panel-collapse collapse in' : 'panel-collapse collapse'} id="DebugLogTab" aria-labelledby="DebugLog" role="tabpanel"> |
|
|
|
<div className="panel-body"> |
|
|
|
<p>{translate('INDEX.DEBUG_LOG_DESC')}</p> |
|
|
|
<div className="col-sm-12"></div> |
|
|
@ -266,7 +275,7 @@ class Settings extends React.Component { |
|
|
|
<label className="floating-label" htmlFor="settings_select_debuglog_options">{translate('INDEX.TARGET')}</label> |
|
|
|
</div> |
|
|
|
<div className="col-sm-12 col-xs-12" style={{textAlign: 'center'}}> |
|
|
|
<button type="submit" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="read_debug_log_btn" onClick="Settings_LoadDebugLog()">{translate('INDEX.LOAD_DEBUG_LOG')}</button> |
|
|
|
<button type="submit" className="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="read_debug_log_btn">{translate('INDEX.LOAD_DEBUG_LOG')}</button> |
|
|
|
</div> |
|
|
|
<div className="col-sm-12 col-xs-12" style={{textAlign: 'center'}}> |
|
|
|
<br /> |
|
|
|