epic halving and latest block 0 removed
This commit is contained in:
parent
c56b207dca
commit
a88cfb166a
@ -32,7 +32,7 @@
|
||||
<epic-explorer-search></epic-explorer-search>
|
||||
</div>
|
||||
<div *ngIf="halvingtext" class="text-center">
|
||||
<p class="mb-0 mt-2">Next halving in {{this.halvingtext}}</p>
|
||||
<p class="mb-0 mt-3 mb-2 havlingtext">Next <span class="big-epic">EPIC</span> halving in <span><span class="big-epic">{{this.halvingtext}}</span><br><span class="havlingtime"> DAYS HOURS MINUTES</span></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 col-md-4">
|
||||
@ -108,9 +108,9 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-6 drawline">
|
||||
<div class="col-6 drawline" #odometer>
|
||||
<p class="block_heading">{{ "home.LATEST_BLOCK_AGE" | translate }}</p>
|
||||
<p class="block_value_v2 medtxtwid" [ngClass]="latestblockdetail.blink == true ? 'item-highlight' : ''">
|
||||
<p class="block_value_v2 medtxtwid latestblockarea" [ngClass]="latestblockdetail.blink == true ? 'item-highlight' : ''">
|
||||
<ng2-odometer [number]="Block_latest" [config]="{ }"></ng2-odometer>
|
||||
<!-- {{ latestblockdetail.letest_block_num | number }} -->
|
||||
</p>
|
||||
|
@ -39,9 +39,11 @@ export class BlockDetailListComponent implements OnInit {
|
||||
timeout_8;
|
||||
timeout_9;
|
||||
timeout_10;
|
||||
timeout_11;
|
||||
halvingtext;
|
||||
havlingTimer;
|
||||
@ViewChild("minhgt", { static: false }) elementView: ElementRef;
|
||||
@ViewChild("odometer", { static: false }) odometerRef: ElementRef;
|
||||
|
||||
minHeight: number;
|
||||
apiInterval;
|
||||
@ -138,6 +140,7 @@ export class BlockDetailListComponent implements OnInit {
|
||||
let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
let seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
let text = "";
|
||||
let text2 = days +':'+ ('0' + hours).slice(-2) +':'+ ('0' + minutes).slice(-2);
|
||||
if(days == 1){
|
||||
text = "1 day ";
|
||||
}else if (days > 1){
|
||||
@ -153,7 +156,7 @@ export class BlockDetailListComponent implements OnInit {
|
||||
}else if (minutes > 1){
|
||||
text = text + minutes+" minutes ";
|
||||
}
|
||||
this.halvingtext = text;
|
||||
this.halvingtext = text2;
|
||||
}, 5 * 1000);
|
||||
}
|
||||
public parseDays (value) {
|
||||
@ -298,6 +301,18 @@ export class BlockDetailListComponent implements OnInit {
|
||||
}, 5*1000);
|
||||
this.timeout_2 = setTimeout(() => {
|
||||
this.Block_latest = res.response.letest_block_num;
|
||||
this.timeout_11 =setTimeout(() => {
|
||||
console.log('000');
|
||||
const odometerElement = this.odometerRef.nativeElement;
|
||||
const digitElement = odometerElement.querySelector('.latestblockarea .odometer-inside span.odometer-digit:first-child span.odometer-digit-inner span.odometer-value');
|
||||
const digitElementToHide = odometerElement.querySelector('.latestblockarea .odometer-inside span.odometer-digit:first-child');
|
||||
console.log(digitElement);
|
||||
console.log('111-'+digitElement.innerText);
|
||||
if (digitElement.innerText == '0') {
|
||||
digitElementToHide.style.display = 'none';
|
||||
console.log('222');
|
||||
}
|
||||
}, 4000);
|
||||
}, 10*1000);
|
||||
this.timeout_3 = setTimeout(() => {
|
||||
this.Block_supply = res.response.coin_existence;
|
||||
@ -349,6 +364,8 @@ export class BlockDetailListComponent implements OnInit {
|
||||
clearTimeout(this.timeout_7);
|
||||
clearTimeout(this.timeout_8);
|
||||
clearTimeout(this.timeout_9);
|
||||
clearTimeout(this.timeout_10);
|
||||
clearTimeout(this.timeout_11);
|
||||
|
||||
this.latestblockdetailObservable
|
||||
? this.latestblockdetailObservable.unsubscribe()
|
||||
|
@ -20,6 +20,25 @@ body {
|
||||
max-width: 75%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.big-epic {
|
||||
font-size: 36px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #bf9b32;
|
||||
padding: 0px 5px;
|
||||
height: 30px;
|
||||
}
|
||||
.havlingtext {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.havlingtime {
|
||||
color: #bf9b32;
|
||||
font-size: 10px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
}
|
||||
.text_underline{text-decoration: underline;color: #BF9B30}
|
||||
a, .privacy_txt a { color: #BF9B30}
|
||||
a:hover,
|
||||
@ -913,6 +932,12 @@ p.block_heading {
|
||||
}
|
||||
|
||||
@media(max-width:767px){
|
||||
.big-epic {
|
||||
font-size: 32px;
|
||||
}
|
||||
.havlingtime {
|
||||
font-size: 9px;
|
||||
}
|
||||
.countdownbox span{ display: block;}
|
||||
.countdownbox .count{white-space: normal; text-overflow: inherit; overflow: visible; font-size: 25px;}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user