Browse Source

walletsData comp receive props fix

all-modes
pbca26 8 years ago
parent
commit
b7cff58893
  1. 5
      assets/mainWindow/css/loading.css
  2. 13
      assets/mainWindow/js/loading.js
  3. 10
      react/src/components/dashboard/walletsData/walletsData.js

5
assets/mainWindow/css/loading.css

@ -442,10 +442,11 @@ button.toast-close-button {
display: inherit; display: inherit;
top: inherit; top: inherit;
left: inherit; left: inherit;
right: 49.2%; right: 48%;
padding: 5px 2px; padding: 2px 0;
} }
.dropdown-menu li { .dropdown-menu li {
cursor: pointer; cursor: pointer;
margin: 5px 0;
} }

13
assets/mainWindow/js/loading.js

@ -178,17 +178,20 @@ function openSettingsWindow() {
const remote = require('electron').remote; const remote = require('electron').remote;
const window = remote.getCurrentWindow(); const window = remote.getCurrentWindow();
toggleDropdown(); $('.dropdown-menu').addClass('hide');
window.createAppSettingsWindow(); window.createAppSettingsWindow();
} }
function closeMainWindow(isKmdOnly) { function closeMainWindow(isKmdOnly, isCustom) {
const remote = require('electron').remote; const remote = require('electron').remote;
const window = remote.getCurrentWindow(); const window = remote.getCurrentWindow();
toggleDropdown(); $('.dropdown-menu').addClass('hide');
disableModeButtons(); disableModeButtons();
window.startKMDNative(isKmdOnly ? 'kmd' : null);
if (!isCustom) {
window.startKMDNative(isKmdOnly ? 'KMD' : null);
}
window.createWindow('open'); window.createWindow('open');
window.hide(); window.hide();
@ -213,7 +216,7 @@ function normalStart() {
let appConf = remote.getCurrentWindow().appConfig; let appConf = remote.getCurrentWindow().appConfig;
appConf.iguanaLessMode = false; appConf.iguanaLessMode = false;
toggleDropdown(); $('.dropdown-menu').addClass('hide');
disableModeButtons(); disableModeButtons();
// run iguana-less mode with no daemons startup // run iguana-less mode with no daemons startup

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

@ -329,7 +329,7 @@ class WalletsData extends React.Component {
if (!this.state.currentAddress && if (!this.state.currentAddress &&
this.props.ActiveCoin.activeAddress && this.props.ActiveCoin.activeAddress &&
this.props.ActiveCoin.mode === 'basilisk') { this.props.ActiveCoin.mode === 'basilisk') {
_stateChange = Object.assign({}, this.state, { _stateChange = Object.assign({}, _stateChange, {
currentAddress: this.props.ActiveCoin.activeAddress, currentAddress: this.props.ActiveCoin.activeAddress,
}); });
} }
@ -342,7 +342,7 @@ class WalletsData extends React.Component {
/*if (!this.state.itemsList || this.state.itemsList === 'no data' || /*if (!this.state.itemsList || this.state.itemsList === 'no data' ||
(this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) || (this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) ||
(JSON.stringify(this.props.ActiveCoin.txhistory) !== JSON.stringify(this.state.txhistory))) {*/ (JSON.stringify(this.props.ActiveCoin.txhistory) !== JSON.stringify(this.state.txhistory))) {*/
_stateChange = Object.assign({}, this.state, { _stateChange = Object.assign({}, _stateChange, {
itemsList: this.props.ActiveCoin.txhistory, itemsList: this.props.ActiveCoin.txhistory,
filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm), filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm),
txhistory: this.props.ActiveCoin.txhistory, txhistory: this.props.ActiveCoin.txhistory,
@ -354,16 +354,16 @@ class WalletsData extends React.Component {
if (this.props.ActiveCoin.txhistory && if (this.props.ActiveCoin.txhistory &&
this.props.ActiveCoin.txhistory === 'no data') { this.props.ActiveCoin.txhistory === 'no data') {
_stateChange = Object.assign({}, this.state, { _stateChange = Object.assign({}, _stateChange, {
itemsList: 'no data', itemsList: 'no data',
}); });
} else if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'loading') { } else if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'loading') {
_stateChange = Object.assign({}, this.state, { _stateChange = Object.assign({}, _stateChange, {
itemsList: 'loading', itemsList: 'loading',
}); });
} }
this.setState(Object.assign({}, this.state, _stateChange)); this.setState(Object.assign({}, _stateChange));
} }
isFullySynced() { isFullySynced() {

Loading…
Cancel
Save