diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html index 1cf14a54d..34d0b9556 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html @@ -1,6 +1,41 @@ -@if (tx.status.confirmed) { -
+
+ @if (!tx.status.confirmed) { +
+
+
+
+
+
+
+ @if (eta) { + ~ + } +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
Mined
+
+
+
+ }
@@ -12,7 +47,13 @@
- + @if (tx.status.confirmed) { +
+ +
+ } @else if (standardETA && !tx.status.confirmed) { + + }
@@ -25,128 +66,71 @@
First seen
- + @if (useAbsoluteTime) { + {{ transactionTime * 1000 | date }} + } @else { + + }
-
+
-
-
+ @if (tx.status.confirmed) { +
+ } @else { +
+ } +
+ @if (!tx.status.confirmed) { +
+ }
-
Accelerated
-
- + @if (tx.status.confirmed) { +
Accelerated
+ } +
+ @if (!tx.status.confirmed) { + Accelerated{{ "" }} + } + @if (useAbsoluteTime) { + {{ acceleratedAt * 1000 | date }} + } @else { + + }
+ @if (tx.status.confirmed) {
+ } @else { +
+ }
-
-
-
+
+ @if (tx.status.confirmed) { +
+ } @else { +
+ } +
+ @if (tx.status.confirmed) {
Mined
+ @if (useAbsoluteTime) { + {{ tx.status.block_time * 1000 | date }} + } @else { + }
+ }
-
+
-} @else if (acceleratedETA) { -} @else if (standardETA) { -
-
-
-
-
-
-
-
-
- @if (eta) { - ~ - } -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Mined
-
-
-
-
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
First seen
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- Accelerated  -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-} \ No newline at end of file diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss index dd815ba45..93a0cdba1 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss @@ -209,7 +209,7 @@ } .status { - margin-top: -64px; + margin-top: -66px; .badge.badge-waiting { opacity: 0.5; @@ -224,10 +224,20 @@ } .time { - margin-top: 33px; + margin-top: 32px; font-size: 12px; line-height: 16px; white-space: nowrap; + + &.offset-left { + @media (max-width: 650px) { + margin-left: -20px; + } + } + + &.no-margin { + margin-top: 0px; + } } } } diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts index 38d48dd05..df4de1f20 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts @@ -19,15 +19,22 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges { acceleratedAt: number; now: number; accelerateRatio: number; + useAbsoluteTime: boolean = false; constructor() {} ngOnInit(): void { this.acceleratedAt = this.tx.acceleratedAt ?? new Date().getTime() / 1000; + this.now = Math.floor(new Date().getTime() / 1000); + this.useAbsoluteTime = this.tx.status.block_time < this.now - 7 * 24 * 3600; + + window.setInterval(() => { + this.now = Math.floor(new Date().getTime() / 1000); + this.useAbsoluteTime = this.tx.status.block_time < this.now - 7 * 24 * 3600; + }, 60000); } ngOnChanges(changes): void { - this.now = Math.floor(new Date().getTime() / 1000); // Hide standard ETA while we don't have a proper standard ETA calculation, see https://github.com/mempool/mempool/issues/65 // if (changes?.eta?.currentValue || changes?.standardETA?.currentValue || changes?.acceleratedETA?.currentValue) { diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 22916b242..e9b2d8f19 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -640,7 +640,9 @@
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) { - + @if (tx.effectiveFeePerVsize) { + + } } @else { }