load seed, coins from conf
This commit is contained in:
parent
3161a38d25
commit
116693993a
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"coins": ["KMD", "BEER"],
|
||||
"passphrase": ""
|
||||
}
|
|
@ -216,7 +216,9 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title language" data-langstr="portfolio_portfolio_chart"></h3>
|
||||
<button class="btn btn-xs btn-info btn-activatecoins portfolio" style="float: right; margin-right: -6px; margin-top: -20px"><span class="language" data-langstr="portfolio_add_coins"></span> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
<button class="btn btn-xs btn-info load-selection-btn" style="float: right; margin-right: 12px; margin-top: -20px; position: relative; right: -10px">Load selection <span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
|
||||
<button class="btn btn-xs btn-info btn-activatecoins portfolio" style="float: right; margin-left: -6px; margin-top: -20px"><span class="language" data-langstr="portfolio_add_coins"></span> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
<button class="btn btn-xs btn-refreshportfolio portfolio" style="float: right; margin-right: 6px; margin-top: -20px"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
<div class="portfolio portfolio-coinslist"> <!-- panel-body -->
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
var CheckMM_Interval = null;
|
||||
var CheckDefaultLogin_Interval = null;
|
||||
var mmPort = window.require('electron').remote.getCurrentWindow().mmPort;
|
||||
var mmPort = window.require('electron').remote.getCurrentWindow().mmPort || 7783;
|
||||
|
||||
console.log(window.require('electron').remote.getCurrentWindow().config);
|
||||
|
||||
$(document).ready(function() {
|
||||
BarterDEXInitLang();
|
||||
|
|
|
@ -9,7 +9,8 @@ var check_bot_list_Interval = null;
|
|||
var bot_screen_coin_balance_Interval = null;
|
||||
var bot_screen_sellcoin_balance_Interval = null;
|
||||
var shell = require('electron').shell;
|
||||
var mmPort = window.require('electron').remote.getCurrentWindow().mmPort;
|
||||
var mmPort = window.require('electron').remote.getCurrentWindow().mmPort || 7783;
|
||||
var conf = window.require('electron').remote.getCurrentWindow().config;
|
||||
|
||||
$(window).resize(function() {
|
||||
$('.loginbody').css('height',$(window).height());
|
||||
|
@ -22,6 +23,13 @@ $(window).resize(function() {
|
|||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
// load conf
|
||||
$('#loginPassphrase').val(conf.passphrase);
|
||||
$('.load-selection-btn').click(function() {
|
||||
sessionStorage.setItem('mm_chartinterval', JSON.stringify({"periodicity":"h","interval":1}));
|
||||
loadCoinSelection();
|
||||
});
|
||||
|
||||
document.addEventListener('drop', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
@ -1152,6 +1160,34 @@ function get_coins() {
|
|||
});
|
||||
}
|
||||
|
||||
function loadCoinSelection() {
|
||||
for (let i = 0; i < conf.coins.length; i++) {
|
||||
const _coin = conf.coins[i].indexOf('|spv') > -1 ? conf.coins[i].split('|')[0] : conf.coins[i];
|
||||
const _electrum = conf.coins[i].indexOf('|spv') > -1 ? false : true;
|
||||
|
||||
enable_disable_coin({
|
||||
coin: _coin,
|
||||
electrum: _electrum,
|
||||
method: 'enable',
|
||||
});
|
||||
}
|
||||
|
||||
$('.porfolio_coins_list tbody').empty();
|
||||
var actiavte_portfolio_coins_list_spinner = ''
|
||||
actiavte_portfolio_coins_list_spinner += '<th colspan="7">';
|
||||
actiavte_portfolio_coins_list_spinner += '<div style="text-align: center; height: 100px;">';
|
||||
actiavte_portfolio_coins_list_spinner += '<svg id="portfolio-coins-spinner">';
|
||||
actiavte_portfolio_coins_list_spinner += '<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"/>';
|
||||
actiavte_portfolio_coins_list_spinner += '<circle class="path2" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"/>';
|
||||
actiavte_portfolio_coins_list_spinner += '<circle class="path3" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"/>';
|
||||
actiavte_portfolio_coins_list_spinner += '<circle class="path4" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"/>';
|
||||
actiavte_portfolio_coins_list_spinner += '</svg>';
|
||||
actiavte_portfolio_coins_list_spinner += '</div>';
|
||||
actiavte_portfolio_coins_list_spinner += '</th>';
|
||||
$('.porfolio_coins_list tbody').append(actiavte_portfolio_coins_list_spinner);
|
||||
CheckPortfolioFn();
|
||||
}
|
||||
|
||||
let electrumCoinsKeepAlive = {};
|
||||
|
||||
function enable_disable_coin(enable_disable_coin_data) {
|
||||
|
|
Loading…
Reference in New Issue