From b558cee8250fa690298444ef74b6402d052f8271 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 5 May 2017 21:29:36 +0300 Subject: [PATCH] syncOnly forks --- react/src/actions/actionCreators.js | 29 ++++++++++++++++-- .../addcoin/addcoinOptionsCrypto.js | 6 ++-- react/src/styles/index.scss | 30 +++++++++++++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/react/src/actions/actionCreators.js b/react/src/actions/actionCreators.js index dd1f06d..6bbc6f5 100644 --- a/react/src/actions/actionCreators.js +++ b/react/src/actions/actionCreators.js @@ -316,7 +316,7 @@ export function dismissToasterMessage() { } } -export function addCoin(coin, mode, syncOnly) { +export function addCoin(coin, mode, syncOnly, port) { console.log('coin, mode, syncOnly', coin + ' ' + mode + ' ' + syncOnly); /*startIguanaInstance(mode, coin) .then(function(json) { @@ -361,8 +361,14 @@ export function addCoin(coin, mode, syncOnly) { }); } } else { - return dispatch => { - dispatch(iguanaAddCoin(coin, mode, _acData)); + if (port) { + return dispatch => { + dispatch(iguanaAddCoin(coin, mode, _acData, port)); + } + } else { + return dispatch => { + dispatch(iguanaAddCoin(coin, mode, _acData)); + } } } } @@ -2498,6 +2504,23 @@ export function getSyncOnlyForks() { } } +export function stopIguanaFork(pmid) { + return dispatch => { + return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/forks/stop?pmid=' + pmid, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + }) + .catch(function(error) { + console.log(error); + dispatch(triggerToaster(true, 'stopIguanaFork', 'Error', 'error')); + }) + .then(response => response.json()) + .then(json => dispatch(triggerToaster(true, 'Iguana instance is stopped', translate('TOASTR.SERVICE_NOTIFICATION'), 'success'))) + } +} + /*function Shepherd_SendPendValue() { Shepherd_SysInfo().then(function(result){ var ram_data = formatBytes(result.totalmem_bytes) diff --git a/react/src/components/addcoin/addcoinOptionsCrypto.js b/react/src/components/addcoin/addcoinOptionsCrypto.js index f87c8f4..7438132 100644 --- a/react/src/components/addcoin/addcoinOptionsCrypto.js +++ b/react/src/components/addcoin/addcoinOptionsCrypto.js @@ -3,13 +3,13 @@ import { translate } from '../../translate/translate'; class AddCoinOptionsCrypto extends React.Component { render() { - // - // - // return ( + + + diff --git a/react/src/styles/index.scss b/react/src/styles/index.scss index cd16870..a86f0ab 100644 --- a/react/src/styles/index.scss +++ b/react/src/styles/index.scss @@ -163,6 +163,36 @@ body { .sync-only-forks { color: #757575; + + .modal-body { + overflow-y: auto; + } + .badge.up { + position: absolute; + top: 40px; + left: 65px; + margin: 0 5px; + } + .avatar { + width: 20%; + display: inline-block; + text-align: center; + vertical-align: top; + + img { + width: 55px; + display: inherit; + } + } + .progress-bars { + padding-left: 40px; + display: inline-block; + width: 80%; + margin: 0 auto; + } + .padding-bottom-60:last-child { + padding-bottom: 0 !important; + } } /*.toaster .single-toast:nth-child(0) {