Browse Source

Merge branch 'redux' into feature/settings-refactor

all-modes^2
Miika Turunen 8 years ago
parent
commit
0e4bb63474
  1. 12
      assets/mainWindow/css/loading.css
  2. 6
      assets/mainWindow/js/init.js
  3. 6
      assets/mainWindow/js/loading.js
  4. 6
      react/src/components/dashboard/jumblr/jumblr.js
  5. 2
      react/src/components/dashboard/settings/settings.debugLogPanel.js
  6. 18
      react/src/components/dashboard/settings/settings.exportKeysPanel.js
  7. 25
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  8. 2
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  9. 2
      react/src/components/dashboard/walletsData/walletsData.js
  10. 1
      react/src/components/dashboard/walletsData/walletsData.render.js
  11. 10
      react/src/translate/en.js

12
assets/mainWindow/css/loading.css

@ -41,11 +41,11 @@ body.loading-window {
}
body.agama-default-window-height {
height: 300px !important;
height: 355px !important;
}
body.agama-app-settings-window {
height: 820px;
height: 700px;
}
.agama-logo {
@ -454,3 +454,11 @@ button.toast-close-button {
cursor: pointer;
margin: 5px 0;
}
.iguana-less {
height: 570px !important;
}
.iguana-less #iguanaCorePort,
.iguana-less #useBasiliskInstance {
display: none;
}

6
assets/mainWindow/js/init.js

@ -3,6 +3,12 @@ $(document).ready(function() {
var window = remote.getCurrentWindow();
var appConf = remote.getCurrentWindow().appConfig;
if (!appConf.experimentalFeatures) {
$('#normalStartBtn').hide();
$('.dropdown-menu').css('right', '34.8%');
$('#nativeOnlyBtnCarret').css('margin-right', '0');
}
$('#pulse').jRoll({
radius: 100,
animation: 'pulse'

6
assets/mainWindow/js/loading.js

@ -16,13 +16,17 @@ function initSettingsForm() {
let appConfSchema = remote.getCurrentWindow().appConfigSchema;
_configCopy = Object.assign({}, appConf);
if (!appConf.experimentalFeatures) {
$('.agama-app-settings-window').addClass('iguana-less');
}
let _htmlOut = '<table class="settings-table">';
for (let key in appConf) {
if (appConfSchema[key] &&
appConfSchema[key].initDisplay) {
_htmlOut = `
${_htmlOut}
<tr>
<tr id="${key}">
<td class="left">
${appConfSchema[key].displayName}`;

6
react/src/components/dashboard/jumblr/jumblr.js

@ -128,12 +128,6 @@ class Jumblr extends React.Component {
});
}
/*toggleAddressGenMod() {
this.setState({
jumblrDepositAddressPBased: !this.state.jumblrDepositAddressPBased,
});
}*/
generateJumblrSecretAddress() {
let _jumblrSecretAddress = [];
let _apiSuccessCount = 0;

2
react/src/components/dashboard/settings/settings.debugLogPanel.js

@ -42,7 +42,7 @@ class DebugLogPanel extends React.Component {
_items.push(
<p key={ `app-runtime-log-entry-${i}` }>
<span>{ secondsToString(_appRuntimeLog[i].time, true) }</span>
<span className="padding-left-30">{ JSON.stringify(_appRuntimeLog[i].msg, null, '').replace('\\n', ' ') }</span>
<span className="padding-left-30">{ JSON.stringify(_appRuntimeLog[i].msg, null, '') }</span>
</p>
);
}

18
react/src/components/dashboard/settings/settings.exportKeysPanel.js

@ -4,6 +4,7 @@ import { connect } from 'react-redux';
import {
encryptWallet,
settingsWifkeyState,
copyCoinAddress,
} from '../../../actions/actionCreators';
import Store from '../../../store';
@ -19,6 +20,7 @@ class ExportKeysPanel extends React.Component {
this.exportWifKeys = this.exportWifKeys.bind(this);
this.exportWifKeysRaw = this.exportWifKeysRaw.bind(this);
this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this);
this._copyCoinAddress = this._copyCoinAddress.bind(this);
this.updateInput = this.updateInput.bind(this);
}
@ -59,6 +61,10 @@ class ExportKeysPanel extends React.Component {
}
}
_copyCoinAddress(address) {
Store.dispatch(copyCoinAddress(address));
}
renderWifKeys() {
let items = [];
@ -80,8 +86,16 @@ class ExportKeysPanel extends React.Component {
(i === 1 && _key.indexOf('wif') > -1)) {
items.push(
<tr key={ _key }>
<td>{ _key }</td>
<td className="padding-left-15">{ _wifKeys[_key] }</td>
<td className="padding-bottom-20">{ _key.replace('wif', ' WIF') }</td>
<td className="padding-bottom-20 padding-left-15">
{ _wifKeys[_key] }
<button
className="btn btn-default btn-xs clipboard-edexaddr margin-left-10"
title={ translate('INDEX.COPY_TO_CLIPBOARD') }
onClick={ () => this._copyCoinAddress(_wifKeys[_key]) }>
<i className="icon wb-copy"></i> { translate('INDEX.COPY') }
</button>
</td>
</tr>
);
}

25
react/src/components/dashboard/walletsBalance/walletsBalance.js

@ -15,15 +15,36 @@ class WalletsBalance extends React.Component {
super();
this.state = {
currentAddress: null,
isExplorerData: false,
};
this.isFullySynced = this.isFullySynced.bind(this);
this.refreshBalance = this.refreshBalance.bind(this);
}
componentWillReceiveProps(props) {
if (!this.state.currentAddress &&
this.props.ActiveCoin.activeAddress) {
if (this.props.ActiveCoin.activeAddress) {
const _mode = this.props.ActiveCoin.mode;
let _isExplorerData = false;
if (_mode === 'basilisk') {
if (this.props.ActiveCoin.cache) {
const _cache = this.props.ActiveCoin.cache;
const _coin = this.props.ActiveCoin.coin;
const _address = this.props.ActiveCoin.activeAddress;
if (_address &&
_cache[_coin] &&
_cache[_coin][_address] &&
_cache[_coin][_address].getbalance &&
_cache[_coin][_address].getbalance.data &&
_cache[_coin][_address].getbalance.data.source) {
_isExplorerData = true;
}
}
}
this.setState(Object.assign({}, this.state, {
isExplorerData: _isExplorerData,
currentAddress: this.props.ActiveCoin.activeAddress,
}));
}

2
react/src/components/dashboard/walletsBalance/walletsBalance.render.js

@ -108,6 +108,8 @@ const WalletsBalanceRender = function() {
</div>
</div>
</div>
<div className={ !this.state.isExplorerData ? 'hide' : '' } style={{ display: 'block', textAlign: 'center', paddingTop: '94px' }}><strong>Notice:</strong> balance is fetched from KMD explorer as a fallback measure!</div>
</div>
);
};

2
react/src/components/dashboard/walletsData/walletsData.js

@ -54,6 +54,7 @@ class WalletsData extends React.Component {
searchTerm: null,
coin: null,
txhistory: null,
isExplorerData: false,
};
this.toggleBasiliskActionsMenu = this.toggleBasiliskActionsMenu.bind(this);
@ -344,6 +345,7 @@ class WalletsData extends React.Component {
(this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) ||
(JSON.stringify(this.props.ActiveCoin.txhistory) !== JSON.stringify(this.state.txhistory))) {*/
_stateChange = Object.assign({}, _stateChange, {
isExplorerData: this.props.ActiveCoin.txhistory[0].source ? true : false,
itemsList: this.props.ActiveCoin.txhistory,
filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm),
txhistory: this.props.ActiveCoin.txhistory,

1
react/src/components/dashboard/walletsData/walletsData.render.js

@ -249,6 +249,7 @@ export const WalletsDataRender = function() {
</div>
<h4 className="panel-title">{ translate('INDEX.TRANSACTION_HISTORY') }</h4>
</header>
<div className={ !this.state.isExplorerData ? 'hide' : '' } style={{ display: 'block', textAlign: 'center', paddingTop: '10px' }}><strong>Notice:</strong> transactions list is fetched from KMD explorer as a fallback measure!</div>
<div className="panel-body">
<div className="row padding-bottom-30 padding-top-10">
{ this.shouldDisplayAddressList() &&

10
react/src/translate/en.js

@ -278,12 +278,12 @@ export const _lang = {
'WALLET_BACKUP': 'Wallet Backup',
'FIAT_CURRENCY': 'Fiat Currency',
'EXPORT_KEYS': 'Export Keys',
'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet wif keys will be shown here.<br>' +
'If you don\'t see a wif key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.<br>' +
'You can use these wif keys to import to another coin wallets.',
'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet WIF keys will be shown here.<br>' +
'If you don\'t see a WIF key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.<br>' +
'You can use these WIF keys to import to another coin wallets.',
'PLEASE_KEEP_KEYS_SAFE': 'Please keep these keys extra safe and secure.',
'PASSPHRASE': 'Passphrase',
'GET_WIF_KEYS': 'Get Wif Keys',
'GET_WIF_KEYS': 'Get WIF Keys',
'IMPORT_KEYS': 'Import Keys',
'IMPORT_KEYS_DESC_P1': 'This section allows you to import private key of all iguana supported coins, Assetchain, Geckochain, or PAXchain by the wallet.',
'IMPORT_KEYS_DESC_P2': 'It is not mandatory to have that coin active in the wallet for which you are executing import private key process.',
@ -590,7 +590,7 @@ export const _lang = {
'SUPPORT_TICKETS': 'Support tickets',
'GET_SLACK_INVITE': 'Get Slack invite',
'ADDRESS_LIST': 'Address list',
'WIF_KEY_LIST': 'Wif key list',
'WIF_KEY_LIST': 'WIF (Wallet Import Format) key list',
'CLI_RESPONSE': 'CLI response',
'PASSPHRASE_REQ': 'Passphrase is required.',
'SAVE_APP_CONFIG': 'Save app config',

Loading…
Cancel
Save