Browse Source

Komodo Activating Best Chain GUI conditions added

master
Satinder Grewal 8 years ago
parent
commit
3329b7765b
  1. 2
      assets/global/js/components/ladda-bootstrap.js
  2. 23
      assets/scripts/kmd_wallet_dashboard.js
  3. 10
      index.html

2
assets/global/js/components/ladda-bootstrap.js

@ -6,7 +6,7 @@
$.components.register("ladda", {
mode: "init",
defaults: {
timeout: 10000
timeout: 2000
},
init: function() {
if (typeof Ladda === "undefined") return;

23
assets/scripts/kmd_wallet_dashboard.js

@ -289,7 +289,18 @@ function RunKMDInitFunctions() {
$('#extcoin-wallet').hide();
$('#extcoin-wallet-connection-alert').show();
}
if ( check1[0] == 'connected' || check1[0] == 'activating' ) {
if ( check1[0] == 'activating' ) {
$('#extcoin-wallet-activating-alert').show();
$('#extcoin-wallet').show();
$('#extcoin-wallet-connection-alert').hide();
$('#kmd_wallet_dashoard_section').show();
$('#kmd_wallet_dashboardinfo').show();
$('#kmd_wallet_send').hide();
$('#kmd_wallet_recieve_section').hide();
$('#kmd_wallet_settings').hide();
}
if ( check1[0] == 'connected') {
getTotalKMDBalance();
KMDfillTxHistoryT();
$('#extcoin-wallet').show();
@ -1173,8 +1184,8 @@ function CheckIfConnected() {
if ( AjaxOutputData.errors != undefined ) {
//console.log('connected');
result.push('connected');
//} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) {
//result.push('activating');
} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) {
result.push('activating');
} else if ( AjaxOutputData.errors == undefined) {
result.push('not active');
} else {
@ -1254,8 +1265,8 @@ function KMD_getInfo_rtrn() {
if ( AjaxOutputData.errors != undefined ) {
//console.log('connected');
result.push(AjaxOutputData);
//} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) {
//result.push('activating');
} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) {
result.push('activating');
} else if ( AjaxOutputData.errors == undefined) {
result.push('not active');
} else {
@ -1287,7 +1298,7 @@ function KMD_ProgressBar() {
//console.log(getinfotmp.connections);
//console.log(getinfotmp.longestchain);
if ( getinfotmp == 'activating') {
$('span[data-extcoin="'+extcoin+'"][id="extcoin-sync-percent"]').text('Activating... Please wait');
$('span[data-extcoin="'+extcoin+'"][id="extcoin-sync-percent"]').text('Activating...');
} else {
var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100)/ parseInt(getinfotmp.longestchain, 10);
console.log(parseFloat(sync_percent).toFixed(2)+'%')

10
index.html

@ -471,12 +471,12 @@
<span class="site-menu-title">Komodo Wallet</span>
</a>
</li>
<li class="site-menu-item" id="nav-zcash-wallet">
<!--<li class="site-menu-item" id="nav-zcash-wallet">
<a class="animsition-link" href="javascript:;">
<i class="site-menu-icon" aria-hidden="true"><img src="assets/images/icons/zcash_icon_grey.png" alt="" style="width: 25px;"></i>
<span class="site-menu-title">Zcash Wallet</span>
</a>
</li>
</li>-->
<li class="site-menu-item" id="nav-iguana-atomic-explorer">
<a class="animsition-link" href="javascript:;">
<i class="site-menu-icon fa-cubes" aria-hidden="true"></i>
@ -946,6 +946,12 @@
<!--<p class="margin-top-15"><button class="btn btn-success btn-inverse" type="button" id="extcoin-wallet-connection-alert-btn">Refresh Again</button></p>-->
</div>
<div role="alert" class="alert alert-info alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-activating-alert" style="display: none;">
<button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button>
<h4>Activating best chain...</h4>
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text">Komodo daemon has been started and is processing.<br>Please wait while the best chain is being activated.</p>
</div>
<div class="row" data-extcoin="COIN" style="margin: -20px 0px 10px 0px;">
<div class="col-xs-12" data-extcoin="COIN" id="extcoin-progressbars" >
<div class="progress">

Loading…
Cancel
Save