Browse Source

Merge pull request #147 from SuperNETorg/cli

Cli
all-modes
pbca26 8 years ago
committed by GitHub
parent
commit
03a34e6000
  1. 91
      react/src/actions/actions/addCoin.js
  2. 22
      react/src/actions/actions/dexCoins.js
  3. 11
      react/src/actions/actions/nativeSyncInfo.js
  4. 22
      react/src/actions/actions/walletAuth.js
  5. 43
      react/src/assets/images/agama-icon.svg
  6. 60
      react/src/assets/images/agama-login-logo.svg
  7. 50
      react/src/assets/images/agama-logo-side.svg
  8. BIN
      react/src/assets/images/agama-wallet.png
  9. BIN
      react/src/assets/images/easydex-logo-big.png
  10. 43
      react/src/components/addcoin/addcoin.js
  11. 12
      react/src/components/addcoin/addcoin.render.js
  12. 32
      react/src/components/addcoin/addcoinOptionsCrypto.js
  13. 20
      react/src/components/addcoin/coin-selectors.render.js
  14. 9
      react/src/components/dashboard/coinTile/coinTileItem.js
  15. 1
      react/src/components/dashboard/loginModal/loginModal.render.js
  16. 2
      react/src/components/dashboard/main/dashboard.render.js
  17. 4
      react/src/components/dashboard/navbar/navbar.js
  18. 18
      react/src/components/dashboard/navbar/navbar.render.js
  19. 2
      react/src/components/dashboard/notifications/notifications.js
  20. 8
      react/src/components/dashboard/notifications/notifications.render.js
  21. 11
      react/src/components/dashboard/receiveCoin/receiveCoin.render.js
  22. 13
      react/src/components/dashboard/settings/settings.js
  23. 30
      react/src/components/dashboard/settings/settings.render.js
  24. 2
      react/src/components/dashboard/walletsData/walletsData.js
  25. 14
      react/src/components/dashboard/walletsData/walletsData.render.js
  26. 32
      react/src/components/dashboard/walletsNative/walletsNative.js
  27. 2
      react/src/components/dashboard/walletsNative/walletsNative.render.js
  28. 148
      react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js
  29. 12
      react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.render.js
  30. 4
      react/src/components/dashboard/walletsNav/walletsNav.js
  31. 4
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  32. 7
      react/src/components/dashboard/walletsProgress/walletsProgress.js
  33. 4
      react/src/components/login/login.js
  34. 11
      react/src/components/login/login.render.js
  35. 2
      react/src/components/main/main.js
  36. 13
      react/src/components/overrides.scss
  37. 3
      react/src/config.js
  38. 4
      react/src/translate/en.js

91
react/src/actions/actions/addCoin.js

@ -4,7 +4,8 @@ import {
Config, Config,
toggleAddcoinModal, toggleAddcoinModal,
getDexCoins, getDexCoins,
startIguanaInstance startIguanaInstance,
iguanaWalletPassphraseState,
} from '../actionCreators'; } from '../actionCreators';
import { import {
logGuiHttp, logGuiHttp,
@ -18,10 +19,11 @@ import {
checkAC checkAC
} from '../../components/addcoin/payload'; } from '../../components/addcoin/payload';
export function addCoin(coin, mode, syncOnly, port) { export function addCoin(coin, mode, syncOnly, port, startupParams) {
if (mode === '-1') { if (mode === '-1' ||
mode === -1) {
return dispatch => { return dispatch => {
dispatch(shepherdGetConfig(coin, mode)); dispatch(shepherdGetConfig(coin, '-1', startupParams));
} }
} else { } else {
if (checkCoinType(coin) === 'currency_ac') { if (checkCoinType(coin) === 'currency_ac') {
@ -151,7 +153,7 @@ export function iguanaAddCoin(coin, mode, acData, port) {
} }
} }
export function shepherdHerd(coin, mode, path) { export function shepherdHerd(coin, mode, path, startupParams) {
let acData; let acData;
let herdData = { let herdData = {
'ac_name': coin, 'ac_name': coin,
@ -183,6 +185,15 @@ export function shepherdHerd(coin, mode, path) {
}; };
} }
if (startupParams) {
herdData['ac_custom_param'] = startupParams.type;
if (startupParams.value) {
herdData['ac_custom_param_value'] = startupParams.value;
}
}
// TODO: switch statement
if (checkCoinType(coin) === 'crypto') { if (checkCoinType(coin) === 'crypto') {
acData = startCrypto( acData = startCrypto(
path.result, path.result,
@ -190,6 +201,7 @@ export function shepherdHerd(coin, mode, path) {
mode mode
); );
} }
if (checkCoinType(coin) === 'currency_ac') { if (checkCoinType(coin) === 'currency_ac') {
acData = startCurrencyAssetChain( acData = startCurrencyAssetChain(
path.result, path.result,
@ -234,15 +246,26 @@ export function shepherdHerd(coin, mode, path) {
); );
}) })
.then(response => response.json()) .then(response => response.json())
.then( .then(function(json) {
json => dispatch( if (Config.iguanaLessMode) {
iguanaAddCoin( dispatch(
coin, addCoinResult(coin, mode)
mode, );
acData setTimeout(() => {
) dispatch(
) iguanaActiveHandleBypass()
); );
}, 1000);
} else {
dispatch(
iguanaAddCoin(
coin,
mode,
acData
)
);
}
});
} }
} }
@ -266,7 +289,7 @@ export function addCoinResult(coin, mode) {
} }
} }
export function _shepherdGetConfig(coin, mode) { export function _shepherdGetConfig(coin, mode, startupParams) {
return dispatch => { return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getconf`, { return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getconf`, {
method: 'POST', method: 'POST',
@ -291,14 +314,42 @@ export function _shepherdGetConfig(coin, mode) {
shepherdHerd( shepherdHerd(
coin, coin,
mode, mode,
json json,
startupParams
) )
) )
); );
} }
} }
export function shepherdGetConfig(coin, mode) { export function iguanaActiveHandleBypass() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
.catch(function(error) {
console.log(error);
dispatch(
triggerToaster(
'Failed to iguanaActiveHandleBypass',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(
json => dispatch(
iguanaWalletPassphraseState(json, dispatch)
)
)
}
}
export function shepherdGetConfig(coin, mode, startupParams) {
if (coin === 'KMD' && if (coin === 'KMD' &&
mode === '-1') { mode === '-1') {
return dispatch => { return dispatch => {
@ -325,7 +376,8 @@ export function shepherdGetConfig(coin, mode) {
shepherdHerd( shepherdHerd(
coin, coin,
mode, mode,
json json,
startupParams
) )
) )
) )
@ -355,7 +407,8 @@ export function shepherdGetConfig(coin, mode) {
shepherdHerd( shepherdHerd(
coin, coin,
mode, mode,
json json,
startupParams
) )
) )
); );

22
react/src/actions/actions/dexCoins.js

@ -21,15 +21,29 @@ export function getDexCoins() {
'timestamp': _timestamp, 'timestamp': _timestamp,
'function': 'getDexCoins', 'function': 'getDexCoins',
'type': 'post', 'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`, 'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload, 'payload': _payload,
'status': 'pending', 'status': 'pending',
})); }));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, { let _fetchConfig = {
method: 'POST', method: 'POST',
body: JSON.stringify(_payload) body: JSON.stringify(_payload),
}) };
if (Config.iguanaLessMode) {
_fetchConfig = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
};
}
return fetch(
Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
_fetchConfig
)
.catch(function(error) { .catch(function(error) {
console.log(error); console.log(error);
dispatch(logGuiHttp({ dispatch(logGuiHttp({

11
react/src/actions/actions/nativeSyncInfo.js

@ -19,12 +19,13 @@ export function getSyncInfoNativeKMD(skipDebug) {
'timestamp': _timestamp, 'timestamp': _timestamp,
'function': 'getSyncInfoNativeKMD', 'function': 'getSyncInfoNativeKMD',
'type': 'post', 'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, 'url': Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`,
'payload': '', 'payload': '',
'status': 'pending', 'status': 'pending',
})); }));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, { return fetch(
Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, {
method: 'GET', method: 'GET',
}) })
.catch(function(error) { .catch(function(error) {
@ -47,9 +48,9 @@ export function getSyncInfoNativeKMD(skipDebug) {
dispatch(logGuiHttp({ dispatch(logGuiHttp({
'timestamp': _timestamp, 'timestamp': _timestamp,
'status': 'success', 'status': 'success',
'response': json, 'response': Config.iguanaLessMode ? json.info : json,
})); }));
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': json })); dispatch(getSyncInfoNativeState({ 'remoteKMDNode': Config.iguanaLessMode ? json.info : json }));
}) })
.then(function() { .then(function() {
if (!skipDebug) { if (!skipDebug) {
@ -60,7 +61,6 @@ export function getSyncInfoNativeKMD(skipDebug) {
} }
function getSyncInfoNativeState(json, coin, skipDebug) { function getSyncInfoNativeState(json, coin, skipDebug) {
console.log('getSyncInfoNativeState', json);
if (coin === 'KMD' && if (coin === 'KMD' &&
json && json &&
json.error) { json.error) {
@ -69,7 +69,6 @@ function getSyncInfoNativeState(json, coin, skipDebug) {
if (json && if (json &&
json.error && json.error &&
Config.cli.default) { Config.cli.default) {
console.log('getSyncInfoNativeState', 'error');
return { return {
type: SYNCING_NATIVE_MODE, type: SYNCING_NATIVE_MODE,
progress: Config.cli.default ? json.error : json, progress: Config.cli.default ? json.error : json,

22
react/src/actions/actions/walletAuth.js

@ -185,15 +185,29 @@ export function iguanaActiveHandle(getMainAddress) {
'timestamp': _timestamp, 'timestamp': _timestamp,
'function': 'iguanaActiveHandle', 'function': 'iguanaActiveHandle',
'type': 'post', 'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`, 'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload, 'payload': _payload,
'status': 'pending', 'status': 'pending',
})); }));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, { let _fetchConfig = {
method: 'POST', method: 'POST',
body: JSON.stringify(_payload), body: JSON.stringify(_payload),
}) };
if (Config.iguanaLessMode) {
_fetchConfig = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
};
}
return fetch(
Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
_fetchConfig
)
.catch(function(error) { .catch(function(error) {
console.log(error); console.log(error);
dispatch(logGuiHttp({ dispatch(logGuiHttp({
@ -222,7 +236,7 @@ export function iguanaActiveHandle(getMainAddress) {
} }
} }
function iguanaWalletPassphraseState(json, dispatch) { export function iguanaWalletPassphraseState(json, dispatch) {
sessionStorage.setItem('IguanaActiveAccount', JSON.stringify(json)); sessionStorage.setItem('IguanaActiveAccount', JSON.stringify(json));
dispatch( dispatch(
triggerToaster( triggerToaster(

43
react/src/assets/images/agama-icon.svg

@ -0,0 +1,43 @@
<svg width="62" height="62" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="64" width="64" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="svg_1">
<g id="svg_2">
<path id="svg_3" d="m-95.883,25.261" fill="#FFFFFF"/>
</g>
<g id="svg_4">
<g id="svg_5">
<g id="svg_6">
<polyline id="svg_7" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_8">
<g id="svg_9">
<polyline id="svg_10" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_11">
<g id="svg_12">
<polyline id="svg_13" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_14">
<g id="svg_15">
<path id="svg_16" d="m5.017,16.12"/>
</g>
</g>
</g>
<path id="svg_17" d="m25.98,50.215c-2.344,-0.536 -3.68,-2.914 -3.097,-4.579c-6.44,3.197 -12.483,2.971 -18.131,-0.678c0.041,0.104 0.082,0.208 0.124,0.312c6.681,10.741 16.851,15.481 30.51,14.221c3.236,-7.521 3.861,-13.971 1.874,-19.351c-1.248,-1.697 -3.004,-1.71 -5.268,-0.041c-0.961,0.561 -1.489,3.06 -1.584,7.499c-0.266,1.98 -1.743,2.853 -4.428,2.617" fill="#FCC414" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_18" d="m4.752,44.958c5.648,3.649 11.691,3.875 18.131,0.678c0.16,-0.457 0.464,-0.86 0.932,-1.157c2.521,-1.906 3.361,-3.856 2.521,-5.85c-0.85,-3.058 -4.675,-4.436 -11.473,-4.137c-3.756,0.08 -5.555,-1.439 -5.397,-4.557c0.498,-2.718 1.92,-4.086 4.266,-4.105c0.537,-0.086 1.049,-0.066 1.537,0.058c-3.75,-4.456 -5.289,-9.947 -4.617,-16.473c-0.159,0.142 -0.316,0.287 -0.473,0.433c-9.212,9.231 -11.02,20.934 -5.427,35.11" fill="#F59E1B" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_19" d="m15.267,25.888c0.896,0.229 1.709,0.813 2.438,1.752c2.473,1.993 4.859,2.661 7.159,2.004c1.945,-0.811 2.463,-2.33 1.552,-4.557c-1.062,-1.742 -2.796,-3.39 -5.204,-4.945c-1.717,-1.979 -1.544,-3.929 0.517,-5.85c1.455,-1.012 2.964,-1.12 4.525,-0.323c0.666,0.23 1.268,1.105 1.805,2.623c-0.693,-7.092 -0.405,-12.033 0.862,-14.824c-7.258,0.684 -13.349,3.233 -18.273,7.647c-0.67,6.526 0.869,12.017 4.619,16.473" fill="#EC6922" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_20" d="m28.06,16.592c0.302,0.852 0.583,1.906 0.845,3.162c0.582,2.774 1.498,4.595 2.747,5.462c1.194,0.532 1.899,0.15 2.117,-1.147c0.123,-1.364 -0.001,-3.055 -0.372,-5.074c-0.393,-3.504 0.857,-5.282 3.749,-5.333c2.727,0.436 3.794,1.923 3.2,4.46c1.971,-3.824 6.071,-6.31 12.301,-7.458c-5.227,-6.048 -13.135,-9.013 -23.724,-8.896c-1.268,2.791 -1.555,7.732 -0.863,14.824" fill="#383C8F" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_21" d="m40.346,18.122c-1.623,2.394 -2.765,4.452 -3.426,6.173c-0.578,1.829 -0.481,3.122 0.291,3.878c2.344,1.144 4.701,-2.734 7.004,-4.736c1.918,-1.668 4.619,-0.639 5.277,2.118c0.264,1.68 -0.316,2.863 -1.743,3.549c5.066,-0.177 8.928,2.53 11.585,8.121l-0.003,-0.301c0.798,-11.687 -1.249,-20.719 -6.399,-25.925c-0.094,-0.113 -0.189,-0.225 -0.285,-0.336c-6.23,1.149 -10.33,3.635 -12.301,7.459" fill="#0FA8E0" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_22" d="m46.195,29.595c-2.898,0.535 -4.848,1.182 -5.85,1.94c-1.47,1.845 -1.297,3.45 0.517,4.816c4.689,5.427 6.13,13.785 4.845,23.139l14.131,0.072l-0.505,-22.337c-2.657,-5.591 -6.519,-8.298 -11.585,-8.121c-0.437,0.211 -0.955,0.375 -1.553,0.491" fill="#61C1D2" clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

60
react/src/assets/images/agama-login-logo.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

50
react/src/assets/images/agama-logo-side.svg

@ -0,0 +1,50 @@
<svg width="210" height="60" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="62" width="212" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="svg_2">
<g id="svg_3">
<path id="svg_4" d="m-95.883,24.261" fill="#FFFFFF"/>
</g>
<g id="svg_5">
<g id="svg_6">
<g id="svg_7">
<polyline id="svg_8" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_9">
<g id="svg_10">
<polyline id="svg_11" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_12">
<g id="svg_13">
<polyline id="svg_14" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_15">
<g id="svg_16">
<path id="svg_17" d="m5.017,15.12"/>
</g>
</g>
</g>
<path id="svg_18" d="m25.98,49.215c-2.344,-0.536 -3.68,-2.914 -3.097,-4.579c-6.44,3.197 -12.483,2.971 -18.131,-0.678c0.041,0.104 0.082,0.208 0.124,0.312c6.681,10.741 16.851,15.481 30.51,14.221c3.236,-7.521 3.861,-13.971 1.874,-19.351c-1.248,-1.697 -3.004,-1.71 -5.268,-0.041c-0.961,0.561 -1.489,3.06 -1.584,7.499c-0.266,1.98 -1.743,2.853 -4.428,2.617" fill="#FCC414" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_19" d="m4.752,43.958c5.648,3.649 11.691,3.875 18.131,0.678c0.16,-0.457 0.464,-0.86 0.932,-1.157c2.521,-1.906 3.361,-3.856 2.521,-5.85c-0.85,-3.058 -4.675,-4.436 -11.473,-4.137c-3.756,0.08 -5.555,-1.439 -5.397,-4.557c0.498,-2.718 1.92,-4.086 4.266,-4.105c0.537,-0.086 1.049,-0.066 1.537,0.058c-3.75,-4.456 -5.289,-9.947 -4.617,-16.473c-0.159,0.142 -0.316,0.287 -0.473,0.433c-9.212,9.231 -11.02,20.934 -5.427,35.11" fill="#F59E1B" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_20" d="m15.267,24.888c0.896,0.229 1.709,0.813 2.438,1.752c2.473,1.993 4.859,2.661 7.159,2.004c1.945,-0.811 2.463,-2.33 1.552,-4.557c-1.062,-1.742 -2.796,-3.39 -5.204,-4.945c-1.717,-1.979 -1.544,-3.929 0.517,-5.85c1.455,-1.012 2.964,-1.12 4.525,-0.323c0.666,0.23 1.268,1.105 1.805,2.623c-0.693,-7.092 -0.405,-12.033 0.862,-14.824c-7.258,0.684 -13.349,3.233 -18.273,7.647c-0.67,6.526 0.869,12.017 4.619,16.473" fill="#EC6922" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_21" d="m28.06,15.592c0.302,0.852 0.583,1.906 0.845,3.162c0.582,2.774 1.498,4.595 2.747,5.462c1.194,0.532 1.899,0.15 2.117,-1.147c0.123,-1.364 -0.001,-3.055 -0.372,-5.074c-0.393,-3.504 0.857,-5.282 3.749,-5.333c2.727,0.436 3.794,1.923 3.2,4.46c1.971,-3.824 6.071,-6.31 12.301,-7.458c-5.227,-6.048 -13.135,-9.013 -23.724,-8.896c-1.268,2.791 -1.555,7.732 -0.863,14.824" fill="#383C8F" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_22" d="m40.346,17.122c-1.623,2.394 -2.765,4.452 -3.426,6.173c-0.578,1.829 -0.481,3.122 0.291,3.878c2.344,1.144 4.701,-2.734 7.004,-4.736c1.918,-1.668 4.619,-0.639 5.277,2.118c0.264,1.68 -0.316,2.863 -1.743,3.549c5.066,-0.177 8.928,2.53 11.585,8.121l-0.003,-0.301c0.798,-11.687 -1.249,-20.719 -6.399,-25.925c-0.094,-0.113 -0.189,-0.225 -0.285,-0.336c-6.23,1.149 -10.33,3.635 -12.301,7.459" fill="#0FA8E0" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_23" d="m46.195,28.595c-2.898,0.535 -4.848,1.182 -5.85,1.94c-1.47,1.845 -1.297,3.45 0.517,4.816c4.689,5.427 6.13,13.785 4.845,23.139l14.131,0.072l-0.505,-22.337c-2.657,-5.591 -6.519,-8.298 -11.585,-8.121c-0.437,0.211 -0.955,0.375 -1.553,0.491" fill="#61C1D2" clip-rule="evenodd" fill-rule="evenodd"/>
</g>
<g id="svg_24">
<path id="svg_25" d="m91.822,42.954l-3.324,-7.457l-10.701,0l-3.287,7.457l-3.141,0l10.555,-23.542l2.611,0l10.5,23.542l-3.213,0zm-4.292,-9.911l-3.104,-7.265c-0.402,-0.919 -0.815,-2.047 -1.242,-3.384c-0.268,1.026 -0.651,2.154 -1.15,3.384l-3.141,7.265l8.637,0z" fill="#1D1D1B"/>
<path id="svg_26" d="m110.448,30.67l9.076,0l0,11.402c-1.413,0.396 -2.849,0.695 -4.31,0.897c-1.461,0.203 -3.153,0.305 -5.077,0.305c-4.042,0 -7.189,-1.056 -9.441,-3.167c-2.252,-2.111 -3.378,-5.07 -3.378,-8.876c0,-2.438 0.557,-4.573 1.671,-6.407s2.718,-3.234 4.812,-4.202c2.094,-0.967 4.547,-1.451 7.359,-1.451c2.849,0 5.503,0.46 7.962,1.38l-1.205,2.405c-2.411,-0.898 -4.729,-1.348 -6.958,-1.348c-3.25,0 -5.789,0.851 -7.615,2.55c-1.826,1.7 -2.739,4.058 -2.739,7.073c0,3.164 0.879,5.564 2.639,7.2c1.759,1.636 4.343,2.454 7.752,2.454c1.85,0 3.658,-0.188 5.423,-0.562l0,-7.217l-5.971,0l0,-2.436z" fill="#1D1D1B"/>
<path id="svg_27" d="m145.146,42.954l-3.324,-7.457l-10.7,0l-3.287,7.457l-3.141,0l10.554,-23.542l2.611,0l10.502,23.542l-3.215,0zm-4.291,-9.911l-3.105,-7.265c-0.4,-0.919 -0.814,-2.047 -1.24,-3.384c-0.27,1.026 -0.652,2.154 -1.15,3.384l-3.142,7.265l8.637,0z" fill="#1D1D1B"/>
<path id="svg_28" d="m165.342,42.954l-9.058,-20.784l-0.146,0c0.17,1.646 0.255,3.604 0.255,5.87l0,14.914l-2.866,0l0,-23.446l4.675,0l8.455,19.341l0.146,0l8.528,-19.341l4.638,0l0,23.446l-3.104,0l0,-15.106c0,-1.732 0.085,-3.614 0.255,-5.646l-0.146,0l-9.131,20.752l-2.501,0z" fill="#1D1D1B"/>
<path id="svg_29" d="m205.569,42.954l-3.323,-7.457l-10.701,0l-3.287,7.457l-3.141,0l10.555,-23.542l2.611,0l10.501,23.542l-3.215,0zm-4.291,-9.911l-3.104,-7.265c-0.401,-0.919 -0.815,-2.047 -1.241,-3.384c-0.269,1.026 -0.651,2.154 -1.15,3.384l-3.142,7.265l8.637,0z" fill="#1D1D1B"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
react/src/assets/images/agama-wallet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
react/src/assets/images/easydex-logo-big.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 15 KiB

43
react/src/components/addcoin/addcoin.js

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../translate/translate';
import { import {
Config,
addCoin, addCoin,
toggleAddcoinModal, toggleAddcoinModal,
triggerToaster, triggerToaster,
@ -16,6 +17,7 @@ class AddCoin extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
nativeOnly: Config.iguanaLessMode,
coins: [], coins: [],
defaultCoinState: { defaultCoinState: {
selectedCoin: null, selectedCoin: null,
@ -33,6 +35,7 @@ class AddCoin extends React.Component {
}, },
mode: -2, mode: -2,
syncOnly: false, syncOnly: false,
daemonParam: null,
}, },
display: false, display: false,
actionsMenu: false, actionsMenu: false,
@ -57,7 +60,7 @@ class AddCoin extends React.Component {
loadCoinSelection() { loadCoinSelection() {
shepherdGetCoinList() shepherdGetCoinList()
.then(function(json) { .then((json) => {
if (json.msg !== 'error') { if (json.msg !== 'error') {
this.setState(Object.assign({}, this.state, { this.setState(Object.assign({}, this.state, {
coins: json.result, coins: json.result,
@ -72,7 +75,7 @@ class AddCoin extends React.Component {
) )
); );
} }
}.bind(this)); });
} }
toggleSyncOnlyMode(index) { toggleSyncOnlyMode(index) {
@ -87,6 +90,18 @@ class AddCoin extends React.Component {
})); }));
} }
updateDaemonParam(e, index) {
let _coins = this.state.coins;
_coins[index] = Object.assign({}, _coins[index], {
[e.target.name]: e.target.value,
});
this.setState(Object.assign({}, this.state, {
coins: _coins,
}));
}
toggleActionsMenu() { toggleActionsMenu() {
this.setState(Object.assign({}, this.state, { this.setState(Object.assign({}, this.state, {
actionsMenu: !this.state.actionsMenu, actionsMenu: !this.state.actionsMenu,
@ -120,7 +135,7 @@ class AddCoin extends React.Component {
updateSelectedCoin(e, index) { updateSelectedCoin(e, index) {
const coin = e.target.value.split('|'); const coin = e.target.value.split('|');
const defaultMode = coin[1]; const defaultMode = Config.iguanaLessMode ? 'native' : coin[1];
const modeToValue = { const modeToValue = {
'full': 1, 'full': 1,
'basilisk': 0, 'basilisk': 0,
@ -185,16 +200,27 @@ class AddCoin extends React.Component {
activateCoin() { activateCoin() {
const coin = this.state.coins[0].selectedCoin.split('|')[0]; const coin = this.state.coins[0].selectedCoin.split('|')[0];
if (this.isCoinAlreadyAdded(coin)) { if (this.isCoinAlreadyAdded(coin)) {
this.dismiss(); this.dismiss();
return; return;
} }
Store.dispatch(addCoin( if (!this.state.coins[0].daemonParam) {
coin, Store.dispatch(addCoin(
this.state.coins[0].mode, coin,
this.state.coins[0].syncOnly this.state.coins[0].mode,
)); this.state.coins[0].syncOnly,
));
} else {
Store.dispatch(addCoin(
coin,
this.state.coins[0].mode,
this.state.coins[0].syncOnly,
null,
{ type: this.state.coins[0].daemonParam }
));
}
this.removeCoin(); this.removeCoin();
this.addNewItem(); this.addNewItem();
@ -230,6 +256,7 @@ class AddCoin extends React.Component {
activateAllCoins() { activateAllCoins() {
const coin = this.state.coins[0].selectedCoin.split('|')[0]; const coin = this.state.coins[0].selectedCoin.split('|')[0];
if (!this.isCoinAlreadyAdded(coin)) { if (!this.isCoinAlreadyAdded(coin)) {
Store.dispatch( Store.dispatch(
addCoin( addCoin(

12
react/src/components/addcoin/addcoin.render.js

@ -49,15 +49,15 @@ const AddCoinRender = function() {
</button> </button>
</div> </div>
<div className="col-sm-12"> <div className="col-sm-12">
<p> <p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.FULL_MODE') }:</strong> { translate('INDEX.FULL_MODE_DESC') } <strong>{ translate('INDEX.FULL_MODE') }:</strong> { translate('INDEX.FULL_MODE_DESC') }
</p> </p>
<p> <p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.BASILISK_MODE') }:</strong> { translate('INDEX.BASILISK_MODE_DESC') } <strong>{ translate('INDEX.BASILISK_MODE') }:</strong> { translate('INDEX.BASILISK_MODE_DESC') }
</p> </p>
<p> <p>
<strong>{ translate('INDEX.NATIVE_MODE') }:</strong> { translate('INDEX.NATIVE_MODE_DESC1') } <strong>{ translate('INDEX.NATIVE_MODE') }:</strong> { translate('INDEX.NATIVE_MODE_DESC1') }&nbsp;
<strong>Komodo Daemon</strong> { translate('INDEX.NATIVE_MODE_DESC2') } <strong>Komodo Daemon</strong> { translate('INDEX.NATIVE_MODE_DESC2') }&nbsp;
<i>Iguana Daemon</i> { translate('INDEX.NATIVE_MODE_DESC3') }. <i>Iguana Daemon</i> { translate('INDEX.NATIVE_MODE_DESC3') }.
</p> </p>
<div className="alert alert-icon alert-primary"> <div className="alert alert-icon alert-primary">
@ -67,8 +67,8 @@ const AddCoinRender = function() {
<span>×</span> <span>×</span>
</button> </button>
<i className="icon md-info-outline"></i> <i className="icon md-info-outline"></i>
<strong>{ translate('INDEX.NATIVE_MODE') }</strong> { translate('INDEX.NATIVE_MODE_DESC4') } <strong>{ translate('INDEX.NATIVE_MODE') }</strong> { translate('INDEX.NATIVE_MODE_DESC4') }&nbsp;
<strong>{ translate('INDEX.NATIVE_MODE_DESC5') }</strong>, <strong>{ translate('INDEX.NATIVE_MODE_DESC5') }</strong>,&nbsp;
<i>{ translate('INDEX.NATIVE_MODE_DESC5') }</i>. <i>{ translate('INDEX.NATIVE_MODE_DESC5') }</i>.
</div> </div>
</div> </div>

32
react/src/components/addcoin/addcoinOptionsCrypto.js

@ -1,26 +1,34 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../translate/translate';
import { Config } from '../../actions/actionCreators';
class AddCoinOptionsCrypto extends React.Component { class AddCoinOptionsCrypto extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
}
}
render() { render() {
//<option value="ANC|full">AnonCoin (ANC)</option> //<option value="ANC|full">AnonCoin (ANC)</option>
//<option value="MZC|full">MazaCoin (MZC)</option> //<option value="MZC|full">MazaCoin (MZC)</option>
//<option value="SYS|full">SysCoin (SYS)</option> //<option value="SYS|full">SysCoin (SYS)</option>
return ( return (
<optgroup label="Crypto Currencies"> <optgroup label="Crypto Currencies">
<option value="BTCD|full">BitcoinDark (BTCD)</option> <option value="BTCD|full" className={ this.state.nativeOnly ? 'hide' : '' }>BitcoinDark (BTCD)</option>
<option value="BTC|full|basilisk">Bitcoin (BTC)</option> <option value="BTC|full|basilisk" className={ this.state.nativeOnly ? 'hide' : '' }>Bitcoin (BTC)</option>
<option value="BTM|full">Bitmark (BTM)</option> <option value="BTM|full" className={ this.state.nativeOnly ? 'hide' : '' }>Bitmark (BTM)</option>
<option value="CARB|full">Carboncoin (CARB)</option> <option value="CARB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Carboncoin (CARB)</option>
<option value="DGB|full">Digibyte (DGB)</option> <option value="DGB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Digibyte (DGB)</option>
<option value="DOGE|full">Dogecoin (DOGE)</option> <option value="DOGE|full" className={ this.state.nativeOnly ? 'hide' : '' }>Dogecoin (DOGE)</option>
<option value="FRK|full">Franko (FRK)</option> <option value="FRK|full" className={ this.state.nativeOnly ? 'hide' : '' }>Franko (FRK)</option>
<option value="GAME|full">Gamecredits (GAME)</option> <option value="GAME|full" className={ this.state.nativeOnly ? 'hide' : '' }>Gamecredits (GAME)</option>
<option value="KMD|basilisk|native">Komodo (KMD)</option> <option value="KMD|basilisk|native">Komodo (KMD)</option>
<option value="LTC|full">Litecoin (LTC)</option> <option value="LTC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Litecoin (LTC)</option>
<option value="UNO|full">Unobtanium (UNO)</option> <option value="UNO|full" className={ this.state.nativeOnly ? 'hide' : '' }>Unobtanium (UNO)</option>
<option value="ZEC|full">Zcash (ZEC)</option> <option value="ZEC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zcash (ZEC)</option>
<option value="ZET|full">Zetacoin (ZET)</option> <option value="ZET|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zetacoin (ZET)</option>
</optgroup> </optgroup>
); );
} }

20
react/src/components/addcoin/coin-selectors.render.js

@ -34,7 +34,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</button> </button>
</div> </div>
<div className="col-sm-12 text-center"> <div className="col-sm-12 text-center">
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login"> <div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input <input
type="radio" type="radio"
className="to-labelauty labelauty" className="to-labelauty labelauty"
@ -64,7 +64,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span> </span>
</label> </label>
</div> </div>
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login"> <div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input <input
type="radio" type="radio"
className="to-labelauty labelauty" className="to-labelauty labelauty"
@ -94,7 +94,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span> </span>
</label> </label>
</div> </div>
<div className="form-group col-lg-4 col-md-4 col-sm-12 col-xs-12 style-addcoin-lbl-mdl-login"> <div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6" style={{ paddingLeft: this.state.nativeOnly ? '0' : 'inherit' }}>
<input <input
type="radio" type="radio"
className="to-labelauty labelauty" className="to-labelauty labelauty"
@ -133,6 +133,20 @@ const CoinSelectorsRender = function(item, coin, i) {
<i className="fa fa-trash-o"></i> <i className="fa fa-trash-o"></i>
</button> </button>
</div> </div>
<div className={ item.mode === '-1' || item.mode === -1 ? 'col-sm-5' : 'hide' }>
<div className="toggle-box padding-top-3 padding-bottom-10">
<select
className="form-control form-material"
name="daemonParam"
onChange={ (event) => this.updateDaemonParam(event, i) }
autoFocus>
<option>Daemon param: none</option>
<option value="silent">Daemon param: background process</option>
<option value="reindex">Daemon param: reindex</option>
<option value="rescan">Daemon param: rescan</option>
</select>
</div>
</div>
<div className={ item.mode === '1' || item.mode === 1 ? 'col-sm-12' : 'hide' }> <div className={ item.mode === '1' || item.mode === 1 ? 'col-sm-12' : 'hide' }>
<div className="toggle-box padding-top-3 padding-bottom-10"> <div className="toggle-box padding-top-3 padding-bottom-10">
<span className="pointer"> <span className="pointer">

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

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { import {
Config,
dashboardChangeActiveCoin, dashboardChangeActiveCoin,
iguanaActiveHandle, iguanaActiveHandle,
getAddressesByAccount, getAddressesByAccount,
@ -16,7 +17,8 @@ import {
getKMDOPID, getKMDOPID,
getNativeTxHistory, getNativeTxHistory,
getKMDBalanceTotal, getKMDBalanceTotal,
getSyncInfoNative getSyncInfoNative,
getDebugLog
} from '../../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../../store'; import Store from '../../../store';
@ -43,11 +45,14 @@ class CoinTileItem extends React.Component {
Store.dispatch(iguanaActiveHandle(true)); Store.dispatch(iguanaActiveHandle(true));
const syncPercentage = this.props.Dashboard && this.props.Dashboard.progress && (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2)).replace('NaN', 0); const syncPercentage = this.props.Dashboard && this.props.Dashboard.progress && (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2)).replace('NaN', 0);
if (syncPercentage < 100) {
Store.dispatch(getDebugLog('komodo', 10));
}
if (this.props.Dashboard.progress && if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks && this.props.Dashboard.progress.blocks &&
this.props.Dashboard.progress.longestchain && this.props.Dashboard.progress.longestchain &&
syncPercentage && syncPercentage &&
syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD) { (Config.iguanaLessMode || syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD)) {
Store.dispatch(getSyncInfoNative(coin, true)); Store.dispatch(getSyncInfoNative(coin, true));
Store.dispatch(getKMDBalanceTotal(coin)); Store.dispatch(getKMDBalanceTotal(coin));
Store.dispatch(getNativeTxHistory(coin)); Store.dispatch(getNativeTxHistory(coin));

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

@ -30,7 +30,6 @@ const LoginModalRender = function () {
<div className="brand"> <div className="brand">
<img className="brand-img" src="assets/images/easydex-logo-big.png" alt="SuperNET Iguana" /> <img className="brand-img" src="assets/images/easydex-logo-big.png" alt="SuperNET Iguana" />
</div> </div>
<div id="section-login" className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }> <div id="section-login" className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }>
<h4 className="color-white" id="login-welcome">{ translate('INDEX.WELCOME_LOGIN') }</h4> <h4 className="color-white" id="login-welcome">{ translate('INDEX.WELCOME_LOGIN') }</h4>
<div className="login-form"> <div className="login-form">

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

@ -29,7 +29,7 @@ const DashboardRender = function() {
{ !this.isNativeMode() && <WalletsProgress {...this.props} /> } { !this.isNativeMode() && <WalletsProgress {...this.props} /> }
{ !this.isNativeMode() && <WalletsBalance {...this.props} />} { !this.isNativeMode() && <WalletsBalance {...this.props} />}
<SendCoin {...this.props} /> <SendCoin {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} /> { !this.isNativeMode() && <ReceiveCoin {...this.props.ActiveCoin} /> }
<WalletsData {...this.props} /> <WalletsData {...this.props} />
<WalletsTxInfo {...this.props} /> <WalletsTxInfo {...this.props} />
<WalletsNative {...this.props} /> <WalletsNative {...this.props} />

4
react/src/components/dashboard/navbar/navbar.js

@ -6,7 +6,8 @@ import {
startInterval, startInterval,
toggleSyncOnlyModal, toggleSyncOnlyModal,
getSyncOnlyForks, getSyncOnlyForks,
logout logout,
Config
} from '../../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../../store'; import Store from '../../../store';
@ -17,6 +18,7 @@ class Navbar extends React.Component {
super(props); super(props);
this.state = { this.state = {
openDropMenu: false, openDropMenu: false,
nativeOnly: Config.iguanaLessMode,
}; };
this.openDropMenu = this.openDropMenu.bind(this); this.openDropMenu = this.openDropMenu.bind(this);
this.logout = this.logout.bind(this); this.logout = this.logout.bind(this);

18
react/src/components/dashboard/navbar/navbar.render.js

@ -19,12 +19,14 @@ const NavbarRender = function() {
<div className="navbar-brand navbar-brand-center site-gridmenu-toggle"> <div className="navbar-brand navbar-brand-center site-gridmenu-toggle">
<img <img
className="navbar-brand-logo hidden-xs" className="navbar-brand-logo hidden-xs"
src="assets/images/easydex-logo-dashboard.png" src="assets/images/agama-logo-side.svg"
title="SuperNET Iguana" /> height="100"
width="100"
title="Agama Wallet" />
<img <img
className="navbar-brand-logo hidden-md hidden-sm hidden-lg" className="navbar-brand-logo hidden-md hidden-sm hidden-lg"
src="assets/images/easydex-logo-dashboard-white.png" src="assets/images/agama-icon.svg"
title="SuperNET Iguana white" /> title="Agama Wallet white" />
<span className="navbar-brand-text hidden-xs"></span> <span className="navbar-brand-text hidden-xs"></span>
</div> </div>
<button <button
@ -50,9 +52,9 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> { translate('INDEX.WALLETS') } <i className="site-menu-icon"></i> { translate('INDEX.WALLETS') }
</a> </a>
</li> </li>
<li className={ this.isSectionActive('edex') ? 'active nav-top-menu' : 'nav-top-menu' }> <li className={ 'hide ' + (this.isSectionActive('edex') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('edex') }> <a onClick={ () => this.dashboardChangeSection('edex') }>
<i className="site-menu-icon"></i> EasyDEX <i className="site-menu-icon"></i> BarterDEX
</a> </a>
</li> </li>
<li className={ 'hide ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }> <li className={ 'hide ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }>
@ -60,7 +62,7 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> Jumblr <i className="site-menu-icon"></i> Jumblr
</a> </a>
</li> </li>
<li className={ this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu' }> <li className={ this.state.nativeOnly ? 'hide' : (this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('atomic') }> <a onClick={ () => this.dashboardChangeSection('atomic') }>
<i className="site-menu-icon"></i> Atomic Explorer <i className="site-menu-icon"></i> Atomic Explorer
</a> </a>
@ -95,7 +97,7 @@ const NavbarRender = function() {
<i className="icon md-settings"></i> { translate('INDEX.SETTINGS') } <i className="icon md-settings"></i> { translate('INDEX.SETTINGS') }
</a> </a>
</li> </li>
<li> <li className={ this.state.nativeOnly ? 'hide' : '' }>
<a onClick={ () => this.openSyncOnlyModal() }> <a onClick={ () => this.openSyncOnlyModal() }>
<i className="icon fa-cubes"></i> { translate('ADD_COIN.SYNC_ONLY') } <i className="icon fa-cubes"></i> { translate('ADD_COIN.SYNC_ONLY') }
</a> </a>

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

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { sortByDate } from '../../../util/sort'; import { sortByDate } from '../../../util/sort';
import { Config } from '../../../actions/actionCreators';
import { import {
NotificationsByTypeRender, NotificationsByTypeRender,
NotificationsModalRender, NotificationsModalRender,
@ -19,6 +20,7 @@ class Notifications extends React.Component {
}, },
activeTab: 2, activeTab: 2,
guiLog: null, guiLog: null,
debug: Config.debug,
}; };
this.toggleNotificationsModal = this.toggleNotificationsModal.bind(this); this.toggleNotificationsModal = this.toggleNotificationsModal.bind(this);
} }

8
react/src/components/dashboard/notifications/notifications.render.js

@ -92,14 +92,14 @@ export const NotificationsRender = function() {
<div> <div>
<div <div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' } className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }> onClick={ this.state.debug ? this.toggleNotificationsModal : null }>
<span className="badge success"> <span className={ this.state.debug ? 'badge success' : 'hide' }>
{ this.state.calls.success } { this.state.calls.success }
</span> </span>
<span className="badge error"> <span className={ this.state.debug ? 'badge error' : 'hide' }>
{ this.state.calls.error } { this.state.calls.error }
</span> </span>
<span className="badge pending"> <span className={ this.state.debug ? 'badge pending' : 'hide' }>
{ this.state.calls.pending } { this.state.calls.pending }
</span> </span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }> <div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>

11
react/src/components/dashboard/receiveCoin/receiveCoin.render.js

@ -73,8 +73,7 @@ export const ReceiveCoinRender = function() {
onClick={ this.openDropMenu }> onClick={ this.openDropMenu }>
<a className="dropdown-toggle white btn btn-warning"> <a className="dropdown-toggle white btn btn-warning">
<i className="icon md-arrows margin-right-10"></i> { translate('INDEX.GET_NEW_ADDRESS') } <i className="icon md-arrows margin-right-10"></i> { translate('INDEX.GET_NEW_ADDRESS') }
<span <span className="caret"></span>
className="caret"></span>
</a> </a>
<ul <ul
className="dropdown-menu dropdown-menu-right"> className="dropdown-menu dropdown-menu-right">
@ -97,7 +96,7 @@ export const ReceiveCoinRender = function() {
<div className="panel-body"> <div className="panel-body">
<table className="table table-hover dataTable table-striped"> <table className="table table-hover dataTable table-striped">
<thead> <thead>
{this.isNativeMode() ? { this.isNativeMode() ?
<tr> <tr>
<th>{ translate('INDEX.TYPE') }</th> <th>{ translate('INDEX.TYPE') }</th>
<th>{ translate('INDEX.ADDRESS') }</th> <th>{ translate('INDEX.ADDRESS') }</th>
@ -113,11 +112,11 @@ export const ReceiveCoinRender = function() {
} }
</thead> </thead>
<tbody> <tbody>
{this.renderAddressList('public')} { this.renderAddressList('public') }
{this.isNativeMode() && this.renderAddressList('private')} { this.isNativeMode() && this.renderAddressList('private') }
</tbody> </tbody>
<tfoot> <tfoot>
{this.isNativeMode() ? { this.isNativeMode() ?
<tr> <tr>
<th>{ translate('INDEX.TYPE') }</th> <th>{ translate('INDEX.TYPE') }</th>
<th>{ translate('INDEX.ADDRESS') }</th> <th>{ translate('INDEX.ADDRESS') }</th>

13
react/src/components/dashboard/settings/settings.js

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import { translate } from '../../../translate/translate'; import { translate } from '../../../translate/translate';
import { import {
Config,
iguanaActiveHandle, iguanaActiveHandle,
encryptWallet, encryptWallet,
settingsWifkeyState, settingsWifkeyState,
@ -42,6 +43,7 @@ class Settings extends React.Component {
cliResponse: null, cliResponse: null,
exportWifKeysRaw: false, exportWifKeysRaw: false,
seedInputVisibility: false, seedInputVisibility: false,
nativeOnly: Config.iguanaLessMode,
}; };
this.exportWifKeys = this.exportWifKeys.bind(this); this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this); this.updateInput = this.updateInput.bind(this);
@ -320,12 +322,21 @@ class Settings extends React.Component {
_cliResponseParsed = _cliResponse.result; _cliResponseParsed = _cliResponse.result;
} }
const __cliResponseParsed = _cliResponseParsed.split('\r\n');
let _items = [];
for (let i = 0; i < __cliResponseParsed.length; i++) {
_items.push(
<div key={ `cli-response-${Math.random(0, 9) * 10}` }>{ __cliResponseParsed[i] }</div>
);
}
return ( return (
<div> <div>
<div> <div>
<strong>CLI response:</strong> <strong>CLI response:</strong>
</div> </div>
{ JSON.stringify(_cliResponseParsed, null, '\t') } { _items }
</div> </div>
); );
} else { } else {

30
react/src/components/dashboard/settings/settings.render.js

@ -106,9 +106,9 @@ export const SettingsRender = function() {
className="panel-group" className="panel-group"
id="SettingsAccordion"> id="SettingsAccordion">
<div <div
className="panel"
id="WalletInfo" id="WalletInfo"
onClick={ () => this.openTab('WalletInfo', 0) }> onClick={ () => this.openTab('WalletInfo', 0) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 0 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 0 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-balance-wallet"></i>{ translate('INDEX.WALLET_INFO') } <i className="icon md-balance-wallet"></i>{ translate('INDEX.WALLET_INFO') }
@ -157,9 +157,9 @@ export const SettingsRender = function() {
</div> </div>
<div <div
className="panel"
id="AddNodeforCoin" id="AddNodeforCoin"
onClick={ () => this.openTab('AddNodeforCoin', 1) }> onClick={ () => this.openTab('AddNodeforCoin', 1) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 1 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 1 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-plus-square"></i>{ translate('INDEX.ADD_NODE') } <i className="icon md-plus-square"></i>{ translate('INDEX.ADD_NODE') }
@ -243,9 +243,9 @@ export const SettingsRender = function() {
</div> </div>
<div <div
className="panel"
id="DumpWallet" id="DumpWallet"
onClick={ () => this.openTab('DumpWallet', 2) }> onClick={ () => this.openTab('DumpWallet', 2) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 2 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 2 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon wb-briefcase"></i>{ translate('INDEX.WALLET_BACKUP') } <i className="icon wb-briefcase"></i>{ translate('INDEX.WALLET_BACKUP') }
@ -259,9 +259,9 @@ export const SettingsRender = function() {
</div> </div>
<div <div
className="panel"
id="FiatCurrencySettings" id="FiatCurrencySettings"
onClick={ () => this.openTab('FiatCurrencySettings', 3) }> onClick={ () => this.openTab('FiatCurrencySettings', 3) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 3 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 3 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-money"></i>{ translate('INDEX.FIAT_CURRENCY') } <i className="icon fa-money"></i>{ translate('INDEX.FIAT_CURRENCY') }
@ -275,9 +275,9 @@ export const SettingsRender = function() {
</div> </div>
<div <div
className="panel"
id="ExportKeys" id="ExportKeys"
onClick={ () => this.openTab('ExportKeys', 4) }> onClick={ () => this.openTab('ExportKeys', 4) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 4 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 4 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.EXPORT_KEYS') } <i className="icon md-key"></i>{ translate('INDEX.EXPORT_KEYS') }
@ -345,9 +345,9 @@ export const SettingsRender = function() {
</div> </div>
<div <div
className="panel"
id="ImportKeys" id="ImportKeys"
onClick={ () => this.openTab('ImportKeys', 5) }> onClick={ () => this.openTab('ImportKeys', 5) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 5 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 5 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.IMPORT_KEYS') } <i className="icon md-key"></i>{ translate('INDEX.IMPORT_KEYS') }
@ -431,7 +431,7 @@ export const SettingsRender = function() {
name="debugTarget" name="debugTarget"
id="settingsDelectDebugLogOptions" id="settingsDelectDebugLogOptions"
onChange={ this.updateInput }> onChange={ this.updateInput }>
<option value="iguana">Iguana</option> <option value="iguana" className={ this.state.nativeOnly ? 'hide' : '' }>Iguana</option>
<option value="komodo">Komodo</option> <option value="komodo">Komodo</option>
</select> </select>
<label <label
@ -487,9 +487,9 @@ export const SettingsRender = function() {
{ this.renderAppInfoTab() } { this.renderAppInfoTab() }
<div <div
className="panel"
id="Cli" id="Cli"
onClick={ () => this.openTab('Cli', 9) }> onClick={ () => this.openTab('Cli', 9) }
className={ !this.props.Main.coins.native.length ? 'hide' : 'panel' }>
<div className="panel-heading"> <div className="panel-heading">
<a className={ this.state.activeTab === 9 ? 'panel-title' : 'panel-title collapsed' }> <a className={ this.state.activeTab === 9 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-code"></i> CLI <i className="icon fa-code"></i> CLI

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

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import Config from '../../../config';
import { translate } from '../../../translate/translate'; import { translate } from '../../../translate/translate';
import { sortByDate } from '../../../util/sort'; import { sortByDate } from '../../../util/sort';
import { import {
Config,
basiliskRefresh, basiliskRefresh,
basiliskConnection, basiliskConnection,
toggleDashboardTxInfoModal, toggleDashboardTxInfoModal,

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

@ -43,12 +43,12 @@ export const PaginationRender = function(paginationFrom, paginationTo) {
<div className="row unselectable"> <div className="row unselectable">
<div className="col-sm-5"> <div className="col-sm-5">
<div className="dataTables_info"> <div className="dataTables_info">
{ translate('INDEX.SHOWING') } { translate('INDEX.SHOWING') }&nbsp;
{ paginationFrom } { paginationFrom }&nbsp;
{ translate('INDEX.TO_ALT') } { translate('INDEX.TO_ALT') }&nbsp;
{ paginationTo } { paginationTo }&nbsp;
{ translate('INDEX.OF') } { translate('INDEX.OF') }&nbsp;
{ this.props.ActiveCoin.txhistory.length } { this.props.ActiveCoin.txhistory.length }&nbsp;
{ translate('INDEX.ENTRIES_SM') } { translate('INDEX.ENTRIES_SM') }
</div> </div>
</div> </div>
@ -143,7 +143,7 @@ export const WalletsDataRender = function() {
<div className={ 'margin-bottom-3 ' + (this.state.currentStackLength === 1 || (this.state.currentStackLength === 0 && this.state.totalStackLength === 0) ? 'hide' : 'progress progress-sm') }> <div className={ 'margin-bottom-3 ' + (this.state.currentStackLength === 1 || (this.state.currentStackLength === 0 && this.state.totalStackLength === 0) ? 'hide' : 'progress progress-sm') }>
<div <div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent" className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: 100 - (this.state.currentStackLength * 100 / this.state.totalStackLength) + '%'}}> style={{ width: 100 - (this.state.currentStackLength * 100 / this.state.totalStackLength) + '%' }}>
{ translate('SEND.PROCESSING_REQ') }: { this.state.currentStackLength } / { this.state.totalStackLength } { translate('SEND.PROCESSING_REQ') }: { this.state.currentStackLength } / { this.state.totalStackLength }
</div> </div>
</div> </div>

32
react/src/components/dashboard/walletsNative/walletsNative.js

@ -1,9 +1,41 @@
import React from 'react'; import React from 'react';
import WalletsNativeRender from './walletsNative.render'; import WalletsNativeRender from './walletsNative.render';
import { translate } from '../../../translate/translate';
import {
Config,
triggerToaster
} from '../../../actions/actionCreators';
import Store from '../../../store';
import { SocketProvider } from 'socket.io-react';
import io from 'socket.io-client';
const socket = io.connect('http://127.0.0.1:' + Config.agamaPort);
class WalletsNative extends React.Component { class WalletsNative extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
socket.on('service', msg => this.updateSocketsData(msg));
}
updateSocketsData(data) {
if (data &&
data.komodod &&
data.komodod.error) {
switch (data.komodod.error) {
case 'run -reindex':
Store.dispatch(
triggerToaster(
'Restart Agama and run Komodo with -reindex param',
translate('TOASTR.WALLET_NOTIFICATION'),
'info',
false
)
);
break;
}
}
} }
defaultBG() { defaultBG() {

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

@ -4,6 +4,7 @@ import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo';
import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend'; import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend';
import WalletsProgress from '../walletsProgress/walletsProgress'; import WalletsProgress from '../walletsProgress/walletsProgress';
import WalletsNativeTxHistory from '../walletsNativeTxHistory/walletsNativeTxHistory'; import WalletsNativeTxHistory from '../walletsNativeTxHistory/walletsNativeTxHistory';
import ReceiveCoin from '../receiveCoin/receiveCoin';
const WalletsNativeRender = function() { const WalletsNativeRender = function() {
return ( return (
@ -28,6 +29,7 @@ const WalletsNativeRender = function() {
<WalletsProgress {...this.props} /> <WalletsProgress {...this.props} />
<div className="row"> <div className="row">
<WalletsBalance {...this.props} /> <WalletsBalance {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} />
<WalletsNativeTxHistory {...this.props} /> <WalletsNativeTxHistory {...this.props} />
<WalletsNativeSend {...this.props} /> <WalletsNativeSend {...this.props} />
<WalletsNativeInfo {...this.props} /> <WalletsNativeInfo {...this.props} />

148
react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js

@ -0,0 +1,148 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import {
ChainActivationNotificationRender,
WalletsNativeSyncProgressRender
} from './walletsNativeSyncProgress.render';
class WalletsNativeSyncProgress extends React.Component {
renderSyncPercentagePlaceholder() {
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks > 0 &&
this.props.Dashboard.progress.longestchain === 0) {
return (
<div className="progress-bar progress-bar-info progress-bar-striped active full-width font-size-80-percent">
<span className="full-width">{ translate('INDEX.SYNC_ERR_LONGESTCHAIN') }</span>
</div>
);
} else if (this.props.Dashboard.progress && this.props.Dashboard.progress.blocks === 0) {
return (
<div className="progress-bar progress-bar-info progress-bar-striped active full-width font-size-80-percent">
<span className="full-width">{ translate('INDEX.SYNC_ERR_BLOCKS') }</span>
</div>
);
} else {
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks) {
const syncPercentage = (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2) + '%').replace('NaN', 0);
return (
<div
className="progress-bar progress-bar-info progress-bar-striped active font-size-80-percent"
style={{ width: syncPercentage }}>
<span style={{ width: syncPercentage }}>{ syncPercentage }</span> | { this.props.Dashboard.progress.blocks } / { this.props.Dashboard.progress.longestchain } | { translate('INDEX.CONNECTIONS') }: { this.props.Dashboard.progress.connections }
</div>
);
} else {
return (
<div
className="progress-bar progress-bar-info progress-bar-striped active font-size-80-percent"
style={{ width: '100%' }}>
<span style={{ width: '100%' }}>Loading blocks...it can take up to 15 min to load blocks</span>
</div>
);
}
}
}
renderActivatingBestChainProgress() {
if (this.props.Settings &&
this.props.Settings.debugLog) {
console.log('debugLog');
if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1 &&
!this.props.Dashboard.progress &&
!this.props.Dashboard.progress.blocks) {
const temp = this.props.Settings.debugLog.split(' ');
let currentBestChain;
let currentProgress;
for (let i = 0; i < temp.length; i++) {
if (temp[i].indexOf('height=') > -1) {
currentBestChain = temp[i].replace('height=', '');
}
if (temp[i].indexOf('progress=') > -1) {
currentProgress = Number(temp[i].replace('progress=', '')) * 100;
}
}
// fallback to local data if remote node is inaccessible
if (this.props.Dashboard.progress.remoteKMDNode &&
!this.props.Dashboard.progress.remoteKMDNode.blocks) {
return (
`: ${currentProgress}% (activating)`
);
} else {
if (this.props.Dashboard.progress.remoteKMDNode &&
this.props.Dashboard.progress.remoteKMDNode.blocks) {
return(
`: ${Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks)}% (blocks ${currentBestChain} / ${this.props.Dashboard.progress.remoteKMDNode.blocks})`
);
}
}
} else if (
this.props.Settings.debugLog.indexOf('Still rescanning') > -1 &&
!this.props.Dashboard.progress ||
!this.props.Dashboard.progress.blocks
) {
const temp = this.props.Settings.debugLog.split(' ');
let currentProgress;
for (let i = 0; i < temp.length; i++) {
if (temp[i].indexOf('Progress=') > -1) {
currentProgress = (Number(temp[i].replace('Progress=', '')) * 100).toFixed(2);
}
}
return (
`: ${currentProgress}% (rescanning blocks)`
);
} else if (
this.props.Settings.debugLog.indexOf('LoadExternalBlockFile:') > -1 ||
this.props.Settings.debugLog.indexOf('Reindexing block file') > -1
) {
return (
`: (reindexing blocks from disk)`
);
} else {
return (
<span> (downloading blocks!)</span>
);
}
}
}
renderLB(_translationID) {
const _translationComponents = translate(_translationID).split('<br>');
return _translationComponents.map((_translation) =>
<span>
{ _translation }
<br />
</span>
);
}
renderChainActivationNotification() {
return ChainActivationNotificationRender.call(this);
/* if (this.props.Dashboard.progress) {
if ((!this.props.Dashboard.progress.blocks && !this.props.Dashboard.progress.longestchain) ||
(this.props.Dashboard.progress.blocks < this.props.Dashboard.progress.longestchain)) {
return ChainActivationNotificationRender.call(this);
}
} else {
return null;
} */
}
render() {
if (this.props &&
this.props.Dashboard) {
return WalletsNativeSyncProgressRender.call(this);
}
return null;
}
}
export default WalletsNativeSyncProgress;

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

@ -27,12 +27,12 @@ export const PaginationRender = function(paginationStart, paginationEnd, paginat
<div className="row unselectable"> <div className="row unselectable">
<div className="col-sm-5"> <div className="col-sm-5">
<div className="dataTables_info"> <div className="dataTables_info">
{ translate('INDEX.SHOWING') } { translate('INDEX.SHOWING') }&nbsp;
{ paginationStart } { paginationStart }&nbsp;
{ translate('INDEX.TO') } { translate('INDEX.TO') }&nbsp;
{ paginationEnd } { paginationEnd }&nbsp;
{ translate('INDEX.OF') } { translate('INDEX.OF') }&nbsp;
{ this.props.ActiveCoin.txhistory.length } { this.props.ActiveCoin.txhistory.length }&nbsp;
{ translate('INDEX.ENTRIES_SM') } { translate('INDEX.ENTRIES_SM') }
</div> </div>
</div> </div>

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

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { import {
Config,
copyCoinAddress, copyCoinAddress,
iguanaEdexBalance, iguanaEdexBalance,
toggleSendCoinForm, toggleSendCoinForm,
@ -16,6 +17,9 @@ import {
class WalletsNav extends React.Component { class WalletsNav extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
};
this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this); this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this);
} }

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

@ -24,10 +24,10 @@ export const WalletsNavWithWalletRender = function () {
return ( return (
<div> <div>
<div <div
className="page-header page-header-bordered header-easydex padding-bottom-20" className={ 'page-header page-header-bordered header-easydex ' + (this.state.nativeOnly ? 'padding-bottom-40' : 'padding-bottom-20') }
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="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

7
react/src/components/dashboard/walletsProgress/walletsProgress.js

@ -121,6 +121,13 @@ class WalletsProgress extends React.Component {
return ( return (
`: ${currentProgress}% (rescanning blocks)` `: ${currentProgress}% (rescanning blocks)`
); );
} else if (
this.props.Settings.debugLog.indexOf('LoadExternalBlockFile:') > -1 ||
this.props.Settings.debugLog.indexOf('Reindexing block file') > -1
) {
return (
`: (reindexing blocks from disk)`
);
} else { } else {
return ( return (
<span> (downloading blocks)</span> <span> (downloading blocks)</span>

4
react/src/components/login/login.js

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { import {
Config,
toggleAddcoinModal, toggleAddcoinModal,
iguanaWalletPassphrase, iguanaWalletPassphrase,
iguanaActiveHandle, iguanaActiveHandle,
@ -36,6 +37,7 @@ class Login extends React.Component {
displaySeedBackupModal: false, displaySeedBackupModal: false,
customWalletSeed: false, customWalletSeed: false,
isCustomSeedWeak: false, isCustomSeedWeak: false,
nativeOnly: Config.iguanaLessMode,
}; };
this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this); this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this);
this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this); this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this);
@ -196,7 +198,7 @@ class Login extends React.Component {
return null; return null;
} }
const passPhraseWords = passPhrase.split(" "); const passPhraseWords = passPhrase.split(' ');
if (!PassPhraseGenerator.arePassPhraseWordsValid(passPhraseWords)) if (!PassPhraseGenerator.arePassPhraseWordsValid(passPhraseWords))
return null; return null;

11
react/src/components/login/login.render.js

@ -10,11 +10,13 @@ const LoginRender = function () {
<div className="brand"> <div className="brand">
<img <img
className="brand-img" className="brand-img"
src="assets/images/easydex-logo-big.png" src="assets/images/agama-login-logo.svg"
width="200"
height="160"
alt="SuperNET Iguana" /> alt="SuperNET Iguana" />
</div> </div>
<div className="vertical-padding-20 horizontal-padding-0"> <div className={ this.state.nativeOnly ? 'hide' : 'vertical-padding-20 horizontal-padding-0' }>
<span <span
className="display-sync-only-coins-toggle" className="display-sync-only-coins-toggle"
onClick={ this.openSyncOnlyModal }> onClick={ this.openSyncOnlyModal }>
@ -52,7 +54,7 @@ const LoginRender = function () {
</div> </div>
</div> </div>
<div className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }> <div className={ this.state.activeLoginSection === 'login' && !this.state.nativeOnly ? 'show' : 'hide' }>
<h4 className="color-white"> <h4 className="color-white">
{translate('INDEX.WELCOME_LOGIN')} {translate('INDEX.WELCOME_LOGIN')}
</h4> </h4>
@ -82,8 +84,7 @@ const LoginRender = function () {
type="button" type="button"
className="btn btn-primary btn-block" className="btn btn-primary btn-block"
onClick={ this.loginSeed } onClick={ this.loginSeed }
disabled={ !this.state.loginPassphrase disabled={ !this.state.loginPassphrase || !this.state.loginPassphrase.length }>{ translate('INDEX.SIGN_IN') }</button>
|| !this.state.loginPassphrase.length }>{ translate('INDEX.SIGN_IN') }</button>
<div className="form-group form-material floating"> <div className="form-group form-material floating">
<button <button
className="btn btn-lg btn-flat btn-block waves-effect" className="btn btn-lg btn-flat btn-block waves-effect"

2
react/src/components/main/main.js

@ -1,9 +1,9 @@
import React from 'react'; import React from 'react';
import Config from '../../config';
import WalletMain from './walletMain'; import WalletMain from './walletMain';
import { iguanaSetRPCAuth } from '../../util/auth'; import { iguanaSetRPCAuth } from '../../util/auth';
import Store from '../../store'; import Store from '../../store';
import { import {
Config,
getDexCoins, getDexCoins,
iguanaActiveHandle iguanaActiveHandle
} from '../../actions/actionCreators'; } from '../../actions/actionCreators';

13
react/src/components/overrides.scss

@ -483,7 +483,7 @@ input:checked + .slider:before {
&.stick-to-top { &.stick-to-top {
top: -3px; top: -3px;
left: 470px; left: 400px;
z-index: 1500; z-index: 1500;
.spinner { .spinner {
@ -582,3 +582,14 @@ select{
} }
} }
} }
.site-navbar {
.navbar-brand-logo {
height: 32px;
width: 110px;
}
}
.navbar-brand {
padding: 22px 15px;
}

3
react/src/config.js

@ -9,5 +9,6 @@ module.exports = {
cli: { cli: {
passthru: true, passthru: true,
default: true default: true
} },
iguanaLessMode: true,
}; };

4
react/src/translate/en.js

@ -32,7 +32,7 @@ export const _lang = {
'SYNC_ERR_BLOCKS': 'Unable to get current sync progress. Err: no blocks param in response', 'SYNC_ERR_BLOCKS': 'Unable to get current sync progress. Err: no blocks param in response',
'COIN_IS_BUSY': 'Coin is busy processing', 'COIN_IS_BUSY': 'Coin is busy processing',
'REFRESHING_BASILISK_NET': 'Refreshing Basilisk Network Connections', 'REFRESHING_BASILISK_NET': 'Refreshing Basilisk Network Connections',
'SELECT_A_COIN': 'Select Coin to add to EasyDEX', 'SELECT_A_COIN': 'Select Coin to add to Agama Wallet',
'WALLETS': 'Wallets', 'WALLETS': 'Wallets',
'ACTIVATE_COIN': 'Activate Coin', 'ACTIVATE_COIN': 'Activate Coin',
'WELCOME_PLEASE_ADD': 'Welcome. Please add coin to start.', 'WELCOME_PLEASE_ADD': 'Welcome. Please add coin to start.',
@ -55,7 +55,7 @@ export const _lang = {
'NATIVE_MODE_DESC6': 'Private Transactions', 'NATIVE_MODE_DESC6': 'Private Transactions',
'UNSUPPORTED_BROWSER': 'Uh Oh! Unsupported Web Browser :-(', 'UNSUPPORTED_BROWSER': 'Uh Oh! Unsupported Web Browser :-(',
'CLOSE': 'Close', 'CLOSE': 'Close',
'IE_UNSUPPORTED': 'The current version of EasyDEX-GUI doesn\'t support Internet Explorer', 'IE_UNSUPPORTED': 'The current version of Agama Wallet doesn\'t support Internet Explorer',
'PLEASE_USE': 'Please use either', 'PLEASE_USE': 'Please use either',
'OR': 'or', 'OR': 'or',
'TO_USE': 'to use', 'TO_USE': 'to use',

Loading…
Cancel
Save