From b7cff58893acc58dcba4c9ebb40e3b9a7ad23008 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 5 Sep 2017 23:03:32 +0300 Subject: [PATCH] walletsData comp receive props fix --- assets/mainWindow/css/loading.css | 5 +++-- assets/mainWindow/js/loading.js | 13 ++++++++----- .../components/dashboard/walletsData/walletsData.js | 10 +++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/assets/mainWindow/css/loading.css b/assets/mainWindow/css/loading.css index d0a6d59..a9ce385 100644 --- a/assets/mainWindow/css/loading.css +++ b/assets/mainWindow/css/loading.css @@ -442,10 +442,11 @@ button.toast-close-button { display: inherit; top: inherit; left: inherit; - right: 49.2%; - padding: 5px 2px; + right: 48%; + padding: 2px 0; } .dropdown-menu li { cursor: pointer; + margin: 5px 0; } \ No newline at end of file diff --git a/assets/mainWindow/js/loading.js b/assets/mainWindow/js/loading.js index 7d6bd37..1522533 100644 --- a/assets/mainWindow/js/loading.js +++ b/assets/mainWindow/js/loading.js @@ -178,17 +178,20 @@ function openSettingsWindow() { const remote = require('electron').remote; const window = remote.getCurrentWindow(); - toggleDropdown(); + $('.dropdown-menu').addClass('hide'); window.createAppSettingsWindow(); } -function closeMainWindow(isKmdOnly) { +function closeMainWindow(isKmdOnly, isCustom) { const remote = require('electron').remote; const window = remote.getCurrentWindow(); - toggleDropdown(); + $('.dropdown-menu').addClass('hide'); disableModeButtons(); - window.startKMDNative(isKmdOnly ? 'kmd' : null); + + if (!isCustom) { + window.startKMDNative(isKmdOnly ? 'KMD' : null); + } window.createWindow('open'); window.hide(); @@ -213,7 +216,7 @@ function normalStart() { let appConf = remote.getCurrentWindow().appConfig; appConf.iguanaLessMode = false; - toggleDropdown(); + $('.dropdown-menu').addClass('hide'); disableModeButtons(); // run iguana-less mode with no daemons startup diff --git a/react/src/components/dashboard/walletsData/walletsData.js b/react/src/components/dashboard/walletsData/walletsData.js index 754cae6..12d5c25 100644 --- a/react/src/components/dashboard/walletsData/walletsData.js +++ b/react/src/components/dashboard/walletsData/walletsData.js @@ -329,7 +329,7 @@ class WalletsData extends React.Component { if (!this.state.currentAddress && this.props.ActiveCoin.activeAddress && this.props.ActiveCoin.mode === 'basilisk') { - _stateChange = Object.assign({}, this.state, { + _stateChange = Object.assign({}, _stateChange, { currentAddress: this.props.ActiveCoin.activeAddress, }); } @@ -342,7 +342,7 @@ class WalletsData extends React.Component { /*if (!this.state.itemsList || this.state.itemsList === 'no data' || (this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) || (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, filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm), txhistory: this.props.ActiveCoin.txhistory, @@ -354,16 +354,16 @@ class WalletsData extends React.Component { if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'no data') { - _stateChange = Object.assign({}, this.state, { + _stateChange = Object.assign({}, _stateChange, { itemsList: 'no data', }); } else if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'loading') { - _stateChange = Object.assign({}, this.state, { + _stateChange = Object.assign({}, _stateChange, { itemsList: 'loading', }); } - this.setState(Object.assign({}, this.state, _stateChange)); + this.setState(Object.assign({}, _stateChange)); } isFullySynced() {