Replace more hardcoded css
This commit is contained in:
@@ -62,7 +62,7 @@ h5 {
|
||||
|
||||
.card-title {
|
||||
font-size: 1rem;
|
||||
color: #4a68b9;
|
||||
color: var(--title-fg);
|
||||
}
|
||||
|
||||
.disabled {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.card-title {
|
||||
color: #4a68b9;
|
||||
color: var(--title-fg);
|
||||
font-size: 10px;
|
||||
margin-bottom: 4px;
|
||||
font-size: 1rem;
|
||||
|
||||
@@ -59,7 +59,7 @@ tr, td, th {
|
||||
}
|
||||
|
||||
.progress {
|
||||
background-color: #2d3348;
|
||||
background-color: var(--secondary);
|
||||
}
|
||||
|
||||
.txid {
|
||||
@@ -148,7 +148,7 @@ tr, td, th {
|
||||
|
||||
.tooltip-custom .tooltiptext {
|
||||
visibility: hidden;
|
||||
color: #fff;
|
||||
color: var(--fg);
|
||||
text-align: center;
|
||||
padding: 5px 0;
|
||||
border-radius: 6px;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<a class="title-link" href="" [routerLink]="['/mempool-block/0' | relativeUrl]">
|
||||
<h5 class="card-title d-inline" i18n="dashboard.mempool-goggles-accelerations">Mempool Goggles: Accelerations</h5>
|
||||
<span> </span>
|
||||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: #4a68b9"></fa-icon>
|
||||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: var(--title-fg)"></fa-icon>
|
||||
</a>
|
||||
<div class="mempool-block-wrapper" *ngIf="webGlEnabled">
|
||||
<app-mempool-block-overview [index]="0" [overrideColors]="getAcceleratorColor"></app-mempool-block-overview>
|
||||
@@ -85,7 +85,7 @@
|
||||
<a class="title-link" href="" [routerLink]="['/acceleration/list' | relativeUrl]">
|
||||
<h5 class="card-title d-inline" i18n="dashboard.recent-accelerations">Recent Accelerations</h5>
|
||||
<span> </span>
|
||||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: #4a68b9"></fa-icon>
|
||||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: var(--title-fg)"></fa-icon>
|
||||
</a>
|
||||
<app-accelerations-list [attr.data-cy]="'recent-accelerations'" [widget]=true [accelerations$]="minedAccelerations$"></app-accelerations-list>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #1d1f31;
|
||||
background-color: var(--bg);
|
||||
}
|
||||
|
||||
.graph-card {
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
.card-title {
|
||||
font-size: 1rem;
|
||||
color: #4a68b9;
|
||||
color: var(--title-fg);
|
||||
}
|
||||
.card-title > a {
|
||||
color: #4a68b9;
|
||||
color: var(--title-fg);
|
||||
}
|
||||
|
||||
.card-body.pool-ranking {
|
||||
|
||||
@@ -8,12 +8,14 @@ import { Observable, catchError, combineLatest, distinctUntilChanged, interval,
|
||||
import { Color } from '../../block-overview-graph/sprite-types';
|
||||
import { hexToColor } from '../../block-overview-graph/utils';
|
||||
import TxView from '../../block-overview-graph/tx-view';
|
||||
import { feeLevels, defaultMempoolFeeColors } from '../../../app.constants';
|
||||
import { feeLevels, defaultMempoolFeeColors, contrastMempoolFeeColors } from '../../../app.constants';
|
||||
import { ServicesApiServices } from '../../../services/services-api.service';
|
||||
import { detectWebGL } from '../../../shared/graphs.utils';
|
||||
import { ThemeService } from '../../../services/theme.service';
|
||||
|
||||
const acceleratedColor: Color = hexToColor('8F5FF6');
|
||||
const normalColors = defaultMempoolFeeColors.map(hex => hexToColor(hex + '5F'));
|
||||
const contrastColors = contrastMempoolFeeColors.map(hex => hexToColor(hex + '5F'));
|
||||
|
||||
interface AccelerationBlock extends BlockExtended {
|
||||
accelerationCount: number,
|
||||
@@ -34,6 +36,7 @@ export class AcceleratorDashboardComponent implements OnInit {
|
||||
webGlEnabled = true;
|
||||
|
||||
graphHeight: number = 300;
|
||||
theme: ThemeService;
|
||||
|
||||
constructor(
|
||||
private seoService: SeoService,
|
||||
@@ -128,7 +131,7 @@ export class AcceleratorDashboardComponent implements OnInit {
|
||||
} else {
|
||||
const rate = tx.fee / tx.vsize; // color by simple single-tx fee rate
|
||||
const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(1, rate) < feeLvl) - 1;
|
||||
return normalColors[feeLevelIndex] || normalColors[defaultMempoolFeeColors.length - 1];
|
||||
return this.theme.theme === 'contrast' ? contrastColors[feeLevelIndex] || contrastColors[contrastColors.length - 1] : normalColors[feeLevelIndex] || normalColors[normalColors.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.card-title {
|
||||
color: #4a68b9;
|
||||
color: var(--title-fg);
|
||||
font-size: 10px;
|
||||
margin-bottom: 4px;
|
||||
font-size: 1rem;
|
||||
|
||||
Reference in New Issue
Block a user