Browse Source

renamed dashboard label to transactions; added native wallet info btn

all-modes
pbca26 8 years ago
parent
commit
b6d26da623
  1. 3
      react/change.log
  2. 27
      react/src/components/dashboard/coinTile/coinTileItem.js
  3. 2
      react/src/components/dashboard/sendCoin/sendCoin.render.js
  4. 10
      react/src/components/dashboard/walletsNav/walletsNav.js
  5. 12
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  6. 2
      react/src/components/login/login.js

3
react/change.log

@ -13,7 +13,8 @@ UI:
- reset app setting to default - reset app setting to default
- manual balance / transactions list refresh - manual balance / transactions list refresh
- quick access dropdown on login to open settings / about / sync only modals - quick access dropdown on login to open settings / about / sync only modals
- qr code - qr code generator / scan
- basilisk send form reset fix
v0.2.0.21a-beta v0.2.0.21a-beta
-------------- --------------

27
react/src/components/dashboard/coinTile/coinTileItem.js

@ -110,16 +110,13 @@ class CoinTileItem extends React.Component {
if (coin !== this.props.ActiveCoin.coin) { if (coin !== this.props.ActiveCoin.coin) {
if (!this.props.ActiveCoin.coins[this.props.ActiveCoin.coin]) { if (!this.props.ActiveCoin.coins[this.props.ActiveCoin.coin]) {
coinInitDataFetchInterval = setInterval(() => { coinInitDataFetchInterval = setInterval(() => {
console.warn('dispatch', 'coinInitDataFetchInterval');
this.dispatchCoinActions(coin, mode); this.dispatchCoinActions(coin, mode);
if (mode === 'native' && this.props.Dashboard.progress) { if ((mode === 'native' || mode === 'full') && this.props.Dashboard.progress) {
console.warn('clearInterval', 'native');
clearInterval(coinInitDataFetchInterval); clearInterval(coinInitDataFetchInterval);
} }
if (mode === 'basilisk' && (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory !== 'loading') && this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] && JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))[this.props.ActiveCoin.coin]) { if (mode === 'basilisk' && (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory !== 'loading') && this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] && JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))[this.props.ActiveCoin.coin]) {
console.warn('clearInterval', 'basilisk');
clearInterval(coinInitDataFetchInterval); clearInterval(coinInitDataFetchInterval);
} }
}, 500); }, 500);
@ -141,8 +138,6 @@ class CoinTileItem extends React.Component {
Store.dispatch(dashboardChangeActiveCoin(coin, mode)); Store.dispatch(dashboardChangeActiveCoin(coin, mode));
console.warn('first load');
if (mode === 'full') { if (mode === 'full') {
const _iguanaActiveHandle = setInterval(() => { const _iguanaActiveHandle = setInterval(() => {
this.dispatchCoinActions(coin, mode); this.dispatchCoinActions(coin, mode);
@ -160,32 +155,12 @@ class CoinTileItem extends React.Component {
this.dispatchCoinActions(coin, mode); this.dispatchCoinActions(coin, mode);
}, coin === 'KMD' ? IGUNA_ACTIVE_HANDLE_TIMEOUT_KMD_NATIVE : IGUNA_ACTIVE_HANDLE_TIMEOUT); }, coin === 'KMD' ? IGUNA_ACTIVE_HANDLE_TIMEOUT_KMD_NATIVE : IGUNA_ACTIVE_HANDLE_TIMEOUT);
/*if (!this.props.Dashboard.progress) {
Store.dispatch(getSyncInfoNative(coin, true));
Store.dispatch(getKMDBalanceTotal(coin));
Store.dispatch(getNativeTxHistory(coin));
Store.dispatch(getKMDAddressesNative(coin, mode));
Store.dispatch(getKMDOPID(null, coin));
setTimeout(() => {
Store.dispatch(getSyncInfoNative(coin, true));
Store.dispatch(getKMDBalanceTotal(coin));
Store.dispatch(getNativeTxHistory(coin));
Store.dispatch(getKMDAddressesNative(coin, mode));
Store.dispatch(getKMDOPID(null, coin));
}, 100);
}*/
Store.dispatch(startInterval('sync', _iguanaActiveHandle)); Store.dispatch(startInterval('sync', _iguanaActiveHandle));
} }
if (mode === 'basilisk') { if (mode === 'basilisk') {
const _activeHandle = this.props.Dashboard.activeHandle; const _activeHandle = this.props.Dashboard.activeHandle;
const _basiliskMainAddress = _activeHandle[coin] || JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))[coin]; const _basiliskMainAddress = _activeHandle[coin] || JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))[coin];
/*setTimeout(() => {
this.dispatchCoinActions(coin, mode);
}, 100);*/
Store.dispatch(changeActiveAddress(_basiliskMainAddress)); Store.dispatch(changeActiveAddress(_basiliskMainAddress));
if (_basiliskMainAddress) { if (_basiliskMainAddress) {

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

@ -163,7 +163,7 @@ export const SendApiTypeSelectorRender = function() {
</div> </div>
</span> </span>
</div> </div>
{ this.stateisCameraFeatureDetected && { this.state.isCameraFeatureDetected &&
<div className="col-lg-4 text-right"> <div className="col-lg-4 text-right">
<QRModal <QRModal
mode="scan" mode="scan"

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

@ -21,6 +21,8 @@ class WalletsNav extends React.Component {
nativeOnly: Config.iguanaLessMode, nativeOnly: Config.iguanaLessMode,
}; };
this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this); this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this);
this.toggleNativeWalletInfo = this.toggleNativeWalletInfo.bind(this);
this.toggleNativeWalletTransactions = this.toggleNativeWalletTransactions.bind(this);
} }
componentWillMount() { componentWillMount() {
@ -43,6 +45,14 @@ class WalletsNav extends React.Component {
} }
} }
toggleNativeWalletInfo() {
Store.dispatch(toggleDashboardActiveSection('settings'));
}
toggleNativeWalletTransactions() {
Store.dispatch(toggleDashboardActiveSection('default'));
}
toggleSendCoinForm(display) { toggleSendCoinForm(display) {
if (this.props.ActiveCoin.mode === 'native') { if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch( Store.dispatch(

12
react/src/components/dashboard/walletsNav/walletsNav.render.js

@ -38,11 +38,19 @@ export const WalletsNavWithWalletRender = function() {
</ol> </ol>
<div className="page-header-actions"> <div className="page-header-actions">
<div id="kmd_header_button"> <div id="kmd_header_button">
{ this.props.ActiveCoin.mode === 'native' &&
<button
type="button"
className="btn btn-success waves-effect waves-light"
onClick={ this.toggleNativeWalletInfo }>
<i className="icon fa-info"></i>
</button>
}
<button <button
type="button" type="button"
className="btn btn-dark waves-effect waves-light" className="btn btn-dark waves-effect waves-light"
onClick={ this.toggleSendReceiveCoinForms }> onClick={ this.props.ActiveCoin.mode !== 'native' ? this.toggleSendReceiveCoinForms : this.toggleNativeWalletTransactions }>
<i className="icon md-view-dashboard"></i> { this.props.ActiveCoin.mode !== 'native' ? translate('INDEX.DASHBOARD') : translate('INDEX.WALLET_INFO') } <i className="icon md-view-dashboard"></i> { translate('INDEX.TRANSACTIONS') }
</button> </button>
<button <button
type="button" type="button"

2
react/src/components/login/login.js

@ -21,6 +21,8 @@ import { translate } from '../../translate/translate';
const IGUNA_ACTIVE_HANDLE_TIMEOUT = 3000; const IGUNA_ACTIVE_HANDLE_TIMEOUT = 3000;
const IGUNA_ACTIVE_COINS_TIMEOUT = 10000; const IGUNA_ACTIVE_COINS_TIMEOUT = 10000;
// TODO: remove duplicate activehandle and activecoins calls
class Login extends React.Component { class Login extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);

Loading…
Cancel
Save