|
@ -1,225 +1,109 @@ |
|
|
import React from 'react'; |
|
|
import React from 'react'; |
|
|
import { translate } from '../../../translate/translate'; |
|
|
import { translate } from '../../../translate/translate'; |
|
|
|
|
|
import PanelSection from './settings.panelBody'; |
|
|
|
|
|
import Panel from './settings.panel'; |
|
|
|
|
|
|
|
|
|
|
|
import AppUpdatePanel from './settings.appUpdatePanel'; |
|
|
|
|
|
import AppInfoPanel from './settings.appInfoPanel'; |
|
|
|
|
|
import AddNodePanel from './settings.addNodePanel'; |
|
|
|
|
|
import AppSettingsPanel from './settings.appSettingsPanel'; |
|
|
|
|
|
import CliPanel from './settings.cliPanel'; |
|
|
|
|
|
import DebugLogPanel from './settings.debugLogPanel'; |
|
|
|
|
|
import FiatCurrencyPanel from './settings.fiatCurrencyPanel'; |
|
|
|
|
|
import ExportKeysPanel from './settings.exportKeysPanel'; |
|
|
|
|
|
import ImportKeysPanel from './settings.importKeysPanel'; |
|
|
|
|
|
import SupportPanel from './settings.supportPanel'; |
|
|
|
|
|
import WalletInfoPanel from './settings.walletInfoPanel'; |
|
|
|
|
|
import WalletBackupPanel from './settings.walletBackupPanel'; |
|
|
|
|
|
|
|
|
export const SettingsRender = function() { |
|
|
export const SettingsRender = function() { |
|
|
return ( |
|
|
return ( |
|
|
<div className="margin-left-0 full-height"> |
|
|
|
|
|
<div |
|
|
<div |
|
|
className="page-content full-height" |
|
|
id="section-iguana-wallet-settings" |
|
|
id="section-iguana-wallet-settings"> |
|
|
className="padding-30"> |
|
|
<div className="row"> |
|
|
|
|
|
<div className="col-xlg-12 col-md-12"> |
|
|
|
|
|
<div className="row"> |
|
|
<div className="row"> |
|
|
<div className="col-xlg-12 col-md-12"> |
|
|
<div className="col-sm-12"> |
|
|
<h4 className="font-size-14 text-uppercase">{ translate('INDEX.WALLET_SETTINGS') }</h4> |
|
|
<h4 className="font-size-14 text-uppercase">{ translate('INDEX.WALLET_SETTINGS') }</h4> |
|
|
<div |
|
|
<Panel |
|
|
className="panel-group" |
|
|
uniqId={'SettingsAccordion'} |
|
|
id="SettingsAccordion"> |
|
|
singleOpen={true}> |
|
|
|
|
|
|
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="WalletInfo" |
|
|
title={ translate('INDEX.WALLET_INFO') } |
|
|
onClick={ () => this.openTab('WalletInfo', 0) } |
|
|
icon="icon md-balance-wallet" |
|
|
className={ 'panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
openByDefault={!this.props.disableWalletSpecificUI}> |
|
|
<div className="panel-heading"> |
|
|
<WalletInfoPanel /> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 0 ? '' : ' collapsed') }> |
|
|
</PanelSection> |
|
|
<i className="icon md-balance-wallet"></i>{ translate('INDEX.WALLET_INFO') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 0 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 0 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderWalletInfo() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="AddNodeforCoin" |
|
|
title={ translate('INDEX.ADD_NODE') } |
|
|
onClick={ () => this.openTab('AddNodeforCoin', 1) } |
|
|
icon="icon md-plus-square"> |
|
|
className={ 'panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
<AddNodePanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 1 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon md-plus-square"></i>{ translate('INDEX.ADD_NODE') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 1 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 1 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderAddNode() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="DumpWallet" |
|
|
title={ translate('INDEX.WALLET_BACKUP') } |
|
|
onClick={ () => this.openTab('DumpWallet', 2) } |
|
|
icon="icon wb-briefcase"> |
|
|
className={ 'hide panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
<WalletBackupPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 2 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon wb-briefcase"></i>{ translate('INDEX.WALLET_BACKUP') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 2 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 2 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderWalletBackup() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="FiatCurrencySettings" |
|
|
title={ translate('INDEX.FIAT_CURRENCY') } |
|
|
onClick={ () => this.openTab('FiatCurrencySettings', 3) } |
|
|
icon="icon fa-money"> |
|
|
className={ 'hide panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
<FiatCurrencyPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 3 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon fa-money"></i>{ translate('INDEX.FIAT_CURRENCY') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 3 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 3 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderFiatCurrency() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="ExportKeys" |
|
|
title={ translate('INDEX.EXPORT_KEYS') } |
|
|
onClick={ () => this.openTab('ExportKeys', 4) } |
|
|
icon="icon md-key"> |
|
|
className={ 'panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
<ExportKeysPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 4 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon md-key"></i>{ translate('INDEX.EXPORT_KEYS') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 4 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 4 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderExportKeys() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
{ !this.props.disableWalletSpecificUI && |
|
|
<div |
|
|
<PanelSection |
|
|
id="ImportKeys" |
|
|
title={ translate('INDEX.IMPORT_KEYS') } |
|
|
onClick={ () => this.openTab('ImportKeys', 5) } |
|
|
icon="icon md-key"> |
|
|
className={ 'panel' + (this.state.nativeOnly ? ' hide' : '') }> |
|
|
<ImportKeysPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 5 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon md-key"></i>{ translate('INDEX.IMPORT_KEYS') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 5 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 5 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderImportKeys() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
<PanelSection |
|
|
<div |
|
|
title={ translate('INDEX.DEBUG_LOG') } |
|
|
className="panel" |
|
|
icon="icon fa-bug" |
|
|
id="DebugLog" |
|
|
openByDefault={this.props.disableWalletSpecificUI}> |
|
|
onClick={ () => this.openTab('DebugLog', 6) }> |
|
|
<DebugLogPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 6 ? '' : ' collapsed') }> |
|
|
<PanelSection |
|
|
<i className="icon fa-bug"></i>{ translate('INDEX.DEBUG_LOG') } |
|
|
title={ translate('SETTINGS.APP_CONFIG') + ' (config.json)' } |
|
|
</a> |
|
|
icon="icon fa-bug"> |
|
|
</div> |
|
|
<AppSettingsPanel /> |
|
|
<div |
|
|
</PanelSection> |
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 6 ? ' in' : '') } |
|
|
<PanelSection |
|
|
style={{ height: this.state.activeTab === 6 ? `auto` : '0' }}> |
|
|
title={ translate('SETTINGS.APP_INFO') } |
|
|
{ this.renderDebugLog() } |
|
|
icon="icon md-info"> |
|
|
</div> |
|
|
<AppInfoPanel /> |
|
|
</div> |
|
|
</PanelSection> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
className="panel" |
|
|
|
|
|
id="AppSettings" |
|
|
|
|
|
onClick={ () => this.openTab('AppSettings', 7) }> |
|
|
|
|
|
<div className="panel-heading"> |
|
|
|
|
|
<a className={ 'panel-title' + (this.state.activeTab === 7 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon fa-wrench"></i>{ translate('SETTINGS.APP_CONFIG') } (config.json) |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 7 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 7 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderAppSettings() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
className="panel" |
|
|
|
|
|
id="AppInfo" |
|
|
|
|
|
onClick={ () => this.openTab('AppInfo', 8) }> |
|
|
|
|
|
<div className="panel-heading"> |
|
|
|
|
|
<a className={ 'panel-title' + (this.state.activeTab === 8 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon md-info"></i>{ translate('SETTINGS.APP_INFO') } |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 8 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 8 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderAppInfoTab() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
{ this.props.Main && this.props.Main.coins.native && |
|
|
{ this.props.Main && this.props.Main.coins.native && |
|
|
<div |
|
|
<PanelSection |
|
|
id="Cli" |
|
|
title="CLI" |
|
|
onClick={ () => this.openTab('Cli', 9) } |
|
|
icon="icon fa-code"> |
|
|
className={ 'panel' + (!this.props.Main.coins.native.length ? ' hide' : '') }> |
|
|
<CliPanel /> |
|
|
<div className="panel-heading"> |
|
|
</PanelSection> |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 9 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon fa-code"></i> CLI |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 9 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 9 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderCliPanel() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
<PanelSection |
|
|
<div |
|
|
title={ translate('INDEX.UPDATE') } |
|
|
className="panel" |
|
|
icon="icon fa fa-cloud-download"> |
|
|
id="AppUpdate" |
|
|
<AppUpdatePanel /> |
|
|
onClick={ () => this.openTab('AppUpdate', 10) }> |
|
|
</PanelSection> |
|
|
<div className="panel-heading"> |
|
|
<PanelSection |
|
|
<a className={ 'panel-title' + (this.state.activeTab === 10 ? '' : ' collapsed') }> |
|
|
title="Support" |
|
|
<i className="icon fa fa-cloud-download"></i> { translate('INDEX.UPDATE') } |
|
|
icon="icon fa fa-life-ring"> |
|
|
</a> |
|
|
<SupportPanel /> |
|
|
</div> |
|
|
</PanelSection> |
|
|
<div |
|
|
</Panel> |
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 10 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 10 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderAppUpdateTab() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
className="panel" |
|
|
|
|
|
id="Support" |
|
|
|
|
|
onClick={ () => this.openTab('Support', 11) }> |
|
|
|
|
|
<div className="panel-heading"> |
|
|
|
|
|
<a className={ 'panel-title' + (this.state.activeTab === 11 ? '' : ' collapsed') }> |
|
|
|
|
|
<i className="icon fa fa-life-ring"></i> Support |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
className={ 'panel-collapse collapse' + (this.state.activeTab === 11 ? ' in' : '') } |
|
|
|
|
|
style={{ height: this.state.activeTab === 11 ? `auto` : '0' }}> |
|
|
|
|
|
{ this.renderSupportPanel() } |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|