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. 16
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  6. 12
      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(

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

@ -28,8 +28,8 @@ export const WalletsNavWithWalletRender = function() {
id="header-dashboard" id="header-dashboard"
style={{ marginBottom: this.props.ActiveCoin.mode === 'basilisk' ? '30px' : '0' }}> style={{ marginBottom: this.props.ActiveCoin.mode === 'basilisk' ? '30px' : '0' }}>
<ol className={ this.state.nativeOnly ? 'hide' : 'breadcrumb' }> <ol className={ this.state.nativeOnly ? 'hide' : 'breadcrumb' }>
<strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong> <strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong>
{ this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' } { this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' }
<button <button
className="btn btn-default btn-xs clipboard-edexaddr" className="btn btn-default btn-xs clipboard-edexaddr"
onClick={ () => this.copyMyAddress(this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin]) }> onClick={ () => this.copyMyAddress(this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin]) }>
@ -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"

12
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);
@ -62,7 +64,7 @@ class Login extends React.Component {
toggleLoginSettingsDropdownSection(sectionName) { toggleLoginSettingsDropdownSection(sectionName) {
Store.dispatch(toggleLoginSettingsModal(true)); Store.dispatch(toggleLoginSettingsModal(true));
this.setState({ this.setState({
displayLoginSettingsDropdown: false, displayLoginSettingsDropdown: false,
displayLoginSettingsDropdownSection: sectionName, displayLoginSettingsDropdownSection: sectionName,
@ -193,14 +195,14 @@ class Login extends React.Component {
if (this.state.seedInputVisibility) { if (this.state.seedInputVisibility) {
document.querySelector('#loginPassphrase').style.height = '1px'; document.querySelector('#loginPassphrase').style.height = '1px';
document.querySelector('#loginPassphrase').style.height = `${(15 + document.querySelector('#loginPassphrase').scrollHeight)}px`; document.querySelector('#loginPassphrase').style.height = `${(15 + document.querySelector('#loginPassphrase').scrollHeight)}px`;
} }
}, 100); }, 100);
} }
updateLoginPassPhraseInput(e) { updateLoginPassPhraseInput(e) {
// remove any empty chars from the start/end of the string // remove any empty chars from the start/end of the string
const newValue = e.target.value; const newValue = e.target.value;
clearTimeout(this.state.trimPassphraseTimer); clearTimeout(this.state.trimPassphraseTimer);
const _trimPassphraseTimer = setTimeout(() => { const _trimPassphraseTimer = setTimeout(() => {
@ -211,7 +213,7 @@ class Login extends React.Component {
}, 2000); }, 2000);
this.resizeLoginTextarea(); this.resizeLoginTextarea();
this.setState({ this.setState({
trimPassphraseTimer: _trimPassphraseTimer, trimPassphraseTimer: _trimPassphraseTimer,
[e.target.name]: newValue, [e.target.name]: newValue,
@ -350,7 +352,7 @@ class Login extends React.Component {
copyPassPhraseToClipboard() { copyPassPhraseToClipboard() {
const passPhrase = this.state.randomSeed; const passPhrase = this.state.randomSeed;
const textField = document.createElement('textarea'); const textField = document.createElement('textarea');
textField.innerText = passPhrase; textField.innerText = passPhrase;
document.body.appendChild(textField); document.body.appendChild(textField);
textField.select(); textField.select();

Loading…
Cancel
Save