diff --git a/frontend/src/app/components/fees-box/fees-box.component.scss b/frontend/src/app/components/fees-box/fees-box.component.scss
index 460db5e4b..fe4e0161d 100644
--- a/frontend/src/app/components/fees-box/fees-box.component.scss
+++ b/frontend/src/app/components/fees-box/fees-box.component.scss
@@ -1,7 +1,7 @@
.card-title {
color: #4a68b9;
font-size: 10px;
- margin-bottom: 4px;
+ margin-bottom: 4px;
font-size: 1rem;
}
@@ -21,28 +21,22 @@
.fee-estimation-container {
display: flex;
justify-content: space-between;
- @media (min-width: 376px) {
- flex-direction: row;
- }
+ flex-direction: row;
.item {
- max-width: 150px;
+ width: 100px;
margin: 0;
width: -webkit-fill-available;
- @media (min-width: 376px) {
- margin: 0 auto 0px;
- }
- &:first-child{
- display: none;
- @media (min-width: 485px) {
- display: block;
- }
- @media (min-width: 768px) {
- display: none;
- }
- @media (min-width: 992px) {
- display: block;
- }
+ &:first-child {
+ @media (767px < width < 992px), (width < 576px) {
+ display: none
+ }
}
+ &:nth-child(2) {
+ @media (767px < width < 992px), (width < 576px) {
+ display: none
+ }
+ }
+ margin: 0 auto 0px;
&:last-child {
margin-bottom: 0;
}
@@ -55,18 +49,17 @@
border-bottom: 1px solid #ffffff1c;
width: fit-content;
margin: auto;
- line-height: 1.45;
- padding: 0px 2px;
+ font-size: 20px;
}
.fiat {
display: block;
- font-size: 14px !important;
+ font-size: 13px !important;
}
}
}
.loading-container{
- min-height: 76px;
+ height: 50px;
}
.card-text {
@@ -74,12 +67,40 @@
width: 100%;
display: block;
&:first-child {
- max-width: 90px;
- margin: 15px auto 3px;
+ max-width: 70px;
+ margin: 10px auto 3px;
}
&:last-child {
margin: 10px auto 3px;
max-width: 55px;
}
}
+}
+
+.fee-progress-bar {
+ width: 100%;
+ height: 22px;
+ margin-bottom: 12px;
+ border-radius: 0px 10px 10px 0px;
+ display: flex;
+ flex-direction: row;
+ transition: background-color 1s;
+}
+
+.fee-label {
+ font-size: 14px;
+ width: 20%;
+ @media (767px < width < 992px), (width < 576px) {
+ width: 33%;
+ }
+ &:first-child {
+ @media (767px < width < 992px), (width < 576px) {
+ display: none
+ }
+ }
+ &:nth-child(2) {
+ @media (767px < width < 992px), (width < 576px) {
+ display: none
+ }
+ }
}
\ No newline at end of file
diff --git a/frontend/src/app/components/fees-box/fees-box.component.ts b/frontend/src/app/components/fees-box/fees-box.component.ts
index e93397bec..76cf03a4f 100644
--- a/frontend/src/app/components/fees-box/fees-box.component.ts
+++ b/frontend/src/app/components/fees-box/fees-box.component.ts
@@ -1,14 +1,9 @@
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { StateService } from 'src/app/services/state.service';
-import { map, filter, tap } from 'rxjs/operators';
-import { merge, Observable } from 'rxjs';
-import { MempoolBlock, Recommendedfees } from 'src/app/interfaces/websocket.interface';
-
-interface FeeEstimations {
- fastestFee: number;
- halfHourFee: number;
- hourFee: number;
-}
+import { Observable } from 'rxjs';
+import { Recommendedfees } from 'src/app/interfaces/websocket.interface';
+import { feeLevels, mempoolFeeColors } from 'src/app/app.constants';
+import { tap } from 'rxjs/operators';
@Component({
selector: 'app-fees-box',
@@ -19,16 +14,28 @@ interface FeeEstimations {
export class FeesBoxComponent implements OnInit {
isLoadingWebSocket$: Observable
;
recommendedFees$: Observable;
- defaultFee: number;
+ gradient = 'linear-gradient(to right, #2e324e, #2e324e)';
constructor(
- private stateService: StateService,
+ private stateService: StateService
) { }
ngOnInit(): void {
- this.defaultFee = this.stateService.network === 'liquid' || this.stateService.network === 'liquidtestnet' ? 0.1 : 1;
-
this.isLoadingWebSocket$ = this.stateService.isLoadingWebSocket$;
- this.recommendedFees$ = this.stateService.recommendedFees$;
+ this.recommendedFees$ = this.stateService.recommendedFees$
+ .pipe(
+ tap((fees) => {
+ let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => fees.minimumFee >= feeLvl);
+ feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
+ const startColor = '#' + (mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
+
+ feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => fees.fastestFee >= feeLvl);
+ feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
+ const endColor = '#' + (mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
+
+ this.gradient = `linear-gradient(to right, ${startColor}, ${endColor})`;
+ }
+ )
+ );
}
}
diff --git a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
index a4bd584f3..0019c8a44 100644
--- a/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
+++ b/frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
@@ -238,7 +238,6 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
gradientColors.push(mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
});
-
gradientColors.forEach((color, i, gc) => {
backgroundGradients.push(`
#${i === 0 ? color : gc[i - 1]} ${ i === 0 ? emptyBackgroundSpacePercentage : ((i / gradientColors.length) * 100) * usedBlockSpace / 100 + emptyBackgroundSpacePercentage }%,
diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss
index 72332602b..3ee108d9d 100644
--- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss
+++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss
@@ -64,7 +64,7 @@
}
.more-padding {
- padding: 18px;
+ padding: 24px 20px !important;
}
.card-wrapper {
diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html
index d26b6660a..99ae4a301 100644
--- a/frontend/src/app/dashboard/dashboard.component.html
+++ b/frontend/src/app/dashboard/dashboard.component.html
@@ -5,7 +5,7 @@
Transaction Fees
-
@@ -33,7 +33,7 @@
Transaction Fees
-
diff --git a/frontend/src/app/dashboard/dashboard.component.scss b/frontend/src/app/dashboard/dashboard.component.scss
index e6ddb5f84..81e7a671d 100644
--- a/frontend/src/app/dashboard/dashboard.component.scss
+++ b/frontend/src/app/dashboard/dashboard.component.scss
@@ -269,6 +269,9 @@
justify-content: space-around;
padding: 22px 20px;
}
+ .less-padding {
+ padding: 20px 20px;
+ }
}
.retarget-sign {